Sha256: c4c7557a542d5fbf289d8c69930d332a8ff2e91582c256a86dfdafd9e3a5d897

Contents?: true

Size: 1.76 KB

Versions: 1

Compression:

Stored size: 1.76 KB

Contents

Appcelerator.Module.Security={eventReceived:null,getName:function(){return"appcelerator security"},getDescription:function(){return"security widget"},getVersion:function(){return 1},getSpecVersion:function(){return 1},getAuthor:function(){return"Jeff Haynie"},getModuleURL:function(){return"http://www.appcelerator.org"},isWidget:function(){return true},getWidgetName:function(){return"app:security"},execute:function(E,A,D,C,B){Appcelerator.Module.Security.securityCode=A["code"].toFunction(true);Appcelerator.Module.Security.eventReceived={data:D,scope:C,version:B};Appcelerator.Module.Security.executeSecurity()},getAttributes:function(){return[{name:"on",optional:true,description:"May be used to execute the widget"}]},executeSecurity:function(){$$("*[security]").each(function(B){Appcelerator.Module.Security.eventReceived.element=B;Appcelerator.Module.Security.eventReceived.roles=Appcelerator.Module.Security.eventReceived.element.getAttribute("security").split(",");var A=Appcelerator.Module.Security.securityCode.call(Appcelerator.Module.Security.eventReceived);if(A!=true){B.style.display="none";B.setAttribute("_compilerRemoved","true")}});$$("*[_compilerRemoved]").each(function(A){Element.remove(A)})},buildWidget:function(A,C){var B=Appcelerator.Compiler.getHtml(A);if(B&&B.trim().length>0){if(C["on"]){C["code"]=String.unescapeXML(B);return{"position":Appcelerator.Compiler.POSITION_REMOVE,"parameters":C,"functions":["execute"]}}else{return{"position":Appcelerator.Compiler.POSITION_REMOVE,"presentation":"Error: security widget requires on attribute to execute"}}}return{"position":Appcelerator.Compiler.POSITION_REPLACE,"presentation":"Error: security widget requires code inside tag for implementation"}}};Appcelerator.Core.registerModule("app:security",Appcelerator.Module.Security)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
appcelerator-2.0.1.1 appcelerator/templates/modules/app_security/app_security.js