]> jfr.im git - z_archive/KronOS.git/commitdiff
Added test code for javascripting in default/users app
authorJohn Runyon <redacted>
Sun, 3 Nov 2013 17:43:51 +0000 (17:43 +0000)
committerJohn Runyon <redacted>
Sun, 3 Nov 2013 17:43:51 +0000 (17:43 +0000)
kosapps/default/users.php
public/js/application.js

index 25a9a0229f7d8377958be734c37d34b2b29cfa1f..0ea616f682436295aa4a2deeb2f01cb6a6be7f18 100644 (file)
@@ -21,6 +21,11 @@ class User_Manager extends KOS_App {
        public function windowTitle() {
                return "User Manager";
        }
+
+       public static function scripts($aid) {
+               return 'wos.appscripts['.$aid.'] = {load: function(t){this.target = t; $(t).append("<p><var>"+t+"</var></p>");}};';
+       }
+
        public function windowContents() {
                return <<<EOF
 <em>User Manager!</em>
index 4999a602b16612be2a1354a8e321ea43cb1268f5..a5ef12c8b0d4e668ba7489ed5714536613683b72 100644 (file)
                                        wos.apps[repl.id] = {aid: appid, instance: repl.id, title: repl.title, target: target};
 
                                        $.getScript('control/scripts/'+appid, function() {
-                                               wos.appscripts[appid].load(target);
+                                               wos.appscripts[appid].load(target+' > .modal-body');
                                        });
 
                                        $('body').append('<div id="'+repl.name+repl.id+'" class="app modal hide fade"></div>');