- Timestamp:
- 08/08/08 10:47:29 (5 months ago)
- Files:
-
- branches/jsspike-20080806/microfacts/Rantfile (deleted)
- branches/jsspike-20080806/microfacts/__init__.py (modified) (1 diff)
- branches/jsspike-20080806/microfacts/public/all.compressed.js (added)
- branches/jsspike-20080806/microfacts/public/all.js (added)
- branches/jsspike-20080806/microfacts/public/app/models/factlet.js (deleted)
- branches/jsspike-20080806/microfacts/public/app/models/thread.js (deleted)
- branches/jsspike-20080806/microfacts/public/assets/behaviour/vendor/diff_match_patch.js (deleted)
- branches/jsspike-20080806/microfacts/public/assets/images/icons/emblem-documents.png (deleted)
- branches/jsspike-20080806/microfacts/public/assets/jsinclude.txt (deleted)
- branches/jsspike-20080806/microfacts/public/assets/style/display.css (deleted)
- branches/jsspike-20080806/microfacts/public/assets/style/forms.css (deleted)
- branches/jsspike-20080806/microfacts/public/assets/style/master.css (deleted)
- branches/jsspike-20080806/microfacts/public/assets/style/navigation.css (deleted)
- branches/jsspike-20080806/microfacts/public/assets/style/print.css (deleted)
- branches/jsspike-20080806/microfacts/public/assets/style/reset.css (deleted)
- branches/jsspike-20080806/microfacts/public/assets/style/typography.css (deleted)
- branches/jsspike-20080806/microfacts/public/images/bottom-grad-alpha.png (moved) (moved from branches/jsspike-20080806/microfacts/public/assets/images/bottom-grad-alpha.png)
- branches/jsspike-20080806/microfacts/public/images/dogear.png (moved) (moved from branches/jsspike-20080806/microfacts/public/assets/images/dogear.png)
- branches/jsspike-20080806/microfacts/public/images/icons (added)
- branches/jsspike-20080806/microfacts/public/images/icons/factlet_edit.png (added)
- branches/jsspike-20080806/microfacts/public/images/icons/factlet_stack.png (added)
- branches/jsspike-20080806/microfacts/public/images/icons/thread_add.png (added)
- branches/jsspike-20080806/microfacts/public/images/icons/thread_edit.png (added)
- branches/jsspike-20080806/microfacts/public/images/icons/thread_stack.png (added)
- branches/jsspike-20080806/microfacts/public/images/thread-block.png (moved) (moved from branches/jsspike-20080806/microfacts/public/assets/images/thread-block.png)
- branches/jsspike-20080806/microfacts/public/images/top-grad.png (moved) (moved from branches/jsspike-20080806/microfacts/public/assets/images/top-grad.png)
- branches/jsspike-20080806/microfacts/public/spec/coverage.html (deleted)
- branches/jsspike-20080806/microfacts/public/spec/index.html (deleted)
- branches/jsspike-20080806/microfacts/public/style (added)
- branches/jsspike-20080806/microfacts/public/style/Rakefile (added)
- branches/jsspike-20080806/microfacts/public/style/ie.css (added)
- branches/jsspike-20080806/microfacts/public/style/print.css (added)
- branches/jsspike-20080806/microfacts/public/style/sass (added)
- branches/jsspike-20080806/microfacts/public/style/sass/base (added)
- branches/jsspike-20080806/microfacts/public/style/sass/base/buttons.sass (added)
- branches/jsspike-20080806/microfacts/public/style/sass/base/colours.sass (added)
- branches/jsspike-20080806/microfacts/public/style/sass/base/forms.sass (added)
- branches/jsspike-20080806/microfacts/public/style/sass/base/mixins.sass (added)
- branches/jsspike-20080806/microfacts/public/style/sass/base/reset.sass (added)
- branches/jsspike-20080806/microfacts/public/style/sass/base/typography.sass (added)
- branches/jsspike-20080806/microfacts/public/style/sass/ie.sass (added)
- branches/jsspike-20080806/microfacts/public/style/sass/microfacts (added)
- branches/jsspike-20080806/microfacts/public/style/sass/microfacts/colours.sass (added)
- branches/jsspike-20080806/microfacts/public/style/sass/microfacts/display.sass (added)
- branches/jsspike-20080806/microfacts/public/style/sass/microfacts/navigation.sass (added)
- branches/jsspike-20080806/microfacts/public/style/sass/print.sass (added)
- branches/jsspike-20080806/microfacts/public/style/sass/screen.sass (added)
- branches/jsspike-20080806/microfacts/public/style/screen.css (added)
- branches/jsspike-20080806/microfacts/public/templates (added)
- branches/jsspike-20080806/microfacts/public/vendor/README.txt (deleted)
- branches/jsspike-20080806/microfacts/public/vendor/compress.html (deleted)
- branches/jsspike-20080806/microfacts/public/vendor/compress.js (deleted)
- branches/jsspike-20080806/microfacts/public/vendor/ejs/ejs.js (modified) (19 diffs)
- branches/jsspike-20080806/microfacts/public/vendor/ejs/view.js (modified) (13 diffs)
- branches/jsspike-20080806/microfacts/public/vendor/include.js (deleted)
- branches/jsspike-20080806/microfacts/public/vendor/mootools-1.2-core.js (added)
- branches/jsspike-20080806/microfacts/public/vendor/mootools-trunk-1515.js (deleted)
- branches/jsspike-20080806/microfacts/public/vendor/mootools-trunk-1516.js (deleted)
- branches/jsspike-20080806/microfacts/script/.gitignore (added)
- branches/jsspike-20080806/microfacts/script/Rakefile (added)
- branches/jsspike-20080806/microfacts/script/all.js (added)
- branches/jsspike-20080806/microfacts/script/app (added)
- branches/jsspike-20080806/microfacts/script/app/controller.js (added)
- branches/jsspike-20080806/microfacts/script/app/master.js (moved) (moved from branches/jsspike-20080806/microfacts/public/app/master.js) (2 diffs)
- branches/jsspike-20080806/microfacts/script/app/model.js (added)
- branches/jsspike-20080806/microfacts/script/app/templates (added)
- branches/jsspike-20080806/microfacts/script/app/templates/factlet (added)
- branches/jsspike-20080806/microfacts/script/app/templates/factlet/description-update-form.ejs (moved) (moved from branches/jsspike-20080806/microfacts/public/app/views/factlet/description-update-form.ejs)
- branches/jsspike-20080806/microfacts/script/app/templates/factlet/description.ejs (moved) (moved from branches/jsspike-20080806/microfacts/public/app/views/factlet/description.ejs)
- branches/jsspike-20080806/microfacts/script/app/templates/factlet/factlet.ejs (moved) (moved from branches/jsspike-20080806/microfacts/public/app/views/factlet/factlet.ejs)
- branches/jsspike-20080806/microfacts/script/app/templates/factlet/title-update-form.ejs (moved) (moved from branches/jsspike-20080806/microfacts/public/app/views/factlet/title-update-form.ejs)
- branches/jsspike-20080806/microfacts/script/app/templates/factlet/title.ejs (moved) (moved from branches/jsspike-20080806/microfacts/public/app/views/factlet/title.ejs)
- branches/jsspike-20080806/microfacts/script/app/templates/thread (added)
- branches/jsspike-20080806/microfacts/script/app/templates/thread/factlet-list.ejs (moved) (moved from branches/jsspike-20080806/microfacts/public/app/views/thread/factlet-list.ejs)
- branches/jsspike-20080806/microfacts/script/app/view.js (added)
- branches/jsspike-20080806/microfacts/script/appold (added)
- branches/jsspike-20080806/microfacts/script/appold/controllers (added)
- branches/jsspike-20080806/microfacts/script/appold/controllers/deck_controller.js (moved) (moved from branches/jsspike-20080806/microfacts/public/app/controllers/deck_controller.js) (1 diff)
- branches/jsspike-20080806/microfacts/script/appold/controllers/factlet_controller.js (moved) (moved from branches/jsspike-20080806/microfacts/public/app/controllers/factlet_controller.js) (1 diff)
- branches/jsspike-20080806/microfacts/script/appold/controllers/factlet_info_controller.js (moved) (moved from branches/jsspike-20080806/microfacts/public/app/controllers/factlet_info_controller.js) (1 diff)
- branches/jsspike-20080806/microfacts/script/appold/controllers/factlet_search_controller.js (moved) (moved from branches/jsspike-20080806/microfacts/public/app/controllers/factlet_search_controller.js) (1 diff)
- branches/jsspike-20080806/microfacts/script/appold/controllers/thread_controller.js (moved) (moved from branches/jsspike-20080806/microfacts/public/app/controllers/thread_controller.js) (1 diff)
- branches/jsspike-20080806/microfacts/script/appold/controllers/thread_timeline_controller.js (moved) (moved from branches/jsspike-20080806/microfacts/public/app/controllers/thread_timeline_controller.js) (1 diff)
- branches/jsspike-20080806/microfacts/script/appold/master.js (copied) (copied from branches/jsspike-20080806/microfacts/public/app/master.js) (2 diffs)
- branches/jsspike-20080806/microfacts/script/appold/models (added)
- branches/jsspike-20080806/microfacts/script/appold/models/factlet.js (added)
- branches/jsspike-20080806/microfacts/script/appold/models/thread.js (added)
- branches/jsspike-20080806/microfacts/script/appold/specs (added)
- branches/jsspike-20080806/microfacts/script/appold/specs/application_controller_spec.js (added)
- branches/jsspike-20080806/microfacts/script/appold/specs/controller_spec.js (moved) (moved from branches/jsspike-20080806/microfacts/public/spec/lib/controller_spec.js)
- branches/jsspike-20080806/microfacts/script/appold/specs/deck_spec.js (moved) (moved from branches/jsspike-20080806/microfacts/public/spec/lib/deck_spec.js)
- branches/jsspike-20080806/microfacts/script/appold/specs/model_spec.js (moved) (moved from branches/jsspike-20080806/microfacts/public/spec/lib/model_spec.js)
- branches/jsspike-20080806/microfacts/script/files_list.txt (deleted)
- branches/jsspike-20080806/microfacts/script/include.rb (deleted)
- branches/jsspike-20080806/microfacts/script/jslint.js (deleted)
- branches/jsspike-20080806/microfacts/script/lib (added)
- branches/jsspike-20080806/microfacts/script/lib/controller.js (moved) (moved from branches/jsspike-20080806/microfacts/public/app/lib/controller.js)
- branches/jsspike-20080806/microfacts/script/lib/deck.js (moved) (moved from branches/jsspike-20080806/microfacts/public/app/lib/deck.js) (1 diff)
- branches/jsspike-20080806/microfacts/script/lib/extensions.js (moved) (moved from branches/jsspike-20080806/microfacts/public/app/lib/extensions.js)
- branches/jsspike-20080806/microfacts/script/lib/microfactsdeck.js (moved) (moved from branches/jsspike-20080806/microfacts/public/app/lib/microfactsdeck.js) (1 diff)
- branches/jsspike-20080806/microfacts/script/lib/model.js (moved) (moved from branches/jsspike-20080806/microfacts/public/app/lib/model.js)
- branches/jsspike-20080806/microfacts/script/lib/timeline.js (moved) (moved from branches/jsspike-20080806/microfacts/public/app/lib/timeline.js)
- branches/jsspike-20080806/microfacts/script/readme.txt (deleted)
- branches/jsspike-20080806/microfacts/script/spec (added)
- branches/jsspike-20080806/microfacts/script/spec/URLS (added)
- branches/jsspike-20080806/microfacts/script/spec/all_spec.js (added)
- branches/jsspike-20080806/microfacts/script/spec/jsspec (added)
- branches/jsspike-20080806/microfacts/script/spec/jsspec/JSSpec.css (moved) (moved from branches/jsspike-20080806/microfacts/public/assets/style/vendor/jsspec.css) (3 diffs)
- branches/jsspike-20080806/microfacts/script/spec/jsspec/JSSpec.js (moved) (moved from branches/jsspike-20080806/microfacts/public/assets/behaviour/vendor/jsspec.js) (62 diffs, 1 prop)
- branches/jsspike-20080806/microfacts/script/spec/jsspec/diff_match_patch.js (added)
- branches/jsspike-20080806/microfacts/script/spec/runner.html (added)
- branches/jsspike-20080806/microfacts/script/spec/specs (added)
- branches/jsspike-20080806/microfacts/script/spec/specs/controller_spec.js (added)
- branches/jsspike-20080806/microfacts/script/spec/specs/model_spec.js (added)
- branches/jsspike-20080806/microfacts/script/spec/specs/view_spec.js (added)
- branches/jsspike-20080806/microfacts/script/vendor (added)
- branches/jsspike-20080806/microfacts/script/vendor/jslint.js (moved) (moved from branches/jsspike-20080806/microfacts/public/vendor/ejs/ejs_fulljslint.js) (154 diffs)
- branches/jsspike-20080806/microfacts/script/vendor/rhino (added)
- branches/jsspike-20080806/microfacts/script/vendor/rhino/js.jar (moved) (moved from branches/jsspike-20080806/microfacts/script/js.jar)
- branches/jsspike-20080806/microfacts/script/yuicompressor-2.2.4.jar (deleted)
- branches/jsspike-20080806/microfacts/templates/home.html (modified) (2 diffs)
- branches/jsspike-20080806/microfacts/templates/layout.html (modified) (3 diffs)
- branches/jsspike-20080806/microfacts/templates/thread/layout.html (modified) (1 diff)
- branches/jsspike-20080806/microfacts/templates/thread/new.html (modified) (1 diff)
- branches/jsspike-20080806/microfacts/templates/thread/read.html (modified) (1 diff)
- branches/jsspike-20080806/setup.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/jsspike-20080806/microfacts/__init__.py
r2 r117 1 __version__ = '0.2' branches/jsspike-20080806/microfacts/public/vendor/ejs/ejs.js
r52 r117 9 9 * EJS is a client-side preprocessing engine written in and for JavaScript. 10 10 * If you have used PHP, ASP, JSP, or ERB then you get the idea: code embedded 11 * in <% // Code here %> tags will be executed, and code embedded in <%= .. %> 12 * tags will be evaluated and appended to the output. 13 * 14 * This is essentially a direct JavaScript port of Masatoshi Seki's erb.rb 15 * from the Ruby Core, though it contains a subset of ERB's functionality. 16 * 11 * in <% // Code here %> tags will be executed, and code embedded in <%= .. %> 12 * tags will be evaluated and appended to the output. 13 * 14 * This is essentially a direct JavaScript port of Masatoshi Seki's erb.rb 15 * from the Ruby Core, though it contains a subset of ERB's functionality. 16 * 17 17 * Requirements: 18 18 * prototype.js 19 * 19 * 20 20 * Usage: 21 21 * // source should be either a string or a DOM node whose innerHTML 22 22 * // contains EJB source. 23 * var source = "<% var ejb="EJB"; %><h1>Hello, <%= ejb %>!</h1>"; 24 * var compiler = new EjsCompiler(source); 25 * compiler.compile(); 23 * var source = "<% var ejb="EJB"; %><h1>Hello, <%= ejb %>!</h1>"; 24 * var compiler = new EjsCompiler(source); 25 * compiler.compile(); 26 26 * var output = eval(compiler.out); 27 27 * alert(output); // -> "<h1>Hello, EJB!</h1>" 28 * 28 * 29 29 * For a demo: see demo.html 30 30 * For the license: see license.txt … … 46 46 retArr.push(item.substring(0,first_idx)); 47 47 item = item.slice(first_idx); 48 } 48 } 49 49 retArr.push(result[0]); 50 50 item = item.slice(result[0].length); 51 result = regex.exec(item); 51 result = regex.exec(item); 52 52 } 53 53 if (! item == '') … … 74 74 this.SplitRegexp = /(\[%%)|(%%\])|(\[%=)|(\[%#)|(\[%)|(%\]\n)|(%\])|(\n)/; 75 75 else 76 this.SplitRegexp = new RegExp('('+this.double_left+')|(%%'+this.double_right+')|('+this.left_equal+')|('+this.left_comment+')|('+this.left_delimiter+')|('+this.right_delimiter+'\n)|('+this.right_delimiter+')|(\n)') 77 76 this.SplitRegexp = new RegExp('('+this.double_left+')|(%%'+this.double_right+')|('+this.left_equal+')|('+this.left_comment+')|('+this.left_delimiter+')|('+this.right_delimiter+'\n)|('+this.right_delimiter+')|(\n)') 77 78 78 this.source = source; 79 79 this.stag = null; … … 93 93 if(input instanceof Date) 94 94 return input.toDateString(); 95 if(input.toString) 95 if(input.toString) 96 96 return input.toString() 97 97 return ''; … … 113 113 } 114 114 }, 115 115 116 116 /* For each token, block! */ 117 117 scanline: function(line, regex, block) { … … 137 137 this.pre_cmd = pre_cmd; 138 138 this.post_cmd = post_cmd; 139 139 140 140 for (var i=0; i<this.pre_cmd.length; i++) 141 141 { … … 144 144 } 145 145 EjsBuffer.prototype = { 146 146 147 147 push: function(cmd) { 148 148 this.line.push(cmd); … … 166 166 } 167 167 } 168 168 169 169 }; 170 170 … … 173 173 this.pre_cmd = ['___ejsO = "";']; 174 174 this.post_cmd = new Array(); 175 this.source = ' '; 175 this.source = ' '; 176 176 if (source != null) 177 177 { … … 185 185 { 186 186 this.source = source.innerHTML; 187 } 187 } 188 188 if (typeof this.source != 'string') 189 189 { … … 212 212 var put_cmd = "___ejsO += "; 213 213 var insert_cmd = put_cmd; 214 var buff = new EjsBuffer(this.pre_cmd, this.post_cmd); 214 var buff = new EjsBuffer(this.pre_cmd, this.post_cmd); 215 215 var content = ''; 216 216 var clean = function(content) … … 220 220 content = content.replace(/"/g, '\\"'); 221 221 return content; 222 } 222 } 223 223 this.scanner.scan(function(token, scanner) { 224 224 if (scanner.stag == null) … … 239 239 { 240 240 // Chould be content.dump in Ruby 241 241 242 242 buff.push(put_cmd + '"' + clean(content) + '"'); 243 243 } … … 291 291 this.out = buff.script + ";"; 292 292 var to_be_evaled = 'this.process = function(_CONTEXT,_VIEW) { try { with(_VIEW) { with (_CONTEXT) {'+this.out+" return ___ejsO;}}}catch(e){e.lineNumber=null;throw e;}};"; 293 293 294 294 try{ 295 295 eval(to_be_evaled); … … 320 320 EJS = function( options ){ 321 321 this.set_options(options) 322 322 323 323 if(options.url){ 324 324 var template = EJS.get(options.url, this.cache) … … 350 350 template.compile(options); 351 351 352 352 353 353 EJS.update(this.name, this); 354 354 this.template = template … … 358 358 EJS.type = options.type != null ? options.type : EJS.type 359 359 var templates_directory = {} //nice and private container 360 360 361 361 EJS.get = function(path, cache){ 362 362 if(cache == false) return null; … … 364 364 return null; 365 365 } 366 367 EJS.update = function(path, template) { 366 367 EJS.update = function(path, template) { 368 368 if(path == null) return; 369 templates_directory[path] = template 370 } 371 369 templates_directory[path] = template 370 } 371 372 372 EJS.INVALID_PATH = -1; 373 374 373 374 375 375 } 376 376 EJS.config( {cache: true, type: '<' } ) … … 429 429 } 430 430 } 431 431 432 432 EJS.request = function(path){ 433 433 var request = new EJS.newRequest() 434 434 request.open("GET", path, false); 435 435 436 436 try{request.send(null);} 437 437 catch(e){return null;} 438 438 439 439 if ( request.status == 404 || request.status == 2 ||(request.status == 0 && request.responseText == '') ) return null; 440 440 441 441 return request.responseText 442 442 } 443 443 EJS.ajax_request = function(params){ 444 444 params.method = ( params.method ? params.method : 'GET') 445 445 446 446 var request = new EJS.newRequest(); 447 447 request.onreadystatechange = function(){ branches/jsspike-20080806/microfacts/public/vendor/ejs/view.js
r52 r117 2 2 if(! (value instanceof Date)) 3 3 value = new Date() 4 4 5 5 var month_names = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; 6 6 var years = [], months = [], days =[]; … … 23 23 var month_select = this.select_tag(name+'[month]', month, months, {id: name+'[month]'}) 24 24 var day_select = this.select_tag(name+'[day]', day, days, {id: name+'[day]'}) 25 25 26 26 return year_select+month_select+day_select; 27 27 } 28 28 29 29 EjsView.prototype.form_tag = function(action, html_options) { 30 31 30 31 32 32 html_options = html_options || {}; 33 33 html_options.action = action … … 36 36 html_options.enctype = 'multipart/form-data'; 37 37 } 38 38 39 39 return this.start_tag_for('form', html_options) 40 40 } … … 42 42 EjsView.prototype.form_tag_end = function() { return this.tag_end('form'); } 43 43 44 EjsView.prototype.hidden_field_tag = function(name, value, html_options) { 45 return this.input_field_tag(name, value, 'hidden', html_options); 44 EjsView.prototype.hidden_field_tag = function(name, value, html_options) { 45 return this.input_field_tag(name, value, 'hidden', html_options); 46 46 } 47 47 48 48 EjsView.prototype.input_field_tag = function(name, value , inputType, html_options) { 49 49 50 50 html_options = html_options || {}; 51 51 html_options.id = html_options.id || name; … … 53 53 html_options.type = inputType || 'text'; 54 54 html_options.name = name; 55 55 56 56 return this.single_tag_for('input', html_options) 57 57 } … … 64 64 if(!name) var name = 'null'; 65 65 if(!html_options) var html_options = {} 66 66 67 67 if(html_options.confirm){ 68 html_options.onclick = 68 html_options.onclick = 69 69 " var ret_confirm = confirm(\""+html_options.confirm+"\"); if(!ret_confirm){ return false;} " 70 70 html_options.confirm = null; … … 78 78 if(!html_options) var html_options = {} 79 79 html_options.onclick = html_options.onclick || '' ; 80 80 81 81 if(html_options.confirm){ 82 html_options.onclick = 82 html_options.onclick = 83 83 " var ret_confirm = confirm(\""+html_options.confirm+"\"); if(!ret_confirm){ return false;} " 84 84 html_options.confirm = null; 85 85 } 86 86 87 87 html_options.value = name; 88 88 html_options.type = 'submit' … … 117 117 EjsView.prototype.password_field_tag = function(name, value, html_options) { return this.input_field_tag(name, value, 'password', html_options); } 118 118 119 EjsView.prototype.select_tag = function(name, value, choices, html_options) { 119 EjsView.prototype.select_tag = function(name, value, choices, html_options) { 120 120 html_options = html_options || {}; 121 121 html_options.id = html_options.id || name; 122 122 html_options.value = value; 123 123 html_options.name = name; 124 124 125 125 var txt = '' 126 126 txt += this.start_tag_for('select', html_options) 127 127 128 128 for(var i = 0; i < choices.length; i++) 129 129 { … … 142 142 EjsView.prototype.start_tag_for = function(tag, html_options) { return this.tag(tag, html_options); } 143 143 144 EjsView.prototype.submit_tag = function(name, html_options) { 144 EjsView.prototype.submit_tag = function(name, html_options) { 145 145 html_options = html_options || {}; 146 146 //html_options.name = html_options.id || 'commit'; … … 153 153 if(!end) var end = '>' 154 154 var txt = ' ' 155 for(var attr in html_options) { 155 for(var attr in html_options) { 156 156 if(html_options[attr] != null) 157 157 var value = html_options[attr].toString(); … … 161 161 attr = "class"; 162 162 if( value.indexOf("'") != -1 ) 163 txt += attr+'=\"'+value+'\" ' 163 txt += attr+'=\"'+value+'\" ' 164 164 else 165 txt += attr+"='"+value+"' " 165 txt += attr+"='"+value+"' " 166 166 } 167 167 return '<'+tag+txt+end; … … 170 170 EjsView.prototype.tag_end = function(tag) { return '</'+tag+'>'; } 171 171 172 EjsView.prototype.text_area_tag = function(name, value, html_options) { 172 EjsView.prototype.text_area_tag = function(name, value, html_options) { 173 173 html_options = html_options || {}; 174 174 html_options.id = html_options.id || name; … … 180 180 delete html_options.size 181 181 } 182 182 183 183 html_options.cols = html_options.cols || 50; 184 184 html_options.rows = html_options.rows || 4; 185 185 186 186 return this.start_tag_for('textarea', html_options)+value+this.tag_end('textarea') 187 187 } branches/jsspike-20080806/microfacts/script/app/master.js
r101 r117 1 var factletControllers = []; 2 var threadControllers = []; 1 /* deps: app/controller, app/view, app/model */ 3 2 4 3 var DEBUGLEVEL = 3; … … 25 24 } 26 25 27 28 26 window.addEvent('domready', function () { 29 30 $$('.factlet').each(function (elem) { 31 var id = elem.get('id').split('-').at(-1); 32 elem.store('factlet:data', {id: id}); 33 factletControllers[id] = new FactletController(elem); 34 }); 35 36 $$('.thread').each(function (elem) { 37 var id = elem.get('id').split('-').at(-1); 38 elem.store('thread:id', id); 39 threadControllers[id] = new ThreadController(elem); 40 }); 41 42 }); 27 var ac = new Controller(document); 28 }) branches/jsspike-20080806/microfacts/script/appold/controllers/deck_controller.js
r86 r117 1 /* deps: lib/controller */ 1 2 var DeckController = new Class({ 2 3 Extends: Controller, branches/jsspike-20080806/microfacts/script/appold/controllers/factlet_controller.js
r86 r117 1 /* deps: lib/controller, lib/extensions, app/models/factlet */ 1 2 var FactletController = new Class({ 2 3 Extends: Controller, branches/jsspike-20080806/microfacts/script/appold/controllers/factlet_info_controller.js
r100 r117 1 /* deps: lib/controller, app/models/factlet */ 1 2 var FactletInfoController = new Class({ 2 3 Extends: Controller, branches/jsspike-20080806/microfacts/script/appold/controllers/factlet_search_controller.js
r88 r117 1 /* deps: lib/controller, lib/extensions */ 1 2 var FactletSearchController = new Class({ 2 3 Extends: Controller, branches/jsspike-20080806/microfacts/script/appold/controllers/thread_controller.js
r103 r117 1 /* deps: lib/controller, lib/microfactsdeck, app/models/thread, app/controllers/deck_controller, app/controllers/factlet_info_controller, app/controllers/factlet_search_controller, app/controllers/thread_timeline_controller */ 1 2 var ThreadController = new Class({ 2 3 Extends: Controller, branches/jsspike-20080806/microfacts/script/appold/controllers/thread_timeline_controller.js
r103 r117 1 /* deps: lib/controller, lib/timeline */ 1 2 var ThreadTimelineController = new Class({ 2 3 Extends: Controller, branches/jsspike-20080806/microfacts/script/appold/master.js
r101 r117 1 /* deps: app/controllers/factlet_controller, app/controllers/thread_controller, lib/extensions */ 2 1 3 var factletControllers = []; 2 4 var threadControllers = []; … … 25 27 } 26 28 27 28 29 window.addEvent('domready', function () { 29 30 branches/jsspike-20080806/microfacts/script/lib/deck.js
r80 r117 1 /* deps: lib/extensions */ 1 2 var Deck = new Class({ 2 3 Implements: [Options, Events], branches/jsspike-20080806/microfacts/script/lib/microfactsdeck.js
r70 r117 1 /* deps: lib/deck */ 1 2 var MicroFactsDeck = new Class({ 2 3 Extends: Deck branches/jsspike-20080806/microfacts/script/spec/jsspec/JSSpec.css
r52 r117 21 21 margin: 0; 22 22 position: absolute; 23 top: 0px; 23 top: 0px; 24 24 left: 0px; 25 25 width: 100%; … … 31 31 padding: 0; 32 32 margin: 0; 33 position: absolute; 33 position: absolute; 34 34 top: 40px; 35 35 left: 0px; 36 36 bottom: 0px; 37 overflow: auto; 38 width: 250px; 37 overflow: auto; 38 width: 250px; 39 39 _height:expression(document.body.clientHeight-40); 40 40 } … … 43 43 padding: 0; 44 44 margin: 0; 45 position: absolute; 45 position: absolute; 46 46 top: 40px; 47 47 left: 250px; branches/jsspike-20080806/microfacts/script/spec/jsspec/JSSpec.js
- Property svn:executable deleted
r52 r117 32 32 var JSSpec = { 33 33 specs: [], 34 34 35 35 EMPTY_FUNCTION: function() {}, 36 36 37 37 Browser: { 38 38 Trident: navigator.appName == "Microsoft Internet Explorer", … … 52 52 this.onSuccess = typeof onSuccess == 'function' ? onSuccess : JSSpec.EMPTY_FUNCTION; 53 53 this.onException = typeof onException == 'function' ? onException : JSSpec.EMPTY_FUNCTION; 54 54 55 55 if(JSSpec.Browser.Trident) { 56 56 // Exception handler for Trident. It helps to collect exact line number where exception occured. … … 63 63 delete JSSpec._secondPass; 64 64 delete JSSpec._assertionFailure; 65 65 66 66 ex.type = "failure"; 67 67 self.onException(self, ex); … … 72 72 self.onException(self, ex); 73 73 } 74 74 75 75 return true; 76 76 }; … … 83 83 lineNumber:normalException.lineNumber 84 84 }; 85 85 86 86 return merged; 87 87 }; … … 92 92 var onSuccess = this.onSuccess; 93 93 var onException = this.onException; 94 94 95 95 window.setTimeout( 96 96 function() { … … 98 98 if(JSSpec.Browser.Trident) { 99 99 window._curExecutor = self; 100 100 101 101 result = self.target(); 102 102 self.onSuccess(self, result); … … 107 107 } catch(ex) { 108 108 if(JSSpec.Browser.Webkit) ex = {message:ex.message, fileName:ex.sourceURL, lineNumber:ex.line}; 109 109 110 110 if(JSSpec._secondPass) { 111 111 ex = self.mergeExceptions(JSSpec._assertionFailure, ex); 112 112 delete JSSpec._secondPass; 113 113 delete JSSpec._assertionFailure; 114 114 115 115 ex.type = "failure"; 116 116 self.onException(self, ex);
