rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
false,F=null,O=null,aa=null,ba=0,ka=false,S=null,ea=null,I={state:0,socket:null},na=(new Date).getTime(),la,fa=0,T={};x.prototype.preload=function(c){var d=new Image;this.images.push(d);d.onload=x.prototype.onload;d.onerror=x.prototype.onload;d.onabort=x.prototype.onload;d.imagePreloader=this;d.src=c};x.prototype.onloa...
0};var ga=[],y=[],ha=_$_RELATIVE_URL_$_,R=false,ma=false,ja=false,F=null,P=null,aa=null,ba=0,ka=false,S=null,ea=null,I={state:0,socket:null},na=(new Date).getTime(),la,fa=0,T={};x.prototype.preload=function(c){var d=new Image;this.images.push(d);d.onload=x.prototype.onload;d.onerror=x.prototype.onload;d.onabort=x.proto...
false,F=null,O=null,aa=null,ba=0,ka=false,S=null,ea=null,I={state:0,socket:null},na=(new Date).getTime(),la,fa=0,T={};x.prototype.preload=function(c){var d=new Image;this.images.push(d);d.onload=x.prototype.onload;d.onerror=x.prototype.onload;d.onabort=x.prototype.onload;d.imagePreloader=this;d.src=c};x.prototype.onloa...
function(){var d=this.imagePreloader;--d.work==0&&d.callback(d.images)};n.history.register(_$_INITIAL_HASH_$_,t);window.onunload=function(){q.emit(q,"Wt-unload");v()};this._p_={ieAlternative:l,loadScript:C,onJsLoad:M,setTitle:b,update:y,quit:Y,setFormObjects:function(d){V=d},saveDownPos:w,addTimerEvent:U,load:f,handleR...
function(d){var c=new Image;this.images.push(c);c.onload=H.prototype.onload;c.onerror=H.prototype.onload;c.onabort=H.prototype.onload;c.imagePreloader=this;c.src=d};H.prototype.onload=function(){var d=this.imagePreloader;--d.work==0&&d.callback(d.images)};n.history.register(_$_INITIAL_HASH_$_,t);window.onunload=functio...
function(){var d=this.imagePreloader;--d.work==0&&d.callback(d.images)};n.history.register(_$_INITIAL_HASH_$_,t);window.onunload=function(){q.emit(q,"Wt-unload");v()};this._p_={ieAlternative:l,loadScript:C,onJsLoad:M,setTitle:b,update:y,quit:Y,setFormObjects:function(d){V=d},saveDownPos:w,addTimerEvent:U,load:f,handleR...
if(this.settings.data.async && obj.find("li").size() == 0) { obj.children("a").addClass("loading");
obj.children("ul:eq(0)").remove().end().append("<ul><li class='last'><a class='loading' href='#'><ins>&nbsp;</ins>" + (_this.settings.lang.loading || "Loading ...") + "</a></li></ul>"); obj.removeClass("closed").addClass("open");
open_branch : function (obj, disable_animation, callback) { var _this = this; if(this.locked) return this.error("LOCKED"); var obj = this.get_node(obj); if(!obj.size()) return this.error("OPEN: NO SUCH NODE"); if(obj.hasClass("leaf")) return this.error("OPEN: OPENING LEAF NODE"); if(this.settings.d...
this._load_branch(obj, function () { _this.open_branch(obj, disable_animation, callback); }); return;
var _datastore = new $.tree.datastores[this.settings.data.type](); _datastore.load(this.callback("beforedata",[obj,this]),this,this.settings.data.opts,function(data){ data = _this.callback("ondata", [data, _this]); if(!data || data.length == 0) { obj.removeClass("closed").removeClass("open").addClass("leaf").children("...
open_branch : function (obj, disable_animation, callback) { var _this = this; if(this.locked) return this.error("LOCKED"); var obj = this.get_node(obj); if(!obj.size()) return this.error("OPEN: NO SUCH NODE"); if(obj.hasClass("leaf")) return this.error("OPEN: OPENING LEAF NODE"); if(this.settings.d...
obj.children("a").removeClass("loading"); if(this.callback("beforeopen",[obj.get(0),this]) === false) return this.error("OPEN: STOPPED BY USER"); if(parseInt(this.settings.ui.animation) > 0 && !disable_animation ) { obj.children("ul:eq(0)").css("display","none"); obj.removeClass("closed").addClass("open"); obj.childr...
else { if(!this.settings.data.async) { if(this.callback("beforeopen",[obj.get(0),this]) === false) return this.error("OPEN: STOPPED BY USER"); } if(parseInt(this.settings.ui.animation) > 0 && !disable_animation ) { obj.children("ul:eq(0)").css("display","none"); obj.removeClass("closed").addClass("open"); obj.children(...
open_branch : function (obj, disable_animation, callback) { var _this = this; if(this.locked) return this.error("LOCKED"); var obj = this.get_node(obj); if(!obj.size()) return this.error("OPEN: NO SUCH NODE"); if(obj.hasClass("leaf")) return this.error("OPEN: OPENING LEAF NODE"); if(this.settings.d...
}); } else { obj.removeClass("closed").addClass("open"); if(callback) callback.call();
} this.callback("onopen", [obj.get(0), this]); return true;
open_branch : function (obj, disable_animation, callback) { var _this = this; if(this.locked) return this.error("LOCKED"); var obj = this.get_node(obj); if(!obj.size()) return this.error("OPEN: NO SUCH NODE"); if(obj.hasClass("leaf")) return this.error("OPEN: OPENING LEAF NODE"); if(this.settings.d...
this.callback("onopen", [obj.get(0), this]); return true;
open_branch : function (obj, disable_animation, callback) { var _this = this; if(this.locked) return this.error("LOCKED"); var obj = this.get_node(obj); if(!obj.size()) return this.error("OPEN: NO SUCH NODE"); if(obj.hasClass("leaf")) return this.error("OPEN: OPENING LEAF NODE"); if(this.settings.d...
}
};
function open_panel() { var menu_item, panel_container = document.createElement("div"); menu_item = document.createElement("input"); menu_item.type = "button"; menu_item.value="close"; menu_item.onclick = function () ...
if (maskConf) { $.mask.load(overlay, maskConf); }
if (maskConf) { $(overlay).expose(maskConf); }
function Overlay(trigger, conf) { // private variables var self = this, fire = trigger.add(self), w = $(window), closers, overlay, opened, maskConf = $.tools.mask && (conf.mask || conf.expose), uid = Math.random().toString().slice(10); // mask configuration if (maskCon...
if (!conf.absolute) { top += w.scrollTop(); left += w.scrollLeft(); } overlay.css({position: conf.fixed ? 'fixed' : 'absolute'}).css({top: top, left: left});
function Overlay(trigger, conf) { // private variables var self = this, fire = trigger.add(self), w = $(window), closers, overlay, opened, maskConf = $.tools.mask && (conf.mask || conf.expose), uid = Math.random().toString().slice(10); // mask configuration if (maskCon...
eff[0].call(self, function() {
eff[0].call(self, {top: top, left: left}, function() {
function Overlay(trigger, conf) { // private variables var self = this, fire = trigger.add(self), w = $(window), closers, overlay, opened, maskConf = $.tools.mask && (conf.mask || conf.expose), uid = Math.random().toString().slice(10); // mask configuration if (maskCon...
if (maskConf) {
if (maskConf && conf.closeOnClick) {
function Overlay(trigger, conf) { // private variables var self = this, fire = trigger.add(self), w = $(window), closers, overlay, opened, maskConf = $.tools.mask && (conf.mask || conf.expose), uid = Math.random().toString().slice(10); // mask configuration if (maskCon...
if (conf.load) { self.load(); }
function Overlay(trigger, conf) { // private variables var self = this, fire = trigger.add(self), w = $(window), closers, overlay, opened, maskConf = $.tools.mask && (conf.mask || conf.expose), uid = Math.random().toString().slice(10); // mask configuration if (maskCon...
maskConf = $.tools.mask && (conf.mask || conf.expose),
maskConf = $.tools.expose && (conf.mask || conf.expose),
function Overlay(trigger, conf) { // private variables var self = this, fire = trigger.add(self), w = $(window), closers, overlay, opened, maskConf = $.tools.mask && (conf.mask || conf.expose), uid = Math.random().toString().slice(10); // mask configuration if (maskCon...
$(self).bind(name, fn);
if (fn) { $(self).bind(name, fn); }
function Overlay(trigger, conf) { // private variables var self = this, fire = trigger.add(self), w = $(window), closers, overlay, opened, maskConf = $.tools.expose && (conf.mask || conf.expose), uid = Math.random().toString().slice(10); // mask configuration if (maskC...
closers = $('<div class="close"></div>');
closers = $('<a class="close"></a>');
function Overlay(trigger, conf) { // private variables var self = this, fire = trigger.add(self), w = $(window), closers, overlay, opened, maskConf = $.tools.expose && (conf.mask || conf.expose), uid = Math.random().toString().slice(10); // mask configuration if (maskC...
},onAttribute:function(q,r,s){var t=this._.attributes[r];if(t){var u=t.filter(s,q,this);if(u===false)return false;if(typeof u!='undefined')return u;}return s;}}});function l(q,r){for(var s=0;q&&s<r.length;s++){var t=r[s];q=q.replace(t[0],t[1]);}return q;};function m(q,r,s){if(typeof r=='function')r=[r];var t,u,v=q.leng...
return l.length?l.join(';')+';':false;};},elementMigrateFilter:function(h,i){return function(j){var k=i?new CKEDITOR.style(h,i)._.definition:h;j.name=k.element;CKEDITOR.tools.extend(j.attributes,CKEDITOR.tools.clone(k.attributes));j.addStyle(CKEDITOR.style.getStyleText(k));};},styleMigrateFilter:function(h,i){var j=thi...
},onAttribute:function(q,r,s){var t=this._.attributes[r];if(t){var u=t.filter(s,q,this);if(u===false)return false;if(typeof u!='undefined')return u;}return s;}}});function l(q,r){for(var s=0;q&&s<r.length;s++){var t=r[s];q=q.replace(t[0],t[1]);}return q;};function m(q,r,s){if(typeof r=='function')r=[r];var t,u,v=q.leng...
true;if(typeof i=="number"&&i<k.length){x=i;if(g=k[i])J=g._fireEvent(q,s,D);if(!g||J!==false)J=h._fireEvent(q,s,D,g)}o(w[q],function(){J=this.call(f,i,s);this.cached&&w[q].splice(H,1);if(J===false)return false;H++});return J}}};typeof a=="string"?flashembed.domReady(function(){var g=document.getElementById(a);if(g){a=g...
true;if(typeof i=="number"&&i<k.length){x=i;if(g=k[i])J=g._fireEvent(q,s,D);if(!g||J!==false)J=h._fireEvent(q,s,D,g)}o(w[q],function(){J=this.call(f,i,s);this.cached&&w[q].splice(I,1);if(J===false)return false;I++});return J}}};typeof a=="string"?flashembed.domReady(function(){var g=document.getElementById(a);if(g){a=g...
true;if(typeof i=="number"&&i<k.length){x=i;if(g=k[i])J=g._fireEvent(q,s,D);if(!g||J!==false)J=h._fireEvent(q,s,D,g)}o(w[q],function(){J=this.call(f,i,s);this.cached&&w[q].splice(H,1);if(J===false)return false;H++});return J}}};typeof a=="string"?flashembed.domReady(function(){var g=document.getElementById(a);if(g){a=g...
WT_DECLARE_WT_MEMBER(2,"StdLayout.prototype.initResize",function(a,s,i){function p(e,k){if(e.offsetWidth>0)return e.offsetWidth;else{e=l.firstChild.rows[0];var m,n,r,u;r=n=0;for(u=e.childNodes.length;n<u;++n){m=e.childNodes[n];if(m.className!="Wt-vrh"){if(r==k)return m.offsetWidth;r+=m.colSpan}}return 0}}function c(e,k...
WT_DECLARE_WT_MEMBER(2,"StdLayout.prototype.initResize",function(a,s,h){function p(e,k){if(e.offsetWidth>0)return e.offsetWidth;else{e=l.firstChild.rows[0];var m,n,r,u;r=n=0;for(u=e.childNodes.length;n<u;++n){m=e.childNodes[n];if(m.className!="Wt-vrh"){if(r==k)return m.offsetWidth;r+=m.colSpan}}return 0}}function c(e,k...
WT_DECLARE_WT_MEMBER(2,"StdLayout.prototype.initResize",function(a,s,i){function p(e,k){if(e.offsetWidth>0)return e.offsetWidth;else{e=l.firstChild.rows[0];var m,n,r,u;r=n=0;for(u=e.childNodes.length;n<u;++n){m=e.childNodes[n];if(m.className!="Wt-vrh"){if(r==k)return m.offsetWidth;r+=m.colSpan}}return 0}}function c(e,k...
C.abort();C=null}if(C==null)if(S==null)S=setTimeout(function(){p()},q.updateDelay);else if(R){clearTimeout(S);p()}}function o(c){Y=c;da._p_.comm.responseReceived(c)}function p(){S=null;if(q.isIEMobile)feedback=false;if(X){if(!ea){if(confirm("The application was quited, do you want to restart?"))document.location=docume...
C.abort();C=null}if(C==null)if(M==null){M=setTimeout(function(){p()},q.updateDelay);da=(new Date).getTime()}else if(S){clearTimeout(M);p()}else if((new Date).getTime()-da>q.updateDelay){clearTimeout(M);p()}}function o(c){Y=c;ea._p_.comm.responseReceived(c)}function p(){M=null;if(q.isIEMobile)feedback=false;if(X){if(!fa...
C.abort();C=null}if(C==null)if(S==null)S=setTimeout(function(){p()},q.updateDelay);else if(R){clearTimeout(S);p()}}function o(c){Y=c;da._p_.comm.responseReceived(c)}function p(){S=null;if(q.isIEMobile)feedback=false;if(X){if(!ea){if(confirm("The application was quited, do you want to restart?"))document.location=docume...
function I(c){clearTimeout(c);document.body.style.cursor="auto";if(U!=null){try{U()}catch(d){}U=null}}function B(){document.body.style.cursor="wait";U=hideLoadingIndicator;showLoadingIndicator()}function P(c){ca=c}function E(c){with(window){c&&eval(c);_$_APP_CLASS_$_._p_.autoJavaScript()}}function D(c,d,e){if(!X){if(c=...
arguments[h];i=i===false?0:i===true?1:i.toDateString?i.toDateString():i;e.args[h-2]=i}e.feedback=true;v[g]=r(e,g);j()}function P(c,d,e){var g=function(){var i=q.getElement(c);if(i){if(e)i.timer=setTimeout(i.tm,d);else{i.timer=null;i.tm=null}i.onclick()}},h=q.getElement(c);h.timer=setTimeout(g,d);h.tm=g}function G(c,d){...
function I(c){clearTimeout(c);document.body.style.cursor="auto";if(U!=null){try{U()}catch(d){}U=null}}function B(){document.body.style.cursor="wait";U=hideLoadingIndicator;showLoadingIndicator()}function P(c){ca=c}function E(c){with(window){c&&eval(c);_$_APP_CLASS_$_._p_.autoJavaScript()}}function D(c,d,e){if(!X){if(c=...
false}if(f)N(d);else{var m=document.createElement("script");m.setAttribute("src",d);m.onload=function(){N(d)};m.onreadystatechange=function(){if(m.readyState=="complete"||m.readyState=="loaded")N(d)};document.getElementsByTagName("head")[0].appendChild(m)}}function p(d,c){this.callback=c;this.work=d.length;this.images=...
"complete"||h.readyState=="loaded")M(d)};document.getElementsByTagName("head")[0].appendChild(h)}}function p(d,c){this.callback=c;this.work=d.length;this.images=[];if(d.length==0)c(this.images);else for(c=0;c<d.length;c++)this.preload(d[c])}function r(d){if(d.ieAlternativeExecuted)return"0";x.emit(d.parentNode,"IeAltne...
false}if(f)N(d);else{var m=document.createElement("script");m.setAttribute("src",d);m.onload=function(){N(d)};m.onreadystatechange=function(){if(m.readyState=="complete"||m.readyState=="loaded")N(d)};document.getElementsByTagName("head")[0].appendChild(m)}}function p(d,c){this.callback=c;this.work=d.length;this.images=...
(function(){var a=1,b=2,c=4,d=8,e=/^\s*(\d+)((px)|\%)?\s*$/i,f=/(^\s*(\d+)((px)|\%)?\s*$)|^$/i,g=/^\d+px$/,h=function(){var q=this.getValue(),r=this.getDialog(),s=q.match(e);if(s){if(s[2]=='%')m(r,false);q=s[1];}if(r.lockRatio){var t=r.originalElement;if(t.getCustomData('isReady')=='true')if(this.id=='txtHeight'){if(q&...
(function(){var a=function(b,c){var d=1,e=2,f=4,g=8,h=/^\s*(\d+)((px)|\%)?\s*$/i,i=/(^\s*(\d+)((px)|\%)?\s*$)|^$/i,j=/^\d+px$/,k=function(){var C=this.getValue(),D=this.getDialog(),E=C.match(h);if(E){if(E[2]=='%')p(D,false);C=E[1];}if(D.lockRatio){var F=D.originalElement;if(F.getCustomData('isReady')=='true')if(this.id...
(function(){var a=1,b=2,c=4,d=8,e=/^\s*(\d+)((px)|\%)?\s*$/i,f=/(^\s*(\d+)((px)|\%)?\s*$)|^$/i,g=/^\d+px$/,h=function(){var q=this.getValue(),r=this.getDialog(),s=q.match(e);if(s){if(s[2]=='%')m(r,false);q=s[1];}if(r.lockRatio){var t=r.originalElement;if(t.getCustomData('isReady')=='true')if(this.id=='txtHeight'){if(q&...
N.moveChildren(O);N.remove();O.appendTo(M);if(!c)O.appendBogus();}if(L)M.insertBefore(L);else M.appendTo(H);};function r(A,B,C){var D=j.list.listToArray(B.root,C),E=[];for(var F=0;F<B.contents.length;F++){var G=B.contents[F];G=G.getAscendant('li',true);if(!G||G.getCustomData('list_item_processed'))continue;E.push(G);h....
delete R.attributes.contenteditable;},style:function(R){var S=R.children[0];S&&S.value&&(S.value=e.trim(S.value));if(!R.attributes.type)R.attributes.type='text/css';},title:function(R){var S=R.children[0];S&&(S.value=R.attributes._cke_title||'');}},attributes:{'class':function(R,S){return e.ltrim(R.replace(/(?:^|\s+)ck...
N.moveChildren(O);N.remove();O.appendTo(M);if(!c)O.appendBogus();}if(L)M.insertBefore(L);else M.appendTo(H);};function r(A,B,C){var D=j.list.listToArray(B.root,C),E=[];for(var F=0;F<B.contents.length;F++){var G=B.contents[F];G=G.getAscendant('li',true);if(!G||G.getCustomData('list_item_processed'))continue;E.push(G);h....
break}if(s.nodeType===1){if(!m){s.sizcache=i;s.sizset=n}if(typeof f!=="string"){if(s===f){u=true;break}}else if(p.filter(f,[s]).length>0){u=s;break}}s=s[c]}j[n]=u}}}var g=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,h=0,k=Object.prot...
break}if(s.nodeType===1){if(!m){s.sizcache=i;s.sizset=n}if(typeof g!=="string"){if(s===g){u=true;break}}else if(p.filter(g,[s]).length>0){u=s;break}}s=s[d]}j[n]=u}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,h=0,k=Object.prot...
break}if(s.nodeType===1){if(!m){s.sizcache=i;s.sizset=n}if(typeof f!=="string"){if(s===f){u=true;break}}else if(p.filter(f,[s]).length>0){u=s;break}}s=s[c]}j[n]=u}}}var g=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,h=0,k=Object.prot...
}
};
var padding = function(n) { var s = "0" + n.toString(); return s.substr(s.length - 2); }
a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}l=a.offsetParent;if(l==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLef...
a!=l)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+docu...
a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}l=a.offsetParent;if(l==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLef...
for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}l=a.offsetParent;if(l==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a...
a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}l=a.offsetParent;if(l==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLef...
for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}l=a.offsetParent;if(l==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a...
if(k==null)a=null;else{do{a=a.parentNode;if(h.hasTag(a,"DIV")){b-=a.scrollLeft;e-=a.scrollTop}}while(a!=null&&a!=k)}}return{x:b,y:e}};this.widgetCoordinates=function(a,b){b=h.pageCoordinates(b);a=h.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,e=0;if...
if(j==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;e-=a.scrollTop}}while(a!=null&&a!=j)}}return{x:b,y:e}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,e=0;if...
if(k==null)a=null;else{do{a=a.parentNode;if(h.hasTag(a,"DIV")){b-=a.scrollLeft;e-=a.scrollTop}}while(a!=null&&a!=k)}}return{x:b,y:e}};this.widgetCoordinates=function(a,b){b=h.pageCoordinates(b);a=h.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,e=0;if...
function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,e=0;if(a.pageX||a.pageY){b=a.pageX;e=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;e=a.clientY+doc...
function(a,b){b=h.pageCoordinates(b);a=h.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,e=0;if(a.pageX||a.pageY){b=a.pageX;e=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;e=a.clientY+doc...
function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,e=0;if(a.pageX||a.pageY){b=a.pageX;e=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;e=a.clientY+doc...
function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.scrollIntoView=function(a){(a=document...
function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.windowCoordinates=function(a){a=g.page...
a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}h=a.offsetParent;if(h==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLef...
function(a,b){b=k.pageCoordinates(b);a=k.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+doc...
if(m==null)a=null;else{do{a=a.parentNode;if(k.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=m)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=k.pageCoordinates(b);a=k.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,f=0;if...
function(a,b){b=k.pageCoordinates(b);a=k.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+doc...
d.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,b,e){return d.dir(a,"parentNode",e)},next:function(a){return d.nth(a,2,"nextSibling")},prev:function(a){return d.nth(a,2,"previousSibling")},nextAll:function(a){return d.d...
parent: function(a){return a.firstChild;},
d.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,b,e){return d.dir(a,"parentNode",e)},next:function(a){return d.nth(a,2,"nextSibling")},prev:function(a){return d.nth(a,2,"previousSibling")},nextAll:function(a){return d.d...
strTune = strTune.gsub('\x12\n', '\n'); strTune = strTune.gsub('\x12', '\n');
strTune = strTune.gsub('\r\n', '\n'); strTune = strTune.gsub('\r', '\n');
this.parse = function(strTune) { tune.reset(); multilineVars.reset(); // Take care of whatever line endings come our way strTune = strTune.gsub('\x12\n', '\n'); strTune = strTune.gsub('\x12', '\n'); strTune += '\n'; // Tacked on temporarily to make the last line continuation work strTune = strTune.repla...
} else if (multilineVars.inTextBlock) { if (line.startsWith("%%endtext")) { tune.addMetaText("textBlock", multilineVars.textBlock); multilineVars.inTextBlock = false; } else multilineVars.textBlock += ' ' + line;
this.parse = function(strTune) { tune.reset(); multilineVars.reset(); // Take care of whatever line endings come our way strTune = strTune.gsub('\x12\n', '\n'); strTune = strTune.gsub('\x12', '\n'); strTune += '\n'; // Tacked on temporarily to make the last line continuation work strTune = strTune.repla...
tune.reset(); multilineVars.reset(); strTune = strTune.gsub('\r\n', '\n'); strTune = strTune.gsub('\r', '\n'); strTune += '\n'; strTune = strTune.replace(/\n\\.*\n/g, "\n"); strTune = strTune.replace(/\\([ \t]*)\n/g, "$1 \x12"); var lines = strTune.split('\n'); if (lines.last().length === 0) lines.pop(); lines.each( f...
tune.reset(); multilineVars.reset(); strTune = strTune.gsub('\r\n', '\n'); strTune = strTune.gsub('\r', '\n'); strTune += '\n'; strTune = strTune.replace(/\n\\.*\n/g, "\n"); strTune = strTune.replace(/\\([ \t]*)\n/g, "$1 \x12"); var lines = strTune.split('\n'); if (lines.last().length === 0) lines.pop(); lines.each( f...
this.parse = function(strTune) { tune.reset(); multilineVars.reset(); // Take care of whatever line endings come our way strTune = strTune.gsub('\r\n', '\n'); strTune = strTune.gsub('\r', '\n'); strTune += '\n'; // Tacked on temporarily to make the last line continuation work strTune = strTune.replace(/...
parseLine(line); multilineVars.iChar += line.length + 1; }); tune.cleanUp(); };
tune.addMetaText("history", tokenizer.translateString(tokenizer.stripComment(line))); } else if (multilineVars.inTextBlock) { if (line.startsWith("%%endtext")) { tune.addMetaText("textBlock", multilineVars.textBlock); multilineVars.inTextBlock = false; } else multilineVars.textBlock += ' ' + line; } else parseLine(line...
this.parse = function(strTune) { tune.reset(); multilineVars.reset(); // Take care of whatever line endings come our way strTune = strTune.gsub('\r\n', '\n'); strTune = strTune.gsub('\r', '\n'); strTune += '\n'; // Tacked on temporarily to make the last line continuation work strTune = strTune.replace(/...
if (lines.last().length === 0) lines.pop();
this.parse = function(strTune) { tune.reset(); multilineVars.reset(); // Take care of whatever line endings come our way strTune = strTune.gsub('\x12\n', '\n'); strTune = strTune.gsub('\x12', '\n'); strTune = strTune.replace(/\\([ \t]*)\n/g, "$1 \x12"); // take care of line continuations right away, but k...
if(q.index)k.button._.instances[q.index]=null;}}}if(r.contextMenu)e.removeFunction(r.contextMenu._.functionId);if(r._.filebrowserFn)e.removeFunction(r._.filebrowserFn);r.fire('destroy');a.remove(r);a.fire('instanceDestroyed',null,r);},execCommand:function(l,m){var n=this.getCommand(l),o={name:l,commandData:m,command:n}...
if(n&&n.state!=0)if(this.fire('beforeCommandExec',o)!==true){o.returnValue=n.exec(o.commandData);if(!n.async&&this.fire('afterCommandExec',o)!==true)return o.returnValue;}return false;},getCommand:function(l){return this._.commands[l];},getData:function(){var n=this;n.fire('beforeGetData');var l=n._.data;if(typeof l!='...
if(q.index)k.button._.instances[q.index]=null;}}}if(r.contextMenu)e.removeFunction(r.contextMenu._.functionId);if(r._.filebrowserFn)e.removeFunction(r._.filebrowserFn);r.fire('destroy');a.remove(r);a.fire('instanceDestroyed',null,r);},execCommand:function(l,m){var n=this.getCommand(l),o={name:l,commandData:m,command:n}...
var year, month, day, hour, min, sec = null;
I18n.parseDate = function(d) { var matches, date; var year, month, day, hour, min, sec = null; if (matches = d.toString().match(/(\d{4})-(\d{2})-(\d{2})(?:[ |T](\d{2}):(\d{2}):(\d{2}))?(Z)?/)) { // date/time strings: yyyy-mm-dd hh:mm:ss or yyyy-mm-dd or yyyy-mm-ddThh:mm:ssZ for (var i = 1; i <= 6; i++) { matches[i]...
matches[i] = matches[i] == undefined? 0 : parseInt(matches[i], 10);
matches[i] = parseInt(matches[i], 10) || 0;
I18n.parseDate = function(d) { var matches, date; var year, month, day, hour, min, sec = null; if (matches = d.toString().match(/(\d{4})-(\d{2})-(\d{2})(?:[ |T](\d{2}):(\d{2}):(\d{2}))?(Z)?/)) { // date/time strings: yyyy-mm-dd hh:mm:ss or yyyy-mm-dd or yyyy-mm-ddThh:mm:ssZ for (var i = 1; i <= 6; i++) { matches[i]...
date = new Date(matches[1], matches[2], matches[3], matches[4], matches[5], matches[6]);
date = new Date(matches[1], matches[2], matches[3]);
I18n.parseDate = function(d) { var matches, date; var year, month, day, hour, min, sec = null; if (matches = d.toString().match(/(\d{4})-(\d{2})-(\d{2})(?:[ |T](\d{2}):(\d{2}):(\d{2}))?(Z)?/)) { // date/time strings: yyyy-mm-dd hh:mm:ss or yyyy-mm-dd or yyyy-mm-ddThh:mm:ssZ for (var i = 1; i <= 6; i++) { matches[i]...
} else if (matches[4]) {
} else {
I18n.parseDate = function(d) { var matches, date; var year, month, day, hour, min, sec = null; if (matches = d.toString().match(/(\d{4})-(\d{2})-(\d{2})(?:[ |T](\d{2}):(\d{2}):(\d{2}))?(Z)?/)) { // date/time strings: yyyy-mm-dd hh:mm:ss or yyyy-mm-dd or yyyy-mm-ddThh:mm:ssZ for (var i = 1; i <= 6; i++) { matches[i]...
} else { date = new Date(matches[1], matches[2], matches[3]);
I18n.parseDate = function(d) { var matches, date; var year, month, day, hour, min, sec = null; if (matches = d.toString().match(/(\d{4})-(\d{2})-(\d{2})(?:[ |T](\d{2}):(\d{2}):(\d{2}))?(Z)?/)) { // date/time strings: yyyy-mm-dd hh:mm:ss or yyyy-mm-dd or yyyy-mm-ddThh:mm:ssZ for (var i = 1; i <= 6; i++) { matches[i]...
if (matches[7]) {
if (matches[7] === undefined) {
I18n.parseDate = function(d) { var matches, date; var year, month, day, hour, min, sec = null; if (matches = d.toString().match(/(\d{4})-(\d{2})-(\d{2})(?:[ |T](\d{2}):(\d{2}):(\d{2}))?(Z)?/)) { // date/time strings: yyyy-mm-dd hh:mm:ss or yyyy-mm-dd or yyyy-mm-ddThh:mm:ssZ for (var i = 1; i <= 6; i++) { matches[i]...
} else if (matches[4]) {
} else if (matches[4] === undefined) {
I18n.parseDate = function(d) { var matches, date; var year, month, day, hour, min, sec = null; if (matches = d.toString().match(/(\d{4})-(\d{2})-(\d{2})(?:[ |T](\d{2}):(\d{2}):(\d{2}))?(Z)?/)) { // date/time strings: yyyy-mm-dd hh:mm:ss or yyyy-mm-dd or yyyy-mm-ddThh:mm:ssZ for (var i = 1; i <= 6; i++) { matches[i]...
if (matches[7] === undefined) {
if (matches[7]) {
I18n.parseDate = function(d) { var matches, date; var year, month, day, hour, min, sec = null; if (matches = d.toString().match(/(\d{4})-(\d{2})-(\d{2})(?:[ |T](\d{2}):(\d{2}):(\d{2}))?(Z)?/)) { // date/time strings: yyyy-mm-dd hh:mm:ss or yyyy-mm-dd or yyyy-mm-ddThh:mm:ssZ for (var i = 1; i <= 6; i++) { matches[i]...
} else if (matches[4] === undefined) {
} else if (matches[4]) {
I18n.parseDate = function(d) { var matches, date; var year, month, day, hour, min, sec = null; if (matches = d.toString().match(/(\d{4})-(\d{2})-(\d{2})(?:[ |T](\d{2}):(\d{2}):(\d{2}))?(Z)?/)) { // date/time strings: yyyy-mm-dd hh:mm:ss or yyyy-mm-dd or yyyy-mm-ddThh:mm:ssZ for (var i = 1; i <= 6; i++) { matches[i]...
if (matches = d.toString().match(/(\d{4})-(\d{2})-(\d{2})(?:[ |T](\d{2}):(\d{2}):(\d{2}))?(Z)?/)) {
matches = d.toString().match(/(\d{4})-(\d{2})-(\d{2})(?:[ |T](\d{2}):(\d{2}):(\d{2}))?(Z)?/); if (matches) {
I18n.parseDate = function(d) { var matches, date; if (matches = d.toString().match(/(\d{4})-(\d{2})-(\d{2})(?:[ |T](\d{2}):(\d{2}):(\d{2}))?(Z)?/)) { // date/time strings: yyyy-mm-dd hh:mm:ss or yyyy-mm-dd or yyyy-mm-ddThh:mm:ssZ for (var i = 1; i <= 6; i++) { matches[i] = parseInt(matches[i], 10) || 0; } // mont...
if (!/^\d+$/.test(val)) { return; }
if (!/^-?\d+$/.test(val)) { return; }
function parseDate(val) { if (!val) { return; } if (val.constructor == Date) { return val; } if (typeof val == 'string') { // rfc3339? var els = val.split("-"); if (els.length == 3) { return new Date(integer(els[0]), integer(els[1]) -1, integer(els[2])); } // invalid offset if (!/^\d+$/...
if (line.startsWith('%%')) { var err = this.addDirective(line.substring(2)); if (err) warn(err, line, 2);
if (line.startsWith('%%')) { var err = this.addDirective(line.substring(2)); if (err) warn(err, line, 2); return {}; } line = tokenizer.stripComment(line); if (line.length === 0) return {}; if (line.length >= 2) { if (line[1] === ':') { var nextLine = ""; if (line.indexOf('\x12') >= 0 && line[0] !== 'w') { nextLine = ...
this.parseHeader = function(line) { if (line.startsWith('%%')) { var err = this.addDirective(line.substring(2)); if (err) warn(err, line, 2); return {}; } line = tokenizer.stripComment(line); if (line.length === 0) return {}; if (line.length >= 2) { if (line[1] === ':') { var nextLine = "...
line = tokenizer.stripComment(line); if (line.length === 0) return {};
}
this.parseHeader = function(line) { if (line.startsWith('%%')) { var err = this.addDirective(line.substring(2)); if (err) warn(err, line, 2); return {}; } line = tokenizer.stripComment(line); if (line.length === 0) return {}; if (line.length >= 2) { if (line[1] === ':') { var nextLine = "...
if (line.length >= 2) { if (line[1] === ':') { var nextLine = ""; if (line.indexOf('\x12') >= 0 && line[0] !== 'w') { nextLine = line.substring(line.indexOf('\x12')+1); line = line.substring(0, line.indexOf('\x12')); } var field = metaTextHeaders[line[0]]; if (field !== undefined) { tune.addMetaText(field, tokenizer.tr...
return { regular: true, str: line }; };
this.parseHeader = function(line) { if (line.startsWith('%%')) { var err = this.addDirective(line.substring(2)); if (err) warn(err, line, 2); return {}; } line = tokenizer.stripComment(line); if (line.length === 0) return {}; if (line.length >= 2) { if (line[1] === ':') { var nextLine = "...
ret.accidentals = []; keys[key].each(function(k) { ret.accidentals.push(Object.clone(k)); });
ret = this.deepCopyKey(keys[key]);
this.parseKey = function(str) // (and clef) { var origStr = str; // The format is: // [space][tonic[#|b][ ][3-letter-mode][ignored-chars][space]][ accidentals...][ clef=treble|bass|bass3|tenor|alto|alto2|alto1|none [+8|-8]] // -- or -- the key can be "none" // First get the key letter: turn that into a index into...
var setMiddle = function(str) {
var setClefMiddle = function(str) {
this.parseKey = function(str) // (and clef) { str = tokenizer.stripComment(str); var origStr = str; if (str.length === 0) { // an empty K: field is the same as K:none str = 'none'; } // The format is: // [space][tonic[#|b][ ][3-letter-mode][ignored-chars][space]][ accidentals...][ clef=treble|bass|bass3|teno...
setMiddle(str);
setClefMiddle(str);
this.parseKey = function(str) // (and clef) { str = tokenizer.stripComment(str); var origStr = str; if (str.length === 0) { // an empty K: field is the same as K:none str = 'none'; } // The format is: // [space][tonic[#|b][ ][3-letter-mode][ignored-chars][space]][ accidentals...][ clef=treble|bass|bass3|teno...
var ret = {};
var ret = { root: 'none', acc: '', mode: '' };
this.parseKey = function(str) // (and clef) { str = tokenizer.stripComment(str); var origStr = str; if (str.length === 0) { // an empty K: field is the same as K:none str = 'none'; } // The format is: // [space][tonic[#|b][ ][3-letter-mode][ignored-chars][space]][ accidentals...][ clef=treble|bass|bass3|teno...
ret.root = "HP"; ret.acc = ""; ret.mode = "";
ret.root = "HP";
this.parseKey = function(str) // (and clef) { str = tokenizer.stripComment(str); var origStr = str; if (str.length === 0) { // an empty K: field is the same as K:none str = 'none'; } // The format is: // [space][tonic[#|b][ ][3-letter-mode][ignored-chars][space]][ accidentals...][ clef=treble|bass|bass3|teno...
ret.root = "Hp"; ret.acc = ""; ret.mode = "";
ret.root = "Hp";
this.parseKey = function(str) // (and clef) { str = tokenizer.stripComment(str); var origStr = str; if (str.length === 0) { // an empty K: field is the same as K:none str = 'none'; } // The format is: // [space][tonic[#|b][ ][3-letter-mode][ignored-chars][space]][ accidentals...][ clef=treble|bass|bass3|teno...
ret.root = "none"; ret.acc = ""; ret.mode = "";
this.parseKey = function(str) // (and clef) { str = tokenizer.stripComment(str); var origStr = str; if (str.length === 0) { // an empty K: field is the same as K:none str = 'none'; } // The format is: // [space][tonic[#|b][ ][3-letter-mode][ignored-chars][space]][ accidentals...][ clef=treble|bass|bass3|teno...
var setMiddle = function(str) { var i = tokenizer.skipWhiteSpace(str); str = str.substring(i); if (str.startsWith('m=') || str.startsWith('middle=')) { str = str.substring(str.indexOf('=')+1); multilineVars.clef.middle = parseMiddle(str);
var setMiddle = function(str) { var i = tokenizer.skipWhiteSpace(str); str = str.substring(i); if (str.startsWith('m=') || str.startsWith('middle=')) { str = str.substring(str.indexOf('=')+1); multilineVars.clef.middle = parseMiddle(str); } }; var retClef = tokenizer.getClef(str); if (retClef.token !== undefined && (r...
this.parseKey = function(str) // (and clef) { var origStr = str; // The format is: // [space][tonic[#|b][ ][3-letter-mode][ignored-chars][space]][ accidentals...][ clef=treble|bass|bass3|tenor|alto|alto2|alto1|none [+8|-8]] // -- or -- the key can be "none" // First get the key letter: turn that into a ind...
}; var retClef = tokenizer.getClef(str); if (retClef.token !== undefined && (retClef.explicit === true || retClef.token !== 'none')) {
} } retClef = tokenizer.getClef(str); if (retClef.len > 0) { if (retClef.warn) warn("error parsing clef:" + retClef.warn, origStr, 0); else {
this.parseKey = function(str) // (and clef) { var origStr = str; // The format is: // [space][tonic[#|b][ ][3-letter-mode][ignored-chars][space]][ accidentals...][ clef=treble|bass|bass3|tenor|alto|alto2|alto1|none [+8|-8]] // -- or -- the key can be "none" // First get the key letter: turn that into a ind...
return {foundClef: true};
this.parseKey = function(str) // (and clef) { var origStr = str; // The format is: // [space][tonic[#|b][ ][3-letter-mode][ignored-chars][space]][ accidentals...][ clef=treble|bass|bass3|tenor|alto|alto2|alto1|none [+8|-8]] // -- or -- the key can be "none" // First get the key letter: turn that into a ind...
var ret = {}; var retPitch = tokenizer.getKeyPitch(str); if (retPitch.len > 0) { var key = retPitch.token; str = str.substring(retPitch.len); var retAcc = tokenizer.getSharpFlat(str); if (retAcc.len > 0) { key += retAcc.token; str = str.substring(retAcc.len); } var retMode = tokenizer.getMode(str); if (retMode.len > ...
if (ret.regularKey === undefined && ret.extraAccidentals === undefined && retClef.token === undefined) { warn("error parsing key: ", origStr, 0); return {}; } var result = {}; if (retClef.token !== undefined) result.foundClef = true; if (ret.regularKey !== undefined || ret.extraAccidentals !== undefined) { multilineVa...
this.parseKey = function(str) // (and clef) { var origStr = str; // The format is: // [space][tonic[#|b][ ][3-letter-mode][ignored-chars][space]][ accidentals...][ clef=treble|bass|bass3|tenor|alto|alto2|alto1|none [+8|-8]] // -- or -- the key can be "none" // First get the key letter: turn that into a ind...
if (str.length === 0) { str = 'none'; }
this.parseKey = function(str) // (and clef) { var origStr = str; // The format is: // [space][tonic[#|b][ ][3-letter-mode][ignored-chars][space]][ accidentals...][ clef=treble|bass|bass3|tenor|alto|alto2|alto1|none [+8|-8]] // -- or -- the key can be "none" // First get the key letter: turn that into a index into...
multilineVars.clef = retClef.token;
multilineVars.clef = { type: retClef.token }; str = str.substring(retClef.len); setMiddle(str);
var parseKey = function(str) // (and clef) { var origStr = str; // The format is: // [space][tonic[#|b][ ][3-letter-mode][ignored-chars][space]][ accidentals...][ clef=treble|bass|bass3|tenor|alto|alto2|alto1|none [+8|-8]] // -- or -- the key can be "none" // First get the key letter: turn that into a inde...
tune.appendStartingElement('clef', -1, -1, {type: multilineVars.clef});
tune.appendStartingElement('clef', -1, -1, multilineVars.clef);
var parseLine = function(line) { if (line.startsWith('%%')) { var err = addDirective(line.substring(2)); if (err) warn(err, line, 2); return; } line = tokenizer.stripComment(line); if (line.length === 0) return; if (line.length >= 2) { if (line[1] === ':') { var field = metaTextHeaders[li...
var len = line.substring(2).gsub(" ", ""); var len_arr = len.split('/'); if (len_arr.length === 2) { var n = parseInt(len_arr[0]); var d = parseInt(len_arr[1]); if (d > 0) { var q = n / d; multilineVars.default_length = q*8; multilineVars.havent_set_length = false; } }
setDefaultLength(line, 2, line.length);
var parseLine = function(line) { if (line.startsWith('%%')) { var err = addDirective(line.substring(2)); if (err) warn(err, line, 2); return; } line = tokenizer.stripComment(line); if (line.length === 0) return; if (line.length >= 2) { if (line[1] === ':') { var field = metaTextHeaders[li...
parseRegularMusicLine(line);
if (nextLine.length) nextLine = "\x12" + nextLine; parseRegularMusicLine(line+nextLine); nextLine = "";
var parseLine = function(line) { if (line.startsWith('%%')) { var err = addDirective(line.substring(2)); if (err) warn(err, line, 2); return; } line = tokenizer.stripComment(line); if (line.length === 0) return; if (line.length >= 2) { if (line[1] === ':') { var field = metaTextHeaders[li...
if (nextLine.length > 0) parseLine(nextLine);
var parseLine = function(line) { if (line.startsWith('%%')) { var err = addDirective(line.substring(2)); if (err) warn(err, line, 2); return; } line = tokenizer.stripComment(line); if (line.length === 0) return; if (line.length >= 2) { if (line[1] === ':') { var field = metaTextHeaders[li...
setTempo(line, 2, line.length);
var tempo = setTempo(line, 2, line.length); if (tempo.type === 'delaySet') multilineVars.tempo = tempo.tempo; else if (tempo.type === 'immediate') tune.metaText.tempo = tempo.tempo;
var parseLine = function(line) { if (line.startsWith('%%')) { var err = addDirective(line.substring(2)); if (err) warn(err, line, 2); return; } line = tokenizer.stripComment(line); if (line.length === 0) return; if (line.length >= 2) { if (line[1] === ':') { var nextLine = ""; if (lin...
case 'm': warn("Unknown header", line, 0);
var parseLine = function(line) { if (line.startsWith('%%')) { var err = addDirective(line.substring(2)); if (err) warn(err, line, 2); return; } line = tokenizer.stripComment(line); if (line.length === 0) return; if (line.length >= 2) { if (line[1] === ':') { var nextLine = ""; if (lin...
case 'U': addUserDefinition(line, 2, line.length); break;
var parseLine = function(line) { if (line.startsWith('%%')) { var err = addDirective(line.substring(2)); if (err) warn(err, line, 2); return; } line = tokenizer.stripComment(line); if (line.length === 0) return; if (line.length >= 2) { if (line[1] === ':') { var field = metaTextHeaders[li...
var mid = pitches[str[0]]; for (i = 1; i < str.length; i++) { if (str[i] === ',') mid -= 7; else if (str[i] === ',') mid += 7; } return mid; };
var mid = pitches[str[0]]; for (var i = 1; i < str.length; i++) { if (str[i] === ',') mid -= 7; else if (str[i] === ',') mid += 7; } return mid; };
var parseMiddle = function(str) { var mid = pitches[str[0]]; for (i = 1; i < str.length; i++) { if (str[i] === ',') mid -= 7; else if (str[i] === ',') mid += 7; } return mid; };
var tok = tokens.shift(); if (tok.token === '(') tok = tokens.shift(); while (1) { if (tok.type !== 'number') throw "Expected top number of meter"; ret.value += parseInt(tok.token); ret.num += tok.token;
var tok = tokens.shift(); if (tok.token === '(') tok = tokens.shift(); while (1) { if (tok.type !== 'number') throw "Expected top number of meter"; ret.value += parseInt(tok.token); ret.num += tok.token; if (tokens.length === 0 || tokens[0].token === '/') return ret; tok = tokens.shift(); if (tok.token === ')') {
var parseNum = function() { // handles this much: [open_paren] decimal [ plus|dot decimal ]... [close_paren] var ret = { value: 0, num: "" }; var tok = tokens.shift(); if (tok.token === '(') tok = tokens.shift(); while (1) { if (tok.type !== 'number') throw "Expected top number...
tok = tokens.shift(); if (tok.token === ')') { if (tokens.length === 0 || tokens[0].token === '/') return ret; throw "Unexpected paren in meter"; } if (tok.token !== '.' && tok.token !== '+') throw "Expected top number of meter"; ret.num += tok.token; if (tokens.length === 0) throw "Expected top number of meter"; tok =...
throw "Unexpected paren in meter";
var parseNum = function() { // handles this much: [open_paren] decimal [ plus|dot decimal ]... [close_paren] var ret = { value: 0, num: "" }; var tok = tokens.shift(); if (tok.token === '(') tok = tokens.shift(); while (1) { if (tok.type !== 'number') throw "Expected top number...
return ret; };
if (tok.token !== '.' && tok.token !== '+') throw "Expected top number of meter"; ret.num += tok.token; if (tokens.length === 0) throw "Expected top number of meter"; tok = tokens.shift(); } return ret; };
var parseNum = function() { // handles this much: [open_paren] decimal [ plus|dot decimal ]... [close_paren] var ret = { value: 0, num: "" }; var tok = tokens.shift(); if (tok.token === '(') tok = tokens.shift(); while (1) { if (tok.type !== 'number') throw "Expected top number...
multilineVars.havent_set_length = false;
var parseRegularMusicLine = function(line) { resolveTempo(); multilineVars.havent_set_length = false; // To late to set this now. multilineVars.is_in_header = false; // We should have gotten a key header by now, but just in case, this is definitely out of the header. var i = 0; var startOfLine = multilineVa...
bar.number = ret[2];
bar.ending = ret[2];
var parseRegularMusicLine = function(line) { resolveTempo(); multilineVars.havent_set_length = false; // To late to set this now. multilineVars.is_in_header = false; // We should have gotten a key header by now, but just in case, this is definitely out of the header. var i = 0; var startOfLine = multilineVa...
if (multilineVars.barNumOnNextNote) { el.barNumber = multilineVars.barNumOnNextNote; multilineVars.barNumOnNextNote = null; }
var parseRegularMusicLine = function(line) { resolveTempo(); multilineVars.havent_set_length = false; // To late to set this now. multilineVars.is_in_header = false; // We should have gotten a key header by now, but just in case, this is definitely out of the header. var i = 0; var startOfLine = multilineVa...
i += ret[0];
i = ret[0];
var parseRegularMusicLine = function(line) { resolveTempo(); //multilineVars.havent_set_length = false; // To late to set this now. multilineVars.is_in_header = false; // We should have gotten a key header by now, but just in case, this is definitely out of the header. var i = 0; var startOfLine = multiline...
if (el.gracenote !== undefined) warn("Can't have a grace note before a barline", line, i);
if (el.gracenotes !== undefined) { el.pitch = null; el.rest_type = 'spacer'; tune.appendElement('note', -1, -1, el); el = {}; }
var parseRegularMusicLine = function(line) { resolveTempo(); //multilineVars.havent_set_length = false; // To late to set this now. multilineVars.is_in_header = false; // We should have gotten a key header by now, but just in case, this is definitely out of the header. var i = 0; var startOfLine = multiline...
staffInfo.clef = staffInfo.clef.replace(/[',]/g, ""); if (staffInfo.clef.indexOf('+16') != -1) { oct += 14; staffInfo.clef = staffInfo.clef.replace('+16', '');
if (staffInfo.clef !== undefined) { staffInfo.clef = staffInfo.clef.replace(/[',]/g, ""); if (staffInfo.clef.indexOf('+16') != -1) { oct += 14; staffInfo.clef = staffInfo.clef.replace('+16', ''); } staffInfo.middle = calcMiddle(staffInfo.clef, oct);
this.parseVoice = function(line, i, e) { //First truncate the string to the first non-space character after V: through either the //end of the line or a % character. Then remove trailing spaces, too. var ret = tokenizer.getMeat(line, i, e); var start = ret.start; var end = ret.end; //The first thing on th...
staffInfo.middle = calcMiddle(staffInfo.clef, oct);
this.parseVoice = function(line, i, e) { //First truncate the string to the first non-space character after V: through either the //end of the line or a % character. Then remove trailing spaces, too. var ret = tokenizer.getMeat(line, i, e); var start = ret.start; var end = ret.end; //The first thing on th...
if (staffInfo.clef !== undefined) { staffInfo.clef = staffInfo.clef.replace(/[',]/g, ""); if (staffInfo.clef.indexOf('+16') != -1) { oct += 14; staffInfo.clef = staffInfo.clef.replace('+16', ''); } staffInfo.middle = calcMiddle(staffInfo.clef, oct);
if (staffInfo.clef !== undefined) { staffInfo.clef = staffInfo.clef.replace(/[',]/g, ""); if (staffInfo.clef.indexOf('+16') !== -1) { oct += 14; staffInfo.clef = staffInfo.clef.replace('+16', '');
this.parseVoice = function(line, i, e) { //First truncate the string to the first non-space character after V: through either the //end of the line or a % character. Then remove trailing spaces, too. var ret = tokenizer.getMeat(line, i, e); var start = ret.start; var end = ret.end; //The first thing on th...
break; case 'treble': case 'bass': case 'tenor': case 'alto': case 'none': case 'treble\'': case 'bass\'': case 'tenor\'': case 'alto\'': case 'none\'': case 'treble\'\'': case 'bass\'\'': case 'tenor\'\'': case 'alto\'\'': case 'none\'\'': case 'treble,': case 'bass,': case 'tenor,': case 'alto,': case 'none,': case '...
staffInfo.middle = calcMiddle(staffInfo.clef, oct); } break; case 'treble': case 'bass': case 'tenor': case 'alto': case 'none': case 'treble\'': case 'bass\'': case 'tenor\'': case 'alto\'': case 'none\'': case 'treble\'\'': case 'bass\'\'': case 'tenor\'\'': case 'alto\'\'': case 'none\'\'': case 'treble,': case 'bas...
this.parseVoice = function(line, i, e) { //First truncate the string to the first non-space character after V: through either the //end of the line or a % character. Then remove trailing spaces, too. var ret = tokenizer.getMeat(line, i, e); var start = ret.start; var end = ret.end; //The first thing on th...
staffInfo.clef = token.token.replace(/[',]/g, ""); staffInfo.middle = calcMiddle(staffInfo.clef, oct2); break; case 'staves': case 'stave': case 'stv': addNextTokenToStaffInfo('staves'); break; case 'brace': case 'brc': addNextTokenToStaffInfo('brace'); break; case 'bracket': case 'brk': addNextTokenToStaffInfo('bracke...
staffInfo.clef = token.token.replace(/[',]/g, ""); staffInfo.middle = calcMiddle(staffInfo.clef, oct2); break; case 'staves': case 'stave': case 'stv': addNextTokenToStaffInfo('staves'); break; case 'brace': case 'brc': addNextTokenToStaffInfo('brace'); break; case 'bracket': case 'brk': addNextTokenToStaffInfo('bracke...
this.parseVoice = function(line, i, e) { //First truncate the string to the first non-space character after V: through either the //end of the line or a % character. Then remove trailing spaces, too. var ret = tokenizer.getMeat(line, i, e); var start = ret.start; var end = ret.end; //The first thing on th...
start += tokenizer.eatWhiteSpace(line, start);
this.parseVoice = function(line, i, e) { //First truncate the string to the first non-space character after V: through either the //end of the line or a % character. Then remove trailing spaces, too. var ret = tokenizer.getMeat(line, i, e); var start = ret.start; var end = ret.end; //The first thing on th...
if (staffInfo.startStaff || multilineVars.staves.length === 0) { multilineVars.staves.push({ index: multilineVars.staves.length, meter: multilineVars.origMeter }); if (!multilineVars.score_is_present) multilineVars.staves[multilineVars.staves.length-1].numVoices = 0;
if (staffInfo.startStaff || multilineVars.staves.length === 0) { multilineVars.staves.push({ index: multilineVars.staves.length, meter: multilineVars.origMeter }); if (!multilineVars.score_is_present) multilineVars.staves[multilineVars.staves.length-1].numVoices = 0; } if (multilineVars.voices[id].staffNum === undefine...
this.parseVoice = function(line, i, e) { //First truncate the string to the first non-space character after V: through either the //end of the line or a % character. Then remove trailing spaces, too. var ret = tokenizer.getMeat(line, i, e); var start = ret.start; var end = ret.end; //The first thing on th...
if (multilineVars.voices[id].staffNum === undefined) { multilineVars.voices[id].staffNum = multilineVars.staves.length-1; var vi = 0; for(var v in multilineVars.voices) { if(multilineVars.voices.hasOwnProperty(v)) { if (multilineVars.voices[v].staffNum === multilineVars.voices[id].staffNum) vi++; } } multilineVars.voi...
multilineVars.voices[id].index = vi-1; } var s = multilineVars.staves[multilineVars.voices[id].staffNum]; if (!multilineVars.score_is_present) s.numVoices++; if (staffInfo.clef) s.clef = { type: staffInfo.clef, middle: staffInfo.middle }; if (staffInfo.spacing) s.spacing_below_offset = staffInfo.spacing; if (staffInfo....
this.parseVoice = function(line, i, e) { //First truncate the string to the first non-space character after V: through either the //end of the line or a % character. Then remove trailing spaces, too. var ret = tokenizer.getMeat(line, i, e); var start = ret.start; var end = ret.end; //The first thing on th...
else if (attr.token.length === 0)
else if (attr.token.length === 0 && line[start] !== '"')
function parseVoice(line, i, e) { //First truncate the string to the first non-space character after V: through either the //end of the line or a % character. Then remove trailing spaces, too. var ret = tokenizer.getMeat(line, i, e); var start = ret.start; var end = ret.end; //The first thing on the line ...
if (staffInfo.clef) s.clef = staffInfo.clef;
if (staffInfo.clef) s.clef = { type: staffInfo.clef, middle: staffInfo.middle };
function parseVoice(line, i, e) { //First truncate the string to the first non-space character after V: through either the //end of the line or a % character. Then remove trailing spaces, too. var ret = tokenizer.getMeat(line, i, e); var start = ret.start; var end = ret.end; //The first thing on the line ...
if (multilineVars.staves.length > 1) { multilineVars.staves[0].bracket = 'start'; for (var b = 1; b < multilineVars.staves.length-1; b++) multilineVars.staves[b].bracket = "continue"; multilineVars.staves[multilineVars.staves.length-1].bracket = 'end'; }
function parseVoice(line, i, e) { //First truncate the string to the first non-space character after V: through either the //end of the line or a % character. Then remove trailing spaces, too. var ret = tokenizer.getMeat(line, i, e); var start = ret.start; var end = ret.end; //The first thing on the line ...
var s = multilineVars.staves[multilineVars.staves.length-1];
var s = multilineVars.staves[multilineVars.voices[id].staffNum];
function parseVoice(line, i, e) { //First truncate the string to the first non-space character after V: through either the //end of the line or a % character. Then remove trailing spaces, too. var ret = tokenizer.getMeat(line, i, e); var start = ret.start; var end = ret.end; //The first thing on the line ...
if (staffInfo.subname) {if (s.subname) s.name.push(staffInfo.subname); else s.subname = [ staffInfo.subname ];}
if (staffInfo.subname) {if (s.subname) s.subname.push(staffInfo.subname); else s.subname = [ staffInfo.subname ];}
function parseVoice(line, i, e) { //First truncate the string to the first non-space character after V: through either the //end of the line or a % character. Then remove trailing spaces, too. var ret = tokenizer.getMeat(line, i, e); var start = ret.start; var end = ret.end; //The first thing on the line ...
if (isLeaf) htmlText += xmlDocNode.textContent; else
if (isLeaf) { var textContent = xmlDocNode.textContent ? xmlDocNode.textContent : xmlDocNode.text; htmlText += textContent; } else {
var parseXmlToHtml = function(xmlDocNode, indent) { var htmlText; var isLeaf = isLeafNode(xmlDocNode); // Create opening tag with attributes htmlText = indent + '<span class="tag">&lt;' + xmlDocNode.tagName; for ( var i = 0; i < xmlDocNode.attributes.length; i++) { html...
}
var parseXmlToHtml = function(xmlDocNode, indent) { var htmlText; var isLeaf = isLeafNode(xmlDocNode); // Create opening tag with attributes htmlText = indent + '<span class="tag">&lt;' + xmlDocNode.tagName; for ( var i = 0; i < xmlDocNode.attributes.length; i++) { html...
if(!root) var a = this.moved(tree_component.cut_copy.copy_nodes,obj.children("a:eq(0)"),"inside", true); else var a = this.moved(tree_component.cut_copy.copy_nodes,this.container.children("ul:eq(0)"),"inside", true);
if(!root) var a = this.moved(tree_component.cut_copy.copy_nodes,obj.children("a:eq(0)"),"inside", false, true); else var a = this.moved(tree_component.cut_copy.copy_nodes,this.container.children("ul:eq(0)"),"inside", false, true);
paste : function (obj, position) { if(this.locked) return this.error("LOCKED"); var root = false; if(obj == -1) { root = true; obj = this.container; } else obj = obj ? this.get_node(obj) : this.selected; if(!root && (!obj || !obj.size())) return this.error("PASTE: NO NODE SELECTED"); if(!tree_compo...
var a = this.moved(tree_component.cut_copy.copy_nodes,obj.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").children("a:eq(0)"),"before", true);
var a = this.moved(tree_component.cut_copy.copy_nodes,obj.children("ul:eq(0)").children("li:nth-child(" + (position + 1) + ")").children("a:eq(0)"),"before", false, true);
paste : function (obj, position) { if(this.locked) return this.error("LOCKED"); var root = false; if(obj == -1) { root = true; obj = this.container; } else obj = obj ? this.get_node(obj) : this.selected; if(!root && (!obj || !obj.size())) return this.error("PASTE: NO NODE SELECTED"); if(!tree_compo...
var a = this.moved(tree_component.cut_copy.copy_nodes,obj.children("ul:eq(0)").children("li:nth-child(" + (position) + ")").children("a:eq(0)"),"after", true);
var a = this.moved(tree_component.cut_copy.copy_nodes,obj.children("ul:eq(0)").children("li:nth-child(" + (position) + ")").children("a:eq(0)"),"after", false, true);
paste : function (obj, position) { if(this.locked) return this.error("LOCKED"); var root = false; if(obj == -1) { root = true; obj = this.container; } else obj = obj ? this.get_node(obj) : this.selected; if(!root && (!obj || !obj.size())) return this.error("PASTE: NO NODE SELECTED"); if(!tree_compo...