rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
} else if (cswRecord.getFilteredOnlineResources('WCS').length != 0) { | } else if (cswRecord.getFilteredOnlineResources('WCS').length !== 0) { | var loadLayer = function(activeLayerRecord) { var cswRecords = activeLayerRecord.getCSWRecords(); //We simplify things by treating the record list as a single type of WFS, WCS or WMS //So lets find the first record with a type we can choose (Prioritise WFS -> WCS -> WMS) if (cswRecords.length > 0) { var cswRecord = cswRecords[0]; if (cswRecord.getFilteredOnlineResources('WFS').length != 0) { wfsHandler(activeLayerRecord); } else if (cswRecord.getFilteredOnlineResources('WCS').length != 0) { wcsHandler(activeLayerRecord); } else if (cswRecord.getFilteredOnlineResources('WMS').length != 0) { wmsHandler(activeLayerRecord); } else { genericRecordHandler(activeLayerRecord); } } }; |
} else if (cswRecord.getFilteredOnlineResources('WMS').length != 0) { | } else if (cswRecord.getFilteredOnlineResources('WMS').length !== 0) { | var loadLayer = function(activeLayerRecord) { var cswRecords = activeLayerRecord.getCSWRecords(); //We simplify things by treating the record list as a single type of WFS, WCS or WMS //So lets find the first record with a type we can choose (Prioritise WFS -> WCS -> WMS) if (cswRecords.length > 0) { var cswRecord = cswRecords[0]; if (cswRecord.getFilteredOnlineResources('WFS').length != 0) { wfsHandler(activeLayerRecord); } else if (cswRecord.getFilteredOnlineResources('WCS').length != 0) { wcsHandler(activeLayerRecord); } else if (cswRecord.getFilteredOnlineResources('WMS').length != 0) { wmsHandler(activeLayerRecord); } else { genericRecordHandler(activeLayerRecord); } } }; |
script.setAttribute("src", "http: "ABQIAAAANkbb-SNf1VDzX-W2M-MKGBTBfUk9TZrBRaIteybtnU2KziHEpRRfEtLc0rJCxsohWtD3KULc_ECH6w"+ "&c&async=2&callback=loadMap"); | script.setAttribute("src", ["http: getGoogleKey(), "&c&async=2&callback=loadMap"].join('')); | function loadMaps() { var script = document.createElement("script"); script.setAttribute("src", "http://maps.google.com/maps?file=api&v=2.x&key="+ "ABQIAAAANkbb-SNf1VDzX-W2M-MKGBTBfUk9TZrBRaIteybtnU2KziHEpRRfEtLc0rJCxsohWtD3KULc_ECH6w"+ "&c&async=2&callback=loadMap"); script.setAttribute("type", "text/javascript"); document.documentElement.firstChild.appendChild(script); document.getElementById('mapLoader').style.visibility = "hidden";} |
function loadMaps() { document.getElementById ("mapChoix").innerHTML = "" ; document.getElementById('mapLoader').style.visibility = "hidden"; | function loadMaps(divName, btName) { document.getElementById (divName).innerHTML = "" ; document.getElementById(btName).style.visibility = "hidden"; | function loadMaps() { document.getElementById ("mapChoix").innerHTML = "" ; document.getElementById('mapLoader').style.visibility = "hidden"; var script = document.createElement("script"); script.setAttribute("src", ["http://maps.google.com/maps?file=api&v=2.x&key=", getGoogleKey(), "&c&async=2&callback=loadMap"].join('')); script.setAttribute("type", "text/javascript"); document.documentElement.firstChild.appendChild(script);} |
function loadScript(uri, symbol) | function loadScript(uri, symbol, tries) | function loadScript(uri, symbol){ var loaded = false; if (symbol != "") { try { loaded = !eval("typeof " + symbol + " === 'undefined'"); } catch (e) { loaded = false; } } if (!loaded) { var s = document.createElement('script'); s.setAttribute('src', uri); s.onload = function() { jsLoaded(uri);}; s.onreadystatechange = function() { if (s.readyState == 'complete' || s.readyState == 'loaded') { jsLoaded(uri); } }; var h = document.getElementsByTagName('head')[0]; h.appendChild(s); } else jsLoaded(uri);}; |
s.onload = function() { jsLoaded(uri);}; | s.onload = function() { jsLoaded(uri); }; s.onerror = onerror; | function loadScript(uri, symbol){ var loaded = false; if (symbol != "") { try { loaded = !eval("typeof " + symbol + " === 'undefined'"); } catch (e) { loaded = false; } } if (!loaded) { var s = document.createElement('script'); s.setAttribute('src', uri); s.onload = function() { jsLoaded(uri);}; s.onreadystatechange = function() { if (s.readyState == 'complete' || s.readyState == 'loaded') { jsLoaded(uri); } }; var h = document.getElementsByTagName('head')[0]; h.appendChild(s); } else jsLoaded(uri);}; |
if (s.readyState == 'complete' || s.readyState == 'loaded') { | if (s.readyState == 'loaded') onerror(); else if (s.readyState == 'complete') | function loadScript(uri, symbol){ var loaded = false; if (symbol != "") { try { loaded = !eval("typeof " + symbol + " === 'undefined'"); } catch (e) { loaded = false; } } if (!loaded) { var s = document.createElement('script'); s.setAttribute('src', uri); s.onload = function() { jsLoaded(uri);}; s.onreadystatechange = function() { if (s.readyState == 'complete' || s.readyState == 'loaded') { jsLoaded(uri); } }; var h = document.getElementsByTagName('head')[0]; h.appendChild(s); } else jsLoaded(uri);}; |
} | function loadScript(uri, symbol){ var loaded = false; if (symbol != "") { try { loaded = !eval("typeof " + symbol + " === 'undefined'"); } catch (e) { loaded = false; } } if (!loaded) { var s = document.createElement('script'); s.setAttribute('src', uri); s.onload = function() { jsLoaded(uri);}; s.onreadystatechange = function() { if (s.readyState == 'complete' || s.readyState == 'loaded') { jsLoaded(uri); } }; var h = document.getElementsByTagName('head')[0]; h.appendChild(s); } else jsLoaded(uri);}; |
|
H=H.getParent();}return null;});},getSelectedCells:n};j.add('tabletools',j.tabletools);})();j.add('specialchar',{init:function(l){var m='specialchar';a.dialog.add(m,this.path+'dialogs/specialchar.js');l.addCommand(m,new a.dialogCommand(m));l.ui.addButton('SpecialChar',{label:l.lang.specialChar.toolbar,command:m});}});(function(){var l={editorFocus:false,modes:{wysiwyg:1,source:1}},m={exec:function(o){o.container.focusNext(true,o.tabIndex);}},n={exec:function(o){o.container.focusPrevious(true,o.tabIndex);}};j.add('tab',{requires:['keystrokes'],init:function(o){var p=o.config.tabSpaces||0,q='';while(p--)q+='\xa0';if(q)o.on('key',function(r){if(r.data.keyCode==9){o.insertHtml(q);r.cancel();}});if(b.webkit)o.on('key',function(r){var s=r.data.keyCode;if(s==9&&!q){r.cancel();o.execCommand('blur');}if(s==2000+9){o.execCommand('blurBack');r.cancel();}});o.addCommand('blur',e.extend(m,l));o.addCommand('blurBack',e.extend(n,l));}});})();h.prototype.focusNext=function(l,m){var v=this;var n=v.$,o=m===undefined?v.getTabIndex():m,p,q,r,s,t,u;if(o<=0){t=v.getNextSourceNode(l,1);while(t){if(t.isVisible()&&t.getTabIndex()===0){r=t;break;}t=t.getNextSourceNode(false,1);}}else{t=v.getDocument().getBody().getFirst();while(t=t.getNextSourceNode(false,1)){if(!p)if(!q&&t.equals(v)){q=true;if(l){if(!(t=t.getNextSourceNode(true,1)))break;p=1;}}else if(q&&!v.contains(t))p=1;if(!t.isVisible()||(u=t.getTabIndex())<0)continue;if(p&&u==o){r=t;break;}if(u>o&&(!r||!s||u<s)){r=t;s=u;}else if(!r&&u===0){r=t;s=u;}}}if(r)r.focus();};h.prototype.focusPrevious=function(l,m){var v=this;var n=v.$,o=m===undefined?v.getTabIndex():m,p,q,r,s=0,t,u=v.getDocument().getBody().getLast();while(u=u.getPreviousSourceNode(false,1)){if(!p)if(!q&&u.equals(v)){q=true;if(l){if(!(u=u.getPreviousSourceNode(true,1)))break;p=1;}}else if(q&&!v.contains(u))p=1;if(!u.isVisible()||(t=u.getTabIndex())<0)continue;if(o<=0){if(p&&t===0){r=u;break;}if(t>s){r=u;s=t;}}else{if(p&&t==o){r=u;break;}if(t<o&&(!r||t>s)){r=u;s=t;}}}if(r)r.focus();};(function(){j.add('templates',{requires:['dialog'],init:function(n){a.dialog.add('templates',a.getUrl(this.path+'dialogs/templates.js'));n.addCommand('templates',new a.dialogCommand('templates'));n.ui.addButton('Templates',{label:n.lang.templates.button,command:'templates'});}});var l={},m={};a.addTemplates=function(n,o){l[n]=o;};a.getTemplates=function(n){return l[n];};a.loadTemplates=function(n,o){var p=[];for(var q=0;q<n.length;q++){if(!m[n[q]]){p.push(n[q]);m[n[q]]=1;}}if(p.length>0)a.scriptLoader.load(p,o); | !c&&B.appendBogus();}u.moveToElementEditStart(y);}else if(v){v=new h(v);u.moveToElementEditStart(v);if(!(u.checkStartOfBlock()&&u.checkEndOfBlock()))u.selectNodeContents(v);}else return true;u.select(true);return true;}}return false;}};};j.add('tab',{requires:['keystrokes'],init:function(p){var q=p.config.enableTabKeyTools!==false,r=p.config.tabSpaces||0,s='';while(r--)s+='\xa0';if(s)p.on('key',function(t){if(t.data.keyCode==9){p.insertHtml(s);t.cancel();}});if(q)p.on('key',function(t){if(t.data.keyCode==9&&p.execCommand('selectNextCell')||t.data.keyCode==2000+9&&p.execCommand('selectPreviousCell'))t.cancel();});if(b.webkit||b.gecko)p.on('key',function(t){var u=t.data.keyCode;if(u==9&&!s){t.cancel();p.execCommand('blur');}if(u==2000+9){p.execCommand('blurBack');t.cancel();}});p.addCommand('blur',e.extend(m,l));p.addCommand('blurBack',e.extend(n,l));p.addCommand('selectNextCell',o());p.addCommand('selectPreviousCell',o(true));}});})();h.prototype.focusNext=function(l,m){var v=this;var n=v.$,o=m===undefined?v.getTabIndex():m,p,q,r,s,t,u;if(o<=0){t=v.getNextSourceNode(l,1);while(t){if(t.isVisible()&&t.getTabIndex()===0){r=t;break;}t=t.getNextSourceNode(false,1);}}else{t=v.getDocument().getBody().getFirst();while(t=t.getNextSourceNode(false,1)){if(!p)if(!q&&t.equals(v)){q=true;if(l){if(!(t=t.getNextSourceNode(true,1)))break;p=1;}}else if(q&&!v.contains(t))p=1;if(!t.isVisible()||(u=t.getTabIndex())<0)continue;if(p&&u==o){r=t;break;}if(u>o&&(!r||!s||u<s)){r=t;s=u;}else if(!r&&u===0){r=t;s=u;}}}if(r)r.focus();};h.prototype.focusPrevious=function(l,m){var v=this;var n=v.$,o=m===undefined?v.getTabIndex():m,p,q,r,s=0,t,u=v.getDocument().getBody().getLast();while(u=u.getPreviousSourceNode(false,1)){if(!p)if(!q&&u.equals(v)){q=true;if(l){if(!(u=u.getPreviousSourceNode(true,1)))break;p=1;}}else if(q&&!v.contains(u))p=1;if(!u.isVisible()||(t=u.getTabIndex())<0)continue;if(o<=0){if(p&&t===0){r=u;break;}if(t>s){r=u;s=t;}}else{if(p&&t==o){r=u;break;}if(t<o&&(!r||t>s)){r=u;s=t;}}}if(r)r.focus();};(function(){j.add('templates',{requires:['dialog'],init:function(n){a.dialog.add('templates',a.getUrl(this.path+'dialogs/templates.js'));n.addCommand('templates',new a.dialogCommand('templates'));n.ui.addButton('Templates',{label:n.lang.templates.button,command:'templates'});}});var l={},m={};a.addTemplates=function(n,o){l[n]=o;};a.getTemplates=function(n){return l[n];};a.loadTemplates=function(n,o){var p=[];for(var q=0;q<n.length;q++){if(!m[n[q]]){p.push(n[q]);m[n[q]]=1;}}if(p.length>0)a.scriptLoader.load(p,o); | H=H.getParent();}return null;});},getSelectedCells:n};j.add('tabletools',j.tabletools);})();j.add('specialchar',{init:function(l){var m='specialchar';a.dialog.add(m,this.path+'dialogs/specialchar.js');l.addCommand(m,new a.dialogCommand(m));l.ui.addButton('SpecialChar',{label:l.lang.specialChar.toolbar,command:m});}});(function(){var l={editorFocus:false,modes:{wysiwyg:1,source:1}},m={exec:function(o){o.container.focusNext(true,o.tabIndex);}},n={exec:function(o){o.container.focusPrevious(true,o.tabIndex);}};j.add('tab',{requires:['keystrokes'],init:function(o){var p=o.config.tabSpaces||0,q='';while(p--)q+='\xa0';if(q)o.on('key',function(r){if(r.data.keyCode==9){o.insertHtml(q);r.cancel();}});if(b.webkit)o.on('key',function(r){var s=r.data.keyCode;if(s==9&&!q){r.cancel();o.execCommand('blur');}if(s==2000+9){o.execCommand('blurBack');r.cancel();}});o.addCommand('blur',e.extend(m,l));o.addCommand('blurBack',e.extend(n,l));}});})();h.prototype.focusNext=function(l,m){var v=this;var n=v.$,o=m===undefined?v.getTabIndex():m,p,q,r,s,t,u;if(o<=0){t=v.getNextSourceNode(l,1);while(t){if(t.isVisible()&&t.getTabIndex()===0){r=t;break;}t=t.getNextSourceNode(false,1);}}else{t=v.getDocument().getBody().getFirst();while(t=t.getNextSourceNode(false,1)){if(!p)if(!q&&t.equals(v)){q=true;if(l){if(!(t=t.getNextSourceNode(true,1)))break;p=1;}}else if(q&&!v.contains(t))p=1;if(!t.isVisible()||(u=t.getTabIndex())<0)continue;if(p&&u==o){r=t;break;}if(u>o&&(!r||!s||u<s)){r=t;s=u;}else if(!r&&u===0){r=t;s=u;}}}if(r)r.focus();};h.prototype.focusPrevious=function(l,m){var v=this;var n=v.$,o=m===undefined?v.getTabIndex():m,p,q,r,s=0,t,u=v.getDocument().getBody().getLast();while(u=u.getPreviousSourceNode(false,1)){if(!p)if(!q&&u.equals(v)){q=true;if(l){if(!(u=u.getPreviousSourceNode(true,1)))break;p=1;}}else if(q&&!v.contains(u))p=1;if(!u.isVisible()||(t=u.getTabIndex())<0)continue;if(o<=0){if(p&&t===0){r=u;break;}if(t>s){r=u;s=t;}}else{if(p&&t==o){r=u;break;}if(t<o&&(!r||t>s)){r=u;s=t;}}}if(r)r.focus();};(function(){j.add('templates',{requires:['dialog'],init:function(n){a.dialog.add('templates',a.getUrl(this.path+'dialogs/templates.js'));n.addCommand('templates',new a.dialogCommand('templates'));n.ui.addButton('Templates',{label:n.lang.templates.button,command:'templates'});}});var l={},m={};a.addTemplates=function(n,o){l[n]=o;};a.getTemplates=function(n){return l[n];};a.loadTemplates=function(n,o){var p=[];for(var q=0;q<n.length;q++){if(!m[n[q]]){p.push(n[q]);m[n[q]]=1;}}if(p.length>0)a.scriptLoader.load(p,o);else setTimeout(o,0);};})();i.templates='default';i.templates_files=[a.getUrl('plugins/templates/templates/default.js')];i.templates_replaceContent=true;(function(){var l=function(){this.toolbars=[];this.focusCommandExecuted=false;};l.prototype.focus=function(){for(var n=0,o;o=this.toolbars[n++];)for(var p=0,q;q=o.items[p++];){if(q.focus){q.focus();return;}}};var m={toolbarFocus:{modes:{wysiwyg:1,source:1},exec:function(n){if(n.toolbox){n.toolbox.focusCommandExecuted=true;if(c)setTimeout(function(){n.toolbox.focus();},100);else n.toolbox.focus();}}}};j.add('toolbar',{init:function(n){var o=function(p,q){var r,s,t,u=n.lang.dir=='rtl';switch(q){case u?37:39:case 9:do{r=p.next;if(!r){s=p.toolbar.next;t=s&&s.items.length;while(t===0){s=s.next;t=s&&s.items.length;}if(s)r=s.items[0];}p=r;}while(p&&!p.focus)if(p)p.focus();else n.toolbox.focus();return false;case u?39:37:case 2000+9:do{r=p.previous;if(!r){s=p.toolbar.previous;t=s&&s.items.length;while(t===0){s=s.previous;t=s&&s.items.length;}if(s)r=s.items[t-1];}p=r;}while(p&&!p.focus)if(p)p.focus();else{var v=n.toolbox.toolbars[n.toolbox.toolbars.length-1].items;v[v.length-1].focus();}return false;case 27:n.focus();return false;case 13:case 32:p.execute();return false;}return true;};n.on('themeSpace',function(p){if(p.data.space==n.config.toolbarLocation){n.toolbox=new l();var q='cke_'+e.getNextNumber(),r=['<div class="cke_toolbox" role="toolbar" aria-labelledby="',q,'"'],s=n.config.toolbarStartupExpanded!==false,t;r.push(s?'>':' style="display:none">');r.push('<span id="',q,'" class="cke_voice_label">',n.lang.toolbar,'</span>');var u=n.toolbox.toolbars,v=n.config.toolbar instanceof Array?n.config.toolbar:n.config['toolbar_'+n.config.toolbar];for(var w=0;w<v.length;w++){var x=v[w];if(!x)continue;var y='cke_'+e.getNextNumber(),z={id:y,items:[]};if(t){r.push('</div>');t=0;}if(x==='/'){r.push('<div class="cke_break"></div>');continue;}r.push('<span id="',y,'" class="cke_toolbar" role="presentation"><span class="cke_toolbar_start"></span>');var A=u.push(z)-1;if(A>0){z.previous=u[A-1];z.previous.next=z;}for(var B=0;B<x.length;B++){var C,D=x[B];if(D=='-')C=k.separator;else C=n.ui.create(D);if(C){if(C.canGroup){if(!t){r.push('<span class="cke_toolgroup" role="presentation">');t=1;}}else if(t){r.push('</span>');t=0;}var E=C.render(n,r);A=z.items.push(E)-1;if(A>0){E.previous=z.items[A-1];E.previous.next=E;}E.toolbar=z;E.onkey=o;E.onfocus=function(){if(!n.toolbox.focusCommandExecuted)n.focus();};}}if(t){r.push('</span>');t=0; |
case "percentage": return this.toPercentage(value); | I18n.localize = function(scope, value) { switch (scope) { case "currency": return this.toCurrency(value); case "number": scope = this.lookup("number.format"); return this.toNumber(value, scope); default: if (scope.match(/^(date|time)/)) { return this.toTime(scope, value); } else { return value.toString(); } }}; |
|
if (g_IsIE) pSamplingCurveNode.setProperty("SelectionLanguage", "XPath"); | if (g_IsIE) { pSamplingCurveNode.setProperty("SelectionLanguage", "XPath"); } | function Location_parseXmlElement(pSamplingCurveNode) { if (g_IsIE) pSamplingCurveNode.setProperty("SelectionLanguage", "XPath"); } |
if (g_IsIE) | if (g_IsIE) { | function Location_parseXmlElement(pLocationNode) { if (g_IsIE) pLocationNode.setProperty("SelectionLanguage", "XPath"); /** Sample XML node * <gml:Point srsName="EPSG:4326"> * <gml:pos>115.34697236 -29.04656024</gml:pos> * </gml:Point> */ var sCoords = GXml.value(pLocationNode.selectSingleNode(".//*[local-name() = 'pos']")); if (sCoords) { var aCoords = sCoords.split(" "); this.msLatitude = aCoords[1]; this.msLongitude = aCoords[0]; }} |
} | function Location_parseXmlElement(pLocationNode) { if (g_IsIE) pLocationNode.setProperty("SelectionLanguage", "XPath"); /** Sample XML node * <gml:Point srsName="EPSG:4326"> * <gml:pos>115.34697236 -29.04656024</gml:pos> * </gml:Point> */ var sCoords = GXml.value(pLocationNode.selectSingleNode(".//*[local-name() = 'pos']")); if (sCoords) { var aCoords = sCoords.split(" "); this.msLatitude = aCoords[1]; this.msLongitude = aCoords[0]; }} |
|
if(msg.message && desKey) { msg.message = des(desKey,Base64.decode(msg.message),false).replace(/\0+/g,''); } | logger : function () { var logControls; var printLog; var messageList; var timeShowStartLog; var timeShowEndLog; var aSecond = 1000; var aMinute = 60*aSecond; var anHour = 60*aMinute; var sixHours = 6*anHour; var aDay = 24*anHour; var aWeek = 7*aDay; var earliest; var startTimeOffset; var endTime; var timeChange; var timeShow = function() { timeShowEndLog.set('text',endTime.toLocaleString()); timeShowStartLog.set('text', new Date(endTime.getTime() - startTimeOffset).toLocaleString()); }; var intervalCounterId = null; var intervalCounter; var getInterval = function() { var i = intervalCounter; intervalCounter++; if(i < logOptions.secondstep) return aSecond; if(i < logOptions.minutestep) return aMinute; if(i < logOptions.hourstep) return anHour; if(i < logOptions.sixhourstep) return sixHours; return aDay; }; var logRid; var printQuery; var processMessage = function (msg) { var message = function (txt) { MBchat.updateables.message.displayMessage(msg.lid,msg.time,chatBot,chatBotMessage(msg.user.name + ' ' + txt),true); } switch (msg.type) { case 'LI': message('Logs In ' + msg.message); break; case 'LO': message('Logs Out ' + msg.message); break; case 'LT': message('Logs Out (timeout)'); break; case 'RE': message('Enters Room'); break; case 'RX': message('Leaves Room'); break; case 'WJ': message('Joins whisper no: ' + msg.rid); break; case 'WL': message('Leaves whisper no: ' + msg.rid); break; case 'ME': MBchat.updateables.message.displayMessage(msg.lid,msg.time,msg.user,msg.message,true); break; case 'WH': MBchat.updateables.message.displayMessage(msg.lid,msg.time,msg.user,'(whispers to :' +msg.rid+')'+msg.message,true); break; case 'LH': message('Reads Log'); default: // Do nothing with these break; } } var request = new ServerReq('client/log.php',function(response) { messageList.removeClass('loading'); if(response) { response.messages.each(function(item) { item.lid = item.lid.toInt(); item.rid = item.rid.toInt(); item.user.uid = item.user.uid.toInt(); processMessage(item); }); } }); var fetchLogDelay; var fetchLog = function() { messageList.empty(); messageList.addClass('loading'); request.transmit({ 'rid' : logRid, 'start' : Math.floor(new Date(endTime.getTime()-startTimeOffset).getTime()/1000), 'end': Math.ceil(endTime.getTime()/1000 )}); }; return { init: function() { logControls = $('logControls'); messageList = $('chatList'); printLog = $('printLog'); printLog.addEvent('click',function(e) { printQuery += '&start='+ Math.floor(new Date(endTime.getTime()-startTimeOffset).getTime()/1000); printQuery += '&end='+Math.ceil(endTime.getTime()/1000); printQuery += '&tzo='+endTime.getTimezoneOffset(); MBchat.logout(); window.location = 'client/print.php?' + printQuery ; }); timeShowStartLog = $('timeShowStartLog'); timeShowEndLog = $('timeShowEndLog'); logOptions.minutestep += logOptions.secondstep; //Operationally this is better, so set it up logOptions.hourstep += logOptions.minutestep; logOptions.sixhourstep += logOptions.hourstep; $('minusStartLog').addEvents({ 'mousedown' : function (e) { var incrementer = function() { startTimeOffset += getInterval(); if (endTime.getTime()-startTimeOffset < earliest) { startTimeOffset = endTime.getTime()- earliest; } timeShow(); }; $clear(fetchLogDelay); if(intervalCounterId) $clear(intervalCounterId); intervalCounter=0; incrementer(); //do first one intervalCounterId = incrementer.periodical(logOptions.spinrate); }, 'mouseup' : function (e) { $clear(intervalCounterId); $clear(fetchLogDelay); fetchLogDelay = fetchLog.delay(logOptions.fetchdelay); } }); $('plusStartLog').addEvents({ 'mousedown' : function (e) { var decrementer = function() { if (startTimeOffset > 0) { startTimeOffset -= getInterval(); } if (startTimeOffset < 0) startTimeOffset = 0; timeShow(); }; $clear(fetchLogDelay); if(intervalCounterId) $clear(intervalCounterId); intervalCounter=0; decrementer(); //do first one intervalCounterId = decrementer.periodical(logOptions.spinrate); }, 'mouseup' : function (e) { $clear(intervalCounterId); $clear(fetchLogDelay); fetchLogDelay = fetchLog.delay(logOptions.fetchdelay); } }); $('minusEndLog').addEvents({ 'mousedown' : function (e) { var decrementer = function() { var oSTO = startTimeOffset; if (startTimeOffset > 0) { startTimeOffset -= getInterval(); } if (startTimeOffset < 0) startTimeOffset = 0; endTime = new Date(endTime.getTime()-oSTO+startTimeOffset); timeShow(); }; $clear(fetchLogDelay); if(intervalCounterId) $clear(intervalCounterId); intervalCounter=0; decrementer(); //do first one intervalCounterId = decrementer.periodical(logOptions.spinrate); }, 'mouseup' : function (e) { $clear(intervalCounterId); $clear(fetchLogDelay); fetchLogDelay = fetchLog.delay(logOptions.fetchdelay); } }); $('plusEndLog').addEvents({ 'mousedown' : function (e) { var incrementer = function() { var oSTO = startTimeOffset; var maxOffset = new Date().getTime() - endTime.getTime() + oSTO; startTimeOffset += getInterval(); if (startTimeOffset > maxOffset) startTimeOffset = maxOffset; endTime = new Date(endTime.getTime() - oSTO + startTimeOffset); timeShow(); }; $clear(fetchLogDelay); if(intervalCounterId) $clear(intervalCounterId); intervalCounter=0; incrementer(); //do first one intervalCounterId = incrementer.periodical(logOptions.spinrate); }, 'mouseup' : function (e) { $clear(intervalCounterId); $clear(fetchLogDelay); fetchLogDelay = fetchLog.delay(logOptions.fetchdelay); } }); }, startLog: function (rid,roomName) { logRid = rid; MBchat.updateables.poller.stop(); //presence polls still happen messageList.removeClass('whisper'); messageList.removeClass('chat'); messageList.addClass('logging'); messageList.empty(); printQuery = 'uid='+auth.uid+'&pass='+auth.pass+'&rid='+rid+'&room='+roomName ; $('inputContainer').addClass('hide'); $('emoticonContainer').addClass('hide'); $('roomNameContainer').empty(); $('entranceHall').addClass('hide'); var exit = $('exit'); exit.removeClass('exit-f'); exit.addClass('exit-r'); $('soundOptions').addClass('hide'); $('onlineListContainer').addClass('hide'); logControls.removeClass('hide'); endTime = new Date(); startTimeOffset = anHour; earliest = endTime.getTime() - aWeek; timeShow(); fetchLogDelay = fetchLog.delay(logOptions.fetchdelay); }, returnToEntranceHall : function() { logControls.addClass('hide'); messageList.removeClass('logging'); $('header').removeClass('hide'); $('content').removeClass('hide'); $('entranceHall').removeClass('hide'); $('soundOptions').removeClass('hide'); $('onlineListContainer').removeClass('hide'); MBchat.updateables.poller.start(); MBchat.updateables.message.leaveRoom(); //go To Entrance Hall } }; }() |
|
returnToEntranceHall : function(e) { e.stop(); | returnToEntranceHall : function() { | logger : function () { var logControls; var printLog; var messageList; var timeShowStartLog; var timeShowEndLog; var aSecond = 1000; var aMinute = 60*aSecond; var anHour = 60*aMinute; var sixHours = 6*anHour; var aDay = 24*anHour; var aWeek = 7*aDay; var earliest; var startTimeOffset; var endTime; var timeChange; var timeShow = function() { timeShowEndLog.set('text',endTime.toLocaleString()); timeShowStartLog.set('text', new Date(endTime.getTime() - startTimeOffset).toLocaleString()); }; var intervalCounterId = null; var intervalCounter; var getInterval = function() { var i = intervalCounter; intervalCounter++; if(i < logOptions.secondstep) return aSecond; if(i < logOptions.minutestep) return aMinute; if(i < logOptions.hourstep) return anHour; if(i < logOptions.sixhourstep) return sixHours; return aDay; }; var logRid; var printQuery; var processMessage = function (msg) { var message = function (txt) { MBchat.updateables.message.displayMessage(msg.lid,msg.time,chatBot,chatBotMessage(msg.user.name + ' ' + txt),true); } switch (msg.type) { case 'LI': message('Logs In ' + msg.message); break; case 'LO': message('Logs Out ' + msg.message); break; case 'LT': message('Logs Out (timeout)'); break; case 'RE': message('Enters Room'); break; case 'RX': message('Leaves Room'); break; case 'RM': message('Becomes Moderator'); break; case 'RN': message('Steps Down from being Moderator'); break; case 'WJ': message('Joins whisper no: ' + msg.rid); break; case 'WL': message('Leaves whisper no: ' + msg.rid); break; case 'ME': MBchat.updateables.message.displayMessage(msg.lid,msg.time,msg.user,msg.message,true); break; case 'WH': MBchat.updateables.message.displayMessage(msg.lid,msg.time,msg.user,'(whispers to :' +msg.rid+')'+msg.message,true); break; case 'LH': message('Reads Log'); default: // Do nothing with these break; } } var request = new ServerReq('log.php',function(response) { messageList.removeClass('loading'); if(response) { response.messages.each(function(item) { item.lid = item.lid.toInt(); item.rid = item.rid.toInt(); item.user.uid = item.user.uid.toInt(); processMessage(item); }); } }); var fetchLogDelay; var fetchLog = function() { messageList.empty(); messageList.addClass('loading'); request.transmit({ 'rid' : logRid, 'start' : new Date(endTime.getTime()-startTimeOffset).getTime()/1000, 'end': endTime.getTime()/1000 }); }; return { init: function() { logControls = $('logControls'); messageList = $('chatList'); printLog = $('printLog'); printLog.addEvent('click',function(e) { printQuery += '&start='+ new Date(endTime.getTime()-startTimeOffset).getTime()/1000; printQuery += '&end='+endTime.getTime()/1000; printQuery += '&tzo='+endTime.getTimezoneOffset()*60; MBchat.logout(); window.location = 'print.php?' + printQuery ; //and go back to the forum }); timeShowStartLog = $('timeShowStartLog'); timeShowEndLog = $('timeShowEndLog'); logOptions.minutestep += logOptions.secondstep; //Operationally this is better, so set it up logOptions.hourstep += logOptions.minutestep; logOptions.sixhourstep += logOptions.hourstep; $('minusStartLog').addEvents({ 'mousedown' : function (e) { var incrementer = function() { startTimeOffset += getInterval(); if (endTime.getTime()-startTimeOffset < earliest) { startTimeOffset = endTime.getTime()- earliest; } timeShow(); }; $clear(fetchLogDelay); if(intervalCounterId) $clear(intervalCounterId); intervalCounter=0; incrementer(); //do first one intervalCounterId = incrementer.periodical(logOptions.spinrate); }, 'mouseup' : function (e) { $clear(intervalCounterId); $clear(fetchLogDelay); fetchLogDelay = fetchLog.delay(logOptions.fetchdelay); } }); $('plusStartLog').addEvents({ 'mousedown' : function (e) { var decrementer = function() { if (startTimeOffset > 0) { startTimeOffset -= getInterval(); } if (startTimeOffset < 0) startTimeOffset = 0; timeShow(); }; $clear(fetchLogDelay); if(intervalCounterId) $clear(intervalCounterId); intervalCounter=0; decrementer(); //do first one intervalCounterId = decrementer.periodical(logOptions.spinrate); }, 'mouseup' : function (e) { $clear(intervalCounterId); $clear(fetchLogDelay); fetchLogDelay = fetchLog.delay(logOptions.fetchdelay); } }); $('minusEndLog').addEvents({ 'mousedown' : function (e) { var decrementer = function() { var oSTO = startTimeOffset; if (startTimeOffset > 0) { startTimeOffset -= getInterval(); } if (startTimeOffset < 0) startTimeOffset = 0; endTime = new Date(endTime.getTime()-oSTO+startTimeOffset); timeShow(); }; $clear(fetchLogDelay); if(intervalCounterId) $clear(intervalCounterId); intervalCounter=0; decrementer(); //do first one intervalCounterId = decrementer.periodical(logOptions.spinrate); }, 'mouseup' : function (e) { $clear(intervalCounterId); $clear(fetchLogDelay); fetchLogDelay = fetchLog.delay(logOptions.fetchdelay); } }); $('plusEndLog').addEvents({ 'mousedown' : function (e) { var incrementer = function() { var oSTO = startTimeOffset; var maxOffset = new Date().getTime() - endTime.getTime() + oSTO; startTimeOffset += getInterval(); if (startTimeOffset > maxOffset) startTimeOffset = maxOffset; endTime = new Date(endTime.getTime() - oSTO + startTimeOffset); timeShow(); }; $clear(fetchLogDelay); if(intervalCounterId) $clear(intervalCounterId); intervalCounter=0; incrementer(); //do first one intervalCounterId = incrementer.periodical(logOptions.spinrate); }, 'mouseup' : function (e) { $clear(intervalCounterId); $clear(fetchLogDelay); fetchLogDelay = fetchLog.delay(logOptions.fetchdelay); } }); }, startLog: function (rid,roomName) { logRid = rid; MBchat.updateables.poller.stop(); //presence polls still happen messageList.removeClass('whisper'); messageList.removeClass('chat'); messageList.addClass('logging'); messageList.empty(); printQuery = 'user='+me.uid+'&password='+me.password+'&rid='+rid+'&room='+roomName ; $('inputContainer').addClass('hide'); $('emoticonContainer').addClass('hide'); $('roomNameContainer').empty(); $('entranceHall').addClass('hide'); var exit = $('exit'); exit.removeClass('exit-f'); exit.addClass('exit-r'); $('soundOptions').addClass('hide'); $('onlineListContainer').addClass('hide'); logControls.removeClass('hide'); endTime = new Date(); startTimeOffset = anHour; earliest = endTime.getTime() - aWeek; timeShow(); fetchLogDelay = fetchLog.delay(logOptions.fetchdelay); }, returnToEntranceHall : function(e) { e.stop(); logControls.addClass('hide'); messageList.removeClass('logging'); $('header').removeClass('hide'); $('content').removeClass('hide'); $('entranceHall').removeClass('hide'); $('soundOptions').removeClass('hide'); $('onlineListContainer').removeClass('hide'); MBchat.updateables.poller.start(); MBchat.updateables.message.leaveRoom(); //go To Entrance Hall } }; }() |
this.changeDatabase(this._keeFoxExtension.prefs.getValue("keePassMRUDB",""), true); | var databaseFileName = this._keeFoxExtension.prefs.getValue("keePassDBToOpen",""); if (databaseFileName == "") databaseFileName = this._keeFoxExtension.prefs.getValue("keePassMRUDB",""); this.changeDatabase(databaseFileName, true); | loginToKeePass: function() { this.changeDatabase(this._keeFoxExtension.prefs.getValue("keePassMRUDB",""), true); }, |
var firstName = authors[j].ForeName.text().toString(); | firstName = authors[j].ForeName.text().toString(); } var suffix = authors[j].Suffix.text().toString(); if(suffix && firstName != "") { firstName += ", " + authors[j].Suffix.text().toString(); | function lookupPMIDs(ids, doc) { Zotero.wait(); var newUri = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=PubMed&retmode=xml&rettype=citation&id="+ids.join(","); Zotero.Utilities.HTTP.doGet(newUri, function(text) { // Remove xml parse instruction and doctype text = text.replace(/<!DOCTYPE[^>]*>/, "").replace(/<\?xml[^>]*\?>/, ""); var xml = new XML(text); for(var i=0; i<xml.PubmedArticle.length(); i++) { var newItem = new Zotero.Item("journalArticle"); var citation = xml.PubmedArticle[i].MedlineCitation; var PMID = citation.PMID.text().toString(); newItem.url = "http://www.ncbi.nlm.nih.gov/pubmed/" + PMID; newItem.extra = "PMID: "+PMID; var article = citation.Article; if(article.ArticleTitle.length()) { var title = article.ArticleTitle.text().toString(); if(title.substr(-1) == ".") { title = title.substring(0, title.length-1); } newItem.title = title; } if (article.Pagination.MedlinePgn.length()){ var fullPageRange = article.Pagination.MedlinePgn.text().toString(); var pageRange = fullPageRange.match(/\d+-\d+/g); for (var j in pageRange) { var pageRangeStart = pageRange[j].match(/^\d+/)[0]; var pageRangeEnd = pageRange[j].match(/\d+$/)[0]; if (pageRangeStart.length > pageRangeEnd.length) { pageRangeEnd = pageRangeStart.substring(0,pageRangeStart.length-pageRangeEnd.length) + pageRangeEnd; fullPageRange = fullPageRange.replace(pageRange[j],pageRangeStart+"-"+pageRangeEnd); } } newItem.pages = fullPageRange; } if(article.Journal.length()) { var issn = article.Journal.ISSN.text().toString(); if(issn) { newItem.ISSN = issn; } if(citation.Article.Journal.ISOAbbreviation.length()) { newItem.journalAbbreviation = Zotero.Utilities.superCleanString(citation.Article.Journal.ISOAbbreviation.text().toString()); } else if(citation.MedlineJournalInfo.MedlineTA.length()) { newItem.journalAbbreviation = Zotero.Utilities.superCleanString(citation.MedlineJournalInfo.MedlineTA.text().toString()); } if(article.Journal.Title.length()) { newItem.publicationTitle = Zotero.Utilities.superCleanString(article.Journal.Title.text().toString()); } else if(newItem.journalAbbreviation.length()) { newItem.publicationTitle = newItem.journalAbbreviation; } if(article.Journal.JournalIssue.length()) { newItem.volume = article.Journal.JournalIssue.Volume.text().toString(); newItem.issue = article.Journal.JournalIssue.Issue.text().toString(); if(article.Journal.JournalIssue.PubDate.length()) { // try to get the date if(article.Journal.JournalIssue.PubDate.Day.text().toString() != "") { newItem.date = article.Journal.JournalIssue.PubDate.Month.text().toString()+" "+article.Journal.JournalIssue.PubDate.Day.text().toString()+", "+article.Journal.JournalIssue.PubDate.Year.text().toString(); } else if(article.Journal.JournalIssue.PubDate.Month.text().toString() != "") { newItem.date = article.Journal.JournalIssue.PubDate.Month.text().toString()+" "+article.Journal.JournalIssue.PubDate.Year.text().toString(); } else if(article.Journal.JournalIssue.PubDate.Year.text().toString() != "") { newItem.date = article.Journal.JournalIssue.PubDate.Year.text().toString(); } else if(article.Journal.JournalIssue.PubDate.MedlineDate.text().toString() != "") { newItem.date = article.Journal.JournalIssue.PubDate.MedlineDate.text().toString(); } } } } if(article.AuthorList.length() && article.AuthorList.Author.length()) { var authors = article.AuthorList.Author; for(var j=0; j<authors.length(); j++) { var lastName = authors[j].LastName.text().toString(); var firstName = authors[j].FirstName.text().toString(); if(firstName == "") { var firstName = authors[j].ForeName.text().toString(); } if(firstName || lastName) { newItem.creators.push({lastName:lastName, firstName:firstName}); } } } if (citation.MeshHeadingList && citation.MeshHeadingList.MeshHeading) { var keywords = citation.MeshHeadingList.MeshHeading; for (var k = 0 ; k < keywords.length() ; k++) { newItem.tags.push(keywords[k].DescriptorName.text().toString()); } } newItem.abstractNote = article.Abstract.AbstractText.toString() newItem.DOI = xml.PubmedArticle[i].PubmedData.ArticleIdList.ArticleId.(@IdType == "doi" ).text().toString(); newItem.publicationTitle = Zotero.Utilities.capitalizeTitle(newItem.publicationTitle); newItem.complete(); } Zotero.done(); });} |
false&&f.load();return B(i)}if($f(a)){$f(a).getParent().innerHTML="";u=$f(a).getIndex();e[u]=f}else{e.push(f);u=e.length-1}I=parseInt(a.style.height,10)||a.clientHeight;if(typeof b=="string")b={src:b};j=a.id||"fp"+C();n=b.id||j+"_api";b.id=n;c.playerId=j;if(typeof c=="string")c={clip:{url:c}};if(typeof c.clip=="string")c.clip={url:c.clip};c.clip=c.clip||{};if(a.getAttribute("href",2)&&!c.clip.url)c.clip.url=a.getAttribute("href",2);h=new p(c.clip,-1,f);c.playlist=c.playlist||[c.clip];var q=0;o(c.playlist, | false&&f.load();return B(i)}if($f(a)){$f(a).getParent().innerHTML="";u=$f(a).getIndex();e[u]=f}else{e.push(f);u=e.length-1}G=parseInt(a.style.height,10)||a.clientHeight;if(typeof b=="string")b={src:b};j=a.id||"fp"+C();n=b.id||j+"_api";b.id=n;c.playerId=j;if(typeof c=="string")c={clip:{url:c}};if(typeof c.clip=="string")c.clip={url:c.clip};c.clip=c.clip||{};if(a.getAttribute("href",2)&&!c.clip.url)c.clip.url=a.getAttribute("href",2);h=new p(c.clip,-1,f);c.playlist=c.playlist||[c.clip];var q=0;o(c.playlist, | b)||"*",m=a.substring(b+1,a.length),f=[];o(document.getElementsByTagName(c),function(){this.className&&this.className.indexOf(m)!=-1&&f.push(this)});return f}}function B(a){a=a||window.event;if(a.preventDefault){a.stopPropagation();a.preventDefault()}else{a.returnValue=false;a.cancelBubble=true}return false}function y(a,b,c){a[b]=a[b]||[];a[b].push(c)}function C(){return"_"+(""+Math.random()).substring(2,10)}function A(a,b,c){function m(){function g(i){!f.isLoaded()&&f._fireEvent("onBeforeClick")!==false&&f.load();return B(i)}if($f(a)){$f(a).getParent().innerHTML="";u=$f(a).getIndex();e[u]=f}else{e.push(f);u=e.length-1}I=parseInt(a.style.height,10)||a.clientHeight;if(typeof b=="string")b={src:b};j=a.id||"fp"+C();n=b.id||j+"_api";b.id=n;c.playerId=j;if(typeof c=="string")c={clip:{url:c}};if(typeof c.clip=="string")c.clip={url:c.clip};c.clip=c.clip||{};if(a.getAttribute("href",2)&&!c.clip.url)c.clip.url=a.getAttribute("href",2);h=new p(c.clip,-1,f);c.playlist=c.playlist||[c.clip];var q=0;o(c.playlist,function(){var i=this;if(typeof i=="object"&&i.length)i={url:""+i};o(c.clip,function(s,D){if(D!==undefined&&i[s]===undefined&&typeof D!="function")i[s]=D});c.playlist[q]=i;i=new p(i,q,f);k.push(i);q++});o(c,function(i,s){if(typeof s=="function"){h[i]?h[i](s):y(w,i,s);delete c[i]}});o(c.plugins,function(i,s){if(s)r[i]=new d(i,s,f)});if(!c.plugins||c.plugins.controls===undefined)r.controls=new d("controls",null,f);r.canvas=new d("canvas",null,f);b.bgcolor=b.bgcolor||"#000000";b.version=b.version||[9,0];b.expressInstall="http://www.flowplayer.org/swf/expressinstall.swf";F=a.innerHTML;if(F.replace(/\s/g,"")!=="")if(a.addEventListener)a.addEventListener("click",g,false);else a.attachEvent&&a.attachEvent("onclick",g);else{a.addEventListener&&a.addEventListener("click",B,false);f.load()}}var f=this,l=null,F,h,k=[],r={},w={},j,n,u,x,G,I;v(f,{id:function(){return j},isLoaded:function(){return l!==null},getParent:function(){return a},hide:function(g){if(g)a.style.height="0px";if(l)l.style.height="0px"; |
if(x.type!=CKEDITOR.NODE_ELEMENT)x=x.getParent();x.scrollIntoView();y.updateFromDomRange(w);},removeHighlight:function(){var w=this;if(!w._.highlightRange)return;j.removeFromRange(w._.highlightRange);w.updateFromDomRange(w._.highlightRange);w._.highlightRange=null;},moveBack:function(){var y=this;var w=y._.walker.back(),x=y._.cursors;if(w.hitMatchBoundary)y._.cursors=x=[];x.unshift(w);if(x.length>y._.rangeLength)x.pop();return w;},moveNext:function(){var y=this;var w=y._.walker.next(),x=y._.cursors;if(w.hitMatchBoundary)y._.cursors=x=[];x.push(w);if(x.length>y._.rangeLength)x.shift();return w;},getEndCharacter:function(){var w=this._.cursors;if(w.length<1)return null;return w[w.length-1].character;},getNextCharacterRange:function(w){var x,y,z=this._.cursors;if(x=z[z.length-1])y=new k(m(x));else y=this._.walker;return new l(y,w);},getCursors:function(){return this._.cursors;}};function m(w,x){var y=new CKEDITOR.dom.range();y.setStart(w.textNode,x?w.offset:w.offset+1);y.setEndAt(h.document.getBody(),CKEDITOR.POSITION_BEFORE_END);return y;};function n(w){var x=new CKEDITOR.dom.range();x.setStartAt(h.document.getBody(),CKEDITOR.POSITION_AFTER_START);x.setEnd(w.textNode,w.offset);return x;};var o=0,p=1,q=2,r=function(w,x){var y=[-1];if(x)w=w.toLowerCase();for(var z=0;z<w.length;z++){y.push(y[z]+1);while(y[z+1]>0&&w.charAt(z)!=w.charAt(y[z+1]-1))y[z+1]=y[y[z+1]-1]+1;}this._={overlap:y,state:0,ignoreCase:!!x,pattern:w};};r.prototype={feedCharacter:function(w){var x=this;if(x._.ignoreCase)w=w.toLowerCase();for(;;){if(w==x._.pattern.charAt(x._.state)){x._.state++;if(x._.state==x._.pattern.length){x._.state=0;return q;}return p;}else if(!x._.state)return o;else x._.state=x._.overlap[x._.state];}return null;},reset:function(){this._.state=0;}};var s=/[.,"'?!;: \u0085\u00a0\u1680\u280e\u2028\u2029\u202f\u205f\u3000]/,t=function(w){if(!w)return true;var x=w.charCodeAt(0);return x>=9&&x<=13||x>=8192&&x<=8202||s.test(w);},u={searchRange:null,matchRange:null,find:function(w,x,y,z,A,B){var K=this;if(!K.matchRange)K.matchRange=new l(new k(K.searchRange),w.length);else{K.matchRange.removeHighlight();K.matchRange=K.matchRange.getNextCharacterRange(w.length);}var C=new r(w,!x),D=o,E='%';while(E!==null){K.matchRange.moveNext();while(E=K.matchRange.getEndCharacter()){D=C.feedCharacter(E);if(D==q)break;if(K.matchRange.moveNext().hitMatchBoundary)C.reset();}if(D==q){if(y){var F=K.matchRange.getCursors(),G=F[F.length-1],H=F[0],I=new k(n(H),true),J=new k(m(G),true);if(!(t(I.back().character)&&t(J.next().character)))continue; | (function(){var a;function b(i){return i.type==CKEDITOR.NODE_TEXT&&i.getLength()>0&&(!a||!i.isReadOnly());};function c(i){return!(i.type==CKEDITOR.NODE_ELEMENT&&i.isBlockBoundary(CKEDITOR.tools.extend({},CKEDITOR.dtd.$empty,CKEDITOR.dtd.$nonEditable)));};var d=function(){var i=this;return{textNode:i.textNode,offset:i.offset,character:i.textNode?i.textNode.getText().charAt(i.offset):null,hitMatchBoundary:i._.matchBoundary};},e=['find','replace'],f=[['txtFindFind','txtFindReplace'],['txtFindCaseChk','txtReplaceCaseChk'],['txtFindWordChk','txtReplaceWordChk'],['txtFindCyclic','txtReplaceCyclic']];function g(i){var j,k,l,m;j=i==='find'?1:0;k=1-j;var n,o=f.length;for(n=0;n<o;n++){l=this.getContentElement(e[j],f[n][j]);m=this.getContentElement(e[k],f[n][k]);m.setValue(l.getValue());}};var h=function(i,j){var k=new CKEDITOR.style(CKEDITOR.tools.extend({fullMatch:true,childRule:function(){return false;}},i.config.find_highlight)),l=function(x,y){var z=new CKEDITOR.dom.walker(x);z.guard=y?c:null;z.evaluator=b;z.breakOnFalse=true;this._={matchWord:y,walker:z,matchBoundary:false};};l.prototype={next:function(){return this.move();},back:function(){return this.move(true);},move:function(x){var z=this;var y=z.textNode;if(y===null)return d.call(z);z._.matchBoundary=false;if(y&&x&&z.offset>0){z.offset--;return d.call(z);}else if(y&&z.offset<y.getLength()-1){z.offset++;return d.call(z);}else{y=null;while(!y){y=z._.walker[x?'previous':'next'].call(z._.walker);if(z._.matchWord&&!y||z._.walker._.end)break;if(!y&&!c(z._.walker.current))z._.matchBoundary=true;}z.textNode=y;if(y)z.offset=x?y.getLength()-1:0;else z.offset=0;}return d.call(z);}};var m=function(x,y){this._={walker:x,cursors:[],rangeLength:y,highlightRange:null,isMatched:false};};m.prototype={toDomRange:function(){var x=new CKEDITOR.dom.range(i.document),y=this._.cursors;if(y.length<1){var z=this._.walker.textNode;if(z)x.setStartAfter(z);else return null;}else{var A=y[0],B=y[y.length-1];x.setStart(A.textNode,A.offset);x.setEnd(B.textNode,B.offset+1);}return x;},updateFromDomRange:function(x){var A=this;var y,z=new l(x);A._.cursors=[];do{y=z.next();if(y.character)A._.cursors.push(y);}while(y.character)A._.rangeLength=A._.cursors.length;},setMatched:function(){this._.isMatched=true;},clearMatched:function(){this._.isMatched=false;},isMatched:function(){return this._.isMatched;},highlight:function(){var A=this;if(A._.cursors.length<1)return;if(A._.highlightRange)A.removeHighlight();var x=A.toDomRange(),y=x.createBookmark(); | if(x.type!=CKEDITOR.NODE_ELEMENT)x=x.getParent();x.scrollIntoView();y.updateFromDomRange(w);},removeHighlight:function(){var w=this;if(!w._.highlightRange)return;j.removeFromRange(w._.highlightRange);w.updateFromDomRange(w._.highlightRange);w._.highlightRange=null;},moveBack:function(){var y=this;var w=y._.walker.back(),x=y._.cursors;if(w.hitMatchBoundary)y._.cursors=x=[];x.unshift(w);if(x.length>y._.rangeLength)x.pop();return w;},moveNext:function(){var y=this;var w=y._.walker.next(),x=y._.cursors;if(w.hitMatchBoundary)y._.cursors=x=[];x.push(w);if(x.length>y._.rangeLength)x.shift();return w;},getEndCharacter:function(){var w=this._.cursors;if(w.length<1)return null;return w[w.length-1].character;},getNextCharacterRange:function(w){var x,y,z=this._.cursors;if(x=z[z.length-1])y=new k(m(x));else y=this._.walker;return new l(y,w);},getCursors:function(){return this._.cursors;}};function m(w,x){var y=new CKEDITOR.dom.range();y.setStart(w.textNode,x?w.offset:w.offset+1);y.setEndAt(h.document.getBody(),CKEDITOR.POSITION_BEFORE_END);return y;};function n(w){var x=new CKEDITOR.dom.range();x.setStartAt(h.document.getBody(),CKEDITOR.POSITION_AFTER_START);x.setEnd(w.textNode,w.offset);return x;};var o=0,p=1,q=2,r=function(w,x){var y=[-1];if(x)w=w.toLowerCase();for(var z=0;z<w.length;z++){y.push(y[z]+1);while(y[z+1]>0&&w.charAt(z)!=w.charAt(y[z+1]-1))y[z+1]=y[y[z+1]-1]+1;}this._={overlap:y,state:0,ignoreCase:!!x,pattern:w};};r.prototype={feedCharacter:function(w){var x=this;if(x._.ignoreCase)w=w.toLowerCase();for(;;){if(w==x._.pattern.charAt(x._.state)){x._.state++;if(x._.state==x._.pattern.length){x._.state=0;return q;}return p;}else if(!x._.state)return o;else x._.state=x._.overlap[x._.state];}return null;},reset:function(){this._.state=0;}};var s=/[.,"'?!;: \u0085\u00a0\u1680\u280e\u2028\u2029\u202f\u205f\u3000]/,t=function(w){if(!w)return true;var x=w.charCodeAt(0);return x>=9&&x<=13||x>=8192&&x<=8202||s.test(w);},u={searchRange:null,matchRange:null,find:function(w,x,y,z,A,B){var K=this;if(!K.matchRange)K.matchRange=new l(new k(K.searchRange),w.length);else{K.matchRange.removeHighlight();K.matchRange=K.matchRange.getNextCharacterRange(w.length);}var C=new r(w,!x),D=o,E='%';while(E!==null){K.matchRange.moveNext();while(E=K.matchRange.getEndCharacter()){D=C.feedCharacter(E);if(D==q)break;if(K.matchRange.moveNext().hitMatchBoundary)C.reset();}if(D==q){if(y){var F=K.matchRange.getCursors(),G=F[F.length-1],H=F[0],I=new k(n(H),true),J=new k(m(G),true);if(!(t(I.back().character)&&t(J.next().character)))continue; |
WT_DECLARE_WT_MEMBER(1,"WSuggestionPopup",function(q,d,y,z,r){function m(a){return $(a).hasClass("Wt-suggest-onedit")||$(a).hasClass("Wt-suggest-dropdown")}function s(){return d.style.display!="none"}function k(){d.style.display="none"}function A(a){c.positionAtWidget(d.id,a.id,c.Vertical)}function B(a){a=a||window.event;a=a.target||a.srcElement;if(a.className!="content"){for(;a&&!c.hasTag(a,"DIV");)a=a.parentNode;a&&t(a)}}function t(a){var b=a.firstChild,h=c.getElement(f),e=b.innerHTML;b=b.getAttribute("sug"); | WT_DECLARE_WT_MEMBER(1,"WSuggestionPopup",function(q,d,A,B,r){function m(a){return $(a).hasClass("Wt-suggest-onedit")||$(a).hasClass("Wt-suggest-dropdown")}function t(){return d.style.display!="none"}function l(){d.style.display="none"}function C(a){c.positionAtWidget(d.id,a.id,c.Vertical)}function D(a){a=a||window.event;a=a.target||a.srcElement;if(a.className!="content"){for(;a&&!c.hasTag(a,"DIV");)a=a.parentNode;a&&u(a)}}function u(a){var b=a.firstChild,h=c.getElement(f),e=b.innerHTML;b=b.getAttribute("sug"); | WT_DECLARE_WT_MEMBER(1,"WSuggestionPopup",function(q,d,y,z,r){function m(a){return $(a).hasClass("Wt-suggest-onedit")||$(a).hasClass("Wt-suggest-dropdown")}function s(){return d.style.display!="none"}function k(){d.style.display="none"}function A(a){c.positionAtWidget(d.id,a.id,c.Vertical)}function B(a){a=a||window.event;a=a.target||a.srcElement;if(a.className!="content"){for(;a&&!c.hasTag(a,"DIV");)a=a.parentNode;a&&t(a)}}function t(a){var b=a.firstChild,h=c.getElement(f),e=b.innerHTML;b=b.getAttribute("sug"); |
h.offsetWidth,-c.parentNode.previousSibling.offsetHeight,c.parentNode.nextSibling.offsetHeight,"Wt-vsh",function(o){m(c,f,o)},h,l,g,0,0)}function k(c,f,g){var h=-c.previousSibling.offsetWidth,o=c.nextSibling.offsetWidth,q=c.firstChild,v=a.pxself(t.rows[0].childNodes[0],"paddingTop"),w=a.pxself(t.rows[t.rows.length-1].childNodes[0],"paddingBottom");new a.SizeHandle(a,"h",q.offsetWidth,t.offsetHeight-v-w,h,o,"Wt-hsh",function(B){e(c,f,B)},q,l,g,0,-c.offsetTop+v-a.pxself(c,"paddingTop"))}function m(c, f,g){var h=c.parentNode.previousSibling;c=c.parentNode.nextSibling;var o=h.offsetHeight,q=c.offsetHeight;if(r.stretch[f]>0&&r.stretch[f+1]>0)r.stretch[f]=-1;if(r.stretch[f+1]==0)r.stretch[f+1]=-1;r.stretch[f]<=0&&p.adjustRow(h,o+g);r.stretch[f+1]<=0&&p.adjustRow(c,q-g);a.getElement(s).dirty=true;window.onresize()}function d(){var c,f=0;for(c=0;;++c){var g=u(c);if(g)f+=a.pctself(g,"width");else break}if(f!=0)for(c=0;;++c)if(g=u(c)){var h=a.pctself(g,"width");if(h)g.style.width=h*100/f+"%"}else break} | j.offsetWidth,-c.parentNode.previousSibling.offsetHeight,c.parentNode.nextSibling.offsetHeight,"Wt-vsh",function(q){o(c,f,q)},j,n,g,0,0)}function m(c,f,g){var j=-c.previousSibling.offsetWidth,q=c.nextSibling.offsetWidth,s=c.firstChild,w=a.pxself(v.rows[0].childNodes[0],"paddingTop"),x=a.pxself(v.rows[v.rows.length-1].childNodes[0],"paddingBottom");new a.SizeHandle(a,"h",s.offsetWidth,v.offsetHeight-w-x,j,q,"Wt-hsh",function(C){e(c,f,C)},s,n,g,0,-c.offsetTop+w-a.pxself(c,"paddingTop"))}function o(c, | h.offsetWidth,-c.parentNode.previousSibling.offsetHeight,c.parentNode.nextSibling.offsetHeight,"Wt-vsh",function(o){m(c,f,o)},h,l,g,0,0)}function k(c,f,g){var h=-c.previousSibling.offsetWidth,o=c.nextSibling.offsetWidth,q=c.firstChild,v=a.pxself(t.rows[0].childNodes[0],"paddingTop"),w=a.pxself(t.rows[t.rows.length-1].childNodes[0],"paddingBottom");new a.SizeHandle(a,"h",q.offsetWidth,t.offsetHeight-v-w,h,o,"Wt-hsh",function(B){e(c,f,B)},q,l,g,0,-c.offsetTop+v-a.pxself(c,"paddingTop"))}function m(c,f,g){var h=c.parentNode.previousSibling;c=c.parentNode.nextSibling;var o=h.offsetHeight,q=c.offsetHeight;if(r.stretch[f]>0&&r.stretch[f+1]>0)r.stretch[f]=-1;if(r.stretch[f+1]==0)r.stretch[f+1]=-1;r.stretch[f]<=0&&p.adjustRow(h,o+g);r.stretch[f+1]<=0&&p.adjustRow(c,q-g);a.getElement(s).dirty=true;window.onresize()}function d(){var c,f=0;for(c=0;;++c){var g=u(c);if(g)f+=a.pctself(g,"width");else break}if(f!=0)for(c=0;;++c)if(g=u(c)){var h=a.pctself(g,"width");if(h)g.style.width=h*100/f+"%"}else break} |
null;f=false}else{d={result:"signal=poll"};c=null;f=true}J=y._p_.comm.sendUpdate(ka+j,"request=jsupdate&"+d.result+"&ackId="+da,c,da,-1);O=f?setTimeout(x,_$_SERVER_PUSH_TIMEOUT_$_):null}}function M(d,c){var f={},j=z.length;f.signal="user";f.id=typeof d==="string"?d:d==_$_APP_CLASS_$_?"app":d.id;if(typeof c==="object"){f.name=c.name;f.object=c.eventObject;f.event=c.event}else{f.name=c;f.object=f.event=null}f.args=[];for(var m=2;m<arguments.length;++m){var g=arguments[m];g=g===false?0:g===true?1:g.toDateString? g.toDateString():g;f.args[m-2]=g}f.feedback=true;z[j]=T(f,j);F()}function L(d,c,f){var j=function(){var g=o.getElement(d);if(g){if(f)g.timer=setTimeout(g.tm,c);else{g.timer=null;g.tm=null}g.onclick&&g.onclick()}},m=o.getElement(d);m.timer=setTimeout(j,c);m.tm=j}function E(d,c){setTimeout(function(){if(S[d]===true)c();else S[d]=c},20)}function N(d){if(S[d]!==true){typeof S[d]!=="undefined"&&S[d]();S[d]=true}}function l(d,c){var f=false;if(c!="")try{f=!eval("typeof "+c+" === 'undefined'")}catch(j){f= | x){x=G;j(G)}},50);H=true;w!=null&&w()}}function n(){if(!q){var l=a(),p=history.length;F&&clearInterval(F);F=setInterval(function(){var r,x;r=a();x=history.length;if(r!==l){l=r;p=x;e(l);b()}else if(x!==p&&u){l=r;p=x;r=L[p-1];e(r);b()}},50)}}function J(){var l;l=E.value.split("|");if(l.length>1){K=l[0];D=l[1]}if(l.length>2)L=l[2].split(",");if(q)i();else{n();H=true;w!=null&&w()}}var u=false,q=false,C=false,w=null,z=null,E=null,H=false,F=null,L=[],K,D,M=function(){};return{onReady:function(l){if(H)setTimeout(function(){l()}, | null;f=false}else{d={result:"signal=poll"};c=null;f=true}J=y._p_.comm.sendUpdate(ka+j,"request=jsupdate&"+d.result+"&ackId="+da,c,da,-1);O=f?setTimeout(x,_$_SERVER_PUSH_TIMEOUT_$_):null}}function M(d,c){var f={},j=z.length;f.signal="user";f.id=typeof d==="string"?d:d==_$_APP_CLASS_$_?"app":d.id;if(typeof c==="object"){f.name=c.name;f.object=c.eventObject;f.event=c.event}else{f.name=c;f.object=f.event=null}f.args=[];for(var m=2;m<arguments.length;++m){var g=arguments[m];g=g===false?0:g===true?1:g.toDateString?g.toDateString():g;f.args[m-2]=g}f.feedback=true;z[j]=T(f,j);F()}function L(d,c,f){var j=function(){var g=o.getElement(d);if(g){if(f)g.timer=setTimeout(g.tm,c);else{g.timer=null;g.tm=null}g.onclick&&g.onclick()}},m=o.getElement(d);m.timer=setTimeout(j,c);m.tm=j}function E(d,c){setTimeout(function(){if(S[d]===true)c();else S[d]=c},20)}function N(d){if(S[d]!==true){typeof S[d]!=="undefined"&&S[d]();S[d]=true}}function l(d,c){var f=false;if(c!="")try{f=!eval("typeof "+c+" === 'undefined'")}catch(j){f= |
O=f?setTimeout(x,_$_SERVER_PUSH_TIMEOUT_$_):null}}function M(d,c){var f={},j=z.length;f.signal="user";f.id=typeof d==="string"?d:d==_$_APP_CLASS_$_?"app":d.id;if(typeof c==="object"){f.name=c.name;f.object=c.eventObject;f.event=c.event}else{f.name=c;f.object=f.event=null}f.args=[];for(var m=2;m<arguments.length;++m){var h=arguments[m];h=h===false?0:h===true?1:h.toDateString?h.toDateString():h;f.args[m-2]=h}f.feedback=true;z[j]=T(f,j);F()}function L(d,c,f){var j=function(){var h=o.getElement(d);if(h){if(f)h.timer= | O=f?setTimeout(x,_$_SERVER_PUSH_TIMEOUT_$_):null}}function M(d,c){var f={},j=z.length;f.signal="user";f.id=typeof d==="string"?d:d==_$_APP_CLASS_$_?"app":d.id;if(typeof c==="object"){f.name=c.name;f.object=c.eventObject;f.event=c.event}else{f.name=c;f.object=f.event=null}f.args=[];for(var m=2;m<arguments.length;++m){var g=arguments[m];g=g===false?0:g===true?1:g.toDateString?g.toDateString():g;f.args[m-2]=g}f.feedback=true;z[j]=T(f,j);F()}function L(d,c,f){var j=function(){var g=o.getElement(d);if(g){if(f)g.timer= | O=f?setTimeout(x,_$_SERVER_PUSH_TIMEOUT_$_):null}}function M(d,c){var f={},j=z.length;f.signal="user";f.id=typeof d==="string"?d:d==_$_APP_CLASS_$_?"app":d.id;if(typeof c==="object"){f.name=c.name;f.object=c.eventObject;f.event=c.event}else{f.name=c;f.object=f.event=null}f.args=[];for(var m=2;m<arguments.length;++m){var h=arguments[m];h=h===false?0:h===true?1:h.toDateString?h.toDateString():h;f.args[m-2]=h}f.feedback=true;z[j]=T(f,j);F()}function L(d,c,f){var j=function(){var h=o.getElement(d);if(h){if(f)h.timer= |
-1;this.isIEMobile=navigator.userAgent.toLowerCase().indexOf("msie 4")!=-1||navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1;this.updateDelay=this.isIE?10:51;this.setHtml=function(a,b,f){function m(o,B){var r,t,C;switch(o.nodeType){case 1:r=o.namespaceURI==null?document.createElement(o.nodeName):document.createElementNS(o.namespaceURI,o.nodeName);if(o.attributes&&o.attributes.length>0){t=0;for(C=o.attributes.length;t<C;)r.setAttribute(o.attributes[t].nodeName,o.getAttribute(o.attributes[t++].nodeName))}if(B&& o.childNodes.length>0){t=0;for(C=o.childNodes.length;t<C;){var D=m(o.childNodes[t++],B);D&&r.appendChild(D)}}return r;case 3:case 4:case 5:return document.createTextNode(o.nodeValue)}return null}if(k.isIE||_$_INNER_HTML_$_&&!f)if(f)a.innerHTML+=b;else a.innerHTML=b;else{var l;l=new DOMParser;l=l.parseFromString("<div>"+b+"</div>","application/xhtml+xml").documentElement;if(l.nodeType!=1)l=l.nextSibling;if(!f)a.innerHTML="";b=0;for(f=l.childNodes.length;b<f;)a.appendChild(m(l.childNodes[b++],true))}}; | -1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1)&&navigator.userAgent.toLowerCase().indexOf("msie 6")!=-1;this.isGecko=navigator.userAgent.toLowerCase().indexOf("gecko")!=-1;this.isIEMobile=navigator.userAgent.toLowerCase().indexOf("msie 4")!=-1||navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1;this.updateDelay=this.isIE?10:51;this.setHtml=function(a,b,f){function m(n,E){var q,u,H;switch(n.nodeType){case 1:q=n.namespaceURI==null?document.createElement(n.nodeName):document.createElementNS(n.namespaceURI, n.nodeName);if(n.attributes&&n.attributes.length>0){u=0;for(H=n.attributes.length;u<H;)q.setAttribute(n.attributes[u].nodeName,n.getAttribute(n.attributes[u++].nodeName))}if(E&&n.childNodes.length>0){u=0;for(H=n.childNodes.length;u<H;){var A=m(n.childNodes[u++],E);A&&q.appendChild(A)}}return q;case 3:case 4:case 5:return document.createTextNode(n.nodeValue)}return null}if(k.isIE||_$_INNER_HTML_$_&&!f)if(f)a.innerHTML+=b;else a.innerHTML=b;else{var l;l=new DOMParser;l=l.parseFromString("<div>"+b+"</div>", | -1;this.isIEMobile=navigator.userAgent.toLowerCase().indexOf("msie 4")!=-1||navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1;this.updateDelay=this.isIE?10:51;this.setHtml=function(a,b,f){function m(o,B){var r,t,C;switch(o.nodeType){case 1:r=o.namespaceURI==null?document.createElement(o.nodeName):document.createElementNS(o.namespaceURI,o.nodeName);if(o.attributes&&o.attributes.length>0){t=0;for(C=o.attributes.length;t<C;)r.setAttribute(o.attributes[t].nodeName,o.getAttribute(o.attributes[t++].nodeName))}if(B&&o.childNodes.length>0){t=0;for(C=o.childNodes.length;t<C;){var D=m(o.childNodes[t++],B);D&&r.appendChild(D)}}return r;case 3:case 4:case 5:return document.createTextNode(o.nodeValue)}return null}if(k.isIE||_$_INNER_HTML_$_&&!f)if(f)a.innerHTML+=b;else a.innerHTML=b;else{var l;l=new DOMParser;l=l.parseFromString("<div>"+b+"</div>","application/xhtml+xml").documentElement;if(l.nodeType!=1)l=l.nextSibling;if(!f)a.innerHTML="";b=0;for(f=l.childNodes.length;b<f;)a.appendChild(m(l.childNodes[b++],true))}}; |
(function(){var v="http: function c(){d=true;switch(b.readyState){case 0:a.aborted(b);break;case 4:b.status===200?a.complete(b):a.error(Xmla.Exception._newError("HTTP_ERROR","_ajax",a));break}}b.onreadystatechange=c;b.setRequestHeader("Content-Type","text/xml");b.send(a.data);!a.async&&!d&&c.call(b);return b}function j(a){return typeof a==="undefined"}function t(a){return typeof a==="function"}function N(a){return typeof a==="string"}function O(a){return typeof a==="number"}function P(a){return typeof a==="object"}function C(a){return a.replace(/\&/g, | a.error(Xmla.Exception._newError("HTTP_ERROR","_ajax",a));break}}b=K?new ActiveXObject("MSXML2.XMLHTTP.3.0"):new XMLHttpRequest;b.open("POST",a.url,a.async);b.onreadystatechange=c;b.setRequestHeader("Content-Type","text/xml");b.send(a.data);!a.async&&!d&&c.call(b);return b}function j(a){return typeof a==="undefined"}function M(a){return typeof a==="function"}function N(a){return typeof a==="string"}function O(a){return typeof a==="number"}function P(a){return typeof a==="object"}function B(a){return a.replace(/\&/g, | (function(){var v="http://schemas.xmlsoap.org/soap/",w=v+"envelope/",n="SOAP-ENV",F="xmlns:"+n+'="'+w+'"',x=n+':encodingStyle="'+v+'encoding/"',y="urn:schemas-microsoft-com:",z=y+"xml-analysis",G='xmlns="'+z+'"',H="sql",I=y+"xml-sql",A="http://www.w3.org/2001/XMLSchema",B="xsd",J="http://www.w3.org/2001/XMLSchema-instance",K="xsi",r=z+":rowset",L=window.ActiveXObject?true:false;function M(a){var b;b=L?new ActiveXObject("MSXML2.XMLHTTP.3.0"):new XMLHttpRequest;b.open("POST",a.url,a.async);var d=false;function c(){d=true;switch(b.readyState){case 0:a.aborted(b);break;case 4:b.status===200?a.complete(b):a.error(Xmla.Exception._newError("HTTP_ERROR","_ajax",a));break}}b.onreadystatechange=c;b.setRequestHeader("Content-Type","text/xml");b.send(a.data);!a.async&&!d&&c.call(b);return b}function j(a){return typeof a==="undefined"}function t(a){return typeof a==="function"}function N(a){return typeof a==="string"}function O(a){return typeof a==="number"}function P(a){return typeof a==="object"}function C(a){return a.replace(/\&/g, |
}else{v=w.startContainer;v=v.getChild(w.startOffset);if(v){if(x(v)===false)v=null;}else v=x(w.startContainer,true)===false?null:w.startContainer.getNextSourceNode(true,z,x);}while(v&&!this._.end){this.current=v;if(!this.evaluator||this.evaluator(v)!==false){if(!u)return v;}else if(u&&this.evaluator)return false;v=v[A](false,z,x);}this.end();return this.current=null;};function m(t){var u,v=null;while(u=l.call(this,t))v=u;return v;};d.walker=e.createClass({$:function(t){this.range=t;this._={};},proto:{end:function(){this._.end=1;},next:function(){return l.call(this);},previous:function(){return l.call(this,true);},checkForward:function(){return l.call(this,false,true)!==false;},checkBackward:function(){return l.call(this,true,true)!==false;},lastForward:function(){return m.call(this);},lastBackward:function(){return m.call(this,true);},reset:function(){delete this.current;this._={};}}});var n={block:1,'list-item':1,table:1,'table-row-group':1,'table-header-group':1,'table-footer-group':1,'table-row':1,'table-column-group':1,'table-column':1,'table-cell':1,'table-caption':1},o={hr:1};h.prototype.isBlockBoundary=function(t){var u=e.extend({},o,t||{});return n[this.getComputedStyle('display')]||u[this.getName()];};d.walker.blockBoundary=function(t){return function(u,v){return!(u.type==1&&u.isBlockBoundary(t));};};d.walker.listItemBoundary=function(){return this.blockBoundary({br:1});};d.walker.bookmarkContents=function(t){},d.walker.bookmark=function(t,u){function v(w){return w&&w.getName&&w.getName()=='span'&&w.hasAttribute('_fck_bookmark');};return function(w){var x,y;x=w&&!w.getName&&(y=w.getParent())&&v(y);x=t?x:x||v(w);return u^x;};};d.walker.whitespaces=function(t){return function(u){var v=u&&u.type==3&&!e.trim(u.getText());return t^v;};};d.walker.invisible=function(t){var u=d.walker.whitespaces();return function(v){var w=u(v)||v.is&&!v.$.offsetHeight;return t^w;};};var p=/^[\t\r\n ]*(?: |\xa0)$/,q=d.walker.whitespaces(true),r=d.walker.bookmark(false,true),s=function(t){return r(t)&&q(t);};h.prototype.getBogus=function(){var t=this.getLast(s);if(t&&(!c?t.is&&t.is('br'):t.getText&&p.test(t.getText())))return t;return false;};})();d.range=function(l){var m=this;m.startContainer=null;m.startOffset=null;m.endContainer=null;m.endOffset=null;m.collapsed=true;m.document=l;};(function(){var l=function(t){t.collapsed=t.startContainer&&t.endContainer&&t.startContainer.equals(t.endContainer)&&t.startOffset==t.endOffset;},m=function(t,u,v){t.optimizeBookmark();var w=t.startContainer,x=t.endContainer,y=t.startOffset,z=t.endOffset,A,B; | for(var C=0;C<B.length;C++)a.document.appendStyleSheet(B[C]);}else{B=u(B,a.getUrl(m[p]));a.document.appendStyleText(B);}q.css=B;y=1;}if(!z){t(q.js);a.scriptLoader.load(q.js,function(){z=1;A();});}A();}};return{add:function(o,p){k[o]=p;p.skinPath=m[o]||(m[o]=a.getUrl('skins/'+o+'/'));},load:function(o,p,q){var r=o.skinName,s=o.skinPath;if(k[r])n(o,r,p,q);else{m[r]=s;a.scriptLoader.load(a.getUrl(s+'skin.js'),function(){n(o,r,p,q);});}}};})();a.themes=new a.resourceManager('themes/','theme');a.ui=function(k){if(k.ui)return k.ui;this._={handlers:{},items:{},editor:k};return this;};var k=a.ui;k.prototype={add:function(l,m,n){this._.items[l]={type:m,command:n.command||null,args:Array.prototype.slice.call(arguments,2)};},create:function(l){var q=this;var m=q._.items[l],n=m&&q._.handlers[m.type],o=m&&m.command&&q._.editor.getCommand(m.command),p=n&&n.create.apply(q,m.args);if(o)o.uiItems.push(p);return p;},addHandler:function(l,m){this._.handlers[l]=m;}};(function(){var l=0,m=function(){var x='editor'+ ++l;return a.instances&&a.instances[x]?m():x;},n={},o=function(x){var y=x.config.customConfig;if(!y)return false;y=a.getUrl(y);var z=n[y]||(n[y]={});if(z.fn){z.fn.call(x,x.config);if(a.getUrl(x.config.customConfig)==y||!o(x))x.fireOnce('customConfigLoaded');}else a.scriptLoader.load(y,function(){if(a.editorConfig)z.fn=a.editorConfig;else z.fn=function(){};o(x);});return true;},p=function(x,y){x.on('customConfigLoaded',function(){if(y){if(y.on)for(var z in y.on)x.on(z,y.on[z]);e.extend(x.config,y,true);delete x.config.on;}q(x);});if(y&&y.customConfig!=undefined)x.config.customConfig=y.customConfig;if(!o(x))x.fireOnce('customConfigLoaded');},q=function(x){var y=x.config.skin.split(','),z=y[0],A=a.getUrl(y[1]||'skins/'+z+'/');x.skinName=z;x.skinPath=A;x.skinClass='cke_skin_'+z;x.tabIndex=x.config.tabIndex||x.element.getAttribute('tabindex')||0;x.fireOnce('configLoaded');t(x);},r=function(x){a.lang.load(x.config.language,x.config.defaultLanguage,function(y,z){x.langCode=y;x.lang=e.prototypedCopy(z);if(b.gecko&&b.version<10900&&x.lang.dir=='rtl')x.lang.dir='ltr';var A=x.config;A.contentsLangDirection=='ui'&&(A.contentsLangDirection=x.lang.dir);s(x);});},s=function(x){var y=x.config,z=y.plugins,A=y.extraPlugins,B=y.removePlugins;if(A){var C=new RegExp('(?:^|,)(?:'+A.replace(/\s*,\s*/g,'|')+')(?=,|$)','g');z=z.replace(C,'');z+=','+A;}if(B){C=new RegExp('(?:^|,)(?:'+B.replace(/\s*,\s*/g,'|')+')(?=,|$)','g');z=z.replace(C,'');}j.load(z.split(','),function(D){var E=[],F=[],G=[]; | }else{v=w.startContainer;v=v.getChild(w.startOffset);if(v){if(x(v)===false)v=null;}else v=x(w.startContainer,true)===false?null:w.startContainer.getNextSourceNode(true,z,x);}while(v&&!this._.end){this.current=v;if(!this.evaluator||this.evaluator(v)!==false){if(!u)return v;}else if(u&&this.evaluator)return false;v=v[A](false,z,x);}this.end();return this.current=null;};function m(t){var u,v=null;while(u=l.call(this,t))v=u;return v;};d.walker=e.createClass({$:function(t){this.range=t;this._={};},proto:{end:function(){this._.end=1;},next:function(){return l.call(this);},previous:function(){return l.call(this,true);},checkForward:function(){return l.call(this,false,true)!==false;},checkBackward:function(){return l.call(this,true,true)!==false;},lastForward:function(){return m.call(this);},lastBackward:function(){return m.call(this,true);},reset:function(){delete this.current;this._={};}}});var n={block:1,'list-item':1,table:1,'table-row-group':1,'table-header-group':1,'table-footer-group':1,'table-row':1,'table-column-group':1,'table-column':1,'table-cell':1,'table-caption':1},o={hr:1};h.prototype.isBlockBoundary=function(t){var u=e.extend({},o,t||{});return n[this.getComputedStyle('display')]||u[this.getName()];};d.walker.blockBoundary=function(t){return function(u,v){return!(u.type==1&&u.isBlockBoundary(t));};};d.walker.listItemBoundary=function(){return this.blockBoundary({br:1});};d.walker.bookmarkContents=function(t){},d.walker.bookmark=function(t,u){function v(w){return w&&w.getName&&w.getName()=='span'&&w.hasAttribute('_fck_bookmark');};return function(w){var x,y;x=w&&!w.getName&&(y=w.getParent())&&v(y);x=t?x:x||v(w);return u^x;};};d.walker.whitespaces=function(t){return function(u){var v=u&&u.type==3&&!e.trim(u.getText());return t^v;};};d.walker.invisible=function(t){var u=d.walker.whitespaces();return function(v){var w=u(v)||v.is&&!v.$.offsetHeight;return t^w;};};var p=/^[\t\r\n ]*(?: |\xa0)$/,q=d.walker.whitespaces(true),r=d.walker.bookmark(false,true),s=function(t){return r(t)&&q(t);};h.prototype.getBogus=function(){var t=this.getLast(s);if(t&&(!c?t.is&&t.is('br'):t.getText&&p.test(t.getText())))return t;return false;};})();d.range=function(l){var m=this;m.startContainer=null;m.startOffset=null;m.endContainer=null;m.endOffset=null;m.collapsed=true;m.document=l;};(function(){var l=function(t){t.collapsed=t.startContainer&&t.endContainer&&t.startContainer.equals(t.endContainer)&&t.startOffset==t.endOffset;},m=function(t,u,v){t.optimizeBookmark();var w=t.startContainer,x=t.endContainer,y=t.startOffset,z=t.endOffset,A,B; |
DrawNotation.prototype.setCssZoom(value); abc_keystroke(); | function magnify(value){ DrawNotation.prototype.setCssZoom(value); abc_keystroke();} |
|
sources['db'] = ["db","..\\..\\..\\res\\build-tools\\db"]; | sources['db'] = ["db","..\\..\\..\\platform\\shared\\db\\res\\db"]; | function main() { var args = WScript.Arguments; fso = new ActiveXObject("Scripting.FileSystemObject"); output_file = fso.CreateTextFile(args(0)); var sources = new Object(); sources['db'] = ["db","..\\..\\..\\res\\build-tools\\db"]; //sources['sqlite3']= ["sqlite3","..\\..\\shared\\sqlite3"]; sources['lib']= ["lib",args(4)+"/lib"]; sources['apps']= ["apps",args(4)+"/apps"]; var es = expand_sources(sources); var exts = expand_extensions(args(1)); pinf(args(1),es,exts,args(2),args(3)); output_file.Close();} |
document.title = "(testing) " + option_name + " = " + new_value + " | " + context.settings.view.red_letters.get(); | function make_apply_change(settings_obj, option_name) { /** * Implement the change in setting. * * @return NULL. * @note Called when the user changes a setting. */ return function (new_value) { document.title = "(testing) " + option_name + " = " + new_value + " | " + context.settings.view.red_letters.get(); ///NOTE: Need to use getters and setters. settings_obj[option_name].set(new_value); }; } |
|
false)break}else for(;h<k;){if(b.apply(a[h++],e)===false)break}else if(l)for(g in a){if(b.call(a[g],g,a[g])===false)break}else for(e=a[0];h<k&&b.call(e,h,e)!==false;e=a[++h]);return a},trim:function(a){return(a||"").replace(xa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||d.isFunction(a)||typeof a!=="function"&&a.setInterval?V.call(b,a):d.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var e=0,g=b.length;e<g;e++)if(b[e]===a)return e; | false)break}else for(;h<k;){if(b.apply(a[h++],e)===false)break}else if(l)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(e=a[0];h<k&&b.call(e,h,e)!==false;e=a[++h]);return a},trim:function(a){return(a||"").replace(xa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?V.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var e=0,f=b.length;e<f;e++)if(b[e]===a)return e; | false)break}else for(;h<k;){if(b.apply(a[h++],e)===false)break}else if(l)for(g in a){if(b.call(a[g],g,a[g])===false)break}else for(e=a[0];h<k&&b.call(e,h,e)!==false;e=a[++h]);return a},trim:function(a){return(a||"").replace(xa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||d.isFunction(a)||typeof a!=="function"&&a.setInterval?V.call(b,a):d.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var e=0,g=b.length;e<g;e++)if(b[e]===a)return e; |
this.moCenter = new GLatLng(DEFAULT_MAP_CENTRE["lat"], DEFAULT_MAP_CENTRE["lon"]); | this.moCenter = new GLatLng(DEFAULT_MAP_CENTRE.lat, DEFAULT_MAP_CENTRE.lon); | function Map(pMapContainer) { /** * Default properties of the map. * Note this member will not be updated during map movements. * I am breaking the rules of strict OOP here. * These members could have been private, * but I would rather keep them public and avoid one extra 'get' function call. */ this.mnZoomLevel = DEFAULT_MAP_ZOOM_LEVEL; this.mnMaxZoomLevel = MAX_ZOOM_LEVEL; this.moCenter = new GLatLng(DEFAULT_MAP_CENTRE["lat"], DEFAULT_MAP_CENTRE["lon"]); // Instance of Google Map. this.moMap = new GMap2(document.getElementById(pMapContainer)); // Add an overview map control this.moMap.addControl(this.moOverviewMapControl = new GOverviewMapControl()); // Add the Bounding Box control to the map this.moMap.addControl(this.moDragZoomControl = new GZoomControl( { nOpacity: .2 }, { sButtonHTML: "Bounding Box", oButtonStartingStyle:{width:'68px',height:'11px',border:'1px dotted #3366CC',padding:'0px 2px 3px 5px',color:'#3366CC', sButtonZoomingHTML:"Drag Box"} }, { dragging: this.zoomboxDragging })); this.moMap.addControl(new GSmallMapControl(), new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(25,40))); this.moMap.addControl(new GMapTypeControl(), new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(10,10))); // The map must be centered before setting the mapType this.moMap.setCenter(this.moCenter, this.mnZoomLevel); // Update Latitude/Longitude with mouse move this.moMoveListener = GEvent.addListener(this.moMap, "mousemove", this.mouseMove); // Update the map type of the overlay map based on the main map this.moMapTypeChangedListener = GEvent.addListener(this.moMap, "maptypechanged", this.mapTypeChanged); } |
{ nOpacity: .2 | { nOpacity: 0.2 | function Map(pMapContainer) { /** * Default properties of the map. * Note this member will not be updated during map movements. * I am breaking the rules of strict OOP here. * These members could have been private, * but I would rather keep them public and avoid one extra 'get' function call. */ this.mnZoomLevel = DEFAULT_MAP_ZOOM_LEVEL; this.mnMaxZoomLevel = MAX_ZOOM_LEVEL; this.moCenter = new GLatLng(DEFAULT_MAP_CENTRE["lat"], DEFAULT_MAP_CENTRE["lon"]); // Instance of Google Map. this.moMap = new GMap2(document.getElementById(pMapContainer)); // Add an overview map control this.moMap.addControl(this.moOverviewMapControl = new GOverviewMapControl()); // Add the Bounding Box control to the map this.moMap.addControl(this.moDragZoomControl = new GZoomControl( { nOpacity: .2 }, { sButtonHTML: "Bounding Box", oButtonStartingStyle:{width:'68px',height:'11px',border:'1px dotted #3366CC',padding:'0px 2px 3px 5px',color:'#3366CC', sButtonZoomingHTML:"Drag Box"} }, { dragging: this.zoomboxDragging })); this.moMap.addControl(new GSmallMapControl(), new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(25,40))); this.moMap.addControl(new GMapTypeControl(), new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(10,10))); // The map must be centered before setting the mapType this.moMap.setCenter(this.moCenter, this.mnZoomLevel); // Update Latitude/Longitude with mouse move this.moMoveListener = GEvent.addListener(this.moMap, "mousemove", this.mouseMove); // Update the map type of the overlay map based on the main map this.moMapTypeChangedListener = GEvent.addListener(this.moMap, "maptypechanged", this.mapTypeChanged); } |
mapAllAsObject: function(map, key){ | mapAllAsObject: function(key, map){ | mapAllAsObject: function(map, key){ if(!map){ map = {}; } if (!key) { if (this._key){ key = this._key; } else { key = this.fieldOrder; } } var row; while (row = this.fetchAsObject()){ this.mapAsObject(map, key, row); } return map; } |
if (this._key){ key = this._key; } else { key = this.fieldOrder; } | key = this.getKey(); | mapAllAsObject: function(map, key){ if(!map){ map = {}; } if (!key) { if (this._key){ key = this._key; } else { key = this.fieldOrder; } } var row; while (row = this.fetchAsObject()){ this.mapAsObject(map, key, row); } return map; } |
} | }, | mapAllAsObject: function(map, key){ if(!map){ map = {}; } if (!key) { if (this._key){ key = this._key; } else { key = this.fieldOrder; } } var row; while (row = this.fetchAsObject()){ this.mapAsObject(map, key, row); } return map; } |
var k, v, p, o, m = map; for (var i=0, l=key.length, last = l-1; i<l; i++){ | var k, v, p, i, len = key.length, last = len - 1, m = map; for (i=0; i < len; i += 1){ | mapAsObject: function(map, key, row){ var k, v, p, o, m = map; for (var i=0, l=key.length, last = l-1; i<l; i++){ k = key[i]; //get the keypart v = row[k]; //get the value for the key part p = m[v]; //get the property from the map for this keypart. if (p) { if (i === last) { //last, we need to store the row now. if (p instanceof Array) { //already entries here, append p.push(row); } else { //single row store here. since we need multiple rows, add an array m[v] = [p, row]; } } else { m = p; } } else //property didnt exist for this key yet. if (i === last) { //last keypart: store the row here m[v] = row; } else { //more keyparts to go: add a new map for this keypart m = m[v] = {}; } } }, |
else { m = p; } | mapAsObject: function(map, key, row){ var k, v, p, o, m = map; for (var i=0, l=key.length, last = l-1; i<l; i++){ k = key[i]; //get the keypart v = row[k]; //get the value for the key part p = m[v]; //get the property from the map for this keypart. if (p) { if (i === last) { //last, we need to store the row now. if (p instanceof Array) { //already entries here, append p.push(row); } else { //single row store here. since we need multiple rows, add an array m[v] = [p, row]; } } } else //property didnt exist for this key yet. if (i === last) { //last keypart: store the row here m[v] = row; } else { //more keyparts to go: add a new map for this keypart m = m[v] = {}; } } }, |
|
if (!serviceName || serviceName.length == 0) { | if (!serviceName || serviceName.length === 0) { | var mapLayersFilter = function(cswRecord) { var serviceName = cswRecord.getServiceName(); if (!serviceName || serviceName.length == 0) { return false; } //ensure its not referenced via KnownLayer var knownLayers = getParentKnownLayers(cswRecord); return knownLayers.length == 0; }; |
return knownLayers.length == 0; | return knownLayers.length === 0; | var mapLayersFilter = function(cswRecord) { var serviceName = cswRecord.getServiceName(); if (!serviceName || serviceName.length == 0) { return false; } //ensure its not referenced via KnownLayer var knownLayers = getParentKnownLayers(cswRecord); return knownLayers.length == 0; }; |
result += WT.pxself(p, 'paddingLeft'); result += WT.pxself(p, 'paddingRight'); | this.marginH = function(el) { var p = el.parentNode; var result = WT.px(el, 'marginLeft'); result += WT.px(el, 'marginRight'); result += WT.px(el, 'borderLeftWidth'); result += WT.px(el, 'borderRightWidth'); result += WT.px(el, 'paddingLeft'); result += WT.px(el, 'paddingRight'); return result; }; |
|
result += WT.px(p, 'paddingLeft'); result += WT.px(p, 'paddingRight'); | result += WT.px(el, 'paddingLeft'); result += WT.px(el, 'paddingRight'); | this.marginH = function(el) { var p = el.parentNode; var result = WT.px(el, 'marginLeft'); result += WT.px(el, 'marginRight'); result += WT.px(el, 'borderLeftWidth'); result += WT.px(el, 'borderRightWidth'); result += WT.px(p, 'paddingLeft'); result += WT.px(p, 'paddingRight'); return result; }; |
WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,s,r){var u=this;this.marginH=function(b){var i=b.parentNode;return a.px(b,"marginLeft")+a.px(b,"marginRight")+a.px(b,"borderLeftWidth")+a.px(b,"borderRightWidth")+a.px(i,"paddingLeft")+a.px(i,"paddingRight")};this.marginV=function(b){return a.px(b,"marginTop")+a.px(b,"marginBottom")+a.px(b,"borderTopWidth")+a.px(b,"borderBottomWidth")+a.px(b,"paddingTop")+a.px(b,"paddingBottom")};this.adjustRow=function(b,i){if(b.style.height!=i+"px")b.style.height=i+ | WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,u,h){var t=this;this.getId=function(){return u};this.marginH=function(b){var k=b.parentNode;return a.px(b,"marginLeft")+a.px(b,"marginRight")+a.px(b,"borderLeftWidth")+a.px(b,"borderRightWidth")+a.px(k,"paddingLeft")+a.px(k,"paddingRight")};this.marginV=function(b){return a.px(b,"marginTop")+a.px(b,"marginBottom")+a.px(b,"borderTopWidth")+a.px(b,"borderBottomWidth")+a.px(b,"paddingTop")+a.px(b,"paddingBottom")};this.adjustRow=function(b,k){if(b.style.height!= | WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,s,r){var u=this;this.marginH=function(b){var i=b.parentNode;return a.px(b,"marginLeft")+a.px(b,"marginRight")+a.px(b,"borderLeftWidth")+a.px(b,"borderRightWidth")+a.px(i,"paddingLeft")+a.px(i,"paddingRight")};this.marginV=function(b){return a.px(b,"marginTop")+a.px(b,"marginBottom")+a.px(b,"borderTopWidth")+a.px(b,"borderBottomWidth")+a.px(b,"paddingTop")+a.px(b,"paddingBottom")};this.adjustRow=function(b,i){if(b.style.height!=i+"px")b.style.height=i+ |
return WT.px(el, 'marginLeft') + WT.px(el, 'marginRight') + WT.px(el, 'borderLeftWidth') + WT.px(el, 'borderRightWidth') + WT.px(p, 'paddingLeft') + WT.px(p, 'paddingRight'); | var result = WT.px(el, 'marginLeft'); result += WT.px(el, 'marginRight'); result += WT.px(el, 'borderLeftWidth'); result += WT.px(el, 'borderRightWidth'); result += WT.px(p, 'paddingLeft'); result += WT.px(p, 'paddingRight'); return result; | this.marginH = function(el) { var p = el.parentNode; return WT.px(el, 'marginLeft') + WT.px(el, 'marginRight') + WT.px(el, 'borderLeftWidth') + WT.px(el, 'borderRightWidth') + WT.px(p, 'paddingLeft') + WT.px(p, 'paddingRight'); }; |
WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,t,g){var n=this;this.getId=function(){return t};this.WT=a;this.marginH=function(d){var k=d.parentNode;return a.px(d,"marginLeft")+a.px(d,"marginRight")+a.px(d,"borderLeftWidth")+a.px(d,"borderRightWidth")+a.px(k,"paddingLeft")+a.px(k,"paddingRight")};this.marginV=function(d){return a.px(d,"marginTop")+a.px(d,"marginBottom")+a.px(d,"borderTopWidth")+a.px(d,"borderBottomWidth")+a.px(d,"paddingTop")+a.px(d,"paddingBottom")};this.adjustRow=function(d,k){if(d.style.height!= | WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,t,i){var o=this;this.getId=function(){return t};this.WT=a;this.marginH=function(d){var e=d.parentNode,g=a.px(d,"marginLeft");g+=a.px(d,"marginRight");g+=a.px(d,"borderLeftWidth");g+=a.px(d,"borderRightWidth");g+=a.px(e,"paddingLeft");g+=a.px(e,"paddingRight");return g};this.marginV=function(d){var e=a.px(d,"marginTop");e+=a.px(d,"marginBottom");e+=a.px(d,"borderTopWidth");e+=a.px(d,"borderBottomWidth");e+=a.px(d,"paddingTop");e+=a.px(d,"paddingBottom"); return e};this.adjustRow=function(d,e){if(d.style.height!=e+"px")d.style.height=e+"px";d=d.childNodes;var g,m,h;g=0;for(m=d.length;g<m;++g){h=d[g];var k=e;k-=a.pxself(h,"paddingTop");k-=a.pxself(h,"paddingBottom");if(k<=0)k=0;h.style.height=k+"px";if(!(h.style.verticalAlign||h.childNodes.length==0)){var b=h.childNodes[0];if(k<=0)k=0;if(b.className=="Wt-hcenter"){b.style.height=k+"px";b=b.firstChild.firstChild;if(!a.hasTag(b,"TD"))b=b.firstChild;if(b.style.height!=k+"px")b.style.height=k+"px";b=b.firstChild}if(h.childNodes.length== | WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,t,g){var n=this;this.getId=function(){return t};this.WT=a;this.marginH=function(d){var k=d.parentNode;return a.px(d,"marginLeft")+a.px(d,"marginRight")+a.px(d,"borderLeftWidth")+a.px(d,"borderRightWidth")+a.px(k,"paddingLeft")+a.px(k,"paddingRight")};this.marginV=function(d){return a.px(d,"marginTop")+a.px(d,"marginBottom")+a.px(d,"borderTopWidth")+a.px(d,"borderBottomWidth")+a.px(d,"paddingTop")+a.px(d,"paddingBottom")};this.adjustRow=function(d,k){if(d.style.height!= |
WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,s,h){var p=this;this.getId=function(){return s};this.WT=a;this.marginH=function(c){var f=a.px(c,"marginLeft");f+=a.px(c,"marginRight");f+=a.px(c,"borderLeftWidth");f+=a.px(c,"borderRightWidth");f+=a.px(c,"paddingLeft");f+=a.px(c,"paddingRight");return f};this.marginV=function(c){var f=a.px(c,"marginTop");f+=a.px(c,"marginBottom");f+=a.px(c,"borderTopWidth");f+=a.px(c,"borderBottomWidth");f+=a.px(c,"paddingTop");f+=a.px(c,"paddingBottom");return f};this.getColumn= | WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,s,i){var o=this;this.getId=function(){return s};this.WT=a;this.marginH=function(b){var f=b.parentNode,g=a.px(b,"marginLeft");g+=a.px(b,"marginRight");g+=a.px(b,"borderLeftWidth");g+=a.px(b,"borderRightWidth");g+=a.px(b,"paddingLeft");g+=a.px(b,"paddingRight");g+=a.pxself(f,"paddingLeft");g+=a.pxself(f,"paddingRight");return g};this.marginV=function(b){var f=a.px(b,"marginTop");f+=a.px(b,"marginBottom");f+=a.px(b,"borderTopWidth");f+=a.px(b,"borderBottomWidth"); f+=a.px(b,"paddingTop");f+=a.px(b,"paddingBottom");return f};this.getColumn=function(b){var f,g,j,h=a.getElement(s).firstChild.childNodes;g=f=0;for(j=h.length;g<j;g++){var q=h[g];if(a.hasTag(q,"COLGROUP")){g=-1;h=q.childNodes;j=h.length}if(a.hasTag(q,"COL"))if(q.className!="Wt-vrh")if(f==b)return q;else++f}return null};this.adjustRow=function(b,f){if(b.style.height!=f+"px")b.style.height=f+"px";b=b.childNodes;var g,j,h,q;g=0;q=-1;for(j=b.length;g<j;++g){h=b[g];var d=f;d-=a.pxself(h,"paddingTop"); | WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,s,h){var p=this;this.getId=function(){return s};this.WT=a;this.marginH=function(c){var f=a.px(c,"marginLeft");f+=a.px(c,"marginRight");f+=a.px(c,"borderLeftWidth");f+=a.px(c,"borderRightWidth");f+=a.px(c,"paddingLeft");f+=a.px(c,"paddingRight");return f};this.marginV=function(c){var f=a.px(c,"marginTop");f+=a.px(c,"marginBottom");f+=a.px(c,"borderTopWidth");f+=a.px(c,"borderBottomWidth");f+=a.px(c,"paddingTop");f+=a.px(c,"paddingBottom");return f};this.getColumn= |
WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,s,i){var p=this;this.getId=function(){return s};this.WT=a;this.marginH=function(c){var h=c.parentNode,g=a.px(c,"marginLeft");g+=a.px(c,"marginRight");g+=a.px(c,"borderLeftWidth");g+=a.px(c,"borderRightWidth");g+=a.px(h,"paddingLeft");g+=a.px(h,"paddingRight");return g};this.marginV=function(c){var h=a.px(c,"marginTop");h+=a.px(c,"marginBottom");h+=a.px(c,"borderTopWidth");h+=a.px(c,"borderBottomWidth");h+=a.px(c,"paddingTop");h+=a.px(c,"paddingBottom"); return h};this.getColumn=function(c){var h,g,j,f=a.getElement(s).firstChild.childNodes;g=h=0;for(j=f.length;g<j;g++){var q=f[g];if(a.hasTag(q,"COLGROUP")){g=-1;f=q.childNodes;j=f.length}if(a.hasTag(q,"COL"))if(q.className!="Wt-vrh")if(h==c)return q;else++h}return null};this.adjustRow=function(c,h){if(c.style.height!=h+"px")c.style.height=h+"px";c=c.childNodes;var g,j,f,q;g=0;q=-1;for(j=c.length;g<j;++g){f=c[g];var d=h;d-=a.pxself(f,"paddingTop");d-=a.pxself(f,"paddingBottom");if(d<=0)d=0;f.className!= | WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,s,h){var p=this;this.getId=function(){return s};this.WT=a;this.marginH=function(c){var f=a.px(c,"marginLeft");f+=a.px(c,"marginRight");f+=a.px(c,"borderLeftWidth");f+=a.px(c,"borderRightWidth");f+=a.px(c,"paddingLeft");f+=a.px(c,"paddingRight");return f};this.marginV=function(c){var f=a.px(c,"marginTop");f+=a.px(c,"marginBottom");f+=a.px(c,"borderTopWidth");f+=a.px(c,"borderBottomWidth");f+=a.px(c,"paddingTop");f+=a.px(c,"paddingBottom");return f};this.getColumn= | WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,s,i){var p=this;this.getId=function(){return s};this.WT=a;this.marginH=function(c){var h=c.parentNode,g=a.px(c,"marginLeft");g+=a.px(c,"marginRight");g+=a.px(c,"borderLeftWidth");g+=a.px(c,"borderRightWidth");g+=a.px(h,"paddingLeft");g+=a.px(h,"paddingRight");return g};this.marginV=function(c){var h=a.px(c,"marginTop");h+=a.px(c,"marginBottom");h+=a.px(c,"borderTopWidth");h+=a.px(c,"borderBottomWidth");h+=a.px(c,"paddingTop");h+=a.px(c,"paddingBottom");return h};this.getColumn=function(c){var h,g,j,f=a.getElement(s).firstChild.childNodes;g=h=0;for(j=f.length;g<j;g++){var q=f[g];if(a.hasTag(q,"COLGROUP")){g=-1;f=q.childNodes;j=f.length}if(a.hasTag(q,"COL"))if(q.className!="Wt-vrh")if(h==c)return q;else++h}return null};this.adjustRow=function(c,h){if(c.style.height!=h+"px")c.style.height=h+"px";c=c.childNodes;var g,j,f,q;g=0;q=-1;for(j=c.length;g<j;++g){f=c[g];var d=h;d-=a.pxself(f,"paddingTop");d-=a.pxself(f,"paddingBottom");if(d<=0)d=0;f.className!= |
c+=a.px(b,"paddingTop");c+=a.px(b,"paddingBottom");return c};this.getColumn=function(b){var c,f,d,i=a.getElement(t).firstChild.childNodes;f=c=0;for(d=i.length;f<d;f++){var k=i[f];if(a.hasTag(k,"COLGROUP")){f=-1;i=k.childNodes;d=i.length}if(a.hasTag(k,"COL"))if(k.className!="Wt-vrh")if(c==b)return k;else++c}return null};this.adjustCell=function(b,c){var f=c==0;c-=a.pxself(b,"paddingTop");c-=a.pxself(b,"paddingBottom");if(c<=0)c=0;b.style.height=c+"px";if(!(b.style.verticalAlign||b.childNodes.length== | c+=a.px(b,"paddingTop");c+=a.px(b,"paddingBottom");return c};this.getColumn=function(b){var c,f,i,d=a.getElement(t).firstChild.childNodes;f=c=0;for(i=d.length;f<i;f++){var k=d[f];if(a.hasTag(k,"COLGROUP")){f=-1;d=k.childNodes;i=d.length}if(a.hasTag(k,"COL"))if(k.className!="Wt-vrh")if(c==b)return k;else++c}return null};this.adjustCell=function(b,c,f){var i=c==0;c-=a.pxself(b,"paddingTop");c-=a.pxself(b,"paddingBottom");if(c<=0)c=0;b.style.height=c+"px";if(!(b.style.verticalAlign||b.childNodes.length== | WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,t,h){var o=this;this.getId=function(){return t};this.WT=a;this.marginH=function(b){var c=b.parentNode,f=a.px(b,"marginLeft");f+=a.px(b,"marginRight");f+=a.px(b,"borderLeftWidth");f+=a.px(b,"borderRightWidth");f+=a.px(b,"paddingLeft");f+=a.px(b,"paddingRight");f+=a.pxself(c,"paddingLeft");f+=a.pxself(c,"paddingRight");return f};this.marginV=function(b){var c=a.px(b,"marginTop");c+=a.px(b,"marginBottom");c+=a.px(b,"borderTopWidth");c+=a.px(b,"borderBottomWidth");c+=a.px(b,"paddingTop");c+=a.px(b,"paddingBottom");return c};this.getColumn=function(b){var c,f,d,i=a.getElement(t).firstChild.childNodes;f=c=0;for(d=i.length;f<d;f++){var k=i[f];if(a.hasTag(k,"COLGROUP")){f=-1;i=k.childNodes;d=i.length}if(a.hasTag(k,"COL"))if(k.className!="Wt-vrh")if(c==b)return k;else++c}return null};this.adjustCell=function(b,c){var f=c==0;c-=a.pxself(b,"paddingTop");c-=a.pxself(b,"paddingBottom");if(c<=0)c=0;b.style.height=c+"px";if(!(b.style.verticalAlign||b.childNodes.length== |
return WT.px(el, 'marginTop') + WT.px(el, 'marginBottom') + WT.px(el, 'borderTopWidth') + WT.px(el, 'borderBottomWidth') + WT.px(el, 'paddingTop') + WT.px(el, 'paddingBottom'); | var result = WT.px(el, 'marginTop'); result += WT.px(el, 'marginBottom'); result += WT.px(el, 'borderTopWidth'); result += WT.px(el, 'borderBottomWidth'); result += WT.px(el, 'paddingTop'); result += WT.px(el, 'paddingBottom'); return result; | this.marginV = function(el) { // TODO: consider caching return WT.px(el, 'marginTop') + WT.px(el, 'marginBottom') + WT.px(el, 'borderTopWidth') + WT.px(el, 'borderBottomWidth') + WT.px(el, 'paddingTop') + WT.px(el, 'paddingBottom'); }; |
WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,t,i){var o=this;this.getId=function(){return t};this.WT=a;this.marginH=function(d){var e=d.parentNode,h=a.px(d,"marginLeft");h+=a.px(d,"marginRight");h+=a.px(d,"borderLeftWidth");h+=a.px(d,"borderRightWidth");h+=a.px(e,"paddingLeft");h+=a.px(e,"paddingRight");return h};this.marginV=function(d){var e=a.px(d,"marginTop");e+=a.px(d,"marginBottom");e+=a.px(d,"borderTopWidth");e+=a.px(d,"borderBottomWidth");e+=a.px(d,"paddingTop");e+=a.px(d,"paddingBottom"); return e};this.adjustRow=function(d,e){if(d.style.height!=e+"px")d.style.height=e+"px";d=d.childNodes;var h,m,f;h=0;for(m=d.length;h<m;++h){f=d[h];var k=e;k-=a.pxself(f,"paddingTop");k-=a.pxself(f,"paddingBottom");if(k<=0)k=0;f.style.height=k+"px";if(!(f.style.verticalAlign||f.childNodes.length==0)){var b=f.childNodes[0];if(k<=0)k=0;if(b.className=="Wt-hcenter"){b.style.height=k+"px";b=b.firstChild.firstChild;if(!a.hasTag(b,"TD"))b=b.firstChild;if(b.style.height!=k+"px")b.style.height=k+"px";b=b.firstChild}if(f.childNodes.length== | WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,s,i){var p=this;this.getId=function(){return s};this.WT=a;this.marginH=function(c){var h=c.parentNode,g=a.px(c,"marginLeft");g+=a.px(c,"marginRight");g+=a.px(c,"borderLeftWidth");g+=a.px(c,"borderRightWidth");g+=a.px(h,"paddingLeft");g+=a.px(h,"paddingRight");return g};this.marginV=function(c){var h=a.px(c,"marginTop");h+=a.px(c,"marginBottom");h+=a.px(c,"borderTopWidth");h+=a.px(c,"borderBottomWidth");h+=a.px(c,"paddingTop");h+=a.px(c,"paddingBottom"); return h};this.getColumn=function(c){var h,g,j,f=a.getElement(s).firstChild.childNodes;g=h=0;for(j=f.length;g<j;g++){var q=f[g];if(a.hasTag(q,"COLGROUP")){g=-1;f=q.childNodes;j=f.length}if(a.hasTag(q,"COL"))if(q.className!="Wt-vrh")if(h==c)return q;else++h}return null};this.adjustRow=function(c,h){if(c.style.height!=h+"px")c.style.height=h+"px";c=c.childNodes;var g,j,f,q;g=0;q=-1;for(j=c.length;g<j;++g){f=c[g];var d=h;d-=a.pxself(f,"paddingTop");d-=a.pxself(f,"paddingBottom");if(d<=0)d=0;f.className!= | WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,t,i){var o=this;this.getId=function(){return t};this.WT=a;this.marginH=function(d){var e=d.parentNode,h=a.px(d,"marginLeft");h+=a.px(d,"marginRight");h+=a.px(d,"borderLeftWidth");h+=a.px(d,"borderRightWidth");h+=a.px(e,"paddingLeft");h+=a.px(e,"paddingRight");return h};this.marginV=function(d){var e=a.px(d,"marginTop");e+=a.px(d,"marginBottom");e+=a.px(d,"borderTopWidth");e+=a.px(d,"borderBottomWidth");e+=a.px(d,"paddingTop");e+=a.px(d,"paddingBottom");return e};this.adjustRow=function(d,e){if(d.style.height!=e+"px")d.style.height=e+"px";d=d.childNodes;var h,m,f;h=0;for(m=d.length;h<m;++h){f=d[h];var k=e;k-=a.pxself(f,"paddingTop");k-=a.pxself(f,"paddingBottom");if(k<=0)k=0;f.style.height=k+"px";if(!(f.style.verticalAlign||f.childNodes.length==0)){var b=f.childNodes[0];if(k<=0)k=0;if(b.className=="Wt-hcenter"){b.style.height=k+"px";b=b.firstChild.firstChild;if(!a.hasTag(b,"TD"))b=b.firstChild;if(b.style.height!=k+"px")b.style.height=k+"px";b=b.firstChild}if(f.childNodes.length== |
var p = el.parentNode; | this.marginV = function(el) { var p = el.parentNode; return WT.px(el, 'marginTop') + WT.px(el, 'marginBottom') + WT.px(el, 'borderTopWidth') + WT.px(el, 'borderBottomWidth') + WT.px(el, 'paddingTop') + WT.px(el, 'paddingBottom'); }; |
|
if (n < 3) { n = 3; } | markdownTitle: function(markItUp, char) { heading = ''; n = $.trim(markItUp.selection||markItUp.placeHolder).length; for(i = 0; i < n; i++) { heading += char; } return '\n'+heading; } |
|
0;u[c]!=null;c++)u[c]&&u[c].nodeType===1&&i.push(s[c]);else i.push.apply(i,u);else K(u,i);if(J){p(J,n,i,j);p.uniqueSort(i)}return i};p.uniqueSort=function(c){if(L){l=q;c.sort(L);if(l)for(var f=1;f<c.length;f++)c[f]===c[f-1]&&c.splice(f--,1)}return c};p.matches=function(c,f){return p(c,null,null,f)};p.find=function(c,f,i){var j,n;if(!c)return[];for(var m=0,t=o.order.length;m<t;m++){var s=o.order[m];if(n=o.leftMatch[s].exec(c)){var u=n[1];n.splice(1,1);if(u.substr(u.length-1)!=="\\"){n[1]=(n[1]||"").replace(/\\/g, | 0;u[d]!=null;d++)u[d]&&u[d].nodeType===1&&i.push(s[d]);else i.push.apply(i,u);else K(u,i);if(J){p(J,n,i,j);p.uniqueSort(i)}return i};p.uniqueSort=function(d){if(L){l=q;d.sort(L);if(l)for(var g=1;g<d.length;g++)d[g]===d[g-1]&&d.splice(g--,1)}return d};p.matches=function(d,g){return p(d,null,null,g)};p.find=function(d,g,i){var j,n;if(!d)return[];for(var m=0,t=o.order.length;m<t;m++){var s=o.order[m];if(n=o.leftMatch[s].exec(d)){var u=n[1];n.splice(1,1);if(u.substr(u.length-1)!=="\\"){n[1]=(n[1]||"").replace(/\\/g, | 0;u[c]!=null;c++)u[c]&&u[c].nodeType===1&&i.push(s[c]);else i.push.apply(i,u);else K(u,i);if(J){p(J,n,i,j);p.uniqueSort(i)}return i};p.uniqueSort=function(c){if(L){l=q;c.sort(L);if(l)for(var f=1;f<c.length;f++)c[f]===c[f-1]&&c.splice(f--,1)}return c};p.matches=function(c,f){return p(c,null,null,f)};p.find=function(c,f,i){var j,n;if(!c)return[];for(var m=0,t=o.order.length;m<t;m++){var s=o.order[m];if(n=o.leftMatch[s].exec(c)){var u=n[1];n.splice(1,1);if(u.substr(u.length-1)!=="\\"){n[1]=(n[1]||"").replace(/\\/g, |
lastId = response.lastid.toInt(); | if(response.lastid) lastId = response.lastid.toInt(); | message : function () { var messageList; var mlScroller; var lastId; return { init: function () { messageList = $('chatList'); mlScroller = new Fx.Scroll(messageList,{'link':'cancel'}); lastId = null; }, enterRoom: function(rid) { lastId = null; //prepare to fill up with old messages messageList.removeClass('whisper'); messageList.empty(); messageList.addClass('chat'); $('roomNameContainer').empty(); $('inputContainer').set('styles',{ 'display':'block'}); $('entranceHall').set('styles',{'display':'none'}); room = new Room(rid,'Loading','I'); //set upi room first so random calls afterwards don't screw me var request = new ServerReq('room.php',function(response) { response.room.rid = response.room.rid.toInt(); room.set(response.room); response.messages.each(function(item) { item.lid = item.lid.toInt(); item.rid = item.rid.toInt(); item.user.uid = item.user.uid.toInt(); if(!lastId) lastId = item.lid - 1; MBchat.updateables.processMessage(item); }); lastId = response.lastid.toInt(); //Ensure we get all message from here on in MBchat.updateables.poller.setLastId(lastId); //Display room name at head of page var el = new Element('h1') .set('text', room.name ) .inject('roomNameContainer'); if (room.type == 'M' && (me.mod == 'M' || me.role == 'H' || me.role == 'G' || me.role == 'S' )) { //Can't go to private room here var whisperBoxes = $$('.whisperBox'); whisperBoxes.each ( function (whisperBox) { var privateBox = whisperBox.getElement('.private'); privateBox.removeClass('private'); privateBox.addClass('nonprivate'); privateBox.removeEvent('click',goPrivate); }); } MBchat.updateables.online.show(room.rid); //Show online list for room $('messageText').focus(); }).transmit({'rid' : rid}); }, leaveRoom: function () { lastId = null; var request = new ServerReq ('exit.php',function(response) { response.messages.each(function(item) { item.lid = item.lid.toInt(); item.rid = item.rid.toInt(); item.user.uid = item.user.uid.toInt(); if(!lastId) lastId = item.lid -1; MBchat.updateables.processMessage(item); }); lastId = response.lastid.toInt(); //Ensure we get all message from here on in MBchat.updateables.poller.setLastId(lastId); MBchat.updateables.online.show(0); //Show online list for entrance hall }).transmit({'rid' : room.rid}); //we might have been in a room that stopped me going to private room if (room.type == 'M' && (me.mod == 'M' || me.role == 'H' || me.role == 'G' || me.role == 'S' )) { //Can't go to private room here var whisperBoxes = $$('.whisperBox'); whisperBoxes.each ( function (whisperBox) { var privateBox = whisperBox.getElement('.nonprivate'); if (privateBox) { privateBox.removeClass('nonprivate'); privateBox.addClass('private'); privateBox.addEvent('click',goPrivate); } }); } room.set (entranceHall);; //Set up to be in the entrance hall messageList.removeClass('chat'); messageList.empty(); messageList.addClass('whisper'); $('roomNameContainer').empty(); var el = new Element('h1') .set('text', room.name) .inject('roomNameContainer'); $('inputContainer').set('styles',{ 'display':'none'}); $('entranceHall').set('styles',{'display':'block'}); }, processMessage: function (msg) { var lid = msg.lid.toInt(); if (lastId < lid) { lastId = lid; switch(msg.type) { case 'RE' : if (privateRoom == 0) { if (room.rid == 0 || msg.rid == room.rid) { if (room.rid == 0) { this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' leaves for a Room')); } else { this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Enters the Room')); } } } break; case 'RX' : if (privateRoom == 0) { if (room.rid == 0 || msg.rid == room.rid) { if (room.rid == 0) { this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Re-enters the Hall')); } else { this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Leaves the Room')); } } } break; case 'WH' : if (MBchat.updateables.whispers.isWhisperingIn(msg.rid)) { if (privateRoom == 0) { var whisper = new Element('span',{'class':'whisper'}); var othersAdded = false; if (me.uid == msg.user.uid) { whisper.appendText('(whispers to') } else { whisper.appendText('(whispers to me') othersAdded = true; } //whisperList says who the other whisperers are var whisperIdStr = 'W'+msg.rid; var whisperers = $(whisperIdStr).getElement('.whisperList').getChildren(); whisperers.each(function(whisperer) { var uid = whisperer.get('id').substr(whisperIdStr.length+1).toInt(); if (uid != msg.user.uid) { //This is not the whisperer so include if(othersAdded) { whisper.appendText(', '); }else { whisper.appendText(' '); othersAdded = true; } var newWhisperer = whisperer.clone(); //Make a clone to remove Id newWhisperer.inject(whisper); }; }); whisper.appendText(') ') ; this.displayMessage(lastId,msg.time,msg.user,whisper.get('html') + msg.message); } else { this.displayMessage(lastId,msg.time,msg.user,'(private) ' + msg.message); } } break; case 'WJ' : if(msg.user.uid != me.uid && MBchat.updateables.whispers.isWhisperingIn(msg.rid)) { this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Joins your whisper box')); } break; case 'WL' : if(msg.user.uid != me.uid&& MBchat.updateables.whispers.isWhisperingIn(msg.rid)) { this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Leaves your whisper box')); } break; default: break; } } //Regardless of whether we;ve seen these before we are going to display them again. if(privateRoom == 0) { if (msg.rid == room.rid) { switch(msg.type) { case 'ME' : this.displayMessage(lastId,msg.time,msg.user,msg.message); break; case 'LT' : this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Logs Out (timeout)')); break; case 'LI' : this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Logs In to Chat')); break; case 'LO' : this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Logs Out')); break; case 'RM' : this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Has been made a Moderator')); break; case 'RN' : this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Is no longer a moderator')); break; default: break; } } } }, displayMessage: function(lid,time,user,msgText,noLimit) { var addLeadingZeros = function(number) { number = number.toString(); if(number.length < 2) number = '0'+number; return number; }; var div = new Element('div'); if (lid != 0) div.set('id','L'+lid); //This should be all messages except errors var date = new Date(time.toInt()*1000); var hour = date.getHours(); var suffix = ' am'; if (hour > 12 ) { suffix = ' pm'; hour = hour - 12; } else { if (hour == 12) { suffix = ' pm'; } } var timeEl = new Element('span',{ 'class':'time', 'text': addLeadingZeros(hour) + ':' + addLeadingZeros(date.getMinutes()) + ':' + addLeadingZeros(date.getSeconds()) + suffix }); timeEl.inject(div); displayUser(user,div); msgText = replaceHyperLinks (msgText); //replace Hperlinks first var span = new Element('span',{'html': msgText }) ; span.inject(div); if(!noLimit) { while (messageList.getChildren().length >= messageListSize) { messageList.getFirst().destroy(); } } if((!messageList.getLast()) || (messageList.getLast().get('class') == 'rowOdd') ) { div.addClass('rowEven'); } else { div.addClass('rowOdd'); } div.inject(messageList); mlScroller.toBottom(); } } }(), |
lastId = response.lastid.toInt(); | if(response.listid)lastId = response.lastid.toInt(); | message : function () { var messageList; var mlScroller; var lastId; return { init: function () { messageList = $('chatList'); mlScroller = new Fx.Scroll(messageList,{'link':'cancel'}); lastId = null; }, enterRoom: function(rid) { lastId = null; //prepare to fill up with old messages messageList.removeClass('whisper'); messageList.empty(); messageList.addClass('chat'); $('roomNameContainer').empty(); $('inputContainer').set('styles',{ 'display':'block'}); $('emoticonContainer').set('styles',{ 'display':'block'}); $('entranceHall').set('styles',{'display':'none'}); var exit = $('exit'); exit.addClass('exit-r'); exit.removeClass('exit-f'); room = new Room(rid,'Loading','I'); //set upi room first so random calls afterwards don't screw me var request = new ServerReq('room.php',function(response) { response.room.rid = response.room.rid.toInt(); room.set(response.room); var soundEnabled = $('soundEnabled').checked; $('soundEnabled').checked = false; //remember if sound was enabled but turn it off response.messages.each(function(item) { item.lid = item.lid.toInt(); item.rid = item.rid.toInt(); item.user.uid = item.user.uid.toInt(); if(!lastId) lastId = item.lid - 1; MBchat.updateables.processMessage(item); }); $('soundEnabled').checked = soundEnabled; //turn it on again lastId = response.lastid.toInt(); //Ensure we get all message from here on in MBchat.updateables.poller.setLastId(lastId); //Display room name at head of page var el = new Element('h1') .set('text', room.name ) .inject('roomNameContainer'); if (room.type == 'M' && (me.mod == 'M' || me.role == 'H' || me.role == 'G' || me.role == 'S' )) { //Can't go to private room here var whisperBoxes = $$('.whisperBox'); whisperBoxes.each ( function (whisperBox) { var privateBox = whisperBox.getElement('.private'); privateBox.removeClass('private'); privateBox.addClass('nonprivate'); privateBox.removeEvent('click',goPrivate); }); } MBchat.updateables.online.show(room.rid); //Show online list for room $('messageText').focus(); }).transmit({'rid' : rid}); MBchat.sounds.resetTimer(); }, leaveRoom: function () { lastId = null; var request = new ServerReq ('exit.php',function(response) { response.messages.each(function(item) { item.lid = item.lid.toInt(); item.rid = item.rid.toInt(); item.user.uid = item.user.uid.toInt(); if(!lastId) lastId = item.lid -1; MBchat.updateables.processMessage(item); }); lastId = response.lastid.toInt(); //Ensure we get all message from here on in MBchat.updateables.poller.setLastId(lastId); MBchat.updateables.online.show(0); //Show online list for entrance hall }).transmit({'rid' : room.rid}); //we might have been in a room that stopped me going to private room if (room.type == 'M' && (me.mod == 'M' || me.role == 'H' || me.role == 'G' || me.role == 'S' )) { //Can't go to private room here var whisperBoxes = $$('.whisperBox'); whisperBoxes.each ( function (whisperBox) { var privateBox = whisperBox.getElement('.nonprivate'); if (privateBox) { privateBox.removeClass('nonprivate'); privateBox.addClass('private'); privateBox.addEvent('click',goPrivate); } }); } room.set (entranceHall);; //Set up to be in the entrance hall messageList.removeClass('chat'); messageList.empty(); messageList.addClass('whisper'); $('roomNameContainer').empty(); var el = new Element('h1') .set('text', room.name) .inject('roomNameContainer'); $('inputContainer').set('styles',{ 'display':'none'}); $('emoticonContainer').set('styles',{ 'display':'none'}); $('entranceHall').set('styles',{'display':'block'}); var exit = $('exit'); exit.addClass('exit-f'); exit.removeClass('exit-r'); MBchat.sounds.resetTimer(); }, processMessage: function (msg) { var lid = msg.lid.toInt(); if (lastId < lid) { lastId = lid; switch(msg.type) { case 'RE' : if (privateRoom == 0) { if (room.rid == 0 || msg.rid == room.rid) { if (room.rid == 0) { this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' leaves for a Room')); } else { this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Enters the Room')); } MBchat.sounds.roomMove(); } } break; case 'RX' : if (privateRoom == 0) { if (room.rid == 0 || msg.rid == room.rid) { if (room.rid == 0) { this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Re-enters the Hall')); } else { this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Leaves the Room')); } MBchat.sounds.roomMove(); } } break; case 'WH' : if (MBchat.updateables.whispers.isWhisperingIn(msg.rid)) { if (privateRoom == 0) { var whisper = new Element('span',{'class':'whisper'}); var othersAdded = false; if (me.uid == msg.user.uid) { whisper.appendText('(whispers to') } else { whisper.appendText('(whispers to me') othersAdded = true; } //whisperList says who the other whisperers are var whisperIdStr = 'W'+msg.rid; var whisperers = $(whisperIdStr).getElement('.whisperList').getChildren(); whisperers.each(function(whisperer) { var uid = whisperer.get('id').substr(whisperIdStr.length+1).toInt(); if (uid != msg.user.uid) { //This is not the whisperer so include if(othersAdded) { whisper.appendText(', '); }else { whisper.appendText(' '); othersAdded = true; } var newWhisperer = whisperer.clone(); //Make a clone to remove Id newWhisperer.inject(whisper); }; }); whisper.appendText(') ') ; this.displayMessage(lastId,msg.time,msg.user,whisper.get('html') + msg.message); } else { this.displayMessage(lastId,msg.time,msg.user,'(private) ' + msg.message); } MBchat.sounds.messageArrives(); } break; case 'WJ' : if(msg.user.uid != me.uid && MBchat.updateables.whispers.isWhisperingIn(msg.rid)) { this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Joins your whisper box')); } break; case 'WL' : if(msg.user.uid != me.uid&& MBchat.updateables.whispers.isWhisperingIn(msg.rid)) { this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Leaves your whisper box')); } break; default: break; } } //Regardless of whether we;ve seen these before we are going to display them again. if(privateRoom == 0) { if (msg.rid == room.rid) { switch(msg.type) { case 'ME' : this.displayMessage(lastId,msg.time,msg.user,msg.message); MBchat.sounds.messageArrives(); break; case 'LT' : this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Logs Out (timeout)')); MBchat.sounds.roomMove(); break; case 'LI' : this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Logs In to Chat')); MBchat.sounds.roomMove(); break; case 'LO' : this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Logs Out')); MBchat.sounds.roomMove(); break; case 'RM' : this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Has been made a Moderator')); break; case 'RN' : this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Is no longer a moderator')); break; default: break; } } } }, displayMessage: function(lid,time,user,msgText,noLimit) { var addLeadingZeros = function(number) { number = number.toString(); if(number.length < 2) number = '0'+number; return number; }; var div = new Element('div'); if (lid != 0) div.set('id','L'+lid); //This should be all messages except errors var date = new Date(time.toInt()*1000); var hour = date.getHours(); var suffix = ' am'; if (hour > 12 ) { suffix = ' pm'; hour = hour - 12; } else { if (hour == 12) { suffix = ' pm'; } } var timeEl = new Element('span',{ 'class':'time', 'text': addLeadingZeros(hour) + ':' + addLeadingZeros(date.getMinutes()) + ':' + addLeadingZeros(date.getSeconds()) + suffix }); timeEl.inject(div); displayUser(user,div); msgText = replaceHyperLinks (msgText); //replace Hperlinks first msgText = replaceEmoticons(msgText); //Then replace emoticons. var span = new Element('span',{'html': msgText }) ; span.inject(div); if(!noLimit) { while (messageList.getChildren().length >= messageListSize) { messageList.getFirst().destroy(); } } if((!messageList.getLast()) || (messageList.getLast().get('class') == 'rowOdd') ) { div.addClass('rowEven'); } else { div.addClass('rowOdd'); } div.inject(messageList); if ($('autoScroll').checked) mlScroller.toBottom(); } } }(), |
lastId = response.lastid.toInt(); | if(response.lastid)lastId = response.lastid.toInt(); | message : function () { var messageList; var mlScroller; var lastId; return { init: function () { messageList = $('chatList'); mlScroller = new Fx.Scroll(messageList,{'link':'cancel'}); lastId = null; }, enterRoom: function(rid) { lastId = null; //prepare to fill up with old messages messageList.removeClass('whisper'); messageList.empty(); messageList.addClass('chat'); $('roomNameContainer').empty(); $('inputContainer').set('styles',{ 'display':'block'}); $('emoticonContainer').set('styles',{ 'display':'block'}); $('entranceHall').set('styles',{'display':'none'}); var exit = $('exit'); exit.addClass('exit-r'); exit.removeClass('exit-f'); room = new Room(rid,'Loading','I'); //set upi room first so random calls afterwards don't screw me var request = new ServerReq('room.php',function(response) { response.room.rid = response.room.rid.toInt(); room.set(response.room); var soundEnabled = $('soundEnabled').checked; $('soundEnabled').checked = false; //remember if sound was enabled but turn it off response.messages.each(function(item) { item.lid = item.lid.toInt(); item.rid = item.rid.toInt(); item.user.uid = item.user.uid.toInt(); if(!lastId) lastId = item.lid - 1; MBchat.updateables.processMessage(item); }); $('soundEnabled').checked = soundEnabled; //turn it on again lastId = response.lastid.toInt(); //Ensure we get all message from here on in MBchat.updateables.poller.setLastId(lastId); //Display room name at head of page var el = new Element('h1') .set('text', room.name ) .inject('roomNameContainer'); if (room.type == 'M' && (me.mod == 'M' || me.role == 'H' || me.role == 'G' || me.role == 'S' )) { //Can't go to private room here var whisperBoxes = $$('.whisperBox'); whisperBoxes.each ( function (whisperBox) { var privateBox = whisperBox.getElement('.private'); privateBox.removeClass('private'); privateBox.addClass('nonprivate'); privateBox.removeEvent('click',goPrivate); }); } MBchat.updateables.online.show(room.rid); //Show online list for room $('messageText').focus(); }).transmit({'rid' : rid}); MBchat.sounds.resetTimer(); }, leaveRoom: function () { lastId = null; var request = new ServerReq ('exit.php',function(response) { response.messages.each(function(item) { item.lid = item.lid.toInt(); item.rid = item.rid.toInt(); item.user.uid = item.user.uid.toInt(); if(!lastId) lastId = item.lid -1; MBchat.updateables.processMessage(item); }); lastId = response.lastid.toInt(); //Ensure we get all message from here on in MBchat.updateables.poller.setLastId(lastId); MBchat.updateables.online.show(0); //Show online list for entrance hall }).transmit({'rid' : room.rid}); //we might have been in a room that stopped me going to private room if (room.type == 'M' && (me.mod == 'M' || me.role == 'H' || me.role == 'G' || me.role == 'S' )) { //Can't go to private room here var whisperBoxes = $$('.whisperBox'); whisperBoxes.each ( function (whisperBox) { var privateBox = whisperBox.getElement('.nonprivate'); if (privateBox) { privateBox.removeClass('nonprivate'); privateBox.addClass('private'); privateBox.addEvent('click',goPrivate); } }); } room.set (entranceHall);; //Set up to be in the entrance hall messageList.removeClass('chat'); messageList.empty(); messageList.addClass('whisper'); $('roomNameContainer').empty(); var el = new Element('h1') .set('text', room.name) .inject('roomNameContainer'); $('inputContainer').set('styles',{ 'display':'none'}); $('emoticonContainer').set('styles',{ 'display':'none'}); $('entranceHall').set('styles',{'display':'block'}); var exit = $('exit'); exit.addClass('exit-f'); exit.removeClass('exit-r'); MBchat.sounds.resetTimer(); }, processMessage: function (msg) { var lid = msg.lid.toInt(); if (lastId < lid) { lastId = lid; switch(msg.type) { case 'RE' : if (privateRoom == 0) { if (room.rid == 0 || msg.rid == room.rid) { if (room.rid == 0) { this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' leaves for a Room')); } else { this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Enters the Room')); } MBchat.sounds.roomMove(); } } break; case 'RX' : if (privateRoom == 0) { if (room.rid == 0 || msg.rid == room.rid) { if (room.rid == 0) { this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Re-enters the Hall')); } else { this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Leaves the Room')); } MBchat.sounds.roomMove(); } } break; case 'WH' : if (MBchat.updateables.whispers.isWhisperingIn(msg.rid)) { if (privateRoom == 0) { var whisper = new Element('span',{'class':'whisper'}); var othersAdded = false; if (me.uid == msg.user.uid) { whisper.appendText('(whispers to') } else { whisper.appendText('(whispers to me') othersAdded = true; } //whisperList says who the other whisperers are var whisperIdStr = 'W'+msg.rid; var whisperers = $(whisperIdStr).getElement('.whisperList').getChildren(); whisperers.each(function(whisperer) { var uid = whisperer.get('id').substr(whisperIdStr.length+1).toInt(); if (uid != msg.user.uid) { //This is not the whisperer so include if(othersAdded) { whisper.appendText(', '); }else { whisper.appendText(' '); othersAdded = true; } var newWhisperer = whisperer.clone(); //Make a clone to remove Id newWhisperer.inject(whisper); }; }); whisper.appendText(') ') ; this.displayMessage(lastId,msg.time,msg.user,whisper.get('html') + msg.message); } else { this.displayMessage(lastId,msg.time,msg.user,'(private) ' + msg.message); } MBchat.sounds.messageArrives(); } break; case 'WJ' : if(msg.user.uid != me.uid && MBchat.updateables.whispers.isWhisperingIn(msg.rid)) { this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Joins your whisper box')); } break; case 'WL' : if(msg.user.uid != me.uid&& MBchat.updateables.whispers.isWhisperingIn(msg.rid)) { this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Leaves your whisper box')); } break; default: break; } } //Regardless of whether we;ve seen these before we are going to display them again. if(privateRoom == 0) { if (msg.rid == room.rid) { switch(msg.type) { case 'ME' : this.displayMessage(lastId,msg.time,msg.user,msg.message); MBchat.sounds.messageArrives(); break; case 'LT' : this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Logs Out (timeout)')); MBchat.sounds.roomMove(); break; case 'LI' : this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Logs In to Chat')); MBchat.sounds.roomMove(); break; case 'LO' : this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Logs Out')); MBchat.sounds.roomMove(); break; case 'RM' : this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Has been made a Moderator')); break; case 'RN' : this.displayMessage(lastId,msg.time,chatBot,chatBotMessage(msg.user.name+' Is no longer a moderator')); break; default: break; } } } }, displayMessage: function(lid,time,user,msgText,noLimit) { var addLeadingZeros = function(number) { number = number.toString(); if(number.length < 2) number = '0'+number; return number; }; var div = new Element('div'); if (lid != 0) div.set('id','L'+lid); //This should be all messages except errors var date = new Date(time.toInt()*1000); var hour = date.getHours(); var suffix = ' am'; if (hour > 12 ) { suffix = ' pm'; hour = hour - 12; } else { if (hour == 12) { suffix = ' pm'; } } var timeEl = new Element('span',{ 'class':'time', 'text': addLeadingZeros(hour) + ':' + addLeadingZeros(date.getMinutes()) + ':' + addLeadingZeros(date.getSeconds()) + suffix }); timeEl.inject(div); displayUser(user,div); msgText = replaceHyperLinks (msgText); //replace Hperlinks first msgText = replaceEmoticons(msgText); //Then replace emoticons. var span = new Element('span',{'html': msgText }) ; span.inject(div); if(!noLimit) { while (messageList.getChildren().length >= messageListSize) { messageList.getFirst().destroy(); } } if((!messageList.getLast()) || (messageList.getLast().get('class') == 'rowOdd') ) { div.addClass('rowEven'); } else { div.addClass('rowOdd'); } div.inject(messageList); if ($('autoScroll').checked) mlScroller.toBottom(); } } }(), |
var form = '#' + UID; | var formContainer = '#' + UID; | function modal(url, actType, actOnId, localizedButtons, callingButton) { $(document).ready(function() { var validator = null; var title = $(callingButton).text() // Assign title to calling button's text var okButton = localizedButtons[0]; var cancelButton = localizedButtons[1]; var UID = new Date().getTime(); var form = '#' + UID; // Construct action to perform when OK and Cancels buttons are clicked var dialogOptions = {}; dialogOptions[okButton] = function() { validator = $(form).find('form').validate(); // Post to server and construct callback if ($(form).find('form').valid()) { $.post( $(form).attr("action"), $(form).serialize(), function(returnString) { if (returnString.status == true) { updateItem(actType, actOnId, returnString.content); $('#' + UID).dialog("close"); } else { // Display errors in error list $('#formErrors .formErrorList').html(returnString.content); } }, "json" ); } }; dialogOptions[cancelButton] = function() { $(this).dialog("close"); }; // Construct dialog var $dialog = $('<div id=' + UID + '></div>').dialog({ title: title, autoOpen: false, width: 600, modal: true, draggable: false, buttons: dialogOptions, open:function(event,ui) { $(this).load(url, null, function() { $('#loading').throbber("disable"); }); $(this).html("<div id='loading' class='throbber'></div>"); $('#loading').throbber({ bgcolor: "#CED7E1", speed: 1, }); $('#loading').throbber("enable"); }, close:function() { // Reset form validation errors and inputs on close if (validator != null) { validator.resetForm(); } clearFormFields(form); } }); // Tell the calling button to open this modal on click $(callingButton).live("click", (function() { $dialog.dialog('open') return false; })); });} |
validator = $(form).find('form').validate(); | $form = $(formContainer).find('form'); validator = $form.validate(); | function modal(url, actType, actOnId, localizedButtons, callingButton) { $(document).ready(function() { var validator = null; var title = $(callingButton).text() // Assign title to calling button's text var okButton = localizedButtons[0]; var cancelButton = localizedButtons[1]; var UID = new Date().getTime(); var form = '#' + UID; // Construct action to perform when OK and Cancels buttons are clicked var dialogOptions = {}; dialogOptions[okButton] = function() { validator = $(form).find('form').validate(); // Post to server and construct callback if ($(form).find('form').valid()) { $.post( $(form).attr("action"), $(form).serialize(), function(returnString) { if (returnString.status == true) { updateItem(actType, actOnId, returnString.content); $('#' + UID).dialog("close"); } else { // Display errors in error list $('#formErrors .formErrorList').html(returnString.content); } }, "json" ); } }; dialogOptions[cancelButton] = function() { $(this).dialog("close"); }; // Construct dialog var $dialog = $('<div id=' + UID + '></div>').dialog({ title: title, autoOpen: false, width: 600, modal: true, draggable: false, buttons: dialogOptions, open:function(event,ui) { $(this).load(url, null, function() { $('#loading').throbber("disable"); }); $(this).html("<div id='loading' class='throbber'></div>"); $('#loading').throbber({ bgcolor: "#CED7E1", speed: 1, }); $('#loading').throbber("enable"); }, close:function() { // Reset form validation errors and inputs on close if (validator != null) { validator.resetForm(); } clearFormFields(form); } }); // Tell the calling button to open this modal on click $(callingButton).live("click", (function() { $dialog.dialog('open') return false; })); });} |
if ($(form).find('form').valid()) { | if ($form.valid()) { | function modal(url, actType, actOnId, localizedButtons, callingButton) { $(document).ready(function() { var validator = null; var title = $(callingButton).text() // Assign title to calling button's text var okButton = localizedButtons[0]; var cancelButton = localizedButtons[1]; var UID = new Date().getTime(); var form = '#' + UID; // Construct action to perform when OK and Cancels buttons are clicked var dialogOptions = {}; dialogOptions[okButton] = function() { validator = $(form).find('form').validate(); // Post to server and construct callback if ($(form).find('form').valid()) { $.post( $(form).attr("action"), $(form).serialize(), function(returnString) { if (returnString.status == true) { updateItem(actType, actOnId, returnString.content); $('#' + UID).dialog("close"); } else { // Display errors in error list $('#formErrors .formErrorList').html(returnString.content); } }, "json" ); } }; dialogOptions[cancelButton] = function() { $(this).dialog("close"); }; // Construct dialog var $dialog = $('<div id=' + UID + '></div>').dialog({ title: title, autoOpen: false, width: 600, modal: true, draggable: false, buttons: dialogOptions, open:function(event,ui) { $(this).load(url, null, function() { $('#loading').throbber("disable"); }); $(this).html("<div id='loading' class='throbber'></div>"); $('#loading').throbber({ bgcolor: "#CED7E1", speed: 1, }); $('#loading').throbber("enable"); }, close:function() { // Reset form validation errors and inputs on close if (validator != null) { validator.resetForm(); } clearFormFields(form); } }); // Tell the calling button to open this modal on click $(callingButton).live("click", (function() { $dialog.dialog('open') return false; })); });} |
$(form).attr("action"), $(form).serialize(), | $form.attr("action"), $form.serialize(), | function modal(url, actType, actOnId, localizedButtons, callingButton) { $(document).ready(function() { var validator = null; var title = $(callingButton).text() // Assign title to calling button's text var okButton = localizedButtons[0]; var cancelButton = localizedButtons[1]; var UID = new Date().getTime(); var form = '#' + UID; // Construct action to perform when OK and Cancels buttons are clicked var dialogOptions = {}; dialogOptions[okButton] = function() { validator = $(form).find('form').validate(); // Post to server and construct callback if ($(form).find('form').valid()) { $.post( $(form).attr("action"), $(form).serialize(), function(returnString) { if (returnString.status == true) { updateItem(actType, actOnId, returnString.content); $('#' + UID).dialog("close"); } else { // Display errors in error list $('#formErrors .formErrorList').html(returnString.content); } }, "json" ); } }; dialogOptions[cancelButton] = function() { $(this).dialog("close"); }; // Construct dialog var $dialog = $('<div id=' + UID + '></div>').dialog({ title: title, autoOpen: false, width: 600, modal: true, draggable: false, buttons: dialogOptions, open:function(event,ui) { $(this).load(url, null, function() { $('#loading').throbber("disable"); }); $(this).html("<div id='loading' class='throbber'></div>"); $('#loading').throbber({ bgcolor: "#CED7E1", speed: 1, }); $('#loading').throbber("enable"); }, close:function() { // Reset form validation errors and inputs on close if (validator != null) { validator.resetForm(); } clearFormFields(form); } }); // Tell the calling button to open this modal on click $(callingButton).live("click", (function() { $dialog.dialog('open') return false; })); });} |
clearFormFields(form); | clearFormFields($(formContainer).find('form')); | function modal(url, actType, actOnId, localizedButtons, callingButton) { $(document).ready(function() { var validator = null; var title = $(callingButton).text() // Assign title to calling button's text var okButton = localizedButtons[0]; var cancelButton = localizedButtons[1]; var UID = new Date().getTime(); var form = '#' + UID; // Construct action to perform when OK and Cancels buttons are clicked var dialogOptions = {}; dialogOptions[okButton] = function() { validator = $(form).find('form').validate(); // Post to server and construct callback if ($(form).find('form').valid()) { $.post( $(form).attr("action"), $(form).serialize(), function(returnString) { if (returnString.status == true) { updateItem(actType, actOnId, returnString.content); $('#' + UID).dialog("close"); } else { // Display errors in error list $('#formErrors .formErrorList').html(returnString.content); } }, "json" ); } }; dialogOptions[cancelButton] = function() { $(this).dialog("close"); }; // Construct dialog var $dialog = $('<div id=' + UID + '></div>').dialog({ title: title, autoOpen: false, width: 600, modal: true, draggable: false, buttons: dialogOptions, open:function(event,ui) { $(this).load(url, null, function() { $('#loading').throbber("disable"); }); $(this).html("<div id='loading' class='throbber'></div>"); $('#loading').throbber({ bgcolor: "#CED7E1", speed: 1, }); $('#loading').throbber("enable"); }, close:function() { // Reset form validation errors and inputs on close if (validator != null) { validator.resetForm(); } clearFormFields(form); } }); // Tell the calling button to open this modal on click $(callingButton).live("click", (function() { $dialog.dialog('open') return false; })); });} |
var form = '#' + UID + ' > form'; | var form = '#' + UID; | function modal(url, actType, actOnId, localizedButtons, callingButton) { $(document).ready(function() { var validator = null; var title = $(callingButton).text() // Assign title to calling button's text var okButton = localizedButtons[0]; var cancelButton = localizedButtons[1]; var UID = new Date().getTime(); var form = '#' + UID + ' > form'; // Construct action to perform when OK and Cancels buttons are clicked var dialogOptions = {}; dialogOptions[okButton] = function() { validator = $(form).validate(); // Post to server and construct callback if ($(form).valid()) { $.post( $(form).attr("action"), $(form).serialize(), function(returnString) { if (returnString.status == true) { updateItem(actType, actOnId, returnString.content); $('#' + UID).dialog("close"); } else { // Display errors in error list $('#formErrors .formErrorList').html(returnString.content); } }, "json" ); } }; dialogOptions[cancelButton] = function() { $(this).dialog("close"); }; // Construct dialog var $dialog = $('<div id=' + UID + '></div>').dialog({ title: title, autoOpen: false, width: 600, modal: true, draggable: false, buttons: dialogOptions, open:function(event,ui) { $(this).load(url, null, function() { $('#loading').throbber("disable"); }); $(this).html("<div id='loading' class='throbber'></div>"); $('#loading').throbber({ bgcolor: "#CED7E1", speed: 1, }); $('#loading').throbber("enable"); }, close:function() { // Reset form validation errors and inputs on close if (validator != null) { validator.resetForm(); } clearFormFields(form); } }); // Tell the calling button to open this modal on click $(callingButton).live("click", (function() { $dialog.dialog('open') return false; })); });} |
validator = $(form).validate(); | validator = $(form).find('form').validate(); | function modal(url, actType, actOnId, localizedButtons, callingButton) { $(document).ready(function() { var validator = null; var title = $(callingButton).text() // Assign title to calling button's text var okButton = localizedButtons[0]; var cancelButton = localizedButtons[1]; var UID = new Date().getTime(); var form = '#' + UID + ' > form'; // Construct action to perform when OK and Cancels buttons are clicked var dialogOptions = {}; dialogOptions[okButton] = function() { validator = $(form).validate(); // Post to server and construct callback if ($(form).valid()) { $.post( $(form).attr("action"), $(form).serialize(), function(returnString) { if (returnString.status == true) { updateItem(actType, actOnId, returnString.content); $('#' + UID).dialog("close"); } else { // Display errors in error list $('#formErrors .formErrorList').html(returnString.content); } }, "json" ); } }; dialogOptions[cancelButton] = function() { $(this).dialog("close"); }; // Construct dialog var $dialog = $('<div id=' + UID + '></div>').dialog({ title: title, autoOpen: false, width: 600, modal: true, draggable: false, buttons: dialogOptions, open:function(event,ui) { $(this).load(url, null, function() { $('#loading').throbber("disable"); }); $(this).html("<div id='loading' class='throbber'></div>"); $('#loading').throbber({ bgcolor: "#CED7E1", speed: 1, }); $('#loading').throbber("enable"); }, close:function() { // Reset form validation errors and inputs on close if (validator != null) { validator.resetForm(); } clearFormFields(form); } }); // Tell the calling button to open this modal on click $(callingButton).live("click", (function() { $dialog.dialog('open') return false; })); });} |
if ($(form).valid()) { | if ($(form).find('form').valid()) { | function modal(url, actType, actOnId, localizedButtons, callingButton) { $(document).ready(function() { var validator = null; var title = $(callingButton).text() // Assign title to calling button's text var okButton = localizedButtons[0]; var cancelButton = localizedButtons[1]; var UID = new Date().getTime(); var form = '#' + UID + ' > form'; // Construct action to perform when OK and Cancels buttons are clicked var dialogOptions = {}; dialogOptions[okButton] = function() { validator = $(form).validate(); // Post to server and construct callback if ($(form).valid()) { $.post( $(form).attr("action"), $(form).serialize(), function(returnString) { if (returnString.status == true) { updateItem(actType, actOnId, returnString.content); $('#' + UID).dialog("close"); } else { // Display errors in error list $('#formErrors .formErrorList').html(returnString.content); } }, "json" ); } }; dialogOptions[cancelButton] = function() { $(this).dialog("close"); }; // Construct dialog var $dialog = $('<div id=' + UID + '></div>').dialog({ title: title, autoOpen: false, width: 600, modal: true, draggable: false, buttons: dialogOptions, open:function(event,ui) { $(this).load(url, null, function() { $('#loading').throbber("disable"); }); $(this).html("<div id='loading' class='throbber'></div>"); $('#loading').throbber({ bgcolor: "#CED7E1", speed: 1, }); $('#loading').throbber("enable"); }, close:function() { // Reset form validation errors and inputs on close if (validator != null) { validator.resetForm(); } clearFormFields(form); } }); // Tell the calling button to open this modal on click $(callingButton).live("click", (function() { $dialog.dialog('open') return false; })); });} |
this.mouseDown=function(a,b){h.capture(null);h.capture(j);f=h.pageCoordinates(b)};this.mouseUp=function(){if(f!=null)f=null}}); | this.paintGl()};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=k.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseDown=function(a,c){f.capture(null);f.capture(l);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); | this.mouseDown=function(a,b){h.capture(null);h.capture(j);f=h.pageCoordinates(b)};this.mouseUp=function(){if(f!=null)f=null}}); |
"default"}else b.style.cursor=""}};this.mouseDown=function(a,c){if(b.style.cursor=="crosshair"){d.capture(null);d.capture(b);e=d.pageCoordinates(c);l=Number(b.value)}else if(d.widgetCoordinates(b,c).x>b.offsetWidth-16){d.cancelEvent(c);d.capture(b)}};this.keyDown=function(a,c){if(c.keyCode==40)k();else c.keyCode==38&&j()};this.mouseUp=function(a,c){if(e!=null){e=null;a.onchange()}else{a=d.widgetCoordinates(b,c);if(a.x>b.offsetWidth-16)a.y<b.offsetHeight/2?j():k()}}}); | c);g.removeClass("Wt-spinbox-dn").removeClass("Wt-spinbox-up");if(a.x>b.offsetWidth-16){c=b.offsetHeight/2;if(a.y>=c-1&&a.y<=c+1)b.style.cursor="crosshair";else{b.style.cursor="default";a.y<c-1?g.addClass("Wt-spinbox-up"):g.addClass("Wt-spinbox-dn")}}else b.style.cursor=""}};this.mouseDown=function(a,c){if(b.style.cursor=="crosshair"){d.capture(null);d.capture(b);e=d.pageCoordinates(c);m=Number(b.value)}else if(d.widgetCoordinates(b,c).x>b.offsetWidth-16){d.cancelEvent(c);d.capture(b)}};this.keyDown= | "default"}else b.style.cursor=""}};this.mouseDown=function(a,c){if(b.style.cursor=="crosshair"){d.capture(null);d.capture(b);e=d.pageCoordinates(c);l=Number(b.value)}else if(d.widgetCoordinates(b,c).x>b.offsetWidth-16){d.cancelEvent(c);d.capture(b)}};this.keyDown=function(a,c){if(c.keyCode==40)k();else c.keyCode==38&&j()};this.mouseUp=function(a,c){if(e!=null){e=null;a.onchange()}else{a=d.widgetCoordinates(b,c);if(a.x>b.offsetWidth-16)a.y<b.offsetHeight/2?j():k()}}}); |
nodeId:b,selected:f,drop:e,el:h}}jQuery.data(d,"obj",this);var o=i.firstChild,j=p.firstChild,g=l.WT;this.click=function(c,a){var b=n(a);b.columnId!=-1&&l.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"clicked","","")};this.dblClick=function(c,a){var b=n(a);b.columnId!=-1&&l.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"dblclicked","","")};this.mouseDown=function(c,a){g.capture(null);var b=n(a);if(b.columnId!=-1){l.emit(d,{name:"itemEvent",eventObject:c, event:a},b.nodeId,b.columnId,"mousedown","","");d.getAttribute("drag")==="true"&&b.selected&&l._p_.dragStart(d,a)}};this.mouseUp=function(c,a){var b=n(a);b.columnId!=-1&&l.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"mouseup","","")};this.resizeHandleMDown=function(c,a){a=g.pageCoordinates(a);c.setAttribute("dsx",a.x)};this.resizeHandleMMoved=function(c,a){var b=c.getAttribute("dsx"),f=j.lastChild.className.split(" ")[0];g.getCssRule("#"+d.id+" ."+f);if(b!=null&&b!=""){f=g.pageCoordinates(a); | nodeId:b,selected:e,drop:f,el:j}}jQuery.data(d,"obj",this);var o=i.firstChild,k=p.firstChild,g=m.WT;this.click=function(c,a){var b=n(a);b.columnId!=-1&&m.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"clicked","","")};this.dblClick=function(c,a){var b=n(a);b.columnId!=-1&&m.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"dblclicked","","")};this.mouseDown=function(c,a){g.capture(null);var b=n(a);if(b.columnId!=-1){m.emit(d,{name:"itemEvent",eventObject:c, event:a},b.nodeId,b.columnId,"mousedown","","");d.getAttribute("drag")==="true"&&b.selected&&m._p_.dragStart(d,a)}};this.mouseUp=function(c,a){var b=n(a);b.columnId!=-1&&m.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"mouseup","","")};this.resizeHandleMDown=function(c,a){a=g.pageCoordinates(a);c.setAttribute("dsx",a.x)};this.resizeHandleMMoved=function(c,a){var b=c.getAttribute("dsx"),e=k.lastChild.className.split(" ")[0];g.getCssRule("#"+d.id+" ."+e);if(b!=null&&b!=""){e=g.pageCoordinates(a); | nodeId:b,selected:f,drop:e,el:h}}jQuery.data(d,"obj",this);var o=i.firstChild,j=p.firstChild,g=l.WT;this.click=function(c,a){var b=n(a);b.columnId!=-1&&l.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"clicked","","")};this.dblClick=function(c,a){var b=n(a);b.columnId!=-1&&l.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"dblclicked","","")};this.mouseDown=function(c,a){g.capture(null);var b=n(a);if(b.columnId!=-1){l.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"mousedown","","");d.getAttribute("drag")==="true"&&b.selected&&l._p_.dragStart(d,a)}};this.mouseUp=function(c,a){var b=n(a);b.columnId!=-1&&l.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"mouseup","","")};this.resizeHandleMDown=function(c,a){a=g.pageCoordinates(a);c.setAttribute("dsx",a.x)};this.resizeHandleMMoved=function(c,a){var b=c.getAttribute("dsx"),f=j.lastChild.className.split(" ")[0];g.getCssRule("#"+d.id+" ."+f);if(b!=null&&b!=""){f=g.pageCoordinates(a); |
[a,a,a]);l.negate(i);b.translate(e,i);l.negate(i);this.paintGL()}};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=l.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseDown=function(a,c){f.capture(null);f.capture(j);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); | null){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e,[a,a,a]);l.negate(i);b.translate(e,i);l.negate(i);this.paintGL()}};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=l.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseDown=function(a,c){f.capture(null); f.capture(j);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); | [a,a,a]);l.negate(i);b.translate(e,i);l.negate(i);this.paintGL()}};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=l.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseDown=function(a,c){f.capture(null);f.capture(j);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); |
function(a,c){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=k.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseDown=function(a,c){f.capture(null);f.capture(l);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); | [a,a,a]);l.negate(i);b.translate(e,i);l.negate(i);this.paintGL()}};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=l.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseDown=function(a,c){f.capture(null);f.capture(j);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); | function(a,c){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=k.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseDown=function(a,c){f.capture(null);f.capture(l);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); |
this.paintGl()};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=k.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseDown=function(a,c){f.capture(null);f.capture(l);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); | function(a,c){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=k.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseDown=function(a,c){f.capture(null);f.capture(l);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); | this.paintGl()};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=k.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseDown=function(a,c){f.capture(null);f.capture(l);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); |
e,i){c=a;g=b;k=d;l=e;m=i};this.mouseDragLookAt=function(a,b){var d=h.pageCoordinates(b);a=d.x-f.x;d=d.y-f.y;var e=vec3.create();e[0]=c[0];e[1]=c[4];e[2]=c[8];var i=mat4.create();mat4.identity(i);mat4.translate(i,g);mat4.rotate(i,d*l,e);mat4.rotate(i,a*m,k);vec3.negate(g);mat4.translate(i,g);vec3.negate(g);mat4.multiply(c,i,c);console.log("mouseDragLookAt after: "+mat4.str(c));console.log("mouseDragLookAt: repaint");this.paintGl();f=h.pageCoordinates(b)};this.mouseWheelLookAt=function(a,b){a=h.wheelDelta(b); | c,d,g,j){e=a;i=c;m=d;n=g;o=j};this.mouseDragLookAt=function(a,c){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=k.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var j=b.create();b.identity(j);b.translate(j,i);b.rotate(j,d*n,g);b.rotate(j,a*o,m);k.negate(i);b.translate(j,i);k.negate(i);b.multiply(e,j,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseWheelLookAt=function(a,c){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e,[a,a,a]);k.negate(i);b.translate(e,i);k.negate(i); | e,i){c=a;g=b;k=d;l=e;m=i};this.mouseDragLookAt=function(a,b){var d=h.pageCoordinates(b);a=d.x-f.x;d=d.y-f.y;var e=vec3.create();e[0]=c[0];e[1]=c[4];e[2]=c[8];var i=mat4.create();mat4.identity(i);mat4.translate(i,g);mat4.rotate(i,d*l,e);mat4.rotate(i,a*m,k);vec3.negate(g);mat4.translate(i,g);vec3.negate(g);mat4.multiply(c,i,c);console.log("mouseDragLookAt after: "+mat4.str(c));console.log("mouseDragLookAt: repaint");this.paintGl();f=h.pageCoordinates(b)};this.mouseWheelLookAt=function(a,b){a=h.wheelDelta(b); |
this.paintGl(); | this.paintGL(); | this.mouseDragLookAt = function(o, event) { var c = WT.pageCoordinates(event); var dx=(c.x - dragPreviousXY.x); var dy=(c.y - dragPreviousXY.y); var s=vec3.create(); s[0]=cameraMatrix[0]; s[1]=cameraMatrix[4]; s[2]=cameraMatrix[8]; var r=mat4.create(); mat4.identity(r); mat4.translate(r, lookAtCenter); mat4.rotate(r, dy * lookAtPitchRate, s); mat4.rotate(r, dx * lookAtYawRate, lookAtUpDir); vec3.negate(lookAtCenter); mat4.translate(r, lookAtCenter); vec3.negate(lookAtCenter); mat4.multiply(cameraMatrix,r,cameraMatrix); //console.log('mouseDragLookAt after: ' + mat4.str(cameraMatrix)); // Repaint! //console.log('mouseDragLookAt: repaint'); this.paintGl(); // store mouse coord for next action dragPreviousXY = WT.pageCoordinates(event); }; |
function(a,c,d,g,k){e=a;i=c;m=d;n=g;o=k};this.mouseDragLookAt=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=l.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var k=b.create();b.identity(k);b.translate(k,i);b.rotate(k,d*n,g);b.rotate(k,a*o,m);l.negate(i);b.translate(k,i);l.negate(i);b.multiply(e,k,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseWheelLookAt=function(a,c){if(this.ctx!=null){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e, | null){j.parentNode.replaceChild(j.firstChild,j);a()}}return this.ctx};this.setLookAtParams=function(a,c,d,g,k){e=a;i=c;m=d;n=g;o=k};this.mouseDragLookAt=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=l.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var k=b.create();b.identity(k);b.translate(k,i);b.rotate(k,d*n,g);b.rotate(k,a*o,m);l.negate(i);b.translate(k,i);l.negate(i);b.multiply(e,k,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseWheelLookAt=function(a,c){if(this.ctx!= | function(a,c,d,g,k){e=a;i=c;m=d;n=g;o=k};this.mouseDragLookAt=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=l.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var k=b.create();b.identity(k);b.translate(k,i);b.rotate(k,d*n,g);b.rotate(k,a*o,m);l.negate(i);b.translate(k,i);l.negate(i);b.multiply(e,k,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseWheelLookAt=function(a,c){if(this.ctx!=null){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e, |
WT_DECLARE_WT_MEMBER(1,"WGLWidget",function(r,l){jQuery.data(l,"obj",this);var f=r.WT,k=f.glMatrix.vec3,b=f.glMatrix.mat4;this.ctx=null;this.initializeGL=function(){};this.paintGL=function(){};var h=null,i=null,m=null,n=0,o=0,e=null,p=0,q=0;this.discoverContext=function(){if(l.getContext){this.ctx=l.getContext("experimental-webgl");if(this.ctx==null)this.ctx=l.getContext("webgl")}return this.ctx};this.setLookAtParams=function(a,c,d,g,j){e=a;i=c;m=d;n=g;o=j};this.mouseDragLookAt=function(a,c){var d= f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=k.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var j=b.create();b.identity(j);b.translate(j,i);b.rotate(j,d*n,g);b.rotate(j,a*o,m);k.negate(i);b.translate(j,i);k.negate(i);b.multiply(e,j,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseWheelLookAt=function(a,c){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e,[a,a,a]);k.negate(i);b.translate(e,i);k.negate(i);this.paintGl()};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk= | function(a,c,d,g,k){e=a;i=c;m=d;n=g;o=k};this.mouseDragLookAt=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=l.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var k=b.create();b.identity(k);b.translate(k,i);b.rotate(k,d*n,g);b.rotate(k,a*o,m);l.negate(i);b.translate(k,i);l.negate(i);b.multiply(e,k,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseWheelLookAt=function(a,c){if(this.ctx!=null){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e, | WT_DECLARE_WT_MEMBER(1,"WGLWidget",function(r,l){jQuery.data(l,"obj",this);var f=r.WT,k=f.glMatrix.vec3,b=f.glMatrix.mat4;this.ctx=null;this.initializeGL=function(){};this.paintGL=function(){};var h=null,i=null,m=null,n=0,o=0,e=null,p=0,q=0;this.discoverContext=function(){if(l.getContext){this.ctx=l.getContext("experimental-webgl");if(this.ctx==null)this.ctx=l.getContext("webgl")}return this.ctx};this.setLookAtParams=function(a,c,d,g,j){e=a;i=c;m=d;n=g;o=j};this.mouseDragLookAt=function(a,c){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=k.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var j=b.create();b.identity(j);b.translate(j,i);b.rotate(j,d*n,g);b.rotate(j,a*o,m);k.negate(i);b.translate(j,i);k.negate(i);b.multiply(e,j,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseWheelLookAt=function(a,c){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e,[a,a,a]);k.negate(i);b.translate(e,i);k.negate(i);this.paintGl()};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk= |
c,d,g,j){e=a;i=c;m=d;n=g;o=j};this.mouseDragLookAt=function(a,c){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=k.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var j=b.create();b.identity(j);b.translate(j,i);b.rotate(j,d*n,g);b.rotate(j,a*o,m);k.negate(i);b.translate(j,i);k.negate(i);b.multiply(e,j,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseWheelLookAt=function(a,c){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e,[a,a,a]);k.negate(i);b.translate(e,i);k.negate(i); | WT_DECLARE_WT_MEMBER(1,"WGLWidget",function(r,l){jQuery.data(l,"obj",this);var f=r.WT,k=f.glMatrix.vec3,b=f.glMatrix.mat4;this.ctx=null;this.initializeGL=function(){};this.paintGL=function(){};var h=null,i=null,m=null,n=0,o=0,e=null,p=0,q=0;this.discoverContext=function(){if(l.getContext){this.ctx=l.getContext("experimental-webgl");if(this.ctx==null)this.ctx=l.getContext("webgl")}return this.ctx};this.setLookAtParams=function(a,c,d,g,j){e=a;i=c;m=d;n=g;o=j};this.mouseDragLookAt=function(a,c){var d= f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=k.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var j=b.create();b.identity(j);b.translate(j,i);b.rotate(j,d*n,g);b.rotate(j,a*o,m);k.negate(i);b.translate(j,i);k.negate(i);b.multiply(e,j,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseWheelLookAt=function(a,c){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e,[a,a,a]);k.negate(i);b.translate(e,i);k.negate(i);this.paintGl()};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk= | c,d,g,j){e=a;i=c;m=d;n=g;o=j};this.mouseDragLookAt=function(a,c){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=k.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var j=b.create();b.identity(j);b.translate(j,i);b.rotate(j,d*n,g);b.rotate(j,a*o,m);k.negate(i);b.translate(j,i);k.negate(i);b.multiply(e,j,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseWheelLookAt=function(a,c){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e,[a,a,a]);k.negate(i);b.translate(e,i);k.negate(i); |
console.log('mouseDragLookAt after: ' + mat4.str(cameraMatrix)); | this.mouseDragLookAt = function(o, event) { var c = WT.pageCoordinates(event); var dx=(c.x - dragPreviousXY.x); var dy=(c.y - dragPreviousXY.y); var s=vec3.create(); s[0]=cameraMatrix[0]; s[1]=cameraMatrix[4]; s[2]=cameraMatrix[8]; var r=mat4.create(); mat4.identity(r); mat4.translate(r, lookAtCenter); mat4.rotate(r, dy * lookAtPitchRate, s); mat4.rotate(r, dx * lookAtYawRate, lookAtUpDir); vec3.negate(lookAtCenter); mat4.translate(r, lookAtCenter); vec3.negate(lookAtCenter); mat4.multiply(cameraMatrix,r,cameraMatrix); console.log('mouseDragLookAt after: ' + mat4.str(cameraMatrix)); // Repaint! console.log('mouseDragLookAt: repaint'); //alert('mouseDragLookAt: repaint'); this.paintGl(); // store mouse coord for next action dragPreviousXY = WT.pageCoordinates(event); }; |
|
console.log('mouseDragLookAt: repaint'); | this.mouseDragLookAt = function(o, event) { var c = WT.pageCoordinates(event); var dx=(c.x - dragPreviousXY.x); var dy=(c.y - dragPreviousXY.y); var s=vec3.create(); s[0]=cameraMatrix[0]; s[1]=cameraMatrix[4]; s[2]=cameraMatrix[8]; var r=mat4.create(); mat4.identity(r); mat4.translate(r, lookAtCenter); mat4.rotate(r, dy * lookAtPitchRate, s); mat4.rotate(r, dx * lookAtYawRate, lookAtUpDir); vec3.negate(lookAtCenter); mat4.translate(r, lookAtCenter); vec3.negate(lookAtCenter); mat4.multiply(cameraMatrix,r,cameraMatrix); console.log('mouseDragLookAt after: ' + mat4.str(cameraMatrix)); // Repaint! console.log('mouseDragLookAt: repaint'); //alert('mouseDragLookAt: repaint'); this.paintGl(); // store mouse coord for next action dragPreviousXY = WT.pageCoordinates(event); }; |
|
b=Math.pow(1.2,a);console.log("mouseWheelLookAt: "+a);mat4.translate(c,g);mat4.scale(c,[b,b,b]);vec3.negate(g);mat4.translate(c,g);vec3.negate(g);console.log("mouseWheelLookAt: repaint");this.paintGl()};this.setWalkParams=function(a,b,d){c=a;n=b;o=d};this.mouseDragWalk=function(a,b){var d=h.pageCoordinates(b);a=d.x-f.x;d=d.y-f.y;var e=mat4.create();mat4.identity(e);mat4.rotateY(e,a*o);a=vec3.create();a[0]=0;a[1]=0;a[2]=-n*d;mat4.translate(e,a);mat4.multiply(e,c,c);this.paintGl();f=h.pageCoordinates(b)}; | this.paintGl()};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=k.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseDown=function(a,c){f.capture(null);f.capture(l);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); | b=Math.pow(1.2,a);console.log("mouseWheelLookAt: "+a);mat4.translate(c,g);mat4.scale(c,[b,b,b]);vec3.negate(g);mat4.translate(c,g);vec3.negate(g);console.log("mouseWheelLookAt: repaint");this.paintGl()};this.setWalkParams=function(a,b,d){c=a;n=b;o=d};this.mouseDragWalk=function(a,b){var d=h.pageCoordinates(b);a=d.x-f.x;d=d.y-f.y;var e=mat4.create();mat4.identity(e);mat4.rotateY(e,a*o);a=vec3.create();a[0]=0;a[1]=0;a[2]=-n*d;mat4.translate(e,a);mat4.multiply(e,c,c);this.paintGl();f=h.pageCoordinates(b)}; |
this.paintGl(); | this.paintGL(); | this.mouseDragWalk = function(o, event){ var c = WT.pageCoordinates(event); var dx=(c.x - dragPreviousXY.x); var dy=(c.y - dragPreviousXY.y); var r=mat4.create(); mat4.identity(r); mat4.rotateY(r, dx * walkYawRate); var t=vec3.create(); t[0]=0; t[1]=0; t[2]=-walkFrontRate * dy; mat4.translate(r, t); mat4.multiply(r, cameraMatrix, cameraMatrix); this.paintGl(); dragPreviousXY = WT.pageCoordinates(event); } |
} | }; | this.mouseDragWalk = function(o, event){ var c = WT.pageCoordinates(event); var dx=(c.x - dragPreviousXY.x); var dy=(c.y - dragPreviousXY.y); var r=mat4.create(); mat4.identity(r); mat4.rotateY(r, dx * walkYawRate); var t=vec3.create(); t[0]=0; t[1]=0; t[2]=-walkFrontRate * dy; mat4.translate(r, t); mat4.multiply(r, cameraMatrix, cameraMatrix); this.paintGl(); dragPreviousXY = WT.pageCoordinates(event); } |
[a,a,a]);l.negate(i);b.translate(e,i);l.negate(i);this.paintGL()}};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=l.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseDown=function(a,c){f.capture(null);f.capture(j);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); | null){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e,[a,a,a]);l.negate(i);b.translate(e,i);l.negate(i);this.paintGL()}};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=l.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseDown=function(a,c){f.capture(null); | [a,a,a]);l.negate(i);b.translate(e,i);l.negate(i);this.paintGL()}};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=l.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseDown=function(a,c){f.capture(null);f.capture(j);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); |
f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=k.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var j=b.create();b.identity(j);b.translate(j,i);b.rotate(j,d*n,g);b.rotate(j,a*o,m);k.negate(i);b.translate(j,i);k.negate(i);b.multiply(e,j,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseWheelLookAt=function(a,c){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e,[a,a,a]);k.negate(i);b.translate(e,i);k.negate(i);this.paintGl()};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk= function(a,c){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=k.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseDown=function(a,c){f.capture(null);f.capture(l);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); | [a,a,a]);l.negate(i);b.translate(e,i);l.negate(i);this.paintGL()}};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=l.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseDown=function(a,c){f.capture(null);f.capture(j);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); | f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=k.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var j=b.create();b.identity(j);b.translate(j,i);b.rotate(j,d*n,g);b.rotate(j,a*o,m);k.negate(i);b.translate(j,i);k.negate(i);b.multiply(e,j,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseWheelLookAt=function(a,c){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e,[a,a,a]);k.negate(i);b.translate(e,i);k.negate(i);this.paintGl()};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=k.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseDown=function(a,c){f.capture(null);f.capture(l);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); |
this.paintGl()};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=k.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseDown=function(a,c){f.capture(null);f.capture(l);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); | f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=k.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var j=b.create();b.identity(j);b.translate(j,i);b.rotate(j,d*n,g);b.rotate(j,a*o,m);k.negate(i);b.translate(j,i);k.negate(i);b.multiply(e,j,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseWheelLookAt=function(a,c){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e,[a,a,a]);k.negate(i);b.translate(e,i);k.negate(i);this.paintGl()};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk= function(a,c){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=k.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseDown=function(a,c){f.capture(null);f.capture(l);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); | this.paintGl()};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=k.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseDown=function(a,c){f.capture(null);f.capture(l);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); |
WT_DECLARE_WT_MEMBER(1,"WSpinBox",function(m,b,g,h,f){function i(a){if(a>h)a=h;else if(a<g)a=g;b.value=a}function j(){var a=Number(b.value);a+=f;i(a);b.onchange()}function k(){var a=Number(b.value);a-=f;i(a);b.onchange()}jQuery.data(b,"obj",this);var d=m.WT,e=null,l;this.update=function(a,c,n){g=a;h=c;f=n};this.mouseMove=function(a,c){if(e){a=d.pageCoordinates(c).y-e.y;c=l;c-=a*f;i(c)}else{a=d.widgetCoordinates(b,c);if(a.x>b.offsetWidth-16){c=b.offsetHeight/2;b.style.cursor=a.y>=c-1&&a.y<=c+1?"crosshair": "default"}else b.style.cursor=""}};this.mouseDown=function(a,c){if(b.style.cursor=="crosshair"){d.capture(null);d.capture(b);e=d.pageCoordinates(c);l=Number(b.value)}else if(d.widgetCoordinates(b,c).x>b.offsetWidth-16){d.cancelEvent(c);d.capture(b)}};this.keyDown=function(a,c){if(c.keyCode==40)k();else c.keyCode==38&&j()};this.mouseUp=function(a,c){if(e!=null){e=null;a.onchange()}else{a=d.widgetCoordinates(b,c);if(a.x>b.offsetWidth-16)a.y<b.offsetHeight/2?j():k()}}}); | WT_DECLARE_WT_MEMBER(1,"WSpinBox",function(n,b,h,i,f){function j(a){if(a>i)a=i;else if(a<h)a=h;b.value=a}function k(){var a=Number(b.value);a+=f;j(a);b.onchange()}function l(){var a=Number(b.value);a-=f;j(a);b.onchange()}jQuery.data(b,"obj",this);var d=n.WT,g=$(b),e=null,m;this.update=function(a,c,o){h=a;i=c;f=o};this.mouseOut=function(){g.removeClass("Wt-spinbox-dn").removeClass("Wt-spinbox-up")};this.mouseMove=function(a,c){if(e){a=d.pageCoordinates(c).y-e.y;c=m;c-=a*f;j(c)}else{a=d.widgetCoordinates(b, c);g.removeClass("Wt-spinbox-dn").removeClass("Wt-spinbox-up");if(a.x>b.offsetWidth-16){c=b.offsetHeight/2;if(a.y>=c-1&&a.y<=c+1)b.style.cursor="crosshair";else{b.style.cursor="default";a.y<c-1?g.addClass("Wt-spinbox-up"):g.addClass("Wt-spinbox-dn")}}else b.style.cursor=""}};this.mouseDown=function(a,c){if(b.style.cursor=="crosshair"){d.capture(null);d.capture(b);e=d.pageCoordinates(c);m=Number(b.value)}else if(d.widgetCoordinates(b,c).x>b.offsetWidth-16){d.cancelEvent(c);d.capture(b)}};this.keyDown= | WT_DECLARE_WT_MEMBER(1,"WSpinBox",function(m,b,g,h,f){function i(a){if(a>h)a=h;else if(a<g)a=g;b.value=a}function j(){var a=Number(b.value);a+=f;i(a);b.onchange()}function k(){var a=Number(b.value);a-=f;i(a);b.onchange()}jQuery.data(b,"obj",this);var d=m.WT,e=null,l;this.update=function(a,c,n){g=a;h=c;f=n};this.mouseMove=function(a,c){if(e){a=d.pageCoordinates(c).y-e.y;c=l;c-=a*f;i(c)}else{a=d.widgetCoordinates(b,c);if(a.x>b.offsetWidth-16){c=b.offsetHeight/2;b.style.cursor=a.y>=c-1&&a.y<=c+1?"crosshair":"default"}else b.style.cursor=""}};this.mouseDown=function(a,c){if(b.style.cursor=="crosshair"){d.capture(null);d.capture(b);e=d.pageCoordinates(c);l=Number(b.value)}else if(d.widgetCoordinates(b,c).x>b.offsetWidth-16){d.cancelEvent(c);d.capture(b)}};this.keyDown=function(a,c){if(c.keyCode==40)k();else c.keyCode==38&&j()};this.mouseUp=function(a,c){if(e!=null){e=null;a.onchange()}else{a=d.widgetCoordinates(b,c);if(a.x>b.offsetWidth-16)a.y<b.offsetHeight/2?j():k()}}}); |
else | else { | this.mouseMove = function(o, event) { if (!dragStartXY) { var xy = WT.widgetCoordinates(edit, event); if (xy.x > edit.offsetWidth - 16) { var mid = edit.offsetHeight/2; if (xy.y >= mid - 1 && xy.y <= mid + 1) edit.style.cursor = CH; else edit.style.cursor = 'default'; } else edit.style.cursor = ''; } else { var dy = WT.pageCoordinates(event).y - dragStartXY.y; var v = dragStartValue; v = v - dy*stepValue; setValue(v); } }; |
if (xy.y < mid - 1) $edit.addClass('Wt-spinbox-up'); else $edit.addClass('Wt-spinbox-dn'); } | this.mouseMove = function(o, event) { if (!dragStartXY) { var xy = WT.widgetCoordinates(edit, event); if (xy.x > edit.offsetWidth - 16) { var mid = edit.offsetHeight/2; if (xy.y >= mid - 1 && xy.y <= mid + 1) edit.style.cursor = CH; else edit.style.cursor = 'default'; } else edit.style.cursor = ''; } else { var dy = WT.pageCoordinates(event).y - dragStartXY.y; var v = dragStartValue; v = v - dy*stepValue; setValue(v); } }; |
|
if (WT.isIE) | if (WT.isIE) { WT.firedTarget = e.srcElement || d; | function mouseMove(e) { var d = delegateCapture(e); if (d && !delegating) { if (!e) e = window.event; delegating = true; if (WT.isIE) d.fireEvent('onmousemove', e); else WT.condCall(d, 'onmousemove', e); delegating = false; return false; } else return true;} |
else | WT.firedTarget = null; } else | function mouseMove(e) { var d = delegateCapture(e); if (d && !delegating) { if (!e) e = window.event; delegating = true; if (WT.isIE) d.fireEvent('onmousemove', e); else WT.condCall(d, 'onmousemove', e); delegating = false; return false; } else return true;} |
if (captureElement != null) { | if (delegateCapture(e)) { | function mouseMove(e) { if (captureElement != null) { if (!e) e = window.event; WT.condCall(captureElement, 'onmousemove', e); return false; } else return true;} |
"default"}else b.style.cursor=""}};this.mouseDown=function(a,c){if(b.style.cursor=="crosshair"){d.capture(null);d.capture(b);e=d.pageCoordinates(c);l=Number(b.value)}else if(d.widgetCoordinates(b,c).x>b.offsetWidth-16){d.cancelEvent(c);d.capture(b)}};this.keyDown=function(a,c){if(c.keyCode==40)k();else c.keyCode==38&&j()};this.mouseUp=function(a,c){if(e!=null){e=null;a.onchange()}else{a=d.widgetCoordinates(b,c);if(a.x>b.offsetWidth-16)a.y<b.offsetHeight/2?j():k()}}}); | function(a,c){if(c.keyCode==40)l();else c.keyCode==38&&k()};this.mouseUp=function(a,c){if(e!=null){e=null;a.onchange()}else{a=d.widgetCoordinates(b,c);if(a.x>b.offsetWidth-16)a.y<b.offsetHeight/2?k():l()}}}); | "default"}else b.style.cursor=""}};this.mouseDown=function(a,c){if(b.style.cursor=="crosshair"){d.capture(null);d.capture(b);e=d.pageCoordinates(c);l=Number(b.value)}else if(d.widgetCoordinates(b,c).x>b.offsetWidth-16){d.cancelEvent(c);d.capture(b)}};this.keyDown=function(a,c){if(c.keyCode==40)k();else c.keyCode==38&&j()};this.mouseUp=function(a,c){if(e!=null){e=null;a.onchange()}else{a=d.widgetCoordinates(b,c);if(a.x>b.offsetWidth-16)a.y<b.offsetHeight/2?j():k()}}}); |
event:a},b.nodeId,b.columnId,"mousedown","","");d.getAttribute("drag")==="true"&&b.selected&&l._p_.dragStart(d,a)}};this.mouseUp=function(c,a){var b=n(a);b.columnId!=-1&&l.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"mouseup","","")};this.resizeHandleMDown=function(c,a){a=g.pageCoordinates(a);c.setAttribute("dsx",a.x)};this.resizeHandleMMoved=function(c,a){var b=c.getAttribute("dsx"),f=j.lastChild.className.split(" ")[0];g.getCssRule("#"+d.id+" ."+f);if(b!=null&&b!=""){f=g.pageCoordinates(a); | event:a},b.nodeId,b.columnId,"mousedown","","");d.getAttribute("drag")==="true"&&b.selected&&m._p_.dragStart(d,a)}};this.mouseUp=function(c,a){var b=n(a);b.columnId!=-1&&m.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"mouseup","","")};this.resizeHandleMDown=function(c,a){a=g.pageCoordinates(a);c.setAttribute("dsx",a.x)};this.resizeHandleMMoved=function(c,a){var b=c.getAttribute("dsx"),e=k.lastChild.className.split(" ")[0];g.getCssRule("#"+d.id+" ."+e);if(b!=null&&b!=""){e=g.pageCoordinates(a); | event:a},b.nodeId,b.columnId,"mousedown","","");d.getAttribute("drag")==="true"&&b.selected&&l._p_.dragStart(d,a)}};this.mouseUp=function(c,a){var b=n(a);b.columnId!=-1&&l.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"mouseup","","")};this.resizeHandleMDown=function(c,a){a=g.pageCoordinates(a);c.setAttribute("dsx",a.x)};this.resizeHandleMMoved=function(c,a){var b=c.getAttribute("dsx"),f=j.lastChild.className.split(" ")[0];g.getCssRule("#"+d.id+" ."+f);if(b!=null&&b!=""){f=g.pageCoordinates(a); |
[a,a,a]);l.negate(i);b.translate(e,i);l.negate(i);this.paintGL()}};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=l.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseDown=function(a,c){f.capture(null);f.capture(j);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); | f.capture(j);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); | [a,a,a]);l.negate(i);b.translate(e,i);l.negate(i);this.paintGL()}};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=l.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseDown=function(a,c){f.capture(null);f.capture(j);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); |
if(tree1) tree1.moved(tmp.dragged, tmp.ref_node, tmp.move_type, (tmp.origin_tree.settings.rules.drag_copy == "on" || (tmp.origin_tree.settings.rules.drag_copy == "ctrl" && (event.ctrlKey || event.metaKey)) ) ); | if(tree1) tree1.moved(tmp.dragged, tmp.ref_node, tmp.move_type, false, (tmp.origin_tree.settings.rules.drag_copy == "on" || (tmp.origin_tree.settings.rules.drag_copy == "ctrl" && event.ctrlKey) ) ); | tree_component.mouseup = function(event) { var tmp = tree_component.drag_drop; if(tmp.open_time) clearTimeout(tmp.open_time); if(tmp.scroll_time) clearTimeout(tmp.scroll_time); if(tmp.moving && $.tree.drag_end !== false) $.tree.drag_end.call(null, event, tmp); if(tmp.foreign === false && tmp.drag_node && tmp.drag_node.size()) { tmp.drag_help.remove(); if(tmp.move_type) { var tree1 = tree_component.inst[tmp.ref_node.parents(".tree:eq(0)").attr("id")]; if(tree1) tree1.moved(tmp.dragged, tmp.ref_node, tmp.move_type, (tmp.origin_tree.settings.rules.drag_copy == "on" || (tmp.origin_tree.settings.rules.drag_copy == "ctrl" && (event.ctrlKey || event.metaKey)) ) ); } tmp.move_type = false; tmp.ref_node = false; } if(tmp.foreign !== false) { if(tmp.drag_help) tmp.drag_help.remove(); if(tmp.move_type) { var tree1 = tree_component.inst[tmp.ref_node.parents(".tree:eq(0)").attr("id")]; if(tree1) tree1.callback("ondrop",[tmp.f_data, tree1.get_node(tmp.ref_node).get(0), tmp.move_type, tree1]); } tmp.foreign = false; tmp.move_type = false; tmp.ref_node = false; } // RESET EVERYTHING if(tree_component.drag_drop.marker) tree_component.drag_drop.marker.hide(); if(tmp.dragged && tmp.dragged.size()) tmp.dragged.removeClass("dragged"); tmp.dragged = false; tmp.drag_help = false; tmp.drag_node = false; tmp.f_type = false; tmp.f_data = false; tmp.init_x = false; tmp.init_y = false; tmp.moving = false; tmp.appended = false; tmp.origin_tree = false; if(tmp.isdown) { tmp.isdown = false; event.preventDefault(); event.stopPropagation(); return false; } }; |
return this[ fn ? "bind" : "trigger" ]( "wheel", fn ); | return this[ fn ? "bind" : "trigger" ]( "mousewheel", fn ); | $.fn.mousewheel = function( fn ){ return this[ fn ? "bind" : "trigger" ]( "wheel", fn ); }; |
e,i){c=a;g=b;k=d;l=e;m=i};this.mouseDragLookAt=function(a,b){var d=h.pageCoordinates(b);a=d.x-f.x;d=d.y-f.y;var e=vec3.create();e[0]=c[0];e[1]=c[4];e[2]=c[8];var i=mat4.create();mat4.identity(i);mat4.translate(i,g);mat4.rotate(i,d*l,e);mat4.rotate(i,a*m,k);vec3.negate(g);mat4.translate(i,g);vec3.negate(g);mat4.multiply(c,i,c);console.log("mouseDragLookAt after: "+mat4.str(c));console.log("mouseDragLookAt: repaint");this.paintGl();f=h.pageCoordinates(b)};this.mouseWheelLookAt=function(a,b){a=h.wheelDelta(b); b=Math.pow(1.2,a);console.log("mouseWheelLookAt: "+a);mat4.translate(c,g);mat4.scale(c,[b,b,b]);vec3.negate(g);mat4.translate(c,g);vec3.negate(g);console.log("mouseWheelLookAt: repaint");this.paintGl()};this.setWalkParams=function(a,b,d){c=a;n=b;o=d};this.mouseDragWalk=function(a,b){var d=h.pageCoordinates(b);a=d.x-f.x;d=d.y-f.y;var e=mat4.create();mat4.identity(e);mat4.rotateY(e,a*o);a=vec3.create();a[0]=0;a[1]=0;a[2]=-n*d;mat4.translate(e,a);mat4.multiply(e,c,c);this.paintGl();f=h.pageCoordinates(b)}; | c,d,g,j){e=a;i=c;m=d;n=g;o=j};this.mouseDragLookAt=function(a,c){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=k.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var j=b.create();b.identity(j);b.translate(j,i);b.rotate(j,d*n,g);b.rotate(j,a*o,m);k.negate(i);b.translate(j,i);k.negate(i);b.multiply(e,j,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseWheelLookAt=function(a,c){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e,[a,a,a]);k.negate(i);b.translate(e,i);k.negate(i); this.paintGl()};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=k.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseDown=function(a,c){f.capture(null);f.capture(l);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); | e,i){c=a;g=b;k=d;l=e;m=i};this.mouseDragLookAt=function(a,b){var d=h.pageCoordinates(b);a=d.x-f.x;d=d.y-f.y;var e=vec3.create();e[0]=c[0];e[1]=c[4];e[2]=c[8];var i=mat4.create();mat4.identity(i);mat4.translate(i,g);mat4.rotate(i,d*l,e);mat4.rotate(i,a*m,k);vec3.negate(g);mat4.translate(i,g);vec3.negate(g);mat4.multiply(c,i,c);console.log("mouseDragLookAt after: "+mat4.str(c));console.log("mouseDragLookAt: repaint");this.paintGl();f=h.pageCoordinates(b)};this.mouseWheelLookAt=function(a,b){a=h.wheelDelta(b);b=Math.pow(1.2,a);console.log("mouseWheelLookAt: "+a);mat4.translate(c,g);mat4.scale(c,[b,b,b]);vec3.negate(g);mat4.translate(c,g);vec3.negate(g);console.log("mouseWheelLookAt: repaint");this.paintGl()};this.setWalkParams=function(a,b,d){c=a;n=b;o=d};this.mouseDragWalk=function(a,b){var d=h.pageCoordinates(b);a=d.x-f.x;d=d.y-f.y;var e=mat4.create();mat4.identity(e);mat4.rotateY(e,a*o);a=vec3.create();a[0]=0;a[1]=0;a[2]=-n*d;mat4.translate(e,a);mat4.multiply(e,c,c);this.paintGl();f=h.pageCoordinates(b)}; |
this.paintGl(); | this.paintGL(); | this.mouseWheelLookAt = function(o, event) { WT.cancelEvent(event); //alert('foo'); var d = WT.wheelDelta(event); var s = Math.pow(1.2, d); mat4.translate(cameraMatrix, lookAtCenter); mat4.scale(cameraMatrix, [s, s, s]); vec3.negate(lookAtCenter); mat4.translate(cameraMatrix, lookAtCenter); vec3.negate(lookAtCenter); // Repaint! this.paintGl(); }; |
function(a,c,d,g,k){e=a;i=c;m=d;n=g;o=k};this.mouseDragLookAt=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=l.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var k=b.create();b.identity(k);b.translate(k,i);b.rotate(k,d*n,g);b.rotate(k,a*o,m);l.negate(i);b.translate(k,i);l.negate(i);b.multiply(e,k,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseWheelLookAt=function(a,c){if(this.ctx!=null){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e, [a,a,a]);l.negate(i);b.translate(e,i);l.negate(i);this.paintGL()}};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=l.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseDown=function(a,c){f.capture(null);f.capture(j);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); | null){j.parentNode.replaceChild(j.firstChild,j);a()}}return this.ctx};this.setLookAtParams=function(a,c,d,g,k){e=a;i=c;m=d;n=g;o=k};this.mouseDragLookAt=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=l.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var k=b.create();b.identity(k);b.translate(k,i);b.rotate(k,d*n,g);b.rotate(k,a*o,m);l.negate(i);b.translate(k,i);l.negate(i);b.multiply(e,k,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseWheelLookAt=function(a,c){if(this.ctx!= null){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e,[a,a,a]);l.negate(i);b.translate(e,i);l.negate(i);this.paintGL()}};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=l.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseDown=function(a,c){f.capture(null); | function(a,c,d,g,k){e=a;i=c;m=d;n=g;o=k};this.mouseDragLookAt=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=l.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var k=b.create();b.identity(k);b.translate(k,i);b.rotate(k,d*n,g);b.rotate(k,a*o,m);l.negate(i);b.translate(k,i);l.negate(i);b.multiply(e,k,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseWheelLookAt=function(a,c){if(this.ctx!=null){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e,[a,a,a]);l.negate(i);b.translate(e,i);l.negate(i);this.paintGL()}};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=l.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseDown=function(a,c){f.capture(null);f.capture(j);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); |
f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=k.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var j=b.create();b.identity(j);b.translate(j,i);b.rotate(j,d*n,g);b.rotate(j,a*o,m);k.negate(i);b.translate(j,i);k.negate(i);b.multiply(e,j,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseWheelLookAt=function(a,c){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e,[a,a,a]);k.negate(i);b.translate(e,i);k.negate(i);this.paintGl()};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk= | function(a,c,d,g,k){e=a;i=c;m=d;n=g;o=k};this.mouseDragLookAt=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=l.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var k=b.create();b.identity(k);b.translate(k,i);b.rotate(k,d*n,g);b.rotate(k,a*o,m);l.negate(i);b.translate(k,i);l.negate(i);b.multiply(e,k,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseWheelLookAt=function(a,c){if(this.ctx!=null){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e, [a,a,a]);l.negate(i);b.translate(e,i);l.negate(i);this.paintGL()}};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){if(this.ctx!=null){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=l.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGL();h=f.pageCoordinates(c)}};this.mouseDown=function(a,c){f.capture(null);f.capture(j);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); | f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=k.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var j=b.create();b.identity(j);b.translate(j,i);b.rotate(j,d*n,g);b.rotate(j,a*o,m);k.negate(i);b.translate(j,i);k.negate(i);b.multiply(e,j,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseWheelLookAt=function(a,c){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e,[a,a,a]);k.negate(i);b.translate(e,i);k.negate(i);this.paintGl()};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk= |
c,d,g,j){e=a;i=c;m=d;n=g;o=j};this.mouseDragLookAt=function(a,c){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=k.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var j=b.create();b.identity(j);b.translate(j,i);b.rotate(j,d*n,g);b.rotate(j,a*o,m);k.negate(i);b.translate(j,i);k.negate(i);b.multiply(e,j,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseWheelLookAt=function(a,c){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e,[a,a,a]);k.negate(i);b.translate(e,i);k.negate(i); this.paintGl()};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=k.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseDown=function(a,c){f.capture(null);f.capture(l);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); | f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=k.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var j=b.create();b.identity(j);b.translate(j,i);b.rotate(j,d*n,g);b.rotate(j,a*o,m);k.negate(i);b.translate(j,i);k.negate(i);b.multiply(e,j,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseWheelLookAt=function(a,c){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e,[a,a,a]);k.negate(i);b.translate(e,i);k.negate(i);this.paintGl()};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk= | c,d,g,j){e=a;i=c;m=d;n=g;o=j};this.mouseDragLookAt=function(a,c){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=k.create();g[0]=e[0];g[1]=e[4];g[2]=e[8];var j=b.create();b.identity(j);b.translate(j,i);b.rotate(j,d*n,g);b.rotate(j,a*o,m);k.negate(i);b.translate(j,i);k.negate(i);b.multiply(e,j,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseWheelLookAt=function(a,c){f.cancelEvent(c);a=f.wheelDelta(c);a=Math.pow(1.2,a);b.translate(e,i);b.scale(e,[a,a,a]);k.negate(i);b.translate(e,i);k.negate(i);this.paintGl()};this.setWalkParams=function(a,c,d){e=a;p=c;q=d};this.mouseDragWalk=function(a,c){var d=f.pageCoordinates(c);a=d.x-h.x;d=d.y-h.y;var g=b.create();b.identity(g);b.rotateY(g,a*q);a=k.create();a[0]=0;a[1]=0;a[2]=-p*d;b.translate(g,a);b.multiply(g,e,e);this.paintGl();h=f.pageCoordinates(c)};this.mouseDown=function(a,c){f.capture(null);f.capture(l);h=f.pageCoordinates(c)};this.mouseUp=function(){if(h!=null)h=null}}); |
console.log('mouseWheelLookAt: ' + d); | this.mouseWheelLookAt = function(o, event) { //alert('foo'); var d = WT.wheelDelta(event); var s = Math.pow(1.2, d); console.log('mouseWheelLookAt: ' + d); mat4.translate(cameraMatrix, lookAtCenter); mat4.scale(cameraMatrix, [s, s, s]); vec3.negate(lookAtCenter); mat4.translate(cameraMatrix, lookAtCenter); vec3.negate(lookAtCenter); // Repaint! console.log('mouseWheelLookAt: repaint'); this.paintGl(); }; |
|
console.log('mouseWheelLookAt: repaint'); | this.mouseWheelLookAt = function(o, event) { //alert('foo'); var d = WT.wheelDelta(event); var s = Math.pow(1.2, d); console.log('mouseWheelLookAt: ' + d); mat4.translate(cameraMatrix, lookAtCenter); mat4.scale(cameraMatrix, [s, s, s]); vec3.negate(lookAtCenter); mat4.translate(cameraMatrix, lookAtCenter); vec3.negate(lookAtCenter); // Repaint! console.log('mouseWheelLookAt: repaint'); this.paintGl(); }; |