Changeset e639c5da in github
- Timestamp:
- Aug 29, 2011 6:13:07 PM (21 months ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.7, release-0.8
- Children:
- 95192c6d
- Parents:
- bd38911
- File:
-
- 1 edited
-
program/js/app.js (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
program/js/app.js
rbd38911 re639c5da 87 87 88 88 this.buttons[command].push(button_prop); 89 90 if (this.loaded) 91 init_button(command, button_prop); 89 92 }; 90 93 … … 92 95 this.gui_object = function(name, id) 93 96 { 94 this.gui_objects[name] = id;97 this.gui_objects[name] = this.loaded ? rcube_find_object(id) : id; 95 98 }; 96 99 … … 4917 4920 /*********************************************************/ 4918 4921 4922 var init_button = function(cmd, prop) 4923 { 4924 var elm = document.getElementById(prop.id); 4925 if (!elm) 4926 return; 4927 4928 var preload = false; 4929 if (prop.type == 'image') { 4930 elm = elm.parentNode; 4931 preload = true; 4932 } 4933 4934 elm._command = cmd; 4935 elm._id = prop.id; 4936 if (prop.sel) { 4937 elm.onmousedown = function(e){ return rcmail.button_sel(this._command, this._id); }; 4938 elm.onmouseup = function(e){ return rcmail.button_out(this._command, this._id); }; 4939 if (preload) 4940 new Image().src = prop.sel; 4941 } 4942 if (prop.over) { 4943 elm.onmouseover = function(e){ return rcmail.button_over(this._command, this._id); }; 4944 elm.onmouseout = function(e){ return rcmail.button_out(this._command, this._id); }; 4945 if (preload) 4946 new Image().src = prop.over; 4947 } 4948 }; 4949 4919 4950 // enable/disable buttons for page shifting 4920 4951 this.set_page_buttons = function() … … 4932 4963 4933 4964 for (var i=0; i< this.buttons[cmd].length; i++) { 4934 var prop = this.buttons[cmd][i]; 4935 var elm = document.getElementById(prop.id); 4936 if (!elm) 4937 continue; 4938 4939 var preload = false; 4940 if (prop.type == 'image') { 4941 elm = elm.parentNode; 4942 preload = true; 4943 } 4944 4945 elm._command = cmd; 4946 elm._id = prop.id; 4947 if (prop.sel) { 4948 elm.onmousedown = function(e){ return rcmail.button_sel(this._command, this._id); }; 4949 elm.onmouseup = function(e){ return rcmail.button_out(this._command, this._id); }; 4950 if (preload) 4951 new Image().src = prop.sel; 4952 } 4953 if (prop.over) { 4954 elm.onmouseover = function(e){ return rcmail.button_over(this._command, this._id); }; 4955 elm.onmouseout = function(e){ return rcmail.button_out(this._command, this._id); }; 4956 if (preload) 4957 new Image().src = prop.over; 4958 } 4965 init_button(cmd, this.buttons[cmd][i]); 4959 4966 } 4960 4967 } … … 5569 5576 5570 5577 // overwrite task name 5571 if (query._action.match(/([a-z]+)\/([a-z-_ ]+)/)) {5578 if (query._action.match(/([a-z]+)\/([a-z-_.]+)/)) { 5572 5579 query._action = RegExp.$2; 5573 5580 base = base.replace(/\_task=[a-z]+/, '_task='+RegExp.$1);
Note: See TracChangeset
for help on using the changeset viewer.
