Todos los componentes del NIVEL 2 ya están implementados correctamente: - ✅ Notification Bar (#49) - ✅ Navbar (#50) - ✅ Hero Section (#51) - ✅ Sidebar (#52) - ✅ Footer (#53) Solo se actualizó notification-bar.css para usar variables CSS. Próximo paso: NIVEL 3 (Refinamientos visuales) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
5 lines
1012 B
Plaintext
5 lines
1012 B
Plaintext
define(['ko','../template/renderer'],function(ko,renderer){'use strict';ko.bindingHandlers.simpleChecked={'after':['attr'],init:function(element,valueAccessor){var isCheckbox=element.type==='checkbox',isRadio=element.type==='radio',updateView,updateModel;if(!isCheckbox&&!isRadio){return;}
|
|
updateModel=function(){var modelValue=ko.dependencyDetection.ignore(valueAccessor),isChecked=element.checked;if(ko.computedContext.isInitial()){return;}
|
|
if(modelValue.peek()===isChecked){return;}
|
|
if(isRadio&&!isChecked){return;}
|
|
modelValue(isChecked);};updateView=function(){var modelValue=ko.utils.unwrapObservable(valueAccessor());element.checked=!!modelValue;};ko.utils.registerEventHandler(element,'change',updateModel);ko.computed(updateModel,null,{disposeWhenNodeIsRemoved:element});ko.computed(updateView,null,{disposeWhenNodeIsRemoved:element});}};ko.expressionRewriting._twoWayBindings.simpleChecked=true;renderer.addAttribute('simpleChecked');renderer.addAttribute('simple-checked',{binding:'simpleChecked'});}); |