rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
var newTD = this.columns.getColumnCell(this.columns.getByName(col),column + 1);
var colIndex = this.options.row.useHeaders ? column+1 : column; var newTD = this.columns.getColumnCell(this.columns.getByName(col),colIndex);
modelChanged : function (row, col) { //grab new TD var column = this.columns.getIndexFromGrid(col); var td = document.id(this.gridObj.childNodes[0].childNodes[0].childNodes[row].childNodes[column]); var currentRow = this.model.getPosition(); this.model.moveTo(row); var newTD = this.columns.getColumnCell(this.columns.getByName(col),column + 1); //get parent list var list = td.getParent().retrieve('jxList'); list.replace(td, newTD); this.columns.updateRule(col); this.model.moveTo(currentRow); },
};
}
function move(node, destination) { node.insertAfter(destination); childrenOf(node).reverse().each(function() { move($(this), node[0]); }); };
var path = $('#move-collection-form input[name = path]').val();
var path = $('#move-collection-form select[name = path]').val();
function moveCollection(dialog) { var path = $('#move-collection-form input[name = path]').val(); var collection = $('#simple-search-form input[name = collection]').val(); var params = { action: 'move-collection', path: path, collection: collection }; $.get("operations.xql", params, function (data) { $("#collection-tree-tree").dynatree("getRoot").reload(); dialog.dialog("close"); });}
n: function(event, dx, dy) { var o = this.options, cs = this.originalSize, sp = this.originalPosition; return { top: sp.top + dy, height: cs.height - dy }; },
a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function n(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in r||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function s(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function j(c,a,b,d){if(typeof c=="object"){d=
n: function(event, dx, dy) { var o = this.options, cs = this.originalSize, sp = this.originalPosition; return { top: sp.top + dy, height: cs.height - dy }; },
var pages = Math.floor(options.totalItems / options.itemsPerPage); for (var i = 0; i < pages; i++) { appendPageLink(div, (i * options.itemsPerPage + 1), (i * options.itemsPerPage + options.itemsPerPage));
var pages = Math.ceil(options.totalItems / options.itemsPerPage); var currentPage = Math.floor(currentItem / options.itemsPerPage); console.log("pages: " + pages + " currentPage: " + currentPage); var startPage = currentPage > 2 ? currentPage - 3 : 0; var endPage = 0; if (currentPage + 3 >= pages) endPage = pages - 1; else if (currentPage < 3) endPage = 6; else endPage = currentPage + 3; for (var i = startPage; i <= endPage; i++) { var end = (i * options.itemsPerPage + options.itemsPerPage); if (end > options.totalItems) end = options.totalItems; appendPageLink(div, (i * options.itemsPerPage + 1), end);
function navbar(targetDiv, currentItem) { var div; if (options.navContainer) { div = $(options.navContainer); } else { div = $('<div></div>'); targetDiv.append(div); } div.empty().addClass('pagination-links'); if (options.itemsPerPage == 1) { var span = $('<span class="pagination-back">&lt;&lt;</span>'); div.append(span); if (currentItem <= 1) { span.addClass("inactive"); } else { span.click(function () { retrievePage(currentItem - 1); return false; }); } span = $('<span class="pagination-next">&gt;&gt;</span>'); div.append(span); if (currentItem >= options.totalItems) { span.addClass("inactive"); } else { span.click(function () { retrievePage(currentItem + 1); return false; }); } span = $('<span class="pagination-info"></span>'); span.text('Showing hit ' + currentItem + ' of ' + options.totalItems); var listLink = $('<a class="pagination-list-view" href="#">[Switch to list view]</a>'); listLink.click(function (ev) { ev.preventDefault(); options.itemsPerPage = 10; retrievePage(1); }); span.append(listLink); div.append(span); } else { var pages = Math.floor(options.totalItems / options.itemsPerPage); for (var i = 0; i < pages; i++) { appendPageLink(div, (i * options.itemsPerPage + 1), (i * options.itemsPerPage + options.itemsPerPage)); } if (pages % options.itemsPerPage > 0) { appendPageLink(div, pages * options.itemsPerPage + 1, pages * options.itemsPerPage + pages % options.itemsPerPage); } } return div; }
if (pages % options.itemsPerPage > 0) { appendPageLink(div, pages * options.itemsPerPage + 1, pages * options.itemsPerPage + pages % options.itemsPerPage); }
function navbar(targetDiv, currentItem) { var div; if (options.navContainer) { div = $(options.navContainer); } else { div = $('<div></div>'); targetDiv.append(div); } div.empty().addClass('pagination-links'); if (options.itemsPerPage == 1) { var span = $('<span class="pagination-back">&lt;&lt;</span>'); div.append(span); if (currentItem <= 1) { span.addClass("inactive"); } else { span.click(function () { retrievePage(currentItem - 1); return false; }); } span = $('<span class="pagination-next">&gt;&gt;</span>'); div.append(span); if (currentItem >= options.totalItems) { span.addClass("inactive"); } else { span.click(function () { retrievePage(currentItem + 1); return false; }); } span = $('<span class="pagination-info"></span>'); span.text('Showing hit ' + currentItem + ' of ' + options.totalItems); var listLink = $('<a class="pagination-list-view" href="#">[Switch to list view]</a>'); listLink.click(function (ev) { ev.preventDefault(); options.itemsPerPage = 10; retrievePage(1); }); span.append(listLink); div.append(span); } else { var pages = Math.floor(options.totalItems / options.itemsPerPage); for (var i = 0; i < pages; i++) { appendPageLink(div, (i * options.itemsPerPage + 1), (i * options.itemsPerPage + options.itemsPerPage)); } if (pages % options.itemsPerPage > 0) { appendPageLink(div, pages * options.itemsPerPage + 1, pages * options.itemsPerPage + pages % options.itemsPerPage); } } return div; }
if (over != null && o3_timerid == 0) runHook("hideObject", FREPLACE, over);
if (over != null && (o3_compatmode ? 1 : o3_timerid == 0)) runHook("hideObject", FREPLACE, over);
function nd(time) { if (olLoaded && !isExclusive()) { hideDelay(time); // delay popup close if time specified if (o3_removecounter >= 1) { o3_showingsticky = 0 }; if (o3_showingsticky == 0) { o3_allowmove = 0; if (over != null && o3_timerid == 0) runHook("hideObject", FREPLACE, over); } else { o3_removecounter++; } } return true;}
var url = 'enter_bug.cgi?';
var f = document.createElement("form"); f.setAttribute("method", "post"); f.setAttribute("action", "enter_bug.cgi"); f.setAttribute("target", "_blank");
newbug = function(){ var bug_panel = new Ext.Panel({ id: 'new_bug_panel' }); var caserun_id; if (Ext.getCmp('caserun_grid') && Ext.getCmp('caserun_grid').getSelectionModel().getCount()) { caserun_id = Ext.getCmp('caserun_grid').getSelectionModel().getSelected().get('caserun_id'); } var store = new Ext.data.Store({ url: 'tr_process_case.cgi', baseParams: { action: 'case_to_bug', case_id: this.tcid, caserun_id: caserun_id }, reader: new Ext.data.XmlReader({ record: 'newbug', id: 'case_id' }, [{ name: 'product', mapping: 'product' }, { name: 'version', mapping: 'version' }, { name: 'component', mapping: 'component' }, { name: 'comment', mapping: 'comment' }, { name: 'case_id', mapping: 'case_id' }, { name: 'assigned_to', mapping: 'assigned_to' }, { name: 'qa_contact', mapping: 'qa_contact' }, { name: 'short_desc', mapping: 'short_desc' }]) }); store.load(); store.on('load', function(){ var url = 'enter_bug.cgi?'; for (var i = 0; i < store.fields.keys.length; i++) { url = url + store.fields.keys[i] + '=' + escape(store.getAt(0).get(store.fields.keys[i])) + '&'; } url = url + 'caserun_id=' + caserun_id; window.open(url); }); };
url = url + store.fields.keys[i] + '=' + escape(store.getAt(0).get(store.fields.keys[i])) + '&';
if (store.fields.keys[i] == 'comment'){ h = document.createElement("textarea"); h.setAttribute("name", store.fields.keys[i]); h.value = store.getAt(0).get(store.fields.keys[i]); } else { h = document.createElement("input"); h.setAttribute("name", store.fields.keys[i]); txt = store.getAt(0).get(store.fields.keys[i]).replace(/\n/,'&#10'); h.setAttribute("value", store.getAt(0).get(store.fields.keys[i])); } f.appendChild(h);
newbug = function(){ var bug_panel = new Ext.Panel({ id: 'new_bug_panel' }); var caserun_id; if (Ext.getCmp('caserun_grid') && Ext.getCmp('caserun_grid').getSelectionModel().getCount()) { caserun_id = Ext.getCmp('caserun_grid').getSelectionModel().getSelected().get('caserun_id'); } var store = new Ext.data.Store({ url: 'tr_process_case.cgi', baseParams: { action: 'case_to_bug', case_id: this.tcid, caserun_id: caserun_id }, reader: new Ext.data.XmlReader({ record: 'newbug', id: 'case_id' }, [{ name: 'product', mapping: 'product' }, { name: 'version', mapping: 'version' }, { name: 'component', mapping: 'component' }, { name: 'comment', mapping: 'comment' }, { name: 'case_id', mapping: 'case_id' }, { name: 'assigned_to', mapping: 'assigned_to' }, { name: 'qa_contact', mapping: 'qa_contact' }, { name: 'short_desc', mapping: 'short_desc' }]) }); store.load(); store.on('load', function(){ var url = 'enter_bug.cgi?'; for (var i = 0; i < store.fields.keys.length; i++) { url = url + store.fields.keys[i] + '=' + escape(store.getAt(0).get(store.fields.keys[i])) + '&'; } url = url + 'caserun_id=' + caserun_id; window.open(url); }); };
url = url + 'caserun_id=' + caserun_id; window.open(url);
h = document.createElement("input"); h.setAttribute("name", "caserun_id"); h.setAttribute("value", caserun_id); f.appendChild(h); document.body.appendChild(f); f.submit();
newbug = function(){ var bug_panel = new Ext.Panel({ id: 'new_bug_panel' }); var caserun_id; if (Ext.getCmp('caserun_grid') && Ext.getCmp('caserun_grid').getSelectionModel().getCount()) { caserun_id = Ext.getCmp('caserun_grid').getSelectionModel().getSelected().get('caserun_id'); } var store = new Ext.data.Store({ url: 'tr_process_case.cgi', baseParams: { action: 'case_to_bug', case_id: this.tcid, caserun_id: caserun_id }, reader: new Ext.data.XmlReader({ record: 'newbug', id: 'case_id' }, [{ name: 'product', mapping: 'product' }, { name: 'version', mapping: 'version' }, { name: 'component', mapping: 'component' }, { name: 'comment', mapping: 'comment' }, { name: 'case_id', mapping: 'case_id' }, { name: 'assigned_to', mapping: 'assigned_to' }, { name: 'qa_contact', mapping: 'qa_contact' }, { name: 'short_desc', mapping: 'short_desc' }]) }); store.load(); store.on('load', function(){ var url = 'enter_bug.cgi?'; for (var i = 0; i < store.fields.keys.length; i++) { url = url + store.fields.keys[i] + '=' + escape(store.getAt(0).get(store.fields.keys[i])) + '&'; } url = url + 'caserun_id=' + caserun_id; window.open(url); }); };
if (not_to_be_shown(this)) return;
newRow: function(book){ if (not_to_be_shown(this)) return; if ($("#my_table tr.nothing").length > 0) { myBooks.empty(); myBooks.render_header(); } $("#my_table_body tr:first").before("<tr id=" + book.key + "><td>" + myBooks.del_link(book) + "</td><td>" + book_link(book) + "</td><td>" + myBooks.borrower(book) + "</td><td class='action'>" + myBooks.lend_link(book) + "</td></tr>");},
$("#my_table_body tr:first").before("<tr id=" + book.key + "><td>" + myBooks.del_link(book) + "</td><td>" + book_link(book) +
$("#my_table_body tr:first").before("<tr id=" + book.key + "\" class=\""+ toggleOddEven() + "\"><td>" + myBooks.del_link(book) + "</td><td>" + book_link(book) +
newRow: function(book){ if (not_to_be_shown(this)) return; if ($("#my_table tr.nothing").length > 0) { myBooks.empty(); myBooks.render_header(); } $("#my_table_body tr:first").before("<tr id=" + book.key + "><td>" + myBooks.del_link(book) + "</td><td>" + book_link(book) + "</td><td>" + myBooks.borrower(book) + "</td><td class='action'>" + myBooks.lend_link(book) + "</td></tr>");},
d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
(function($){var ver="2.86";if($.support==undefined){$.support={opacity:!($.browser.msie)};}function debug(s){if($.fn.cycle.debug){log(s);}}function log(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments," "));}}$.fn.cycle=function(options,arg2){var o={s:this.selector,c:this.context};if(this.length===0&&options!="stop"){if(!$.isReady&&o.s){log("DOM not ready, queuing slideshow");$(function(){$(o.s,o.c).cycle(options,arg2);});return this;}log("terminating; zero elements found by selector"+($.isReady?"":" (DOM not ready)"));return this;}return this.each(function(){var opts=handleArguments(this,options,arg2);if(opts===false){return;}opts.updateActivePagerLink=opts.updateActivePagerLink||$.fn.cycle.updateActivePagerLink;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);}this.cycleTimeout=this.cyclePause=0;var $cont=$(this);var $slides=opts.slideExpr?$(opts.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log("terminating; too few slides: "+els.length);return;}var opts2=buildOptions($cont,$slides,els,opts,o);if(opts2===false){return;}var startTime=opts2.continuous?10:getTimeout(opts2.currSlide,opts2.nextSlide,opts2,!opts2.rev);if(startTime){startTime+=(opts2.delay||0);if(startTime<10){startTime=10;}debug("first timeout: "+startTime);this.cycleTimeout=setTimeout(function(){go(els,opts2,0,!opts2.rev);},startTime);}});};function handleArguments(cont,options,arg2){if(cont.cycleStop==undefined){cont.cycleStop=0;}if(options===undefined||options===null){options={};}if(options.constructor==String){switch(options){case"destroy":case"stop":var opts=$(cont).data("cycle.opts");if(!opts){return false;}cont.cycleStop++;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);}cont.cycleTimeout=0;$(cont).removeData("cycle.opts");if(options=="destroy"){destroy(opts);}return false;case"toggle":cont.cyclePause=(cont.cyclePause===1)?0:1;checkInstantResume(cont.cyclePause,arg2,cont);return false;case"pause":cont.cyclePause=1;return false;case"resume":cont.cyclePause=0;checkInstantResume(false,arg2,cont);return false;case"prev":case"next":var opts=$(cont).data("cycle.opts");if(!opts){log('options not found, "prev/next" ignored');return false;}$.fn.cycle[options](opts);return false;default:options={fx:options};}return options;}else{if(options.constructor==Number){var num=options;options=$(cont).data("cycle.opts");if(!options){log("options not found, can not advance slide");return false;}if(num<0||num>=options.elements.length){log("invalid slide index: "+num);return false;}options.nextSlide=num;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}if(typeof arg2=="string"){options.oneTimeFx=arg2;}go(options.elements,options,1,num>=options.currSlide);return false;}}return options;function checkInstantResume(isPaused,arg2,cont){if(!isPaused&&arg2===true){var options=$(cont).data("cycle.opts");if(!options){log("options not found, can not resume");return false;}if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}go(options.elements,options,1,1);}}}function removeFilter(el,opts){if(!$.support.opacity&&opts.cleartype&&el.style.filter){try{el.style.removeAttribute("filter");}catch(smother){}}}function destroy(opts){if(opts.next){$(opts.next).unbind(opts.prevNextEvent);}if(opts.prev){$(opts.prev).unbind(opts.prevNextEvent);}if(opts.pager||opts.pagerAnchorBuilder){$.each(opts.pagerAnchors||[],function(){this.unbind().remove();});}opts.pagerAnchors=null;if(opts.destroy){opts.destroy(opts);}}function buildOptions($cont,$slides,els,options,o){var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});if(opts.autostop){opts.countdown=opts.autostopCount||els.length;}var cont=$cont[0];$cont.data("cycle.opts",opts);opts.$cont=$cont;opts.stopCount=cont.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];opts.after.unshift(function(){opts.busy=0;});if(!$.support.opacity&&opts.cleartype){opts.after.push(function(){removeFilter(this,opts);});}if(opts.continuous){opts.after.push(function(){go(els,opts,0,!opts.rev);});}saveOriginalOpts(opts);if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($slides);}if($cont.css("position")=="static"){$cont.css("position","relative");}if(opts.width){$cont.width(opts.width);}if(opts.height&&opts.height!="auto"){$cont.height(opts.height);}if(opts.startingSlide){opts.startingSlide=parseInt(opts.startingSlide);}if(opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++){opts.randomMap.push(i);}opts.randomMap.sort(function(a,b){return Math.random()-0.5;});opts.randomIndex=1;opts.startingSlide=opts.randomMap[1];}else{if(opts.startingSlide>=els.length){opts.startingSlide=0;}}opts.currSlide=opts.startingSlide||0;var first=opts.startingSlide;$slides.css({position:"absolute",top:0,left:0}).hide().each(function(i){var z=first?i>=first?els.length-(i-first):first-i:els.length-i;$(this).css("z-index",z);});$(els[first]).css("opacity",1).show();removeFilter(els[first],opts);if(opts.fit&&opts.width){$slides.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}var reshape=opts.containerResize&&!$cont.innerHeight();if(reshape){var maxw=0,maxh=0;for(var j=0;j<els.length;j++){var $e=$(els[j]),e=$e[0],w=$e.outerWidth(),h=$e.outerHeight();if(!w){w=e.offsetWidth||e.width||$e.attr("width");}if(!h){h=e.offsetHeight||e.height||$e.attr("height");}maxw=w>maxw?w:maxw;maxh=h>maxh?h:maxh;}if(maxw>0&&maxh>0){$cont.css({width:maxw+"px",height:maxh+"px"});}}if(opts.pause){$cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});}if(supportMultiTransitions(opts)===false){return false;}var requeue=false;options.requeueAttempts=options.requeueAttempts||0;$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:($el.height()||this.offsetHeight||this.height||$el.attr("height")||0);this.cycleW=(opts.fit&&opts.width)?opts.width:($el.width()||this.offsetWidth||this.width||$el.attr("width")||0);if($el.is("img")){var loadingIE=($.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var loadingFF=($.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var loadingOp=($.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var loadingOther=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(loadingIE||loadingFF||loadingOp||loadingOther){if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100){log(options.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){$(o.s,o.c).cycle(options);},opts.requeueTimeout);requeue=true;return false;}else{log("could not determine size of image: "+this.src,this.cycleW,this.cycleH);}}}return true;});if(requeue){return false;}opts.cssBefore=opts.cssBefore||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(":eq("+first+")").css(opts.cssBefore);if(opts.cssFirst){$($slides[first]).css(opts.cssFirst);}if(opts.timeout){opts.timeout=parseInt(opts.timeout);if(opts.speed.constructor==String){opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed);}if(!opts.sync){opts.speed=opts.speed/2;}var buffer=opts.fx=="shuffle"?500:250;while((opts.timeout-opts.speed)<buffer){opts.timeout+=opts.speed;}}if(opts.easing){opts.easeIn=opts.easeOut=opts.easing;}if(!opts.speedIn){opts.speedIn=opts.speed;}if(!opts.speedOut){opts.speedOut=opts.speed;}opts.slideCount=els.length;opts.currSlide=opts.lastSlide=first;if(opts.random){if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;}if(!opts.multiFx){var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init)){init($cont,$slides,opts);}else{if(opts.fx!="custom"&&!opts.multiFx){log("unknown transition: "+opts.fx,"; slideshow terminating");return false;}}}var e0=$slides[first];if(opts.before.length){opts.before[0].apply(e0,[e0,e0,opts,true]);}if(opts.after.length>1){opts.after[1].apply(e0,[e0,e0,opts,true]);}if(opts.next){$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?-1:1);});}if(opts.prev){$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?1:-1);});}if(opts.pager||opts.pagerAnchorBuilder){buildPager(els,opts);}exposeAddSlide(opts,els);return opts;}function saveOriginalOpts(opts){opts.original={before:[],after:[]};opts.original.cssBefore=$.extend({},opts.cssBefore);opts.original.cssAfter=$.extend({},opts.cssAfter);opts.original.animIn=$.extend({},opts.animIn);opts.original.animOut=$.extend({},opts.animOut);$.each(opts.before,function(){opts.original.before.push(this);});$.each(opts.after,function(){opts.original.after.push(this);});}function supportMultiTransitions(opts){var i,tx,txs=$.fn.cycle.transitions;if(opts.fx.indexOf(",")>0){opts.multiFx=true;opts.fxs=opts.fx.replace(/\s*/g,"").split(",");for(i=0;i<opts.fxs.length;i++){var fx=opts.fxs[i];tx=txs[fx];if(!tx||!txs.hasOwnProperty(fx)||!$.isFunction(tx)){log("discarding unknown transition: ",fx);opts.fxs.splice(i,1);i--;}}if(!opts.fxs.length){log("No valid transitions named; slideshow terminating.");return false;}}else{if(opts.fx=="all"){opts.multiFx=true;opts.fxs=[];for(p in txs){tx=txs[p];if(txs.hasOwnProperty(p)&&$.isFunction(tx)){opts.fxs.push(p);}}}}if(opts.multiFx&&opts.randomizeEffects){var r1=Math.floor(Math.random()*20)+30;for(i=0;i<r1;i++){var r2=Math.floor(Math.random()*opts.fxs.length);opts.fxs.push(opts.fxs.splice(r2,1)[0]);}debug("randomized fx sequence: ",opts.fxs);}return true;}function exposeAddSlide(opts,els){opts.addSlide=function(newSlide,prepend){var $s=$(newSlide),s=$s[0];if(!opts.autostopCount){opts.countdown++;}els[prepend?"unshift":"push"](s);if(opts.els){opts.els[prepend?"unshift":"push"](s);}opts.slideCount=els.length;$s.css("position","absolute");$s[prepend?"prependTo":"appendTo"](opts.$cont);if(prepend){opts.currSlide++;opts.nextSlide++;}if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($s);}if(opts.fit&&opts.width){$s.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}s.cycleH=(opts.fit&&opts.height)?opts.height:$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager||opts.pagerAnchorBuilder){$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);}if($.isFunction(opts.onAddSlide)){opts.onAddSlide($s);}else{$s.hide();}};}$.fn.cycle.resetState=function(opts,fx){fx=fx||opts.fx;opts.before=[];opts.after=[];opts.cssBefore=$.extend({},opts.original.cssBefore);opts.cssAfter=$.extend({},opts.original.cssAfter);opts.animIn=$.extend({},opts.original.animIn);opts.animOut=$.extend({},opts.original.animOut);opts.fxFn=null;$.each(opts.original.before,function(){opts.before.push(this);});$.each(opts.original.after,function(){opts.after.push(this);});var init=$.fn.cycle.transitions[fx];if($.isFunction(init)){init(opts.$cont,$(opts.elements),opts);}};function go(els,opts,manual,fwd){if(manual&&opts.busy&&opts.manualTrump){debug("manualTrump in go(), stopping active transition");$(els).stop(true,true);opts.busy=false;}if(opts.busy){debug("transition active, ignoring new tx request");return;}var p=opts.$cont[0],curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual){return;}if(!manual&&!p.cyclePause&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide))){if(opts.end){opts.end(opts);}return;}var changed=false;if((manual||!p.cyclePause)&&(opts.nextSlide!=opts.currSlide)){changed=true;var fx=opts.fx;curr.cycleH=curr.cycleH||$(curr).height();curr.cycleW=curr.cycleW||$(curr).width();next.cycleH=next.cycleH||$(next).height();next.cycleW=next.cycleW||$(next).width();if(opts.multiFx){if(opts.lastFx==undefined||++opts.lastFx>=opts.fxs.length){opts.lastFx=0;}fx=opts.fxs[opts.lastFx];opts.currFx=fx;}if(opts.oneTimeFx){fx=opts.oneTimeFx;opts.oneTimeFx=null;}$.fn.cycle.resetState(opts,fx);if(opts.before.length){$.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});}var after=function(){$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});};debug("tx firing; currSlide: "+opts.currSlide+"; nextSlide: "+opts.nextSlide);opts.busy=1;if(opts.fxFn){opts.fxFn(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}else{if($.isFunction($.fn.cycle[opts.fx])){$.fn.cycle[opts.fx](curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}else{$.fn.cycle.custom(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}}}if(changed||opts.nextSlide==opts.currSlide){opts.lastSlide=opts.currSlide;if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];if(opts.nextSlide==opts.currSlide){opts.nextSlide=(opts.currSlide==opts.slideCount-1)?0:opts.currSlide+1;}}else{var roll=(opts.nextSlide+1)==els.length;opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1;}}if(changed&&opts.pager){opts.updateActivePagerLink(opts.pager,opts.currSlide,opts.activePagerClass);}var ms=0;if(opts.timeout&&!opts.continuous){ms=getTimeout(curr,next,opts,fwd);}else{if(opts.continuous&&p.cyclePause){ms=10;}}if(ms>0){p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev);},ms);}}$.fn.cycle.updateActivePagerLink=function(pager,currSlide,clsName){$(pager).each(function(){$(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);});};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn(curr,next,opts,fwd);while((t-opts.speed)<250){t+=opts.speed;}debug("calculated timeout: "+t+"; speed: "+opts.speed);if(t!==false){return t;}}return opts.timeout;}$.fn.cycle.next=function(opts){advance(opts,opts.rev?-1:1);};$.fn.cycle.prev=function(opts){advance(opts,opts.rev?1:-1);};function advance(opts,val){var els=opts.elements;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2){opts.randomIndex=els.length-2;}else{if(opts.randomIndex==-1){opts.randomIndex=els.length-1;}}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.random){opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap){return false;}opts.nextSlide=els.length-1;}else{if(opts.nextSlide>=els.length){if(opts.nowrap){return false;}opts.nextSlide=0;}}}}var cb=opts.onPrevNextEvent||opts.prevNextClick;if($.isFunction(cb)){cb(val>0,opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,val>=0);return false;}function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);});opts.updateActivePagerLink(opts.pager,opts.startingSlide,opts.activePagerClass);}$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a;if($.isFunction(opts.pagerAnchorBuilder)){a=opts.pagerAnchorBuilder(i,el);debug("pagerAnchorBuilder("+i+", el) returned: "+a);}else{a='<a href="#">'+(i+1)+"</a>";}if(!a){return;}var $a=$(a);if($a.parents("body").length===0){var arr=[];if($p.length>1){$p.each(function(){var $clone=$a.clone(true);$(this).append($clone);arr.push($clone[0]);});$a=$(arr);}else{$a.appendTo($p);}}opts.pagerAnchors=opts.pagerAnchors||[];opts.pagerAnchors.push($a);$a.bind(opts.pagerEvent,function(e){e.preventDefault();opts.nextSlide=i;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}var cb=opts.onPagerEvent||opts.pagerClick;if($.isFunction(cb)){cb(opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,opts.currSlide<i);});if(!/^click/.test(opts.pagerEvent)&&!opts.allowPagerClickBubble){$a.bind("click.cycle",function(){return false;});}if(opts.pauseOnPagerHover){$a.hover(function(){opts.$cont[0].cyclePause++;},function(){opts.$cont[0].cyclePause--;});}};$.fn.cycle.hopsFromLast=function(opts,fwd){var hops,l=opts.lastSlide,c=opts.currSlide;if(fwd){hops=c>l?c-l:opts.slideCount-l;}else{hops=c<l?l-c:l+opts.slideCount-c;}return hops;};function clearTypeFix($slides){debug("applying clearType background-color hack");function hex(s){s=parseInt(s).toString(16);return s.length<2?"0"+s:s;}function getBg(e){for(;e&&e.nodeName.toLowerCase()!="html";e=e.parentNode){var v=$.css(e,"background-color");if(v.indexOf("rgb")>=0){var rgb=v.match(/\d+/g);return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2]);}if(v&&v!="transparent"){return v;}}return"#ffffff";}$slides.each(function(){$(this).css("background-color",getBg(this));});}$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){$(opts.elements).not(curr).hide();opts.cssBefore.opacity=1;opts.cssBefore.display="block";if(w!==false&&next.cycleW>0){opts.cssBefore.width=next.cycleW;}if(h!==false&&next.cycleH>0){opts.cssBefore.height=next.cycleH;}opts.cssAfter=opts.cssAfter||{};opts.cssAfter.display="none";$(curr).css("zIndex",opts.slideCount+(rev===true?1:0));$(next).css("zIndex",opts.slideCount+(rev===true?0:1));};$.fn.cycle.custom=function(curr,next,opts,cb,fwd,speedOverride){var $l=$(curr),$n=$(next);var speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut;$n.css(opts.cssBefore);if(speedOverride){if(typeof speedOverride=="number"){speedIn=speedOut=speedOverride;}else{speedIn=speedOut=1;}easeIn=easeOut=null;}var fn=function(){$n.animate(opts.animIn,speedIn,easeIn,cb);};$l.animate(opts.animOut,speedOut,easeOut,function(){if(opts.cssAfter){$l.css(opts.cssAfter);}if(!opts.sync){fn();}});if(opts.sync){fn();}};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(":eq("+opts.currSlide+")").css("opacity",0);opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.opacity=0;});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={top:0,left:0};}};$.fn.cycle.ver=function(){return ver;};$.fn.cycle.defaults={fx:"fade",timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,onPrevNextEvent:null,prevNextEvent:"click.cycle",pager:null,onPagerEvent:null,pagerEvent:"click.cycle",allowPagerClickBubble:false,pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:"auto",startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!$.support.opacity,cleartypeNoBg:false,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250,activePagerClass:"activeSlide",updateActivePagerLink:null};})(jQuery);$(document).ready(function(){
d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var za=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,Aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Ba=/<([\w:]+)/,db=/<tbody/i,eb=/<|&#?\w+;/,Ca=/<(?:script|object|embed|option|style)/i,Da=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/\=([^="'>\s]+\/)>/g,P={option:[1,
g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,i){return i===0},last:function(g,i,n,m){return i===m.length-1},even:function(g,i){return i%2===0},odd:function(g,i){return i%2===1},lt:function(g,i,n){return i<n[3]-0},gt:function(g,i,n){return i>n[3]-0},nth:function(g,i,n){return n[3]- 0===i},eq:function(g,i,n){return n[3]-0===i}},filter:{PSEUDO:function(g,i,n,m){var p=i[1],q=o.filters[p];if(q)return q(g,n,i,m);else if(p==="contains")return(g.textContent||g.innerText||k.getText([g])||"").indexOf(i[3])>=0;else if(p==="not"){i=i[3];n=0;for(m=i.length;n<m;n++)if(i[n]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+p)},CHILD:function(g,i){var n=i[1],m=g;switch(n){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(n===
e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var za=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,Aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Ba=/<([\w:]+)/,db=/<tbody/i,eb=/<|&#?\w+;/,Ca=/<(?:script|object|embed|option|style)/i,Da=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/\=([^="'>\s]+\/)>/g,P={option:[1,
var txt;
function ol_content_background(text,picture,hasfullhtml) { if (hasfullhtml) { txt=text; } else { txt='<table width="'+o3_width+'" border="0" cellpadding="0" cellspacing="0" height="'+o3_height+'"><tr><td colspan="3" height="'+o3_padyt+'"></td></tr><tr><td width="'+o3_padxl+'"></td><td valign="TOP" width="'+(o3_width-o3_padxl-o3_padxr)+(o3_textfontclass ? '" class="'+o3_textfontclass : '')+'">'+(o3_textfontclass ? '' : wrapStr(0,o3_textsize,'text'))+text+(o3_textfontclass ? '' : wrapStr(1,o3_textsize))+'</td><td width="'+o3_padxr+'"></td></tr><tr><td colspan="3" height="'+o3_padyb+'"></td></tr></table>'; } set_background(picture); return txt;}
if (!runHook("createPopup", FREPLACE, layerhtml)) return false;
if (!runHook("olCreatePopup", FREPLACE, layerhtml)) return false;
function olMain() { var layerhtml, styleType; runHook("olMain", FBEFORE); if (o3_background!="" || o3_fullhtml) { // Use background instead of box. layerhtml = runHook('ol_content_background', FALTERNATE, o3_css, o3_text, o3_background, o3_fullhtml); } else { // They want a popup box. styleType = (pms[o3_css-1-pmStart] == "cssoff" || pms[o3_css-1-pmStart] == "cssclass"); // Prepare popup background if (o3_fgbackground != "") o3_fgbackground = "background=\""+o3_fgbackground+"\""; if (o3_bgbackground != "") o3_bgbackground = (styleType ? "background=\""+o3_bgbackground+"\"" : o3_bgbackground); // Prepare popup colors if (o3_fgcolor != "") o3_fgcolor = (styleType ? "bgcolor=\""+o3_fgcolor+"\"" : o3_fgcolor); if (o3_bgcolor != "") o3_bgcolor = (styleType ? "bgcolor=\""+o3_bgcolor+"\"" : o3_bgcolor); // Prepare popup height if (o3_height > 0) o3_height = (styleType ? "height=\""+o3_height+"\"" : o3_height); else o3_height = ""; // Decide which kinda box. if (o3_cap=="") { // Plain layerhtml = runHook('ol_content_simple', FALTERNATE, o3_css, o3_text); } else { // With caption if (o3_sticky) { // Show close text layerhtml = runHook('ol_content_caption', FALTERNATE, o3_css, o3_text, o3_cap, o3_close); } else { // No close text layerhtml = runHook('ol_content_caption', FALTERNATE, o3_css, o3_text, o3_cap, ""); } } } // We want it to stick! if (o3_sticky) { if (o3_timerid > 0) { clearTimeout(o3_timerid); o3_timerid = 0; } o3_showingsticky = 1; o3_removecounter = 0; } // Created a separate routine to generate the popup to make it easier // to implement a plugin capability if (!runHook("createPopup", FREPLACE, layerhtml)) return false; // Prepare status bar if (o3_autostatus > 0) { o3_status = o3_text; if (o3_autostatus > 1) o3_status = o3_cap; } // When placing the layer the first time, even stickies may be moved. o3_allowmove = 0; // Initiate a timer for timeout if (o3_timeout > 0) { if (o3_timerid > 0) clearTimeout(o3_timerid); o3_timerid = setTimeout("cClick()", o3_timeout); } // Show layer runHook("disp", FREPLACE, o3_status); runHook("olMain", FAFTER); return (olOp && event && event.type == 'mouseover' && !o3_status) ? '' : (o3_status != '');}
cursor_ok();
function on_add(book){ myBooks.newRow(book); $("#my_table_body tr:first").css('background-color', '#D9FFCC'); if (!book_data['mybooks']) { book_data['mybooks'] = []; } book_data['mybooks'].push(book); book_data['own_count'] += 1; updateBookCount(book_data); $("#book_title").val(""); $("#book_author").val(""); $("#suggestbox").focus(); showOwnedTab();}
book_data['own_count'] += 1;
function on_add(book){ myBooks.newRow(book); $("#my_table_body tr:first").css('background-color', '#D9FFCC'); if (!book_data['mybooks']) { book_data['mybooks'] = []; } book_data['mybooks'].push(book); updateBookCount(book_data); $("#book_title").val(""); $("#book_author").val(""); $("#suggestbox").focus(); showOwnedTab();}
alert("oops. Action failed. Please retry");
if( xhr != null && (xhr.status === 400 || xhr.status === 412)) alert(xhr.responseText); else alert("oops. Action failed. Please retry");
function on_ajax_fail(xhr, desc, exceptionobj){ alert("oops. Action failed. Please retry");}
cursor_ok();
function on_ajax_fail(xhr, desc, exceptionobj){ if( xhr != null && (xhr.status === 400 || xhr.status === 412)) alert(xhr.responseText); else alert("oops. Action failed. Please retry");}
updateSharingGroupCheckboxes(getActiveGroup());
var groupId = getActiveGroup(); if(groupId){ updateSharingGroupCheckboxes(); }
onActivate: function (dtnode) { var title = dtnode.data.title; var key = dtnode.data.key; updateCollectionPaths(title, key); showHideCollectionWriteableControls(); showHideCollectionOwnerControls(); updateSharingGroupCheckboxes(getActiveGroup()); updateSharingOtherCheckboxes();// form.submit(); }
updateSharingGroupCheckboxes();
updateSharingGroupCheckboxes(groupId);
onActivate: function (dtnode) { var title = dtnode.data.title; var key = dtnode.data.key; updateCollectionPaths(title, key); showHideCollectionWriteableControls(); showHideCollectionOwnerControls(); var groupId = getActiveGroup(); if(groupId){ updateSharingGroupCheckboxes(); } updateSharingOtherCheckboxes();// form.submit(); }
jQuery.tabbedview.param('initialize', 1)
jQuery.tabbedview.param('initialize', 1);
onBeforeClick: function(e, index){ var tabbedview = jQuery.tabbedview; var current_tab_id = jq('.tabbedview-tabs li a').get(index).id; jQuery.tabbedview.param('initialize', 1) jQuery.tabbedview.spinner.show(); jQuery.tabbedview.selected_tab = index; jQuery.tabbedview.prop('view_name',current_tab_id); },
var current_tab_id = jq('.tabbedview-tabs li a').get(index).id;
var current_tab_id = jq('.tabbedview-tabs li a').get(index).id.split('tab-')[1];
onBeforeClick: function(e, index){ var tabbedview = jQuery.tabbedview; var current_tab_id = jq('.tabbedview-tabs li a').get(index).id; jQuery.tabbedview.param('initialize', 1); jQuery.tabbedview.spinner.show(); jQuery.tabbedview.selected_tab = index; var view_name = jQuery.tabbedview.prop('view_name'); jQuery.tabbedview.prop('old_view_name',view_name); jQuery.tabbedview.prop('view_name',current_tab_id); },
this.fireEvent('change', this); }
this.fireEvent('change', this); },
onChange: function () { this.fireEvent('change', this); }
tab.setActive(true);
if (tab.isActive()) { this.container.scrollIntoView(tab); } else { tab.setActive(true); }
onClick: function() { tab.setActive(true); }.bind(this)
onClick: function(){
onClick: function(e, index){
onClick: function(){ tabbedview.reload_view(); }
col.grid.resizeRowsCols("rows");
onComplete: function(el) { el.setStyle('left', null); //col.grid.resizeRowsCols("rows"); }
}})
}});
n2i.ani(this.element,'opacity',0,200,{onComplete:function() { self.element.setStyle({'display':'none'}); }})
col.grid.resizeRowsCols("rows");
onDrag: function(el) { var col = el.retrieve('col'); col.options.renderMode = 'fixed'; var w = el.getPosition(el.parentNode).x.toInt(); col.setWidth(w); col.grid.resizeRowsCols("rows"); },
col.grid.resizeRowsCols("rows");
onDrag: function(el) { var col = el.retrieve('col'); col.options.renderMode = 'fixed'; var w = el.getPosition(el.parentNode).x.toInt(); col.setWidth(w); },
var additionalParams = linkedDragEl.getAttribute('href') + '&defVals[tt_content][colPos]=' + colPos;
var additionalParams = linkedDragEl.getAttribute('href', 2) + '&defVals[tt_content][colPos]=' + colPos;
onDrop: function(dragSource, evt, data) { var linkedDragEl = Ext.get(dragSource.getEl()); var dropZoneEl = Ext.get(this.getEl()); if (linkedDragEl.hasClass('feEditAdvanced-contentTypeItem')) { // create a new record var previousContentElement = dropZoneEl.prev('.feEditAdvanced-allWrapper'); if (!previousContentElement) { // it is the first element in this list, was dropped onto feEditAdvanced-firstWrapper // so TCEmain needs a "moveAfter" with the correct colPos and the page (needs to be negative) var contentElementContainerId = dropZoneEl.prev('.feEditAdvanced-firstWrapper').id; // the ID looks like this: feEditAdvanced-firstWrapper-colPos-0-pages-13 var colPos = contentElementContainerId.substr(35, 1); var pageId = contentElementContainerId.substr(contentElementContainerId.indexOf('-pages-') + 7); var additionalParams = linkedDragEl.getAttribute('href') + '&defVals[tt_content][colPos]=' + colPos; additionalParams += '&TSFE_EDIT[record]=tt_content:NEW'; additionalParams += '&TSFE_EDIT[pid]=' + pageId; additionalParams += '&pid=' + pageId; var action = new TYPO3.FeEdit.NewRecordAction(); action.trigger(additionalParams, contentElementContainerId); } else { var editPanel = FrontendEditing.editPanels.get(previousContentElement.id); editPanel.create(linkedDragEl.getAttribute('href')); } } else if (linkedDragEl.hasClass('feEditAdvanced-allWrapper')) { // Move a record linkedDragEl.insertBefore(dropZoneEl); linkedDragEl.highlight({duration: 1}); var sourceEditPanel = FrontendEditing.editPanels.get(linkedDragEl.id); var previousContentElement = linkedDragEl.prev('.feEditAdvanced-allWrapper'); if (!previousContentElement) { // it is the first element in this list, was dropped onto feEditAdvanced-firstWrapper // so TCEmain needs a "moveAfter" with the correct colPos and the page (needs to be negative) var contentElementContainerId = linkedDragEl.prev('.feEditAdvanced-firstWrapper').id; // the ID looks like this: feEditAdvanced-firstWrapper-colPos-0-pages-13 var colPos = contentElementContainerId.substr(35, 1); var pageId = contentElementContainerId.substr(contentElementContainerId.indexOf('-pages-') + 7); // "-" and the page ID tells TCEmain to move it to the first position var moveAfter = '-' + pageId; // also if the item was dragged to a different colPos, this needs to be updated in the DB as well moveAfter += '&TSFE_EDIT[colPos]=' + colPos; } else { // just a basic: move one after the other, the colPos will be adapted automatically var destinationEditPanel = FrontendEditing.editPanels.get(previousContentElement.id); var recordFields = destinationEditPanel.record.split(':'); var moveAfter = recordFields[1]; } sourceEditPanel.moveAfter(moveAfter); } else if (linkedDragEl.hasClass('clipObj')) { srcElement = linkedDragEl.select('form input.feEditAdvanced-tsfeedit-input-record').first().getValue(); cmd = linkedDragEl.select('form input.feEditAdvanced-tsfeedit-input-cmd').first().getValue(); // do a clear of element on clipboard FrontendEditing.clipboard.clearClipboard(linkedDragEl); // if source is on this page, then move it if (srcElement) { // set source and destination source = FrontendEditing.editPanels.get(srcElement.id); destination = FrontendEditing.editPanels.get(dropZoneEl.prev().id); srcElement.setAttribute('style', ''); // do the actual cut/copy if (cmd == 'cut') { // move the element to where it is dropped source.paste(destination.getDestinationPointer()); srcElement.removeClass('doCut'); dropZoneEl.insertAfter(srcElement); //TODO: Ext? linkedDragEl.highlight({duration: 5}); // now trigger the cut action } else if (cmd == 'copy') { // display the element where it is dropped srcElement.removeClass('doCopy'); clonedElement = srcElement.cloneNode(true); dropZoneEl.insertAfter(clonedElement); newSource = FrontendEditing.editPanels.get(clonedElement.id); newSource.paste(destination.getDestinationPointer()); } } // if source is NOT on this page, then need to: // do everything except use "blank" source // } else { alert("hmm, doesn't look like we can handle this drag."); } FrontendEditing.deactivateDropZones(); },
editPanel.create(linkedDragEl.getAttribute('href'));
editPanel.create(linkedDragEl.getAttribute('href', 2));
onDrop: function(dragSource, evt, data) { var linkedDragEl = Ext.get(dragSource.getEl()); var dropZoneEl = Ext.get(this.getEl()); if (linkedDragEl.hasClass('feEditAdvanced-contentTypeItem')) { // create a new record var previousContentElement = dropZoneEl.prev('.feEditAdvanced-allWrapper'); if (!previousContentElement) { // it is the first element in this list, was dropped onto feEditAdvanced-firstWrapper // so TCEmain needs a "moveAfter" with the correct colPos and the page (needs to be negative) var contentElementContainerId = dropZoneEl.prev('.feEditAdvanced-firstWrapper').id; // the ID looks like this: feEditAdvanced-firstWrapper-colPos-0-pages-13 var colPos = contentElementContainerId.substr(35, 1); var pageId = contentElementContainerId.substr(contentElementContainerId.indexOf('-pages-') + 7); var additionalParams = linkedDragEl.getAttribute('href') + '&defVals[tt_content][colPos]=' + colPos; additionalParams += '&TSFE_EDIT[record]=tt_content:NEW'; additionalParams += '&TSFE_EDIT[pid]=' + pageId; additionalParams += '&pid=' + pageId; var action = new TYPO3.FeEdit.NewRecordAction(); action.trigger(additionalParams, contentElementContainerId); } else { var editPanel = FrontendEditing.editPanels.get(previousContentElement.id); editPanel.create(linkedDragEl.getAttribute('href')); } } else if (linkedDragEl.hasClass('feEditAdvanced-allWrapper')) { // Move a record linkedDragEl.insertBefore(dropZoneEl); linkedDragEl.highlight({duration: 1}); var sourceEditPanel = FrontendEditing.editPanels.get(linkedDragEl.id); var previousContentElement = linkedDragEl.prev('.feEditAdvanced-allWrapper'); if (!previousContentElement) { // it is the first element in this list, was dropped onto feEditAdvanced-firstWrapper // so TCEmain needs a "moveAfter" with the correct colPos and the page (needs to be negative) var contentElementContainerId = linkedDragEl.prev('.feEditAdvanced-firstWrapper').id; // the ID looks like this: feEditAdvanced-firstWrapper-colPos-0-pages-13 var colPos = contentElementContainerId.substr(35, 1); var pageId = contentElementContainerId.substr(contentElementContainerId.indexOf('-pages-') + 7); // "-" and the page ID tells TCEmain to move it to the first position var moveAfter = '-' + pageId; // also if the item was dragged to a different colPos, this needs to be updated in the DB as well moveAfter += '&TSFE_EDIT[colPos]=' + colPos; } else { // just a basic: move one after the other, the colPos will be adapted automatically var destinationEditPanel = FrontendEditing.editPanels.get(previousContentElement.id); var recordFields = destinationEditPanel.record.split(':'); var moveAfter = recordFields[1]; } sourceEditPanel.moveAfter(moveAfter); } else if (linkedDragEl.hasClass('clipObj')) { srcElement = linkedDragEl.select('form input.feEditAdvanced-tsfeedit-input-record').first().getValue(); cmd = linkedDragEl.select('form input.feEditAdvanced-tsfeedit-input-cmd').first().getValue(); // do a clear of element on clipboard FrontendEditing.clipboard.clearClipboard(linkedDragEl); // if source is on this page, then move it if (srcElement) { // set source and destination source = FrontendEditing.editPanels.get(srcElement.id); destination = FrontendEditing.editPanels.get(dropZoneEl.prev().id); srcElement.setAttribute('style', ''); // do the actual cut/copy if (cmd == 'cut') { // move the element to where it is dropped source.paste(destination.getDestinationPointer()); srcElement.removeClass('doCut'); dropZoneEl.insertAfter(srcElement); //TODO: Ext? linkedDragEl.highlight({duration: 5}); // now trigger the cut action } else if (cmd == 'copy') { // display the element where it is dropped srcElement.removeClass('doCopy'); clonedElement = srcElement.cloneNode(true); dropZoneEl.insertAfter(clonedElement); newSource = FrontendEditing.editPanels.get(clonedElement.id); newSource.paste(destination.getDestinationPointer()); } } // if source is NOT on this page, then need to: // do everything except use "blank" source // } else { alert("hmm, doesn't look like we can handle this drag."); } FrontendEditing.deactivateDropZones(); },
var additionalParams = linkedDragEl.getAttribute('href') + '&defVals[tt_content][colPos]=' + colPos;
var additionalParams = linkedDragEl.getAttribute('rel') + '&defVals[tt_content][colPos]=' + colPos;
onDrop: function(dragSource, evt, data) { var linkedDragEl = Ext.get(dragSource.getEl()); var dropZoneEl = Ext.get(this.getEl()); if (linkedDragEl.hasClass('feEditAdvanced-contentTypeItem')) { // create a new record var previousContentElement = dropZoneEl.prev('.feEditAdvanced-allWrapper'); if (!previousContentElement) { // it is the first element in this list, was dropped onto feEditAdvanced-firstWrapper // so TCEmain needs a "moveAfter" with the correct colPos and the page (needs to be negative) var contentElementContainerId = dropZoneEl.prev('.feEditAdvanced-firstWrapper').id; // the ID looks like this: feEditAdvanced-firstWrapper-colPos-0-pages-13 var colPos = contentElementContainerId.substr(35, 1); var pageId = contentElementContainerId.substr(contentElementContainerId.indexOf('-pages-') + 7); var additionalParams = linkedDragEl.getAttribute('href') + '&defVals[tt_content][colPos]=' + colPos; additionalParams += '&TSFE_EDIT[record]=tt_content:NEW'; additionalParams += '&TSFE_EDIT[pid]=' + pageId; additionalParams += '&pid=' + pageId; var action = new TYPO3.FeEdit.NewRecordAction(); action.trigger(additionalParams, contentElementContainerId); } else { var editPanel = FrontendEditing.editPanels.get(previousContentElement.id); editPanel.create(linkedDragEl.getAttribute('href')); } } else if (linkedDragEl.hasClass('feEditAdvanced-allWrapper')) { // Move a record linkedDragEl.insertBefore(dropZoneEl); linkedDragEl.highlight({duration: 1}); var sourceEditPanel = FrontendEditing.editPanels.get(linkedDragEl.id); var previousContentElement = linkedDragEl.prev('.feEditAdvanced-allWrapper'); if (!previousContentElement) { // it is the first element in this list, was dropped onto feEditAdvanced-firstWrapper // so TCEmain needs a "moveAfter" with the correct colPos and the page (needs to be negative) var contentElementContainerId = linkedDragEl.prev('.feEditAdvanced-firstWrapper').id; // the ID looks like this: feEditAdvanced-firstWrapper-colPos-0-pages-13 var colPos = contentElementContainerId.substr(35, 1); var pageId = contentElementContainerId.substr(contentElementContainerId.indexOf('-pages-') + 7); // "-" and the page ID tells TCEmain to move it to the first position var moveAfter = '-' + pageId; // also if the item was dragged to a different colPos, this needs to be updated in the DB as well moveAfter += '&TSFE_EDIT[colPos]=' + colPos; } else { // just a basic: move one after the other, the colPos will be adapted automatically var destinationEditPanel = FrontendEditing.editPanels.get(previousContentElement.id); var recordFields = destinationEditPanel.record.split(':'); var moveAfter = recordFields[1]; } sourceEditPanel.moveAfter(moveAfter); } else if (linkedDragEl.hasClass('clipObj')) { srcElement = linkedDragEl.select('form input.feEditAdvanced-tsfeedit-input-record').first().getValue(); cmd = linkedDragEl.select('form input.feEditAdvanced-tsfeedit-input-cmd').first().getValue(); // do a clear of element on clipboard FrontendEditing.clipboard.clearClipboard(linkedDragEl); // if source is on this page, then move it if (srcElement) { // set source and destination source = FrontendEditing.editPanels.get(srcElement.id); destination = FrontendEditing.editPanels.get(dropZoneEl.prev().id); srcElement.setAttribute('style', ''); // do the actual cut/copy if (cmd == 'cut') { // move the element to where it is dropped source.paste(destination.getDestinationPointer()); srcElement.removeClass('doCut'); dropZoneEl.insertAfter(srcElement); //TODO: Ext? linkedDragEl.highlight({duration: 5}); // now trigger the cut action } else if (cmd == 'copy') { // display the element where it is dropped srcElement.removeClass('doCopy'); clonedElement = srcElement.cloneNode(true); dropZoneEl.insertAfter(clonedElement); newSource = FrontendEditing.editPanels.get(clonedElement.id); newSource.paste(destination.getDestinationPointer()); } } // if source is NOT on this page, then need to: // do everything except use "blank" source // } else { alert("hmm, doesn't look like we can handle this drag."); } FrontendEditing.deactivateDropZones(); },
editPanel.create(linkedDragEl.getAttribute('href'));
editPanel.create(linkedDragEl.getAttribute('rel'));
onDrop: function(dragSource, evt, data) { var linkedDragEl = Ext.get(dragSource.getEl()); var dropZoneEl = Ext.get(this.getEl()); if (linkedDragEl.hasClass('feEditAdvanced-contentTypeItem')) { // create a new record var previousContentElement = dropZoneEl.prev('.feEditAdvanced-allWrapper'); if (!previousContentElement) { // it is the first element in this list, was dropped onto feEditAdvanced-firstWrapper // so TCEmain needs a "moveAfter" with the correct colPos and the page (needs to be negative) var contentElementContainerId = dropZoneEl.prev('.feEditAdvanced-firstWrapper').id; // the ID looks like this: feEditAdvanced-firstWrapper-colPos-0-pages-13 var colPos = contentElementContainerId.substr(35, 1); var pageId = contentElementContainerId.substr(contentElementContainerId.indexOf('-pages-') + 7); var additionalParams = linkedDragEl.getAttribute('href') + '&defVals[tt_content][colPos]=' + colPos; additionalParams += '&TSFE_EDIT[record]=tt_content:NEW'; additionalParams += '&TSFE_EDIT[pid]=' + pageId; additionalParams += '&pid=' + pageId; var action = new TYPO3.FeEdit.NewRecordAction(); action.trigger(additionalParams, contentElementContainerId); } else { var editPanel = FrontendEditing.editPanels.get(previousContentElement.id); editPanel.create(linkedDragEl.getAttribute('href')); } } else if (linkedDragEl.hasClass('feEditAdvanced-allWrapper')) { // Move a record linkedDragEl.insertBefore(dropZoneEl); linkedDragEl.highlight({duration: 1}); var sourceEditPanel = FrontendEditing.editPanels.get(linkedDragEl.id); var previousContentElement = linkedDragEl.prev('.feEditAdvanced-allWrapper'); if (!previousContentElement) { // it is the first element in this list, was dropped onto feEditAdvanced-firstWrapper // so TCEmain needs a "moveAfter" with the correct colPos and the page (needs to be negative) var contentElementContainerId = linkedDragEl.prev('.feEditAdvanced-firstWrapper').id; // the ID looks like this: feEditAdvanced-firstWrapper-colPos-0-pages-13 var colPos = contentElementContainerId.substr(35, 1); var pageId = contentElementContainerId.substr(contentElementContainerId.indexOf('-pages-') + 7); // "-" and the page ID tells TCEmain to move it to the first position var moveAfter = '-' + pageId; // also if the item was dragged to a different colPos, this needs to be updated in the DB as well moveAfter += '&TSFE_EDIT[colPos]=' + colPos; } else { // just a basic: move one after the other, the colPos will be adapted automatically var destinationEditPanel = FrontendEditing.editPanels.get(previousContentElement.id); var recordFields = destinationEditPanel.record.split(':'); var moveAfter = recordFields[1]; } sourceEditPanel.moveAfter(moveAfter); } else if (linkedDragEl.hasClass('clipObj')) { srcElement = linkedDragEl.select('form input.feEditAdvanced-tsfeedit-input-record').first().getValue(); cmd = linkedDragEl.select('form input.feEditAdvanced-tsfeedit-input-cmd').first().getValue(); // do a clear of element on clipboard FrontendEditing.clipboard.clearClipboard(linkedDragEl); // if source is on this page, then move it if (srcElement) { // set source and destination source = FrontendEditing.editPanels.get(srcElement.id); destination = FrontendEditing.editPanels.get(dropZoneEl.prev().id); srcElement.setAttribute('style', ''); // do the actual cut/copy if (cmd == 'cut') { // move the element to where it is dropped source.paste(destination.getDestinationPointer()); srcElement.removeClass('doCut'); dropZoneEl.insertAfter(srcElement); //TODO: Ext? linkedDragEl.highlight({duration: 5}); // now trigger the cut action } else if (cmd == 'copy') { // display the element where it is dropped srcElement.removeClass('doCopy'); clonedElement = srcElement.cloneNode(true); dropZoneEl.insertAfter(clonedElement); newSource = FrontendEditing.editPanels.get(clonedElement.id); newSource.paste(destination.getDestinationPointer()); } } // if source is NOT on this page, then need to: // do everything except use "blank" source // } else { alert("hmm, doesn't look like we can handle this drag."); } FrontendEditing.deactivateDropZones(); },
var additionalParams = linkedDragEl.getAttribute('href', 2);
var additionalParams = linkedDragEl.getAttribute('href');
onDrop: function(dragSource, evt, data) { var linkedDragEl = Ext.get(dragSource.getEl()); var dropZoneEl = Ext.get(this.getEl()); if (linkedDragEl.hasClass('feEditAdvanced-contentTypeItem')) { // create a new record var previousContentElement = dropZoneEl.prev('.feEditAdvanced-allWrapper'); if (!previousContentElement) { // it is the first element in this list, was dropped onto feEditAdvanced-firstWrapper // so TCEforms needs a "moveAfter" with the correct colPos and the page (needs to be negative) var contentElementContainerId = dropZoneEl.prev('.feEditAdvanced-firstWrapper').id; // the ID looks like this: feEditAdvanced-firstWrapper-pages-13 var pageId = contentElementContainerId.substr(contentElementContainerId.indexOf('-pages-') + 7); var destinationPointer = Ext.get(contentElementContainerId).next('input.feEditAdvanced-flexformPointers').getAttribute('title') + ':0'; var additionalParams = linkedDragEl.getAttribute('href', 2); additionalParams += '&TSFE_EDIT[record]=tt_content:NEW'; additionalParams += '&TSFE_EDIT[pid]=' + pageId; // @todo Destination pointer not currently accounted for when saving. additionalParams += '&TSFE_EDIT[destinationPointer]=' + destinationPointer; additionalParams += '&pid=' + pageId; var action = new TYPO3.FeEdit.NewRecordAction(); action.trigger(additionalParams, contentElementContainerId); } else { var editPanel = FrontendEditing.editPanels.get(previousContentElement.id); editPanel.create(linkedDragEl.getAttribute('href', 2)); } } else if (linkedDragEl.hasClass('feEditAdvanced-allWrapper')) { // Move a record linkedDragEl.insertBefore(dropZoneEl); linkedDragEl.highlight({duration: 1}); var sourceEditPanel = FrontendEditing.editPanels.get(linkedDragEl.id); var previousContentElement = linkedDragEl.prev('.feEditAdvanced-allWrapper'); if (!previousContentElement) { // it is the first element in this list, was dropped onto feEditAdvanced-firstWrapper destinationPointer = sourceEditPanel.el.next('input.feEditAdvanced-flexformPointers').getAttribute('title') + ':0'; } else { // just a basic: move one after the other var destinationEditPanel = FrontendEditing.editPanels.get(previousContentElement.id); destinationPointer = destinationEditPanel.getDestinationPointer(); } sourceEditPanel.moveAfter(destinationPointer); } else if (linkedDragEl.hasClass('clipObj')) { // clipboard action srcElement = linkedDragEl.select('form input.feEditAdvanced-tsfeedit-input-record').first().getValue(); cmd = linkedDragEl.select('form input.feEditAdvanced-tsfeedit-input-cmd').first().getValue(); // do a clear of element on clipboard feClipboard.clearClipboard(linkedDragEl); // if source is on this page, then move it if (srcElement) { // set source and destination source = FrontendEditing.editPanels.get(srcElement.id); destination = FrontendEditing.editPanels.get(dropZoneEl.prev().id); srcElement.removeAttribute('style'); // do the actual cut/copy if (cmd == 'cut') { // move the element to where it is dropped source.paste(destination.getDestinationPointer()); srcElement.removeClass('doCut'); dropZoneEl.insertAfter(srcElement); // TODO: draggableElement.highlight({duration: 5}); // now trigger the cut action } else if (cmd == 'copy') { // display the element where it is dropped srcElement.removeClass('doCopy'); clonedElement = srcElement.cloneNode(true); dropZoneEl.insertAfter(clonedElement); newSource = FrontendEditing.editPanels.get(clonedElement.id); newSource.paste(destination.getDestinationPointer()); } } // if source is NOT on this page, then need to: // do everything except use "blank" source // } else { alert("hmm, doesn't look like we can handle this drag. - TV"); } FrontendEditing.deactivateDropZones(); }
editPanel.create(linkedDragEl.getAttribute('href', 2));
editPanel.create(linkedDragEl.getAttribute('href'));
onDrop: function(dragSource, evt, data) { var linkedDragEl = Ext.get(dragSource.getEl()); var dropZoneEl = Ext.get(this.getEl()); if (linkedDragEl.hasClass('feEditAdvanced-contentTypeItem')) { // create a new record var previousContentElement = dropZoneEl.prev('.feEditAdvanced-allWrapper'); if (!previousContentElement) { // it is the first element in this list, was dropped onto feEditAdvanced-firstWrapper // so TCEforms needs a "moveAfter" with the correct colPos and the page (needs to be negative) var contentElementContainerId = dropZoneEl.prev('.feEditAdvanced-firstWrapper').id; // the ID looks like this: feEditAdvanced-firstWrapper-pages-13 var pageId = contentElementContainerId.substr(contentElementContainerId.indexOf('-pages-') + 7); var destinationPointer = Ext.get(contentElementContainerId).next('input.feEditAdvanced-flexformPointers').getAttribute('title') + ':0'; var additionalParams = linkedDragEl.getAttribute('href', 2); additionalParams += '&TSFE_EDIT[record]=tt_content:NEW'; additionalParams += '&TSFE_EDIT[pid]=' + pageId; // @todo Destination pointer not currently accounted for when saving. additionalParams += '&TSFE_EDIT[destinationPointer]=' + destinationPointer; additionalParams += '&pid=' + pageId; var action = new TYPO3.FeEdit.NewRecordAction(); action.trigger(additionalParams, contentElementContainerId); } else { var editPanel = FrontendEditing.editPanels.get(previousContentElement.id); editPanel.create(linkedDragEl.getAttribute('href', 2)); } } else if (linkedDragEl.hasClass('feEditAdvanced-allWrapper')) { // Move a record linkedDragEl.insertBefore(dropZoneEl); linkedDragEl.highlight({duration: 1}); var sourceEditPanel = FrontendEditing.editPanels.get(linkedDragEl.id); var previousContentElement = linkedDragEl.prev('.feEditAdvanced-allWrapper'); if (!previousContentElement) { // it is the first element in this list, was dropped onto feEditAdvanced-firstWrapper destinationPointer = sourceEditPanel.el.next('input.feEditAdvanced-flexformPointers').getAttribute('title') + ':0'; } else { // just a basic: move one after the other var destinationEditPanel = FrontendEditing.editPanels.get(previousContentElement.id); destinationPointer = destinationEditPanel.getDestinationPointer(); } sourceEditPanel.moveAfter(destinationPointer); } else if (linkedDragEl.hasClass('clipObj')) { // clipboard action srcElement = linkedDragEl.select('form input.feEditAdvanced-tsfeedit-input-record').first().getValue(); cmd = linkedDragEl.select('form input.feEditAdvanced-tsfeedit-input-cmd').first().getValue(); // do a clear of element on clipboard feClipboard.clearClipboard(linkedDragEl); // if source is on this page, then move it if (srcElement) { // set source and destination source = FrontendEditing.editPanels.get(srcElement.id); destination = FrontendEditing.editPanels.get(dropZoneEl.prev().id); srcElement.removeAttribute('style'); // do the actual cut/copy if (cmd == 'cut') { // move the element to where it is dropped source.paste(destination.getDestinationPointer()); srcElement.removeClass('doCut'); dropZoneEl.insertAfter(srcElement); // TODO: draggableElement.highlight({duration: 5}); // now trigger the cut action } else if (cmd == 'copy') { // display the element where it is dropped srcElement.removeClass('doCopy'); clonedElement = srcElement.cloneNode(true); dropZoneEl.insertAfter(clonedElement); newSource = FrontendEditing.editPanels.get(clonedElement.id); newSource.paste(destination.getDestinationPointer()); } } // if source is NOT on this page, then need to: // do everything except use "blank" source // } else { alert("hmm, doesn't look like we can handle this drag. - TV"); } FrontendEditing.deactivateDropZones(); }
moveAfter += '&TSFE_EDIT[colPos]=' + colPos;
onDrop: function(dragSource, evt, data) { var linkedDragEl = Ext.get(dragSource.getEl()); var dropZoneEl = Ext.get(this.getEl()); if (linkedDragEl.hasClass('feEditAdvanced-contentTypeItem')) { // create a new record var previousContentElement = dropZoneEl.prev('.feEditAdvanced-allWrapper'); if (!previousContentElement) { // it is the first element in this list, was dropped onto feEditAdvanced-firstWrapper // so TCEforms needs a "moveAfter" with the correct colPos and the page (needs to be negative) var contentElementContainerId = dropZoneEl.prev('.feEditAdvanced-firstWrapper').id; // the ID looks like this: feEditAdvanced-firstWrapper-colPos-0-pages-13 var colPos = contentElementContainerId.substr(35, 1); var pageId = contentElementContainerId.substr(contentElementContainerId.indexOf('-pages-') + 7); var additionalParams = linkedDragEl.getAttribute('href') + '&defVals[tt_content][colPos]=' + colPos; additionalParams += '&TSFE_EDIT[record]=tt_content:NEW'; additionalParams += '&TSFE_EDIT[pid]=' + pageId; additionalParams += '&pid=' + pageId; var action = new TYPO3.FeEdit.NewRecordAction(); action.trigger(additionalParams, contentElementContainerId); } else { var editPanel = FrontendEditing.editPanels.get(previousContentElement.id); editPanel.create(linkedDragEl.getAttribute('href')); } } else if (linkedDragEl.hasClass('feEditAdvanced-allWrapper')) { // Move a record linkedDragEl.insertBefore(dropZoneEl); linkedDragEl.highlight({duration: 1}); var sourceEditPanel = FrontendEditing.editPanels.get(linkedDragEl.id); var previousContentElement = linkedDragEl.prev('.feEditAdvanced-allWrapper'); if (!previousContentElement) { // it is the first element in this list, was dropped onto feEditAdvanced-firstWrapper // so TCEforms needs a "moveAfter" with the correct colPos and the page (needs to be negative) var contentElementContainerId = linkedDragEl.prev('.feEditAdvanced-firstWrapper').id; // the ID looks like this: feEditAdvanced-firstWrapper-colPos-0-pages-13 var colPos = contentElementContainerId.substr(35, 1); var pageId = contentElementContainerId.substr(contentElementContainerId.indexOf('-pages-') + 7); var moveAfter = '-' + pageId; // @TODO: moving for a specific colPos does not work, probably needs an // additional call "doUpdate" or "doSave" with the UID of the sourceEditPanel and the colPos } else { // just a basic: move one after the other var destinationEditPanel = FrontendEditing.editPanels.get(previousContentElement.id); var recordFields = destinationEditPanel.record.split(':'); var moveAfter = recordFields[1]; } sourceEditPanel.moveAfter(moveAfter); } else if (linkedDragEl.hasClass('clipObj')) { srcElement = linkedDragEl.select('form input.feEditAdvanced-tsfeedit-input-record').first().getValue(); cmd = linkedDragEl.select('form input.feEditAdvanced-tsfeedit-input-cmd').first().getValue(); // do a clear of element on clipboard FrontendEditing.clipboard.clearClipboard(linkedDragEl); // if source is on this page, then move it if (srcElement) { // set source and destination source = FrontendEditing.editPanels.get(srcElement.id); destination = FrontendEditing.editPanels.get(dropZoneEl.prev().id); srcElement.setAttribute('style', ''); // do the actual cut/copy if (cmd == 'cut') { // move the element to where it is dropped source.paste(destination.getDestinationPointer()); srcElement.removeClass('doCut'); dropZoneEl.insertAfter(srcElement); //TODO: Ext? linkedDragEl.highlight({duration: 5}); // now trigger the cut action } else if (cmd == 'copy') { // display the element where it is dropped srcElement.removeClass('doCopy'); clonedElement = srcElement.cloneNode(true); dropZoneEl.insertAfter(clonedElement); newSource = FrontendEditing.editPanels.get(clonedElement.id); newSource.paste(destination.getDestinationPointer()); } } // if source is NOT on this page, then need to: // do everything except use "blank" source // } else { alert("hmm, doesn't look like we can handle this drag."); } FrontendEditing.deactivateDropZones(); },
var additionalParams = linkedDragEl.getAttribute('href');
var additionalParams = linkedDragEl.getAttribute('href', 2);
onDrop: function(dragSource, evt, data) { var linkedDragEl = Ext.get(dragSource.getEl()); var dropZoneEl = Ext.get(this.getEl()); if (linkedDragEl.hasClass('feEditAdvanced-contentTypeItem')) { // create a new record var previousContentElement = dropZoneEl.prev('.feEditAdvanced-allWrapper'); if (!previousContentElement) { // it is the first element in this list, was dropped onto feEditAdvanced-firstWrapper // so TCEforms needs a "moveAfter" with the correct colPos and the page (needs to be negative) var contentElementContainerId = dropZoneEl.prev('.feEditAdvanced-firstWrapper').id; // the ID looks like this: feEditAdvanced-firstWrapper-pages-13 var pageId = contentElementContainerId.substr(contentElementContainerId.indexOf('-pages-') + 7); var destinationPointer = Ext.get(contentElementContainerId).next('input.feEditAdvanced-flexformPointers').getAttribute('title') + ':0'; var additionalParams = linkedDragEl.getAttribute('href'); additionalParams += '&TSFE_EDIT[record]=tt_content:NEW'; additionalParams += '&TSFE_EDIT[pid]=' + pageId; // @todo Destination pointer not currently accounted for when saving. additionalParams += '&TSFE_EDIT[destinationPointer]=' + destinationPointer; additionalParams += '&pid=' + pageId; var action = new TYPO3.FeEdit.NewRecordAction(); action.trigger(additionalParams, contentElementContainerId); } else { var editPanel = FrontendEditing.editPanels.get(previousContentElement.id); editPanel.create(linkedDragEl.getAttribute('href')); } } else if (linkedDragEl.hasClass('feEditAdvanced-allWrapper')) { // Move a record linkedDragEl.insertBefore(dropZoneEl); linkedDragEl.highlight({duration: 1}); var sourceEditPanel = FrontendEditing.editPanels.get(linkedDragEl.id); var previousContentElement = linkedDragEl.prev('.feEditAdvanced-allWrapper'); if (!previousContentElement) { // it is the first element in this list, was dropped onto feEditAdvanced-firstWrapper destinationPointer = sourceEditPanel.el.next('input.feEditAdvanced-flexformPointers').getAttribute('title') + ':0'; } else { // just a basic: move one after the other var destinationEditPanel = FrontendEditing.editPanels.get(previousContentElement.id); destinationPointer = destinationEditPanel.getDestinationPointer(); } sourceEditPanel.moveAfter(destinationPointer); } else if (linkedDragEl.hasClass('clipObj')) { // clipboard action srcElement = linkedDragEl.select('form input.feEditAdvanced-tsfeedit-input-record').first().getValue(); cmd = linkedDragEl.select('form input.feEditAdvanced-tsfeedit-input-cmd').first().getValue(); // do a clear of element on clipboard feClipboard.clearClipboard(linkedDragEl); // if source is on this page, then move it if (srcElement) { // set source and destination source = FrontendEditing.editPanels.get(srcElement.id); destination = FrontendEditing.editPanels.get(dropZoneEl.prev().id); srcElement.removeAttribute('style'); // do the actual cut/copy if (cmd == 'cut') { // move the element to where it is dropped source.paste(destination.getDestinationPointer()); srcElement.removeClass('doCut'); dropZoneEl.insertAfter(srcElement); // TODO: draggableElement.highlight({duration: 5}); // now trigger the cut action } else if (cmd == 'copy') { // display the element where it is dropped srcElement.removeClass('doCopy'); clonedElement = srcElement.cloneNode(true); dropZoneEl.insertAfter(clonedElement); newSource = FrontendEditing.editPanels.get(clonedElement.id); newSource.paste(destination.getDestinationPointer()); } } // if source is NOT on this page, then need to: // do everything except use "blank" source // } else { alert("hmm, doesn't look like we can handle this drag. - TV"); } FrontendEditing.deactivateDropZones(); }
editPanel.create(linkedDragEl.getAttribute('href'));
editPanel.create(linkedDragEl.getAttribute('href', 2));
onDrop: function(dragSource, evt, data) { var linkedDragEl = Ext.get(dragSource.getEl()); var dropZoneEl = Ext.get(this.getEl()); if (linkedDragEl.hasClass('feEditAdvanced-contentTypeItem')) { // create a new record var previousContentElement = dropZoneEl.prev('.feEditAdvanced-allWrapper'); if (!previousContentElement) { // it is the first element in this list, was dropped onto feEditAdvanced-firstWrapper // so TCEforms needs a "moveAfter" with the correct colPos and the page (needs to be negative) var contentElementContainerId = dropZoneEl.prev('.feEditAdvanced-firstWrapper').id; // the ID looks like this: feEditAdvanced-firstWrapper-pages-13 var pageId = contentElementContainerId.substr(contentElementContainerId.indexOf('-pages-') + 7); var destinationPointer = Ext.get(contentElementContainerId).next('input.feEditAdvanced-flexformPointers').getAttribute('title') + ':0'; var additionalParams = linkedDragEl.getAttribute('href'); additionalParams += '&TSFE_EDIT[record]=tt_content:NEW'; additionalParams += '&TSFE_EDIT[pid]=' + pageId; // @todo Destination pointer not currently accounted for when saving. additionalParams += '&TSFE_EDIT[destinationPointer]=' + destinationPointer; additionalParams += '&pid=' + pageId; var action = new TYPO3.FeEdit.NewRecordAction(); action.trigger(additionalParams, contentElementContainerId); } else { var editPanel = FrontendEditing.editPanels.get(previousContentElement.id); editPanel.create(linkedDragEl.getAttribute('href')); } } else if (linkedDragEl.hasClass('feEditAdvanced-allWrapper')) { // Move a record linkedDragEl.insertBefore(dropZoneEl); linkedDragEl.highlight({duration: 1}); var sourceEditPanel = FrontendEditing.editPanels.get(linkedDragEl.id); var previousContentElement = linkedDragEl.prev('.feEditAdvanced-allWrapper'); if (!previousContentElement) { // it is the first element in this list, was dropped onto feEditAdvanced-firstWrapper destinationPointer = sourceEditPanel.el.next('input.feEditAdvanced-flexformPointers').getAttribute('title') + ':0'; } else { // just a basic: move one after the other var destinationEditPanel = FrontendEditing.editPanels.get(previousContentElement.id); destinationPointer = destinationEditPanel.getDestinationPointer(); } sourceEditPanel.moveAfter(destinationPointer); } else if (linkedDragEl.hasClass('clipObj')) { // clipboard action srcElement = linkedDragEl.select('form input.feEditAdvanced-tsfeedit-input-record').first().getValue(); cmd = linkedDragEl.select('form input.feEditAdvanced-tsfeedit-input-cmd').first().getValue(); // do a clear of element on clipboard feClipboard.clearClipboard(linkedDragEl); // if source is on this page, then move it if (srcElement) { // set source and destination source = FrontendEditing.editPanels.get(srcElement.id); destination = FrontendEditing.editPanels.get(dropZoneEl.prev().id); srcElement.removeAttribute('style'); // do the actual cut/copy if (cmd == 'cut') { // move the element to where it is dropped source.paste(destination.getDestinationPointer()); srcElement.removeClass('doCut'); dropZoneEl.insertAfter(srcElement); // TODO: draggableElement.highlight({duration: 5}); // now trigger the cut action } else if (cmd == 'copy') { // display the element where it is dropped srcElement.removeClass('doCopy'); clonedElement = srcElement.cloneNode(true); dropZoneEl.insertAfter(clonedElement); newSource = FrontendEditing.editPanels.get(clonedElement.id); newSource.paste(destination.getDestinationPointer()); } } // if source is NOT on this page, then need to: // do everything except use "blank" source // } else { alert("hmm, doesn't look like we can handle this drag. - TV"); } FrontendEditing.deactivateDropZones(); }
var additionalParams = linkedDragEl.getAttribute('href', 2) + '&defVals[tt_content][colPos]=' + colPos;
var additionalParams = linkedDragEl.getAttribute('href') + '&defVals[tt_content][colPos]=' + colPos;
onDrop: function(dragSource, evt, data) { var linkedDragEl = Ext.get(dragSource.getEl()); var dropZoneEl = Ext.get(this.getEl()); if (linkedDragEl.hasClass('feEditAdvanced-contentTypeItem')) { // create a new record var previousContentElement = dropZoneEl.prev('.feEditAdvanced-allWrapper'); if (!previousContentElement) { // it is the first element in this list, was dropped onto feEditAdvanced-firstWrapper // so TCEmain needs a "moveAfter" with the correct colPos and the page (needs to be negative) var contentElementContainerId = dropZoneEl.prev('.feEditAdvanced-firstWrapper').id; // the ID looks like this: feEditAdvanced-firstWrapper-colPos-0-pages-13 var colPos = contentElementContainerId.substr(35, 1); var pageId = contentElementContainerId.substr(contentElementContainerId.indexOf('-pages-') + 7); var additionalParams = linkedDragEl.getAttribute('href', 2) + '&defVals[tt_content][colPos]=' + colPos; additionalParams += '&TSFE_EDIT[record]=tt_content:NEW'; additionalParams += '&TSFE_EDIT[pid]=' + pageId; additionalParams += '&pid=' + pageId; var action = new TYPO3.FeEdit.NewRecordAction(); action.trigger(additionalParams, contentElementContainerId); } else { var editPanel = FrontendEditing.editPanels.get(previousContentElement.id); editPanel.create(linkedDragEl.getAttribute('href', 2)); } } else if (linkedDragEl.hasClass('feEditAdvanced-allWrapper')) { // Move a record linkedDragEl.insertBefore(dropZoneEl); linkedDragEl.highlight({duration: 1}); var sourceEditPanel = FrontendEditing.editPanels.get(linkedDragEl.id); var previousContentElement = linkedDragEl.prev('.feEditAdvanced-allWrapper'); if (!previousContentElement) { // it is the first element in this list, was dropped onto feEditAdvanced-firstWrapper // so TCEmain needs a "moveAfter" with the correct colPos and the page (needs to be negative) var contentElementContainerId = linkedDragEl.prev('.feEditAdvanced-firstWrapper').id; // the ID looks like this: feEditAdvanced-firstWrapper-colPos-0-pages-13 var colPos = contentElementContainerId.substr(35, 1); var pageId = contentElementContainerId.substr(contentElementContainerId.indexOf('-pages-') + 7); // "-" and the page ID tells TCEmain to move it to the first position var moveAfter = '-' + pageId; // also if the item was dragged to a different colPos, this needs to be updated in the DB as well moveAfter += '&TSFE_EDIT[colPos]=' + colPos; } else { // just a basic: move one after the other, the colPos will be adapted automatically var destinationEditPanel = FrontendEditing.editPanels.get(previousContentElement.id); var recordFields = destinationEditPanel.record.split(':'); var moveAfter = recordFields[1]; } sourceEditPanel.moveAfter(moveAfter); } else if (linkedDragEl.hasClass('clipObj')) { srcElement = linkedDragEl.select('form input.feEditAdvanced-tsfeedit-input-record').first().getValue(); cmd = linkedDragEl.select('form input.feEditAdvanced-tsfeedit-input-cmd').first().getValue(); // do a clear of element on clipboard FrontendEditing.clipboard.clearClipboard(linkedDragEl); // if source is on this page, then move it if (srcElement) { // set source and destination source = FrontendEditing.editPanels.get(srcElement.id); destination = FrontendEditing.editPanels.get(dropZoneEl.prev().id); srcElement.setAttribute('style', ''); // do the actual cut/copy if (cmd == 'cut') { // move the element to where it is dropped source.paste(destination.getDestinationPointer()); srcElement.removeClass('doCut'); dropZoneEl.insertAfter(srcElement); //TODO: Ext? linkedDragEl.highlight({duration: 5}); // now trigger the cut action } else if (cmd == 'copy') { // display the element where it is dropped srcElement.removeClass('doCopy'); clonedElement = srcElement.cloneNode(true); dropZoneEl.insertAfter(clonedElement); newSource = FrontendEditing.editPanels.get(clonedElement.id); newSource.paste(destination.getDestinationPointer()); } } // if source is NOT on this page, then need to: // do everything except use "blank" source // } else { alert("hmm, doesn't look like we can handle this drag."); } FrontendEditing.deactivateDropZones(); },
editPanel.create(linkedDragEl.getAttribute('href', 2));
editPanel.create(linkedDragEl.getAttribute('href'));
onDrop: function(dragSource, evt, data) { var linkedDragEl = Ext.get(dragSource.getEl()); var dropZoneEl = Ext.get(this.getEl()); if (linkedDragEl.hasClass('feEditAdvanced-contentTypeItem')) { // create a new record var previousContentElement = dropZoneEl.prev('.feEditAdvanced-allWrapper'); if (!previousContentElement) { // it is the first element in this list, was dropped onto feEditAdvanced-firstWrapper // so TCEmain needs a "moveAfter" with the correct colPos and the page (needs to be negative) var contentElementContainerId = dropZoneEl.prev('.feEditAdvanced-firstWrapper').id; // the ID looks like this: feEditAdvanced-firstWrapper-colPos-0-pages-13 var colPos = contentElementContainerId.substr(35, 1); var pageId = contentElementContainerId.substr(contentElementContainerId.indexOf('-pages-') + 7); var additionalParams = linkedDragEl.getAttribute('href', 2) + '&defVals[tt_content][colPos]=' + colPos; additionalParams += '&TSFE_EDIT[record]=tt_content:NEW'; additionalParams += '&TSFE_EDIT[pid]=' + pageId; additionalParams += '&pid=' + pageId; var action = new TYPO3.FeEdit.NewRecordAction(); action.trigger(additionalParams, contentElementContainerId); } else { var editPanel = FrontendEditing.editPanels.get(previousContentElement.id); editPanel.create(linkedDragEl.getAttribute('href', 2)); } } else if (linkedDragEl.hasClass('feEditAdvanced-allWrapper')) { // Move a record linkedDragEl.insertBefore(dropZoneEl); linkedDragEl.highlight({duration: 1}); var sourceEditPanel = FrontendEditing.editPanels.get(linkedDragEl.id); var previousContentElement = linkedDragEl.prev('.feEditAdvanced-allWrapper'); if (!previousContentElement) { // it is the first element in this list, was dropped onto feEditAdvanced-firstWrapper // so TCEmain needs a "moveAfter" with the correct colPos and the page (needs to be negative) var contentElementContainerId = linkedDragEl.prev('.feEditAdvanced-firstWrapper').id; // the ID looks like this: feEditAdvanced-firstWrapper-colPos-0-pages-13 var colPos = contentElementContainerId.substr(35, 1); var pageId = contentElementContainerId.substr(contentElementContainerId.indexOf('-pages-') + 7); // "-" and the page ID tells TCEmain to move it to the first position var moveAfter = '-' + pageId; // also if the item was dragged to a different colPos, this needs to be updated in the DB as well moveAfter += '&TSFE_EDIT[colPos]=' + colPos; } else { // just a basic: move one after the other, the colPos will be adapted automatically var destinationEditPanel = FrontendEditing.editPanels.get(previousContentElement.id); var recordFields = destinationEditPanel.record.split(':'); var moveAfter = recordFields[1]; } sourceEditPanel.moveAfter(moveAfter); } else if (linkedDragEl.hasClass('clipObj')) { srcElement = linkedDragEl.select('form input.feEditAdvanced-tsfeedit-input-record').first().getValue(); cmd = linkedDragEl.select('form input.feEditAdvanced-tsfeedit-input-cmd').first().getValue(); // do a clear of element on clipboard FrontendEditing.clipboard.clearClipboard(linkedDragEl); // if source is on this page, then move it if (srcElement) { // set source and destination source = FrontendEditing.editPanels.get(srcElement.id); destination = FrontendEditing.editPanels.get(dropZoneEl.prev().id); srcElement.setAttribute('style', ''); // do the actual cut/copy if (cmd == 'cut') { // move the element to where it is dropped source.paste(destination.getDestinationPointer()); srcElement.removeClass('doCut'); dropZoneEl.insertAfter(srcElement); //TODO: Ext? linkedDragEl.highlight({duration: 5}); // now trigger the cut action } else if (cmd == 'copy') { // display the element where it is dropped srcElement.removeClass('doCopy'); clonedElement = srcElement.cloneNode(true); dropZoneEl.insertAfter(clonedElement); newSource = FrontendEditing.editPanels.get(clonedElement.id); newSource.paste(destination.getDestinationPointer()); } } // if source is NOT on this page, then need to: // do everything except use "blank" source // } else { alert("hmm, doesn't look like we can handle this drag."); } FrontendEditing.deactivateDropZones(); },
var additionalParams = linkedDragEl.getAttribute('href');
var additionalParams = linkedDragEl.getAttribute('rel');
onDrop: function(dragSource, evt, data) { var linkedDragEl = Ext.get(dragSource.getEl()); var dropZoneEl = Ext.get(this.getEl()); if (linkedDragEl.hasClass('feEditAdvanced-contentTypeItem')) { // create a new record var previousContentElement = dropZoneEl.prev('.feEditAdvanced-allWrapper'); if (!previousContentElement) { // it is the first element in this list, was dropped onto feEditAdvanced-firstWrapper // so TCEforms needs a "moveAfter" with the correct colPos and the page (needs to be negative) var contentElementContainerId = dropZoneEl.prev('.feEditAdvanced-firstWrapper').id; // the ID looks like this: feEditAdvanced-firstWrapper-pages-13 var pageId = contentElementContainerId.substr(contentElementContainerId.indexOf('-pages-') + 7); var destinationPointer = Ext.get(contentElementContainerId).next('input.feEditAdvanced-flexformPointers').getAttribute('title') + ':0'; var additionalParams = linkedDragEl.getAttribute('href'); additionalParams += '&TSFE_EDIT[record]=tt_content:NEW'; additionalParams += '&TSFE_EDIT[pid]=' + pageId; // @todo Destination pointer not currently accounted for when saving. additionalParams += '&TSFE_EDIT[destinationPointer]=' + destinationPointer; additionalParams += '&pid=' + pageId; var action = new TYPO3.FeEdit.NewRecordAction(); action.trigger(additionalParams, contentElementContainerId); } else { var editPanel = FrontendEditing.editPanels.get(previousContentElement.id); editPanel.create(linkedDragEl.getAttribute('href')); } } else if (linkedDragEl.hasClass('feEditAdvanced-allWrapper')) { // Move a record linkedDragEl.insertBefore(dropZoneEl); linkedDragEl.highlight({duration: 1}); var sourceEditPanel = FrontendEditing.editPanels.get(linkedDragEl.id); var previousContentElement = linkedDragEl.prev('.feEditAdvanced-allWrapper'); if (!previousContentElement) { // it is the first element in this list, was dropped onto feEditAdvanced-firstWrapper destinationPointer = sourceEditPanel.el.next('input.feEditAdvanced-flexformPointers').getAttribute('title') + ':0'; } else { // just a basic: move one after the other var destinationEditPanel = FrontendEditing.editPanels.get(previousContentElement.id); destinationPointer = destinationEditPanel.getDestinationPointer(); } sourceEditPanel.moveAfter(destinationPointer); } else if (linkedDragEl.hasClass('clipObj')) { // clipboard action srcElement = linkedDragEl.select('form input.feEditAdvanced-tsfeedit-input-record').first().getValue(); cmd = linkedDragEl.select('form input.feEditAdvanced-tsfeedit-input-cmd').first().getValue(); // do a clear of element on clipboard feClipboard.clearClipboard(linkedDragEl); // if source is on this page, then move it if (srcElement) { // set source and destination source = FrontendEditing.editPanels.get(srcElement.id); destination = FrontendEditing.editPanels.get(dropZoneEl.prev().id); srcElement.removeAttribute('style'); // do the actual cut/copy if (cmd == 'cut') { // move the element to where it is dropped source.paste(destination.getDestinationPointer()); srcElement.removeClass('doCut'); dropZoneEl.insertAfter(srcElement); // TODO: draggableElement.highlight({duration: 5}); // now trigger the cut action } else if (cmd == 'copy') { // display the element where it is dropped srcElement.removeClass('doCopy'); clonedElement = srcElement.cloneNode(true); dropZoneEl.insertAfter(clonedElement); newSource = FrontendEditing.editPanels.get(clonedElement.id); newSource.paste(destination.getDestinationPointer()); } } // if source is NOT on this page, then need to: // do everything except use "blank" source // } else { alert("hmm, doesn't look like we can handle this drag. - TV"); } FrontendEditing.deactivateDropZones(); }
editPanel.create(linkedDragEl.getAttribute('href'));
editPanel.create(linkedDragEl.getAttribute('rel'));
onDrop: function(dragSource, evt, data) { var linkedDragEl = Ext.get(dragSource.getEl()); var dropZoneEl = Ext.get(this.getEl()); if (linkedDragEl.hasClass('feEditAdvanced-contentTypeItem')) { // create a new record var previousContentElement = dropZoneEl.prev('.feEditAdvanced-allWrapper'); if (!previousContentElement) { // it is the first element in this list, was dropped onto feEditAdvanced-firstWrapper // so TCEforms needs a "moveAfter" with the correct colPos and the page (needs to be negative) var contentElementContainerId = dropZoneEl.prev('.feEditAdvanced-firstWrapper').id; // the ID looks like this: feEditAdvanced-firstWrapper-pages-13 var pageId = contentElementContainerId.substr(contentElementContainerId.indexOf('-pages-') + 7); var destinationPointer = Ext.get(contentElementContainerId).next('input.feEditAdvanced-flexformPointers').getAttribute('title') + ':0'; var additionalParams = linkedDragEl.getAttribute('href'); additionalParams += '&TSFE_EDIT[record]=tt_content:NEW'; additionalParams += '&TSFE_EDIT[pid]=' + pageId; // @todo Destination pointer not currently accounted for when saving. additionalParams += '&TSFE_EDIT[destinationPointer]=' + destinationPointer; additionalParams += '&pid=' + pageId; var action = new TYPO3.FeEdit.NewRecordAction(); action.trigger(additionalParams, contentElementContainerId); } else { var editPanel = FrontendEditing.editPanels.get(previousContentElement.id); editPanel.create(linkedDragEl.getAttribute('href')); } } else if (linkedDragEl.hasClass('feEditAdvanced-allWrapper')) { // Move a record linkedDragEl.insertBefore(dropZoneEl); linkedDragEl.highlight({duration: 1}); var sourceEditPanel = FrontendEditing.editPanels.get(linkedDragEl.id); var previousContentElement = linkedDragEl.prev('.feEditAdvanced-allWrapper'); if (!previousContentElement) { // it is the first element in this list, was dropped onto feEditAdvanced-firstWrapper destinationPointer = sourceEditPanel.el.next('input.feEditAdvanced-flexformPointers').getAttribute('title') + ':0'; } else { // just a basic: move one after the other var destinationEditPanel = FrontendEditing.editPanels.get(previousContentElement.id); destinationPointer = destinationEditPanel.getDestinationPointer(); } sourceEditPanel.moveAfter(destinationPointer); } else if (linkedDragEl.hasClass('clipObj')) { // clipboard action srcElement = linkedDragEl.select('form input.feEditAdvanced-tsfeedit-input-record').first().getValue(); cmd = linkedDragEl.select('form input.feEditAdvanced-tsfeedit-input-cmd').first().getValue(); // do a clear of element on clipboard feClipboard.clearClipboard(linkedDragEl); // if source is on this page, then move it if (srcElement) { // set source and destination source = FrontendEditing.editPanels.get(srcElement.id); destination = FrontendEditing.editPanels.get(dropZoneEl.prev().id); srcElement.removeAttribute('style'); // do the actual cut/copy if (cmd == 'cut') { // move the element to where it is dropped source.paste(destination.getDestinationPointer()); srcElement.removeClass('doCut'); dropZoneEl.insertAfter(srcElement); // TODO: draggableElement.highlight({duration: 5}); // now trigger the cut action } else if (cmd == 'copy') { // display the element where it is dropped srcElement.removeClass('doCopy'); clonedElement = srcElement.cloneNode(true); dropZoneEl.insertAfter(clonedElement); newSource = FrontendEditing.editPanels.get(clonedElement.id); newSource.paste(destination.getDestinationPointer()); } } // if source is NOT on this page, then need to: // do everything except use "blank" source // } else { alert("hmm, doesn't look like we can handle this drag. - TV"); } FrontendEditing.deactivateDropZones(); }
myparams.status = status;
onGridEdit: function(e){ var ds = this.store; var myparams = e.record.data; myparams.action = 'edit'; var manager; if (!myparams.manager.match('@')){ manager = myparams.manager; delete myparams.manager; } this.form.submit({ url: "tr_process_run.cgi", params: myparams, success: function(f, a){ myparams.manager = manager; ds.commitChanges(); }, failure: function(f, a){ Testopia.Util.error(f, a); myparams.manager = manager; ds.rejectChanges(); } }); },
if (myparams.build_id) {
if (myparams.category_id) {
onGridEdit: function(e){ var myparams = e.record.data; var ds = this.store; myparams.product_id = this.product_id; if (myparams.build_id) { myparams.action = "edit"; } else { myparams.action = "add"; } this.form.submit({ url: "tr_categories.cgi", params: myparams, success: function(f, a){ if (a.result.category_id) { e.record.set('category_id', a.result.category_id); } ds.commitChanges(); }, failure: function(f, a){ Testopia.Util.error(f, a); ds.rejectChanges(); } }); },
window.open('http: 'DataSetChooserHelp');
window.open(Gemma.HOST + 'faculty/pavlidis/wiki/display/gemma/Dataset+chooser', 'DataSetChooserHelp');
onHelp : function() { window.open('http://www.chibi.ubc.ca/faculty/pavlidis/wiki/display/gemma/Dataset+chooser', 'DataSetChooserHelp'); }
"The meta-analysis can only use one factor per study. Experiments that have more" + " than one factor will be shown here (or view all experiments)." + " Click on the factor field to get a menu for choosing among multiple possibilities. Use the 'hinting' " + "button to choose the type of factor most useful to you, to save manual work. For more help see <a target='_blank' " + "href='http:
"The meta-analysis can only use one factor per study. Experiments that have more" + " than one factor will be shown here (or view all experiments)." + " Click on the factor field to get a menu for choosing among multiple possibilities. Use the 'hinting' " + "button to choose the type of factor most useful to you, to save manual work. For more help see <a target='_blank' " + "href='" + Gemma.WIKI + "Dataset+chooser#Datasetchooser-TheGemmaexperimentalfactorchooser'>this page</a>");
onHelp : function() { Ext.Msg .alert( "Help for factor choose", "The meta-analysis can only use one factor per study. Experiments that have more" + " than one factor will be shown here (or view all experiments)." + " Click on the factor field to get a menu for choosing among multiple possibilities. Use the 'hinting' " + "button to choose the type of factor most useful to you, to save manual work. For more help see <a target='_blank' " + "href='http://www.chibi.ubc.ca/faculty/pavlidis/wiki/display/gemma/Dataset+chooser#Datasetchooser-TheGemmaexperimentalfactorchooser'>this page</a>"); },
this.el.frame('e0e0e0');
onHover: function(dragSource, evt, data) { var dragEl = Ext.get(dragSource.getDragEl()); this.el.addClass('feEditAdvanced-dropzoneActive'); },
keys[e.which] = true;
keyState[e.which] = true;
window.onkeydown = function(e) { keys[e.which] = true; return unused[e.which]; }
if (key.used[e.which]) return false;
return key.unused[e.which];
window.onkeydown = function(e) { key.keys[e.which] = true; if (key.used[e.which]) return false;}
keys[e.which] = false;
keyState[e.which] = false;
window.onkeyup = function(e) { keys[e.which] = false; return unused[e.which]; }
if (key.used[e.which]) return false;
return key.unused[e.which];
window.onkeyup = function(e) { key.keys[e.which] = false; if (key.used[e.which]) return false;}
if ( !citethis.DEBUG) { var d1 = citethis.$('txtDebug'), d2 = citethis.$('hboxDebug'); if(d1) d1.style.display = 'none'; if(d2) d2.style.display = 'none'; }
onLoad: function() { try { // initialization code this.initialized = true; this.strings = document.getElementById("citethis-strings"); document.getElementById("contentAreaContextMenu").addEventListener("popupshowing", function(e){ this.showContextMenu(e); }, false); citethis.debug ( '1' ); citethis.showCitationWindow(false); citethis.setPageVariables(true); window.setInterval(this.checkPage, 1000); var e = citethis.$('txtCitationText'), select = function(e){ citethis.$('txtCitationText').select(); }; citethis.debug (2); citethis.$('txtCitationText').addEventListener("focus", select, false); citethis.$('txtCitationText').addEventListener("click", select, false); var fields = 'txtAuthor txtYearPublished txtTitle txtURL txtLastAccessed txtLastUpdated'.split(' '); for (var i = 0; i < fields.length; i++) { citethis.$(fields[i]).addEventListener('blur', citethis.generateCitation, false); } citethis.debug(3); // setup preferences this.prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch("citethis."); this.prefs.QueryInterface(Components.interfaces.nsIPrefBranch2); this.prefs.addObserver("", this, false); citethis.debug(4); citethis.updateCitationStyle(); citethis.debug(5); citethis.updateCitation(); citethis.debug(6); citethis.$('btnAddToCitationList').onclick = function () { citethis.addCitationToList(); }; } catch (e) { citethis.debug ( 'Load issue: ' + e.message ); } },
if(teltype == 'fax') continue; document.getElementById("sipgate_number").appendItem(sgffx.contacts[i].name + ' (' + teltype.toUpperCase() + ')', sgffx.contacts[i].tel[teltype]);
var type = teltype.toUpperCase().split(','); if(type.indexOf('FAX') !== -1) continue; type.forEach(function(singletype, index) { try { type[index] = sipgateffxstrings.getString('sipgateffxContact' + singletype); } catch(e) { type[index] = singletype; } }); document.getElementById("sipgate_number").appendItem(sgffx.contacts[i].name + ' (' + type.join(' ') + ')', sgffx.contacts[i].tel[teltype]);
onLoad: function() { try { // this is needed to generally allow usage of components in javascript netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); sgffx = Components.classes['@api.sipgate.net/sipgateffx;1'] .getService().wrappedJSObject; } catch (anError) { dump("ERROR: " + anError); return; } if(typeof window.arguments != "undefined") { if(typeof window.arguments[0] != "undefined") { document.getElementById("sipgate_number").setAttribute('value', window.arguments[0]); } } if(sgffx.systemArea == 'classic') { document.getElementById("sipgateffxPreviewnumberWindow").buttons = "accept,cancel"; } if(typeof(sgffx.contacts) != 'undefined') { for(var i in sgffx.contacts) { if(!sgffx.contacts[i].tel) continue; for(var teltype in sgffx.contacts[i].tel) { if(teltype == 'fax') continue; document.getElementById("sipgate_number").appendItem(sgffx.contacts[i].name + ' (' + teltype.toUpperCase() + ')', sgffx.contacts[i].tel[teltype]); } } } },
sgffx.setXulObjectVisibility('sendfaxpdfmenuitem', 0);
onLoad: function(event) { // initialization code this.initialized = true; this.strings = document.getElementById("sipgateffx-strings"); sipgateffx_this = this; try { // this is needed to generally allow usage of components in javascript netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); sgffx = Components.classes['@api.sipgate.net/sipgateffx;1'] .getService().wrappedJSObject; try { sgffxDB = Components.classes['@api.sipgate.net/sipgateffx-storage;1'] .getService().wrappedJSObject; } catch(e) { dump("ERROR while initializing DB: " + e); } } catch (anError) { dump("ERROR: " + anError); return; } sgffx.init(this.showUpdateInfo); sgffxDB.openDatabase();// sgffxDB.getBlacklistedSites(); // set language: try { if (navigator.language.match(/de/) == "de") { sgffx.language = "de"; } else { sgffx.language = "en"; } } catch (lang_ex) { sgffx.log("Error in detecting language! Found: "+navigator.language.match(/de/)+". Falling back to 'en' ...\n"); sgffx.language = "en"; } sgffx.strings = this.strings; var allElements = [ 'sipgateContacts', 'showcreditmenuitem', 'pollbalance', 'showvoicemailmenuitem', 'showphonebookmenuitem', 'showsmsformmenuitem', 'showphonenumberformmenuitem', 'showhistorymenuitem', 'showfaxmenuitem', 'showitemizedmenuitem', 'dialactivate', 'item_logoff', 'separator1', 'separator2', 'dialdeactivate', 'item_logon', 'sipgateffx_loggedout', 'sipgateffx_loggedin', 'BalanceText', 'sipgateffx_c2dStatus', 'sipgateffx_c2dStatusText', 'sipgatecmd_c2dCancellCall', 'sipgatenotificationPanel', 'sipgateffxDND', 'sipgateffxDNDon', 'sipgateffxDNDoff', 'sipgateffxEventsCall', 'sipgateffxEventsFax', 'sipgateffxEventsSMS' ]; for(var i = 0; i < allElements.length; i++) { sgffx.setXulObjectReference(allElements[i], document.getElementById(allElements[i])); } sgffx.setXulObjectVisibility('showcreditmenuitem', 0); sgffx.setXulObjectVisibility('pollbalance', 0); sgffx.setXulObjectVisibility('showvoicemailmenuitem', 0); sgffx.setXulObjectVisibility('showphonebookmenuitem', 0); sgffx.setXulObjectVisibility('showsmsformmenuitem', 0); sgffx.setXulObjectVisibility('showphonenumberformmenuitem', 0); sgffx.setXulObjectVisibility('showhistorymenuitem', 0); sgffx.setXulObjectVisibility('showfaxmenuitem', 0); sgffx.setXulObjectVisibility('showitemizedmenuitem', 0); sgffx.setXulObjectVisibility('item_logoff', 0); sgffx.setXulObjectVisibility('separator1', 0); sgffx.setXulObjectVisibility('separator2', 1); sgffx.setXulObjectVisibility('dialdeactivate', 0); sgffx.setXulObjectVisibility('dialactivate', 0); // sgffx.setXulObjectVisibility('sipgate-c2d-status-bar', 1); var contextMenuHolder = "contentAreaContextMenu"; if(sgffx.application == 'thunderbird') { contextMenuHolder = "mailContext"; } document.getElementById(contextMenuHolder) .addEventListener("popupshowing", function(e) { sipgateffx_this.showContextMenu(e); }, false); document.getElementById('sipgateLogo').addEventListener("click", function(e) { // more Info: https://developer.mozilla.org/en/XUL%3aMethod%3aopenPopup document.getElementById('sipgatemenu').openPopup( document.getElementById('sipgateffx_loggedin'), "before_end", 0, 0, true); }, false); document.getElementById('sipgateLogoOff').addEventListener("click", function(e) { // more Info: https://developer.mozilla.org/en/XUL%3aMethod%3aopenPopup document.getElementById('sipgatemenu').openPopup( document.getElementById('sipgateffx_loggedout'), "before_end", 0, 0, true); }, false); if (sgffx.systemArea == 'team') { document.getElementById('sipgateffxEventsCall').addEventListener("click", function(e){ if (e.button != 0) return; sipgateffx_this.onStatusbarCommand('showSitePage', 'historycall'); }, false); document.getElementById('sipgateffxEventsFax').addEventListener("click", function(e){ if (e.button != 0) return; sipgateffx_this.onStatusbarCommand('showSitePage', 'historyfax'); }, false); document.getElementById('sipgateffxEventsSMS').addEventListener("click", function(e){ if (e.button != 0) return; sipgateffx_this.onStatusbarCommand('showSitePage', 'historysms'); }, false); } if(sgffx.getPref("extensions.sipgateffx.autologin","bool")) { setTimeout(this.login); } if(sgffx.application == 'thunderbird') { var threePane = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(Components.interfaces.nsIWindowMediator).getMostRecentWindow("mail:3pane"); gBrowser = threePane.document.getElementById("messagepane"); } gBrowser.addEventListener("DOMContentLoaded", this.parseClick2Dial, false); gBrowser.addEventListener("DOMFrameContentLoaded", this.parseClick2DialFrame, false); _prepareArray(); if(sgffx.application != 'thunderbird') { gBrowser.tabContainer.addEventListener("select", function(e) { try { var host = content.document.location.host.toLowerCase(); if(sgffxDB.isBlacklisted(host)) { document.getElementById("sipgateffxC2DBlacklistOn").hidden = true; document.getElementById("sipgateffxC2DBlacklistOff").hidden = false; return; } else { document.getElementById("sipgateffxC2DBlacklistOn").hidden = false; document.getElementById("sipgateffxC2DBlacklistOff").hidden = true; } } catch(e) { // } }, false); } setTimeout(this.showUpdateInfo, 1000); },
},
}
onLoad: function() { try { // this is needed to generally allow usage of components in javascript netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); sgffx = Components.classes['@api.sipgate.net/sipgateffx;1'] .getService().wrappedJSObject; } catch (anError) { dump("ERROR: " + anError); return; } var ver = sgffx.version; sgffx.log(ver); sgffx.log(document.getElementById("sipgateffxAboutVersion").value); document.getElementById("sipgateffxAboutVersion").value = ver; },
if(!sgffx.contacts[i].tel || !sgffx.contacts[i].tel.cell) continue; document.getElementById("sipgate_fax_number").appendItem(sgffx.contacts[i].name, sgffx.contacts[i].tel.cell);
if(!sgffx.contacts[i].tel) continue; for(var teltype in sgffx.contacts[i].tel) { var type = teltype.toUpperCase().split(','); type.forEach(function(singletype, index) { try { type[index] = sipgateffxfaxstrings.getString('sipgateffxContact' + singletype); } catch(e) { type[index] = singletype; } }); document.getElementById("sipgate_fax_number").appendItem(sgffx.contacts[i].name + ' (' + type.join(' ') + ')', sgffx.contacts[i].tel[teltype]); }
onLoad: function() { try { // this is needed to generally allow usage of components in javascript netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); sgffx = Components.classes['@api.sipgate.net/sipgateffx;1'] .getService().wrappedJSObject; } catch (anError) { dump("ERROR: " + anError); return; } sipgateffxfaxstrings = document.getElementById("sipgateffx_fax-strings"); if(typeof(sgffx.contacts) != 'undefined') { for(var i in sgffx.contacts) { if(!sgffx.contacts[i].tel || !sgffx.contacts[i].tel.cell) continue; document.getElementById("sipgate_fax_number").appendItem(sgffx.contacts[i].name, sgffx.contacts[i].tel.cell); } } },
this.tabMenu = document.getAnonymousElementByAttribute(getBrowser(), "anonid", "tabContextMenu");
this.tabMenu = getBrowser().tabContextMenu || document.getAnonymousElementByAttribute(getBrowser(), "anonid", "tabContextMenu");
onLoad: function() { // initialization code this.initialized = true; this.strings = document.getElementById("tabcloser-strings"); this.tabMenu = document.getAnonymousElementByAttribute(getBrowser(), "anonid", "tabContextMenu"); var self = this; this.tabMenu.addEventListener("popupshowing", function() { self.onMenuShowing(); }, false); // Add the menu item var closeTabMenuitem = this.tabMenu.getElementsByAttribute("id", "context_closeTab")[0]; var newButton = document.createElement("menuitem"); newButton.setAttribute("accesskey", this.strings.getString("closeTabsForSite.accesskey")); newButton.setAttribute("oncommand", "tabcloser.onMenuItemCommand(event);"); this.contextMenuItem = this.tabMenu.insertBefore(newButton, closeTabMenuitem); Components.utils.import("resource://gre/modules/PluralForm.jsm"); },
if (this.hideTimer) { $clear(this.hideTimer); this.hideTimer = null;
if (this.hideTimer) { window.clearTimeout(this.hideTimer); this.hideTimer = null; } if (Jx.Menu.Menus[0] && Jx.Menu.Menus[0] != this) { this.show.delay(1,this); } else if (this.options.exposeOnHover) { if (Jx.Menu.Menus[0] && Jx.Menu.Menus[0] == this) { Jx.Menu.Menus[0] = null;
onMouseEnter: function(e) { if (this.hideTimer) { $clear(this.hideTimer); this.hideTimer = null; } if (Jx.Menu.Menus[0] && Jx.Menu.Menus[0] != this) { this.show.delay(1,this); } else if (this.options.exposeOnHover) { if (Jx.Menu.Menus[0] && Jx.Menu.Menus[0] == this) { Jx.Menu.Menus[0] = null; } this.show.delay(1,this); } },
if (Jx.Menu.Menus[0] && Jx.Menu.Menus[0] != this) { this.show.delay(1,this); } else if (this.options.exposeOnHover) { if (Jx.Menu.Menus[0] && Jx.Menu.Menus[0] == this) { Jx.Menu.Menus[0] = null; } this.show.delay(1,this); }
this.show.delay(1,this); }
onMouseEnter: function(e) { if (this.hideTimer) { $clear(this.hideTimer); this.hideTimer = null; } if (Jx.Menu.Menus[0] && Jx.Menu.Menus[0] != this) { this.show.delay(1,this); } else if (this.options.exposeOnHover) { if (Jx.Menu.Menus[0] && Jx.Menu.Menus[0] == this) { Jx.Menu.Menus[0] = null; } this.show.delay(1,this); } },
this.show({event:e});
this.show.delay(1,this);
onMouseEnter: function(e) { if (this.hideTimer) { $clear(this.hideTimer); this.hideTimer = null; } if (Jx.Menu.Menus[0] && Jx.Menu.Menus[0] != this) { this.show({event:e}); } else if (this.options.exposeOnHover) { if (Jx.Menu.Menus[0] && Jx.Menu.Menus[0] == this) { Jx.Menu.Menus[0] = null; } this.show({event:e}); } },
function onMouseMove(ev) { var e = ev || window.event; if (e.pageX == null && e.clientX != null) { var de = document.documentElement, b = document.body; lastMousePos.pageX = e.clientX + (de && de.scrollLeft || b.scrollLeft || 0) - (de.clientLeft || 0); lastMousePos.pageY = e.clientY + (de && de.scrollTop || b.scrollTop || 0) - (de.clientTop || 0); } else { lastMousePos.pageX = e.pageX; lastMousePos.pageY = e.pageY; }
function onMouseMove(e) {
function onMouseMove(ev) { // FIXME: temp. work-around until jQuery bug 4398 is fixed var e = ev || window.event; if (e.pageX == null && e.clientX != null) { var de = document.documentElement, b = document.body; lastMousePos.pageX = e.clientX + (de && de.scrollLeft || b.scrollLeft || 0) - (de.clientLeft || 0); lastMousePos.pageY = e.clientY + (de && de.scrollTop || b.scrollTop || 0) - (de.clientTop || 0); } else { lastMousePos.pageX = e.pageX; lastMousePos.pageY = e.pageY; } if (options.grid.hoverable) triggerClickHoverEvent("plothover", lastMousePos, function (s) { return s["hoverable"] != false; }); if (options.crosshair.mode != null) { if (!selection.active) { setPositionFromEvent(crosshair.pos, lastMousePos); triggerRedrawOverlay(); } else crosshair.pos.x = -1; // hide the crosshair while selecting } if (selection.active) { target.trigger("plotselecting", [ selectionIsSane() ? getSelectionForEvent() : null ]); updateSelection(lastMousePos); } }
triggerClickHoverEvent("plothover", lastMousePos,
triggerClickHoverEvent("plothover", e,
function onMouseMove(ev) { // FIXME: temp. work-around until jQuery bug 4398 is fixed var e = ev || window.event; if (e.pageX == null && e.clientX != null) { var de = document.documentElement, b = document.body; lastMousePos.pageX = e.clientX + (de && de.scrollLeft || b.scrollLeft || 0) - (de.clientLeft || 0); lastMousePos.pageY = e.clientY + (de && de.scrollTop || b.scrollTop || 0) - (de.clientTop || 0); } else { lastMousePos.pageX = e.pageX; lastMousePos.pageY = e.pageY; } if (options.grid.hoverable) triggerClickHoverEvent("plothover", lastMousePos, function (s) { return s["hoverable"] != false; }); if (options.crosshair.mode != null) { if (!selection.active) { setPositionFromEvent(crosshair.pos, lastMousePos); triggerRedrawOverlay(); } else crosshair.pos.x = -1; // hide the crosshair while selecting } if (selection.active) { target.trigger("plotselecting", [ selectionIsSane() ? getSelectionForEvent() : null ]); updateSelection(lastMousePos); } }
if (options.crosshair.mode != null) { if (!selection.active) { setPositionFromEvent(crosshair.pos, lastMousePos); triggerRedrawOverlay(); } else crosshair.pos.x = -1; } if (selection.active) { target.trigger("plotselecting", [ selectionIsSane() ? getSelectionForEvent() : null ]); updateSelection(lastMousePos); }
function onMouseMove(ev) { // FIXME: temp. work-around until jQuery bug 4398 is fixed var e = ev || window.event; if (e.pageX == null && e.clientX != null) { var de = document.documentElement, b = document.body; lastMousePos.pageX = e.clientX + (de && de.scrollLeft || b.scrollLeft || 0) - (de.clientLeft || 0); lastMousePos.pageY = e.clientY + (de && de.scrollTop || b.scrollTop || 0) - (de.clientTop || 0); } else { lastMousePos.pageX = e.pageX; lastMousePos.pageY = e.pageY; } if (options.grid.hoverable) triggerClickHoverEvent("plothover", lastMousePos, function (s) { return s["hoverable"] != false; }); if (options.crosshair.mode != null) { if (!selection.active) { setPositionFromEvent(crosshair.pos, lastMousePos); triggerRedrawOverlay(); } else crosshair.pos.x = -1; // hide the crosshair while selecting } if (selection.active) { target.trigger("plotselecting", [ selectionIsSane() ? getSelectionForEvent() : null ]); updateSelection(lastMousePos); } }
this.owner.setVisibleItem(this);
this.owner.setVisibleItem.delay(1, this.owner, this);
onMouseOver: function() { if (this.owner && this.owner.setVisibleItem) { this.owner.setVisibleItem(this); } },
onMouseOver: function() {
onMouseOver: function(e) { e.stop();
onMouseOver: function() { if (this.owner && this.owner.setVisibleItem) { this.owner.setVisibleItem.delay(1, this.owner, this); } },
this.owner.setVisibleItem.delay(1, this.owner, this);
this.owner.setVisibleItem(this);
onMouseOver: function() { if (this.owner && this.owner.setVisibleItem) { this.owner.setVisibleItem.delay(1, this.owner, this); } },
return false;
onMouseOver: function() { if (this.owner && this.owner.setVisibleItem) { this.owner.setVisibleItem.delay(1, this.owner, this); } },
$("#Dinner_Latitude").val(LatLong.Latitude.toString()); $("#Dinner_Longitude").val(LatLong.Longitude.toString());
$("#Latitude").val(LatLong.Latitude.toString()); $("#Longitude").val(LatLong.Longitude.toString());
NerdDinner.onMouseUp = function (e) { if (NerdDinner.dragShape != null) { var x = e.mapX; var y = e.mapY; NerdDinner.dragPixel = new VEPixel(x, y); var LatLong = NerdDinner._map.PixelToLatLong(NerdDinner.dragPixel); $("#Dinner_Latitude").val(LatLong.Latitude.toString()); $("#Dinner_Longitude").val(LatLong.Longitude.toString()); NerdDinner.dragShape = null; }}
if (readDataBlock == undefined) {
if (readDataBlock === undefined) {
onRead : function(request, response) { try { // Call readRecords() instead of read because read() will attempt to decode JSON to create an // Object, // but as this point DWR has already created an Object. readDataBlock = request.reader.readRecords(response); } catch (e) { return this.handleResponseException(request, response, e); } if (readDataBlock == undefined) { readDataBlock = { success : true, data : [] } } if (readDataBlock.success === false) { this.fireEvent("exception", this, 'remote', request.action, request.options, response, null); } else { this.fireEvent("load", this, request, request.options); } // The callback will usually be store.loadRecords. request.callback.call(request.scope, readDataBlock, request.options, readDataBlock.success); },
}
};
onRead : function(request, response) { try { // Call readRecords() instead of read because read() will attempt to decode JSON to create an // Object, // but as this point DWR has already created an Object. readDataBlock = request.reader.readRecords(response); } catch (e) { return this.handleResponseException(request, response, e); } if (readDataBlock == undefined) { readDataBlock = { success : true, data : [] } } if (readDataBlock.success === false) { this.fireEvent("exception", this, 'remote', request.action, request.options, response, null); } else { this.fireEvent("load", this, request, request.options); } // The callback will usually be store.loadRecords. request.callback.call(request.scope, readDataBlock, request.options, readDataBlock.success); },
var readDataBlock;
onRead : function(request, response) { var readDataBlock; try { // Call readRecords() instead of read because read() will attempt to decode JSON to create an // Object, // but as this point DWR has already created an Object. readDataBlock = request.reader.readRecords(response); } catch (e) { return this.handleResponseException(request, response, e); } if (readDataBlock) { if (readDataBlock.success === false) { this.fireEvent("exception", this, 'remote', request.action, request.options, response, null); } else { this.fireEvent("load", this, request, request.options); } } // The callback will usually be store.loadRecords. request.callback.call(request.scope, readDataBlock, request.options, readDataBlock.success); },
if (readDataBlock) { if (readDataBlock.success === false) { this.fireEvent("exception", this, 'remote', request.action, request.options, response, null); } else { this.fireEvent("load", this, request, request.options);
if (readDataBlock == undefined) { readDataBlock = { success : true, data : []
onRead : function(request, response) { var readDataBlock; try { // Call readRecords() instead of read because read() will attempt to decode JSON to create an // Object, // but as this point DWR has already created an Object. readDataBlock = request.reader.readRecords(response); } catch (e) { return this.handleResponseException(request, response, e); } if (readDataBlock) { if (readDataBlock.success === false) { this.fireEvent("exception", this, 'remote', request.action, request.options, response, null); } else { this.fireEvent("load", this, request, request.options); } } // The callback will usually be store.loadRecords. request.callback.call(request.scope, readDataBlock, request.options, readDataBlock.success); },
if (readDataBlock.success === false) { this.fireEvent("exception", this, 'remote', request.action, request.options, response, null); } else { this.fireEvent("load", this, request, request.options); }
onRead : function(request, response) { var readDataBlock; try { // Call readRecords() instead of read because read() will attempt to decode JSON to create an // Object, // but as this point DWR has already created an Object. readDataBlock = request.reader.readRecords(response); } catch (e) { return this.handleResponseException(request, response, e); } if (readDataBlock) { if (readDataBlock.success === false) { this.fireEvent("exception", this, 'remote', request.action, request.options, response, null); } else { this.fireEvent("load", this, request, request.options); } } // The callback will usually be store.loadRecords. request.callback.call(request.scope, readDataBlock, request.options, readDataBlock.success); },
if (readDataBlock.success === false) { this.fireEvent("exception", this, 'remote', request.action, request.options, response, null); } else { this.fireEvent("load", this, request, request.options);
if (readDataBlock) { if (readDataBlock.success === false) { this.fireEvent("exception", this, 'remote', request.action, request.options, response, null); } else { this.fireEvent("load", this, request, request.options); }
onRead : function(request, response) { var readDataBlock; try { // Call readRecords() instead of read because read() will attempt to decode JSON to create an // Object, // but as this point DWR has already created an Object. readDataBlock = request.reader.readRecords(response); } catch (e) { return this.handleResponseException(request, response, e); } if (readDataBlock.success === false) { this.fireEvent("exception", this, 'remote', request.action, request.options, response, null); } else { this.fireEvent("load", this, request, request.options); } // The callback will usually be store.loadRecords. request.callback.call(request.scope, readDataBlock, request.options, readDataBlock.success); },
msg : 'Loading'
msg : 'Loading ...'
onRender : function(ct, position) { Gemma.DatasetChooserPanel.superclass.onRender.call(this, ct, position); var admin = dwr.util.getValue("hasAdmin"); /** * Plain grid for displaying datasets in the current set. Editable. */ this.eeSetMembersGrid = new Gemma.ExpressionExperimentGrid({ isAdmin : this.isAdmin, region : 'center', title : "Datasets in current set", pageSize : 15, showAnalysisInfo : true, loadMask : { msg : 'Loading datasets ...' }, tbar : ['->', { text : "Delete selected", handler : this.removeSelectedFromEeSetMembersGrid.createDelegate(this) }], split : true, height : 200, width : 400, rowExpander : true }); /** * Datasets that can be added to the current set. */ this.sourceDatasetsGrid = new Gemma.ExpressionExperimentGrid({ editable : false, isAdmin : this.isAdmin, title : "Dataset locator", region : 'west', split : true, // disabled : true, // enable after selecting a set showAnalysisInfo : true, pageSize : 15, height : 200, loadMask : { msg : 'Searching ...' }, width : 400, rowExpander : true, tbar : new Gemma.DataSetSearchAndGrabToolbar({ taxonSearch : true, targetGrid : this.eeSetMembersGrid }) }); /** * Top grid for showing the EEsets */ this.eeSetGrid = new Gemma.ExpressionExperimentSetGrid({ store : this.eeSetStore, region : 'north', layout : 'fit', split : true, collapsible : true, collapseMode : 'mini', loadMask : { msg : 'Loading' }, height : 200, title : "Available expression experiment sets", displayGrid : this.eeSetMembersGrid, searchGrid : this.sourceDatasetsGrid, tbar : new Gemma.EditExpressionExperimentSetToolbar({ userCanWriteToDB : this.isAdmin }) }); this.add(this.eeSetGrid); this.add(this.eeSetMembersGrid); this.add(this.sourceDatasetsGrid); this.eeSetGrid.getTopToolbar().on("delete-set", function(rec) { this.eeSetMembersGrid.setTitle('Set members'); this.fireEvent('delete-set'); }.createDelegate(this)); /* * Set the taxon for the search field when the ee set is chosen. */ this.eeSetGrid.getSelectionModel().on('rowselect', function(model, rowindex, record) { this.sourceDatasetsGrid.getTopToolbar().eeSearchField.taxonChanged({ id : record.get("taxonId") }); }.createDelegate(this)); },
var w = new Gemma.ExperimentalFactorAddWindow();
var w = new Gemma.ExperimentalFactorAddWindow({ store : this.store });
onRender : function(c, l) { Gemma.ExperimentalFactorToolbar.superclass.onRender.call(this, c, l); this.createButton = new Ext.Toolbar.Button({ text : "Add new", tooltip : "Add a new experimental factor to the design", disabled : false, handler : function() { var w = new Gemma.ExperimentalFactorAddWindow(); w.on('done', function(object) { this.fireEvent('create', object); }.createDelegate(this)); w.show(); }, scope : this }); this.deleteButton = new Ext.Toolbar.Button({ text : "Delete", tooltip : "Delete the selected experimental factor(s)", disabled : true, handler : function() { Ext.Msg.confirm('Deleting records', 'Are you sure? This cannot be undone', function(but) { if (but == 'yes') { this.deleteButton.disable(); this.fireEvent("delete"); } }.createDelegate(this)); }, scope : this }); this.revertButton = new Ext.Toolbar.Button({ text : "Undo", tooltip : "Undo changes to the selected experimental factors", disabled : true, handler : function() { this.fireEvent("undo"); }, scope : this }); this.saveButton = new Ext.Toolbar.Button({ text : "Save", tooltip : "Commit changes", disabled : true, handler : function() { this.saveButton.disable(); this.revertButton.disable(); this.fireEvent("save"); }, scope : this }); this.addButton(this.createButton); this.addSeparator(); this.addButton(this.deleteButton); this.addSeparator(); this.addButton(this.saveButton); this.addSeparator(); this.addButton(this.revertButton); },
this[variableName] = response; console.log(variableName + ' is set to: ' + response);
localSettings[variableName] = response; console.log('localSettings.' + variableName + ' is set to: ' + response);
var onResponse = function (response) { if (response != null) { this[variableName] = response; console.log(variableName + ' is set to: ' + response); } else { console.log(variableName + ' not found in localStorage! ' + response); } }
console.log(variableName + ' not found in localStorage! ' + response); }
console.log('localSettings.' + variableName + ' not found in localStorage! ' + response); }
var onResponse = function (response) { if (response != null) { this[variableName] = response; console.log(variableName + ' is set to: ' + response); } else { console.log(variableName + ' not found in localStorage! ' + response); } }
this.setGene(record.data);
this.setGeneGroup(record.data);
onSelect : function(record, index) { Gemma.GeneGroupCombo.superclass.onSelect.call(this, record, index); if (!this.selectedGeneGroup || record.data.id != this.selectedGeneGroup.id) { this.setGene(record.data); this.fireEvent('select', this, this.selectedGeneGroup); } },
console.log(slider);
,onSliderClick:function(event) { var slider = $('#' + event.data.instance.slider); console.log(slider); var x = event.pageX; var y = event.pageY; var x_offset = x - slider.position().left; var percentage = x_offset * 100 / slider.width(); event.data.instance.updateSlider(x_offset/slider.width()); event.data.instance.seek(percentage); }
var readyState = this.transport.readyState;
var readyState = this.xhr.readyState;
onStateChange: function() { var readyState = this.transport.readyState; if (readyState==4) this.respondToReadyState(readyState); },
this.respondToReadyState(readyState);
{ try { this.respondToReadyState(readyState); } finally { this.cleanup(); } }
onStateChange: function() { var readyState = this.transport.readyState; if (readyState==4) this.respondToReadyState(readyState); },
$$('.authentication h1')[0].innerHTML=values.title;
n2i.dom.setNodeText($$('.authentication h1')[0],values.title);
onSuccess : function() { $$('.authentication h1')[0].innerHTML=values.title; self.win.hide(); }
window[callback_finished_function()];
var json; try { json=response.responseText.evalJSON(true); } catch(error) { json=null; } window[callback_finished_function(json)];
onSuccess: function(response) { if (200 == response.status) { try { if (Object.isUndefined(response.responseText) || response.responseText===null) throw -1; var json=response.responseText.evalJSON(true); if (!Object.isUndefined(json._ajax_nonce) && json._ajax_nonce!==null && json._ajax_nonce.length) response.request.options.query_params.set('_ajax_nonce', json._ajax_nonce); var blocks = new Array(); if (!Object.isUndefined(response.request.options.params.get('fields')) && response.request.options.params.get('fields')!==null && response.request.options.params.get('fields').length) blocks=$$(response.request.options.params.get('fields')); if (!Object.isUndefined(response.request.options.params.get('field')) && response.request.options.params.get('field')!==null && response.request.options.params.get('field').length) blocks.push($(response.request.options.params.get('field'))); if (blocks.length>0) { if (Object.isUndefined(json.result) || json.result===null || !json.result.length) throw -2; var result=json.result; if (!Object.isUndefined(response.request.options.params.get('compare_string')) && response.request.options.params.get('compare_string')!==null && response.request.options.params.get('compare_string').length && result.indexOf(response.request.options.params.get('compare_string'))!==0) throw -3; for (var i=0;i<blocks.length;i++) Element.replace($(blocks[i]), result); } } catch(error) { if (!Object.isUndefined(response.request.options.params.get('callback_error')) && response.request.options.params.get('callback_error')!==null) { var callback_error_function = response.request.options.params.get('callback_error'); window[callback_error_function(error)]; } } } else { if (!Object.isUndefined(response.request.options.params.get('callback_error')) && response.request.options.params.get('callback_error')!==null) { var callback_error_function = response.request.options.params.get('callback_error'); window[callback_error_function(-4)]; } } if (!Object.isUndefined(response.request.options.params.get('callback_finished')) && response.request.options.params.get('callback_finished')!==null) { var callback_finished_function = response.request.options.params.get('callback_finished'); window[callback_finished_function()]; } }
sgffx.setPref("extensions.sipgateffx.defaultExtension", true, "bool");
sgffx.setPref("extensions.sipgateffx.systemTeam", true, "bool");
onUnload: function(){ var relogin = false; if (document.getElementById("parsenumbers").value) { sgffx.setXulObjectVisibility('dialactivate', 0); } else { sgffx.setXulObjectVisibility('dialactivate', 1); } if(document.getElementById("dontshowbalance").value) { sgffx.setXulObjectAttribute('BalanceText', "value", ""); } else { sgffx.getBalance(); } var username = document.getElementById('username').value; var password = document.getElementById('password').value; if (username == '' || password == '') { return; } /* var chosenSystemArea = (document.getElementById("systemTeam").value ? 'team' : 'classic'); if (sgffx.systemArea != chosenSystemArea) { sgffx.log('options: changed systemArea from "'+sgffx.systemArea+'" to "'+chosenSystemArea+'"'); sgffx.systemArea = chosenSystemArea; relogin = true; }*/ var auth = sgffx.getSamuraiAuth(); if (auth.username != username || auth.password != password) { sgffx.log('options: changed user name from "'+auth.username+'" to "'+username+'"'); if(new RegExp(/^.+@.+\.[a-z]{2,6}$/).test(username)) { sgffx.systemArea = 'team'; sgffx.setPref("extensions.sipgateffx.defaultExtension", true, "bool"); sgffx.log('options: changed systemArea to "team"'); } else { sgffx.systemArea = 'classic'; sgffx.setPref("extensions.sipgateffx.defaultExtension", false, "bool"); sgffx.log('options: changed systemArea to "classic"'); } sgffx.setSamuraiAuth(username, password); relogin = true; } if(relogin) { sgffx.log('options: logoff triggered'); sgffx.logoff(); } if (document.getElementById('autologin').value === true && sgffx.loggedOutByUser === false) { if (!sgffx.isLoggedIn) { sgffx.log('options: login triggered'); sgffx.login(); } else { sgffx.log('options: getBalance triggered'); sgffx.getBalance(); } } },
sgffx.setPref("extensions.sipgateffx.defaultExtension", false, "bool");
sgffx.setPref("extensions.sipgateffx.systemTeam", false, "bool");
onUnload: function(){ var relogin = false; if (document.getElementById("parsenumbers").value) { sgffx.setXulObjectVisibility('dialactivate', 0); } else { sgffx.setXulObjectVisibility('dialactivate', 1); } if(document.getElementById("dontshowbalance").value) { sgffx.setXulObjectAttribute('BalanceText', "value", ""); } else { sgffx.getBalance(); } var username = document.getElementById('username').value; var password = document.getElementById('password').value; if (username == '' || password == '') { return; } /* var chosenSystemArea = (document.getElementById("systemTeam").value ? 'team' : 'classic'); if (sgffx.systemArea != chosenSystemArea) { sgffx.log('options: changed systemArea from "'+sgffx.systemArea+'" to "'+chosenSystemArea+'"'); sgffx.systemArea = chosenSystemArea; relogin = true; }*/ var auth = sgffx.getSamuraiAuth(); if (auth.username != username || auth.password != password) { sgffx.log('options: changed user name from "'+auth.username+'" to "'+username+'"'); if(new RegExp(/^.+@.+\.[a-z]{2,6}$/).test(username)) { sgffx.systemArea = 'team'; sgffx.setPref("extensions.sipgateffx.defaultExtension", true, "bool"); sgffx.log('options: changed systemArea to "team"'); } else { sgffx.systemArea = 'classic'; sgffx.setPref("extensions.sipgateffx.defaultExtension", false, "bool"); sgffx.log('options: changed systemArea to "classic"'); } sgffx.setSamuraiAuth(username, password); relogin = true; } if(relogin) { sgffx.log('options: logoff triggered'); sgffx.logoff(); } if (document.getElementById('autologin').value === true && sgffx.loggedOutByUser === false) { if (!sgffx.isLoggedIn) { sgffx.log('options: login triggered'); sgffx.login(); } else { sgffx.log('options: getBalance triggered'); sgffx.getBalance(); } } },
'sendfaxpdfmenuitem',
onUnload: function() { sgffx.log('unload overlay'); var allElements = [ 'showcreditmenuitem', 'pollbalance', 'showvoicemailmenuitem', 'showphonebookmenuitem', 'showsmsformmenuitem', 'showphonenumberformmenuitem', 'showhistorymenuitem', 'showfaxmenuitem', 'showitemizedmenuitem', 'dialactivate', 'item_logoff', 'separator1', 'separator2', 'dialdeactivate', 'item_logon', 'sipgateffx_loggedout', 'sipgateffx_loggedin', 'BalanceText', 'sipgateffx_c2dStatus', 'sipgateffx_c2dStatusText', 'sipgatecmd_c2dCancellCall', 'sipgatenotificationPanel', 'sipgateffxEventsCall', 'sipgateffxEventsFax', 'sipgateffxEventsSMS' ]; sgffx.log('closing window, removing references to elements'); for(var i = 0; i < allElements.length; i++) { sgffx.removeXulObjRef(allElements[i], document.getElementById(allElements[i])); } },
console.log(result);
onValidated : function(result) { // console.log(result); if (result.valid) { /* * Show some kind of summary - how many rows etc, any mismatches with probes. */ Ext.Msg.alert("Your data look valid", "Your data matrix had " + result.numRows + " rows, " + result.numColumns + " columns, " + result.numberMatchingProbes + " probes on the array design matched your data, " + result.numberOfNonMatchingProbes + " didn't." + " If this all looks correct to you, click 'submit' to continue", function() { /* * We disable the form so the user can't modify it. (problem: mask gets in the way of * alerts?) */ // Ext.getCmp('main-form').disable(); // Ext.getCmp('upload-form').disable(); Ext.getCmp('submit-data-button').enable(); }); } else { /* * Display a summary of the problems */ var summary = ""; if (!result.shortNameIsUnique) { summary = "The short name you selected already has been used;"; } if (!result.dataFileIsValidFormat && result.dataFileFormatProblemMessage) { summary = summary + result.dataFileFormatProblemMessage + "; "; } if (!result.arrayDesignMatchesDataFile && result.arrayDesignMismatchProblemMessage) { summary = summary + result.arrayDesignMismatchProblemMessage + "; "; } if (!result.quantitationTypeIsValid && result.quantitationTypeProblemMessage) { summary = summary + result.quantitationTypeProblemMessage + "; "; } Ext.Msg.alert("Data not valid", summary); /* * re-enable the form. */ Ext.getCmp('main-form').enable(); Ext.getCmp('upload-form').enable(); } },
var summary = "";
var summary = "Problems: ";
onValidated : function(result) { // console.log(result); if (result.valid) { /* * Show some kind of summary - how many rows etc, any mismatches with probes. */ Ext.Msg.alert("Your data look valid", "Your data matrix had " + result.numRows + " rows, " + result.numColumns + " columns, " + result.numberMatchingProbes + " probes on the array design matched your data, " + result.numberOfNonMatchingProbes + " didn't." + " If this all looks correct to you, click 'submit' to continue", function() { /* * We disable the form so the user can't modify it. (problem: mask gets in the way of * alerts?) */ // Ext.getCmp('main-form').disable(); // Ext.getCmp('upload-form').disable(); Ext.getCmp('submit-data-button').enable(); }); } else { /* * Display a summary of the problems */ var summary = ""; if (!result.shortNameIsUnique) { summary = "The short name you selected already has been used;"; } if (!result.dataFileIsValidFormat && result.dataFileFormatProblemMessage) { summary = summary + result.dataFileFormatProblemMessage + "; "; } if (!result.arrayDesignMatchesDataFile && result.arrayDesignMismatchProblemMessage) { summary = summary + result.arrayDesignMismatchProblemMessage + "; "; } if (!result.quantitationTypeIsValid && result.quantitationTypeProblemMessage) { summary = summary + result.quantitationTypeProblemMessage + "; "; } Ext.Msg.alert("Data not valid", summary); /* * re-enable the form. */ Ext.getCmp('main-form').enable(); Ext.getCmp('upload-form').enable(); } },
if (readDataBlock == undefined) {
if (readDataBlock === undefined) {
onWrite : function(request, response) { var readDataBlock; try { readDataBlock = request.reader.readResponse(request.action, response); } catch (e) { return this.handleResponseException(request, response, e); } if (readDataBlock == undefined) { readDataBlock = { success : true, data : [] } } if (readDataBlock && readDataBlock.success === false) { this.fireEvent("exception", this, 'remote', request.action, request.options, response, request.records); } else { this.fireEvent("write", this, request.action, readDataBlock.data, readDataBlock, request.records, request.options); } // store.onCreateRecords or onUpdateRecords or onDestroyRecords. request.callback.call(request.scope, readDataBlock.data, readDataBlock, readDataBlock.success); },
}
};
onWrite : function(request, response) { var readDataBlock; try { readDataBlock = request.reader.readResponse(request.action, response); } catch (e) { return this.handleResponseException(request, response, e); } if (readDataBlock == undefined) { readDataBlock = { success : true, data : [] } } if (readDataBlock && readDataBlock.success === false) { this.fireEvent("exception", this, 'remote', request.action, request.options, response, request.records); } else { this.fireEvent("write", this, request.action, readDataBlock.data, readDataBlock, request.records, request.options); } // store.onCreateRecords or onUpdateRecords or onDestroyRecords. request.callback.call(request.scope, readDataBlock.data, readDataBlock, readDataBlock.success); },
if (readDataBlock.success === false) {
if (readDataBlock == undefined) { readDataBlock = { success : true, data : [] } } if (readDataBlock && readDataBlock.success === false) {
onWrite : function(request, response) { var readDataBlock; try { readDataBlock = request.reader.readResponse(request.action, response); } catch (e) { return this.handleResponseException(request, response, e); } if (readDataBlock.success === false) { this.fireEvent("exception", this, 'remote', request.action, request.options, response, request.records); } else { this.fireEvent("write", this, request.action, readDataBlock.data, readDataBlock, request.records, request.options); } // store.onCreateRecords or onUpdateRecords or onDestroyRecords. request.callback.call(request.scope, readDataBlock.data, readDataBlock, readDataBlock.success); },
imce.vars.op && $('input:first', imce.ops[imce.vars.op].div).focus();
if (imce.vars.op) { var $inputs = $('input', imce.ops[imce.vars.op].div); $inputs.eq(0).focus(); $('html').is('.ie') && $inputs.addClass('dummyie').removeClass('dummyie'); }
opClick: function(name) { var Op = imce.ops[name], oldop = imce.vars.op; if (!Op || Op.disabled) { return imce.setMessage(Drupal.t('You can not perform this operation.'), 'error'); } if (Op.div) { if (oldop) { var toggle = oldop == name; imce.opShrink(oldop, toggle ? 'slideUp' : 'hide'); if (toggle) return false; } var left = Op.li.offsetLeft; var $opcon = $('#op-contents').css({left: 0}); $(Op.div).slideDown('normal', function() { setTimeout(function() { imce.vars.op && $('input:first', imce.ops[imce.vars.op].div).focus(); }); }); var diff = left + $opcon.width() - $('#imce-content').width(); $opcon.css({left: diff > 0 ? left - diff : left}); $(Op.li).addClass('active'); $(imce.opCloseLink).css('visibility', 'visible'); imce.vars.op = name; } Op.func(true); return true;},
} if(!this.contentIsLoaded && this.options.loadOnDemand) { this.loadContent(this.content);
open: function() { if (!this.isOpening) { this.isOpening = true; } if (this.contentIsLoaded) { this.removeEvent('contentLoaded', this.openOnLoaded); this.show(); this.fireEvent('open', this); this.isOpening = false; } else { this.addEvent('contentLoaded', this.openOnLoaded); } if(this.options.useKeyboard && this.keyboard != null) { this.keyboard.activate(); } },
this.log("Database file does not exist."); var manager = Components.classes["@mozilla.org/extensions/manager;1"]; if(manager) { manager = manager.getService(Components.interfaces.nsIExtensionManager); var defaultFile = manager.getInstallLocation('[email protected]').getItemLocatio n('[email protected]'); this.copyDatabase(defaultFile, file); this._conn = Components.classes["@mozilla.org/storage/service;1"].getService(Components.interfaces.mozIStorageService).openDatabase(file); this.getBlacklistedSites(); } else { AddonManager.getAddonByID('[email protected]', function(addon) { defaultFile = addon.getResourceURI("").QueryInterface(Components.interfaces.nsIFileURL).file; _sgffxStorage.copyDatabase(defaultFile, file); _sgffxStorage._conn = Components.classes["@mozilla.org/storage/service;1"].getService(Components.interfaces.mozIStorageService).openDatabase(file); _sgffxStorage.getBlacklistedSites(); }); }
this.createDatabase(file); file.permissions = 420; _sgffxStorage.getBlacklistedSites();
openDatabase: function() { if(this._conn !== null) { return; } try { var file = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("ProfD", Components.interfaces.nsIFile); file.append("sipgateffx.sqlite"); if(!file.exists()) { this.log("Database file does not exist."); var manager = Components.classes["@mozilla.org/extensions/manager;1"]; // fix for Firefox >= 4.0 and its new Addon Manager if(manager) { manager = manager.getService(Components.interfaces.nsIExtensionManager); var defaultFile = manager.getInstallLocation('[email protected]').getItemLocation('[email protected]'); this.copyDatabase(defaultFile, file); this._conn = Components.classes["@mozilla.org/storage/service;1"].getService(Components.interfaces.mozIStorageService).openDatabase(file); this.getBlacklistedSites(); } else { AddonManager.getAddonByID('[email protected]', function(addon) { defaultFile = addon.getResourceURI("").QueryInterface(Components.interfaces.nsIFileURL).file; _sgffxStorage.copyDatabase(defaultFile, file); _sgffxStorage._conn = Components.classes["@mozilla.org/storage/service;1"].getService(Components.interfaces.mozIStorageService).openDatabase(file); _sgffxStorage.getBlacklistedSites(); }); } } else { this._conn = Components.classes["@mozilla.org/storage/service;1"].getService(Components.interfaces.mozIStorageService).openDatabase(file); this.getBlacklistedSites(); } } catch(e) { this.log("Failed to initialize database: " + e.message + "\n"); } },
setTimeout(function(){$('#bsignin').click()},1000);
setTimeout(function(){$('#bsignin').click();},1000);
$.fn.openid = function() { var $this = $(this); //name input value - needed for name based OpenID var $usr = $this.find('input[name=openid_username]'); //final url input value var $id = $this.find('input[name=openid_url]'); //beginning and end of name OpenID url (name being the middle) var $front = $this.find('p:has(input[name=openid_username])>span:eq(0)'); var $end = $this.find('p:has(input[name=openid_username])>span:eq(1)'); //needed for special effects only var $localfs = $this.find('fieldset:has(input[name=username])'); var $usrfs = $this.find('fieldset:has(input[name=openid_username])'); var $idfs = $this.find('fieldset:has(input[name=openid_url])'); var submitusr = function() { if ($usr.val().length < 1) { $usr.focus(); return false; } $id.val($front.text() + $usr.val() + $end.text()); return true; }; var submitid = function() { if ($id.val().length < 1) { $id.focus(); return false; } return true; }; var local = function() { var $li = $(this); $('#openid_form .providers li').removeClass('highlight'); $li.addClass('highlight'); $usrfs.hide(); $idfs.hide(); $localfs.show(); $this.unbind('submit').submit(submitid); return false; }; var direct = function() { var $li = $(this); $('#openid_form .providers li').removeClass('highlight'); $li.addClass('highlight'); $usrfs.fadeOut('slow'); $localfs.fadeOut('slow'); $idfs.fadeOut('slow'); $id.val($this.find("li.highlight span").text()); setTimeout(function(){$('#bsignin').click()},1000); return false; }; var openid = function() { var $li = $(this); $('#openid_form .providers li').removeClass('highlight'); $li.addClass('highlight'); $usrfs.hide(); $localfs.hide(); $idfs.show(); $id.focus(); $this.unbind('submit').submit(submitid); return false; }; var username = function() { var $li = $(this); $('#openid_form .providers li').removeClass('highlight'); $li.addClass('highlight'); $idfs.hide(); $localfs.hide(); $usrfs.show(); $this.find('#enter_your_what').text($li.attr("title")); $front.text($li.find("span").text().split("username")[0]); $end.text("").text($li.find("span").text().split("username")[1]); $id.focus(); $this.unbind('submit').submit(submitusr); return false; }; $this.find('li.local').click(local); $this.find('li.direct').click(direct); $this.find('li.openid').click(openid); $this.find('li.username').click(username); $id.keypress(function(e) { if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) { return submitid(); } }); $usr.keypress(function(e) { if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) { return submitusr(); } }); $this.find('li span').hide(); $this.find('li').css('line-height', 0).css('cursor', 'pointer'); $usrfs.hide(); $idfs.hide(); $localfs.hide(); $this.find('li:eq(0)').click(); return this;};
var conid = attrs['attr_'+attnum];
var conid = attrs['attr_'+attnum][0];
function openlist(e) { var elt = jQuery(e); var attnum = elt.attr('id').match(/\d+/)[0]; var conid = attrs['attr_'+attnum]; var constr = constrs["constr_" + conid]; // get the changed attribute position in the arrays for (i=0; (constr.pattnums[i] != attnum);i++); var datas = { fattpos: i, fvalue: e.value, database: database, 'keys[]': constr.pattnums, 'keynames[]': constr.pattnames, 'fkeynames[]': constr.fattnames, f_table: constr.f_table, f_schema: constr.f_schema, offset: jQuery.ppa.o }; jQuery.ajax({ url: 'ajax-ac-insert.php?server=' + server, type: 'post', data: datas, success: function (ret) { jQuery.ppa.i = 0; jQuery.ppa.fkbg.show(); with(jQuery.ppa.fklist) { html(ret); appendTo('#row_att_'+ attnum); css('width',elt.css('width')); show(); jQuery.ppa.numrow = find('tr').length; } } });}
this.setBusy();
openURL: function(url) { if (url) { this.options.contentURL = url; this.options.content = null; //force Url loading this.loadContent(this.content); this.addEvent('contentLoaded', this.openOnLoaded); } else { this.open(); } },