0
+// /* General Application Wide Functions
0
+// * ----------------------------------------------------------------------------------------------------------------- */
0
+// Event.observe(document, 'keypress', actionAreaHelper);
0
+// function actionAreaHelper(event) { if (event.charCode == 96) {toggleActionArea('inbox')}; };
0
+// function globalLoadingBehavior() {
0
+// $('hud').classNames().set('');
0
+// Element.show('loading');
0
+// Element.update('message_wrapper', '<span id="message"> </span>');
0
+// function loadLameActionSpan(boxid,direction) {
0
+// if (direction == 'down') { spanclass = 'box_action box_action_down' }
0
+// if (direction == 'up') { spanclass = 'box_action' }
0
+// Element.replace('boxid_'+boxid+'_action_alink', '<span class="'+spanclass+'" id="boxid_'+boxid+'_action_lame"></span>')
0
+// function remoteFormLoading(formobj,loadid) {
0
+// loadid = (loadid == null) ? 'form_loading' : loadid;
0
+// if (formobj.id == 'request_support_form') {loadimg=''} else {loadimg='_invert'};
0
+// Element.update($(loadid),'<img src="/images/loading'+loadimg+'.gif" />');
0
+// Form.disable(formobj);
0
+// /* Custom sortable serialize params Column#sort
0
+// * ----------------------------------------------------------------------------------------------------------------- */
0
+// function findSortedInfo(obj) {
0
+// pg_sortable_id = obj.element.id;
0
+// pg_lastvalues = $A(obj.lastValue.gsub(/col_wrapper\[\]=/i,'').split('&'));
0
+// pg_sortable_seq = $A(Sortable.sequence(pg_sortable_id));
0
+// if (pg_lastvalues.length == pg_sortable_seq.length) { // Find the column info within the sortable.
0
+// pg_lastvalues.each(function(v,i) {
0
+// if (v != pg_sortable_seq[i]) {
0
+// /* Check to see if the bookmark was moved down */
0
+// if (pg_lastvalues[i+1] == pg_sortable_seq[i]) { col_id=v; col_position=pg_sortable_seq.indexOf(v)+1; };
0
+// /* Check to see if the bookmark was moved up */
0
+// if (pg_lastvalues[i] == pg_sortable_seq[i+1]) { col_id=pg_sortable_seq[i]; col_position=i+1; };
0
+// return 'col_id='+col_id+'&col_position='+col_position;
0
+// else { return false; }
0
+// /* Custom sortable serialize params Box#sort
0
+// * ----------------------------------------------------------------------------------------------------------------- */
0
+// function findDroppedBoxInfo(obj) {
0
+// col_sortable_id = obj.element.id;
0
+// col_sortable_id_num = col_sortable_id.gsub(/col_/i,'');
0
+// col_empty = obj.lastValue.length == 0 ? true : false ;
0
+// col_lastvalues = $A(obj.lastValue.gsub(/(col_\d+)\[\]=/i,'').split('&'));
0
+// col_sortable_seq = $A(Sortable.sequence(col_sortable_id));
0
+// if ((col_lastvalues.length == col_sortable_seq.length) && !col_empty) { // Find the box info within the sortable.
0
+// col_internal_sort = true; col_lost_box = false;
0
+// col_lastvalues.each(function(v,i) {
0
+// if (v != col_sortable_seq[i]) {
0
+// /* Check to see if the box was moved down */
0
+// if (col_lastvalues[i+1] == col_sortable_seq[i]) { box_id=v; box_position=col_sortable_seq.indexOf(v)+1; };
0
+// /* Check to see if the box was moved up */
0
+// if (col_lastvalues[i] == col_sortable_seq[i+1]) { box_id=col_sortable_seq[i]; box_position=i+1; };
0
+// else { // Find the new or lost box info.
0
+// col_internal_sort = false;
0
+// col_lost_box = col_lastvalues.length > col_sortable_seq.length ? true : false ;
0
+// /* Column's with a lost box is ignored by the server. */
0
+// if (col_lost_box == true) { box_id = 'na' ; box_position = 'na' ; }
0
+// /* Column with no boxes now gaining one. */
0
+// else if (col_empty) { box_id = col_sortable_seq[0] ; box_position = 1 ; }
0
+// col_long_array = col_lastvalues.length > col_sortable_seq.length ? col_lastvalues : col_sortable_seq ;
0
+// col_short_array = col_lastvalues.length < col_sortable_seq.length ? col_lastvalues : col_sortable_seq ;
0
+// col_long_array.each(function(v,i) {
0
+// if (v != col_short_array[i]) { box_id=v; box_position=i+1; throw $break; };
0
+// return 'internal_sort='+col_internal_sort+'&lost_box='+col_lost_box+'&col_id='+col_sortable_id_num+'&box_id='+box_id+'&box_position='+box_position
0
+// /* Custom sortable serialize params Bookmark#sort
0
+// * ----------------------------------------------------------------------------------------------------------------- */
0
+// function findDroppedBookmarkInfo(obj) {
0
+// sortable_id = obj.element.id;
0
+// sortable_id_num = sortable_id.gsub(/boxid_list_/i,'');
0
+// box_type = findSortableBoxType(sortable_id_num);
0
+// box_empty = obj.lastValue.length == 0 ? true : false ;
0
+// lastvalues = $A(obj.lastValue.gsub(/(boxid_list_\d+|inbox_list|trashbox_list)\[\]=/i,'').split('&'));
0
+// sortable_seq = $A(Sortable.sequence(sortable_id));
0
+// if ((lastvalues.length == sortable_seq.length) && !box_empty) { // Find the bookmark info within the sortable.
0
+// internal_sort = true; lost_bmark = false; bmark_scope = box_type;
0
+// lastvalues.each(function(v,i) {
0
+// if (v != sortable_seq[i]) {
0
+// /* Check to see if the bookmark was moved down */
0
+// if (lastvalues[i+1] == sortable_seq[i]) { bmark_id=v; bmark_position=sortable_seq.indexOf(v)+1; };
0
+// /* Check to see if the bookmark was moved up */
0
+// if (lastvalues[i] == sortable_seq[i+1]) { bmark_id=sortable_seq[i]; bmark_position=i+1; };
0
+// else { // Find the new or lost bookmark info.
0
+// internal_sort = false;
0
+// lost_bmark = lastvalues.length > sortable_seq.length ? true : false ;
0
+// /* Box's with a lost bookmark are ignored by the server. */
0
+// if (lost_bmark == true) { bmark_id = 'na' ; bmark_position = 'na' ; bmark_scope = 'na'; }
0
+// /* Box with no bookmarks now gaining one. */
0
+// else if (box_empty) { bmark_id = sortable_seq[0] ; bmark_position = 1 ; bmark_scope = findBmarkScope(box_type,sortable_id); }
0
+// long_array = lastvalues.length > sortable_seq.length ? lastvalues : sortable_seq ;
0
+// short_array = lastvalues.length < sortable_seq.length ? lastvalues : sortable_seq ;
0
+// long_array.each(function(v,i) {
0
+// if (v != short_array[i]) { bmark_id=v; bmark_position=i+1; throw $break; };
0
+// bmark_scope = findBmarkScope(box_type,sortable_id);
0
+// return 'internal_sort='+internal_sort+'&lost_bmark='+lost_bmark+'&box_type='+box_type+'&sortable_id='+sortable_id_num+'&bmark_id='+bmark_id+'&bmark_position='+bmark_position+'&bmark_scope='+bmark_scope
0
+// function findSortableBoxType(sortable_id_num) {
0
+// if (sortable_id_num == 'inbox_list') { return 'inbox'; }
0
+// else if (sortable_id_num == 'trashbox_list') { return 'trashbox'; }
0
+// else { return 'box'; }
0
+// function findBmarkScope(box_type, sortable_id) {
0
+// if (box_type == 'box') {
0
+// if ($('inbox_list').visible() && sortableHasClass(sortable_id,'inbox')) {return 'inbox'}
0
+// else if ($('trashbox_list').visible() && sortableHasClass(sortable_id,'trashbox')) {return 'trashbox'}
0
+// function sortableHasClass(sortable_id, css_class) {
0
+// $A($(sortable_id).childNodes).each(function(li) {
0
+// if (li.hasClassName(css_class)) {css_check=true; throw $break;}
0
+// /* Tooltip Functions
0
+// * ----------------------------------------------------------------------------------------------------------------- */
0
+// var Tooltip = Class.create();
0
+// Tooltip.prototype = {
0
+// initialize: function(a) {
0
+// this.a.onmouseover = this.showTooltip.bindAsEventListener(this);
0
+// this.a.onmouseout = this.hideTooltip.bindAsEventListener(this);
0
+// this.tooltip_id = this.a.firstChild.id.gsub('button_','tt_');
0
+// this.tooltip = this.a.title;
0
+// render: function() {
0
+// tooltip_box = Builder.node('div',{id:this.tooltip_id,className:'tooltip_box',style:'display:none;'},[
0
+// Builder.node('div',{className:'tooltip_left'}),
0
+// Builder.node('div',{className:'tooltip_middle'},[
0
+// Builder.node('div',{className:'tooltip_middlergt'}),
0
+// Builder.node('span',{className:'tooltip_message'},this.tooltip),
0
+// Builder.node('div',{className:'tooltip_right'}),
0
+// $('button_box').insertBefore(tooltip_box, this.a);
0
+// this.a.removeAttribute('title');
0
+// reseteffect: function() {
0
+// var effect = $(this.a)._effect;
0
+// if(effect) effect.cancel();
0
+// showTooltip: function(evt) {
0
+// this.a._effect = new Effect.Appear(this.tooltip_id,{delay:0.5,duration:0.3});
0
+// hideTooltip: function(evt) {
0
+// this.a._effect = new Effect.Fade(this.tooltip_id,{duration:0.3});
0
+// Event.observe(window, 'load', activateTooltips, false);
0
+// function activateTooltips() {
0
+// toolTipLinks = $$('a.tooltipable');
0
+// toolTipLinks.each( function(a) { new Tooltip(a); } );
0
+// /* Action Area Specific Functions
0
+// * ----------------------------------------------------------------------------------------------------------------- */
0
+// function getActionAreaVars() {
0
+// actionBar = $('action_bar');
0
+// actionArea = $('action_area');
0
+// actionAreaShim = $('action_area_shim');
0
+// pageSize = WindowUtilities.getPageSize();
0
+// function toggleActionArea(action_box) {
0
+// getActionAreaVars();
0
+// setActionAreaHeigth();
0
+// if (Element.hasClassName(actionBar,'barout')) {
0
+// if (forceTrashbox(action_box)) { forceTrashboxLoad() }
0
+// actionAreaShim.hide();
0
+// actionBar.classNames().set('');
0
+// hud.setStyle({marginLeft:'28px'});
0
+// Event.stopObserving(window, 'resize', setActionAreaHeigth);
0
+// Event.stopObserving(window, 'scroll', setActionAreaHeigth);
0
+// actionAreaShim.show();
0
+// actionAreaShim.setStyle({height:pageSize.pageHeight+'px'});
0
+// actionArea.setStyle({height:pageSize.windowHeight+'px'});
0
+// actionBar.classNames().set('barout');
0
+// hud.setStyle({marginLeft:'9px'})
0
+// Event.observe(window, 'resize', setActionAreaHeigth);
0
+// Event.observe(window, 'scroll', setActionAreaHeigth);
0
+// if (getFieldsetFlag()=='') {
0
+// if (action_box=='inbox') {inboxLoad()}
0
+// else if (action_box=='trashbox') {trashboxLoad();}
0
+// else if (forceTrashbox(action_box)) { forceTrashboxLoad() }
0
+// function forceTrashbox(action_box) {
0
+// if ((getFieldsetFlag()!='legend_trash') && (action_box=='trashbox')) { return true; } else { return false };
0
+// function forceTrashboxLoad() {
0
+// loadingActionArea($('legend_trash_link'));
0
+// new Ajax.Request('/actionarea/trashbox', {asynchronous:true, evalScripts:true});
0
+// function trashboxLoad() {
0
+// setFieldsetFlag('legend_trash');
0
+// $('legend_trash').classNames().set('fld_on');
0
+// new Ajax.Request('/actionarea/trashbox', {asynchronous:true, evalScripts:true});
0
+// function inboxLoad() {
0
+// setFieldsetFlag('legend_inbox');
0
+// $('legend_inbox').classNames().set('fld_on');
0
+// new Ajax.Request('/actionarea/inbox', {asynchronous:true, evalScripts:true});
0
+// function setActionAreaHeigth(event) {
0
+// getActionAreaVars();
0
+// actionAreaShim.setStyle({height:pageSize.pageHeight+'px'});
0
+// actionArea.setStyle({height:pageSize.windowHeight+'px'});
0
+// function setFieldsetFlag(ulid) {
0
+// $('fieldset_legend').classNames().set(ulid);
0
+// function getFieldsetFlag() {
0
+// return $('fieldset_legend').classNames().toString();
0
+// function isActionAreaDisplayed(obj) {
0
+// if (obj.childNodes[0].hasClassName('fld_on')) return false ;
0
+// function loadingActionArea(obj) {
0
+// clicked = obj.childNodes[0];
0
+// currentFieldsetFlag = getFieldsetFlag();
0
+// switch (currentFieldsetFlag) {
0
+// case 'legend_inbox' : hidelist = 'inbox_list' ; break;
0
+// case 'legend_trash' : hidelist = 'trashbox_list' ; break;
0
+// case 'legend_search' : hidelist = 'searchbox_list' ; break;
0
+// setFieldsetFlag(clicked.id);
0
+// clicked.classNames().set('fld_on');
0
+// $(currentFieldsetFlag).classNames().set('');
0
+// if (clicked.id != 'legend_trash') {$('trashbox_emptytrash_box').hide()};
0
+// $('fieldset_progress_wrap').visualEffect('blind_down',{duration: 0.35});
0
+// $(hidelist).visualEffect('blind_up',{duration: 0.35});
0
+// function showOrHideEmptyTrashBox() {
0
+// emptyTrashBox = $('trashbox_emptytrash_box');
0
+// if ( (Element.hasClassName('trashcan','trash_full')) && (getFieldsetFlag()=='legend_trash') ) {emptyTrashBox.show();} else {emptyTrashBox.hide();};
Comments
No one has commented yet.