code
stringlengths
1
2.08M
language
stringclasses
1 value
/* Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ if(!dojo._hasResource["dojox.cometd._base"]){ dojo._hasResource["dojox.cometd._base"]=true; dojo.provide("dojox.cometd._bas...
JavaScript
(function($) { $(document).ready(function(){ $("a.shopimage").fancybox({ 'titleShow' : true, 'titlePosition' : 'inside' }); }) })(jQuery);
JavaScript
// script.aculo.us EffectResize.js // Copyright(c) 2007 - Frost Innovation AS, http://ajaxwidgets.com // // EffectResize.js is freely distributable under the terms of an MIT-style license. // For details, see the script.aculo.us web site: http://script.aculo.us/ // // From: http://wiki.script.aculo.us/scriptaculous/sho...
JavaScript
if(typeof SiteTreeHandlers == 'undefined') SiteTreeHandlers = {}; SiteTreeHandlers.parentChanged_url = 'admin/ajaxupdateparent'; SiteTreeHandlers.orderChanged_url = 'admin/ajaxupdatesort'; SiteTreeHandlers.loadPage_url = 'admin/getitem'; SiteTreeHandlers.loadTree_url = 'admin/getsubtree'; _NEW_PAGES = new Array(); /*...
JavaScript
/** * Modified 2006-10-05, Ingo Schommer * This is more or less a copy of Member.js, with additions and changes * to match the switch from Member.php to MemberTableField.php all over the UI. * Eventually it will replace Member.js (please remove this message then). */ // no confirm message for removal from a grou...
JavaScript
(function($) { $(document).ready(function() { $('.import-form .advanced').hide(); $('.import-form a.toggle-advanced').live( 'click', function(e) { $(this).parents('form:eq(0)').find('.advanced').toggle(); return false; } ); }); }(jQuery));
JavaScript
/** * CAUTION: Assumes that a MemberTableField-instance is present as an editing form */ function action_addmember_right() { var memberTableFields = document.getElementsBySelector('#Form_EditForm div.MemberTableField'); var tables = document.getElementsBySelector('#Form_EditForm div.MemberTableField table'); var a...
JavaScript
tinyMCEPopup.requireLangPack(); var charmap = [ ['Ā', 'Ā', true, 'A - macron'], ['Ē', 'Ē', true, 'E - macron'], ['Ī', 'Ī', true, 'I - macron'], ['Ō', 'Ō', true, 'O - macron'], ['Ū', 'Ū', true, 'U - macron'], ['ā', 'ā', ...
JavaScript
(function() { var each = tinymce.each; /** * Load via: HtmlEditorConfig::get('cms')->enablePlugins(array('ssmacron', '../../../../cms/javascript/tinymce_ssmacron')) */ tinymce.create('tinymce.plugins.InsertMacron', { getInfo : function() { return { longname : 'Button to insert macrons', author : 'H...
JavaScript
/** * Configuration for the left hand tree */ if(typeof SiteTreeHandlers == 'undefined') SiteTreeHandlers = {}; SiteTreeHandlers.parentChanged_url = 'admin/assets/ajaxupdateparent'; SiteTreeHandlers.orderChanged_url = 'admin/assets/ajaxupdatesort'; SiteTreeHandlers.loadPage_url = 'admin/assets/getitem'; SiteTreeHandl...
JavaScript
if(typeof SiteTreeHandlers == 'undefined') SiteTreeHandlers = {}; SiteTree.prototype = { castAsTreeNode: function(li) { behaveAs(li, SiteTreeNode, this.options); }, getIdxOf : function(treeNode) { if(treeNode && treeNode.id) return treeNode.id; }, getTreeNodeByIdx : function(idx) { if(!idx) idx = "0"...
JavaScript
MemberTableFieldPopupForm = Class.extend("ComplexTableFieldPopupForm"); MemberTableFieldPopupForm.prototype = { initialize: function() { this.ComplexTableFieldPopupForm.initialize(); Behaviour.register('MemberTableFieldPopupForm',{ "div.MemberTableField_Popup .Actions input.action": { onclick: this.submi...
JavaScript
AssetTableField = Class.create(); AssetTableField.applyTo('#Form_EditForm_Files'); AssetTableField.prototype = { initialize: function() { Behaviour.register({ '#Form_EditForm div.FileFilter input' : { onkeypress : this.prepareSearch.bind(this) }, '#Form_EditForm' : { changeDetection_fieldsToIgnor...
JavaScript
/** * Javascript handlers for generic model admin. * * Most of the work being done here is intercepting clicks on form submits, * and managing the loading and sequencing of data between the different panels of * the CMS interface. * * @todo add live query to manage application of events to DOM refreshes * @to...
JavaScript
tinyMCE.addI18n('de.tinymce_ssbuttons',{ insertlink: 'Link einfügen', insertimage: 'Bild einfügen', insertflash: 'Flash Objekt einfügen' });
JavaScript
tinyMCE.addI18n('en.tinymce_ssbuttons', { insertlink: 'Insert Link', insertimage: 'Insert Image', insertflash: 'Insert Flash Object' });
JavaScript
(function() { tinymce.PluginManager.requireLangPack("ssbuttons"); var each = tinymce.each; tinymce.create('tinymce.plugins.SSButtons', { /** * Returns information about the plugin as a name/value array. * The current keys are longname, author, authorurl, infourl and version. * * @returns Name/value ar...
JavaScript
Behaviour.register({ 'body.ReportAdmin #Form_EditForm' : { initialise : function() { this.openTab = null; this.prepareForm(); }, /** * Processing called whenever a page is loaded in the right - including the initial one */ prepareForm : function() { ajaxActionsAtTop('Form_EditForm', 'for...
JavaScript
/* highlightImages_over * common/js/highlight.js * Behaviour-abstracted highligher modul * * Usage: * - include <script src="/common/js/highlight.js"></script> in the header of your file * - set the class of the container to "highlight". The class will have ' over' appended to it on mouseover * - set the ove...
JavaScript
if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined'); } else { ss.i18n.addDictionary('sk_SK', { 'CMSMAIN.WARNINGSAVEPAGESBEFOREADDING' : "Pred pridaním ďalšej podstránky, musíte stránku uložiť", 'CMSMAIN.CANTADDCHILDREN' : ...
JavaScript
if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { console.error('Class ss.i18n not defined'); } else { ss.i18n.addDictionary('de_DE', { 'CMSMAIN.WARNINGSAVEPAGESBEFOREADDING' : "Sie müssen diese Seite speichern bevor Unterseiten hingefügt werden können", 'CMSMAIN.CANTADDCHILDREN' : "Unterseiten ni...
JavaScript
if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { console.error('Class ss.i18n not defined'); } else { ss.i18n.addDictionary('fr_FR', { 'CMSMAIN.WARNINGSAVEPAGESBEFOREADDING' : "Vous devez sauvegarder la page avant d\'y ajouter des enfants", 'CMSMAIN.CANTADDCHILDREN' : "Vous ne pouvez pas ajouter ...
JavaScript
if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined'); } else { ss.i18n.addDictionary('cs_CZ', { 'CMSMAIN.WARNINGSAVEPAGESBEFOREADDING' : "Před přidáním další podstránky, musíte stránku uložit", 'CMSMAIN.CANTADDCHILDREN' : "...
JavaScript
if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined'); } else { ss.i18n.addDictionary('en_US', { 'CMSMAIN.WARNINGSAVEPAGESBEFOREADDING' : "You have to save a page before adding children underneath it", 'CMSMAIN.CANTADDCHILDR...
JavaScript
Behaviour.register({ 'input#Form_EditForm_createtranslation': { onclick: function(e) { var st = $('sitetree'); var originalID = st.getIdxOf(st.firstSelected()); if(originalID && originalID.substr(0,3) == 'new') { alert("You have to save a page before translating it"); } else { var url = baseHref(...
JavaScript
Behaviour.register({ '.buttons button' : { onclick: function() { window.top._OPEN_DIALOG.execHandler( this.name ); return false; } } });
JavaScript
function action_publish_right() { $('Form_EditForm_action_publish').value = ss.i18n._t('CMSMAIN.PUBLISHING'); $('Form_EditForm_action_publish').className = 'action loading'; var publish = true; $('Form_EditForm').save(false, null, 'save', publish); } function action_revert_right() { $('Form_EditForm_action_revert'...
JavaScript
CMSForm = Class.extend('ChangeTracker').extend('Observable'); CMSForm.prototype = { initialize : function(fn) { this.ChangeTracker.initialize(); this.formName = fn; this.prepareForm(); }, /** * Trigger normal save event, helpful e.g. when enter key is pressed in * single line input fields. */ onsubmi...
JavaScript
WidgetAreaEditorClass = Class.create(); WidgetAreaEditorClass.prototype = { initialize: function() { this.name = this.getAttribute('name'); this.rewriteWidgetAreaAttributes(); UsedWidget.applyToChildren($('usedWidgets-'+this.name), 'div.Widget'); var availableWidgets = $('availableWidgets-'+this.name).childN...
JavaScript
/** * LeftAndMain_left.js * Code for supporting the left-hand panel of all the 2-pane admin windows * This includes code for the action panel at the top, and the draggable, ajax-linked tree. */ if(typeof SiteTreeHandlers == 'undefined') SiteTreeHandlers = {}; SiteTreeHandlers.parentChanged_url = 'admin/ajaxupdate...
JavaScript
CommentTableField = Class.create(); CommentTableField.prototype = { initialize: function() { var rules = {}; rules['#'+this.id+' table.data a.spamlink'] = { onclick: this.removeRowAfterAjax.bind(this) }; rules['#'+this.id+' table.data a.approvelink'] = { onclick: this.removeRowAfterAjax.bind(this) ...
JavaScript
/** * Configuration for the left hand tree */ if(typeof SiteTreeHandlers == 'undefined') SiteTreeHandlers = {}; SiteTreeHandlers.parentChanged_url = 'admin/security/ajaxupdateparent'; SiteTreeHandlers.orderChanged_url = 'admin/security/ajaxupdatesort'; SiteTreeHandlers.loadPage_url = 'admin/security/getitem'; SiteTre...
JavaScript
/** * Ajax to support the comment posting system */ PageCommentInterface = Class.create(); PageCommentInterface.prototype = { initialize: function() { Behaviour.register({ '#PageCommentInterface_Form_PostCommentForm_action_postcomment' : { onclick : this.postComment }, '#PageComments a.deletelink' ...
JavaScript
ThumbnailStripField = Class.create(); // We do this instead of div.thumbnailstrip for efficiency. It means that ThumbnailStripField can only be used in the // CMS toolbar ThumbnailStripField.applyTo('#FolderImages'); ThumbnailStripField.applyTo('#Flash'); ThumbnailStripField.prototype = { /** * @var updateMethod ...
JavaScript
var _AJAX_LOADING = false; // Resize the tabs once the document is properly loaded // @todo most of this file needs to be tidied up using jQuery if(typeof(jQuery) != 'undefined') { (function($) { $(document).ready(function() { window.onresize(true); }); })(jQuery); } /** * Code for the separator bar between...
JavaScript
function hover_over() { Element.addClassName(this, 'over'); } function hover_out() { Element.removeClassName(this, 'over'); } hover_behaviour = { onmouseover : hover_over, onmouseout : hover_out }
JavaScript
Behaviour.register({ '#Form_EditForm' : { getPageFromServer : function(id) { statusMessage("loading..."); var requestURL = 'admin/comments/showtable/' + id; this.loadURLFromServer(requestURL); $('sitetree').setCurrentByIdx(id); } } });
JavaScript
SideReports = Class.extend('SidePanel'); SideReports.prototype = { initialize: function() { this.selector = $('ReportSelector'); if(this.selector) this.selector.holder = this; this.SidePanel.initialize(); }, destroy: function() { if(this.SidePanel) this.SidePanel.destroy(); this.SidePanel = null; if(th...
JavaScript
/** * UI behaviour for the "Access" tab */ var siteTreeAccessHandler = function(canField, groupsField) { var output = {} output['#Form_EditForm_' + canField + ' input'] = { initialize: function() { if(this.checked) this.click(); }, onclick: function() { $(groupsField).style.display = (this.value == 'On...
JavaScript
var _TRANSLATING_LANG = null; /** * */ LangSelectorClass = Class.create(); LangSelectorClass.prototype = { initialize: function() { if(this.selectedIndex != 0) { _TRANSLATING_LANG = this.value; } }, onchange: function(e, val) { if(this.value != _TRANSLATING_LANG) { _TRANSLATING_LANG = this.value; ...
JavaScript
/** * Javascript required to power the user defined forms. * * Rewritten from the prototype FieldEditor and constantly * being refactored to be be less specific on the UDF dom. */ (function($) { $(document).ready(function() { /** * Namespace */ var userforms = userforms || {}; /** * Messages fr...
JavaScript
alert('c');
JavaScript
alert('a');
JavaScript
alert('b');
JavaScript
/** * Javascript for TableField. allows the deletion of records via * AJAX, and the addition of rows via javasript. * * TODO relies on include-order at the moment to override actions :/ */ Effect.FadeOut = function(element,callback) { element = $(element); var oldOpacity = Element.getInlineOpacity(element); ...
JavaScript
/** * TreeDropdownField.js */ TreeDropdownField = Class.extend('Observable'); TreeDropdownField.prototype = { initialize: function() { // Hook up all the fieldy bits this.editLink = this.getElementsByTagName('a')[0]; if (this.getElementsByTagName('span').length > 0) { // no search, humanItems is a span t...
JavaScript
(function($) { $(document).ready(function() { $("input.rollover").live('mouseover', function(){ if(!this.overSrc) { var srcParts = $(this).attr('src').match( /(.*)\.([a-zA-Z]+)$/ ); var fileName = srcParts[1]; var extension = srcParts[2]; this.overSrc = fileName + '_over.' + extension; this...
JavaScript
(function($) { Behaviour.register({ /** * Automatically check and disable all checkboxes if ADMIN permissions are selected. * As they're disabled, any changes won't be submitted (which is intended behaviour), * checking all boxes is purely presentational. */ '.permissioncheckboxset .valADMIN input': { ...
JavaScript
/** * Javascript-Template, needs to be evaluated by Requirements::javascriptTemplate */ Behaviour.register({ 'div.inlineformaction input#$ID': { onclick: function() { var url = baseHref() + 'admin-custom/' + this.name.substring(7) + '?ID=' + $('Form_EditForm_ID').value + '&ajax=1'; new Ajax.Request( url,...
JavaScript
NumericField = Class.create(); NumericField.applyTo('input.numeric'); NumericField.prototype = { initialize: function() { this.oldValue = this.value; }, setRange: function( minValue, maxValue ) { this.minValue = minValue; this.maxValue = maxValue; }, onkeyup: function() { var testValue = this.value; ...
JavaScript
/* * Stretch an object out to fill its parent. Give space for siblings * If Mozilla didn't have a funky bug, we could *maybe* do this without JavaScript * * A more robust stretchObject() replacement */ function fitToParent(el, tweakVal) { if(typeof el == "string") { var elName = el; el = document.getElement...
JavaScript
if(typeof(ss) == 'undefined') ss = {}; /** * Stub implementation for ss.i18n code. * Use instead of sapphire/javascript/i18n.js * if you want to use any SilverStripe javascript * without internationalization support. */ ss.i18n = { currentLocale: 'en_US', defaultLocale: 'en_US', _t: function (entity, fal...
JavaScript
Behaviour.register({ 'div.confirmedpassword' : { initialize: function() { var rules = {}; rules['#'+this.id+' .showOnClick a'] = {onclick: function(e) { this.toggle(); Event.stop(e); }.bind(this)}; Behaviour.register(rules); this.toggle(); }, toggle: function() { var containe...
JavaScript
UniqueFormField = Class.create(); UniqueFormField.prototype = { validate: function() { // check that the value is not in use, and matches the pattern var suggested = this.value; if( this.restrictedValues[suggested] || suggested == null ) { suggested = this.suggestNewValue(); statusMessage(ss.i18n.sprint...
JavaScript
Event.observe( window, 'load', function() { if($('sitetree')){ if(typeof $('sitetree').observeMethod != 'undefined') { $('sitetree').observeMethod( 'NodeClicked' , function() { checkedListNameArray = null; checkedArray = null; } ); } } } ); RelationComplexTableField = Class.create(); RelationComp...
JavaScript
Behaviour.register({ 'input#Form_EditForm_ExternalURL': { onclick: function() { $('Form_EditForm_RedirectionType_External').checked = true; } }, '#TreeDropdownField_Form_EditForm_LinkToID': { onclick: function() { $('Form_EditForm_RedirectionType_Internal').checked = true; } } });
JavaScript
/* * common/js/loader.js * Common file, to be included before any of the other common/js scripts */ /* * Gracefully deal with a whole lot of modules wanting to set the onload() event handler */ if(typeof _LOADERS == 'undefined') _LOADERS = Array(); function callAllLoaders() { var i, loaderFunc; for(i=0;i<_LOA...
JavaScript
(function($) { $(document).ready(function() { $('ul.SelectionGroup input.selector').live('click', function(){ var li = $(this).parent('li') li.addClass('selected'); var prev = li.prevAll('li.selected'); if(prev.length) prev.removeClass('selected'); var next = li.nextAll('li.selected'); if(next.length) n...
JavaScript
/** * On-demand JavaScript handler * Based on http://plugins.jquery.com/files/issues/jquery.ondemand.js_.txt * and heavily modified to integrate with SilverStripe and prototype.js. * Adds capabilities for custom X-Include-CSS and X-Include-JS HTTP headers * to request loading of externals alongside an ajax respon...
JavaScript
if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined'); } else { ss.i18n.addDictionary('sk_SK', { 'VALIDATOR.FIELDREQUIRED': 'Vyplňte "%s", prosím, je požadované.', 'HASMANYFILEFIELD.UPLOADING': 'Nahrávanieí... %s', 'TABLEF...
JavaScript
if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { console.error('Class ss.i18n not defined'); } else { ss.i18n.addDictionary('de_DE', { 'VALIDATOR.FIELDREQUIRED': '"%s" wird benötigt' }); }
JavaScript
if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { console.error('Class ss.i18n not defined'); } else { ss.i18n.addDictionary('fr_FR', { 'VALIDATOR.FIELDREQUIRED': 'Veuillez remplir "%s", c\'est un champ requis.', 'HASMANYFILEFIELD.UPLOADING': 'Uploading... %s', 'TABLEFIELD.DELETECONFIRMMESSAGE':...
JavaScript
if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined'); } else { ss.i18n.addDictionary('cs_CZ', { 'VALIDATOR.FIELDREQUIRED': 'Vyplňte "%s", prosím, je vyžadováno.', 'HASMANYFILEFIELD.UPLOADING': 'Nahrávání... %s', 'TABLEFIE...
JavaScript
if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined'); } else { ss.i18n.addDictionary('nl_NL', { 'VALIDATOR.FIELDREQUIRED': 'Vul het veld "%s" in, dit is een verplicht veld.', 'HASMANYFILEFIELD.UPLOADING': 'Uploading......
JavaScript
if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') { if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined'); } else { ss.i18n.addDictionary('en_US', { 'VALIDATOR.FIELDREQUIRED': 'Please fill out "%s", it is required.', 'HASMANYFILEFIELD.UPLOADING': 'Uploading... %s', 'TABLEFI...
JavaScript
GB_OpenerObj = {}; GB_RefreshLink = ""; ComplexTableField = Class.create(); ComplexTableField.prototype = { // These are defaults used if setPopupSize encounters errors defaultPopupWidth: 560, defaultPopupHeight: 390, initialize: function() { var rules = {}; rules['#'+this.id+' table.data a.popuplink'] = {...
JavaScript
var ToggleField = Class.create(); ToggleField.prototype = { initialize: function() { var rules = {}; rules['#' + this.id + ' .triggerMore'] = { onclick: function(e) { Element.toggle(this); Event.stop(e); return false; }.bind(this) }; rules['#' + this.id + ' .triggerLess'] = { onclick: function...
JavaScript
var _CURRENT_FORM; var _FIRST_ERRORED_FIELD = null; var _VALIDATIONS_REF = new Array(); function initialiseForm(form, fromAnOnBlur) { _CURRENT_FORM = form; _FIRST_ERRORED_FIELD = null; if(fromAnOnBlur) { limitValidationErrorsTo(fromAnOnBlur); } else { clearValidationErrorLimit(); } _HAS_HAD_FORM_ERROR = fa...
JavaScript
/* * Content-separated javascript tree widget * * Usage: * behaveAs(someUL, Tree) * OR behaveAs(someUL, DraggableTree) * * Extended by Steven J. DeRose, deroses@mail.nih.gov, sderose@acm.org. * * INPUT REQUIREMENTS: * Put class="tree" on topmost UL(s). * Can put class="closed" on LIs to have t...
JavaScript
Behaviour.register({ 'input#Form_EditForm_Title': { /** * Get the URL segment to suggest a new field */ onchange: function() { if(this.value.length == 0) return; if(!$('Form_EditForm_URLSegment')) return; var urlSegmentField = $('Form_EditForm_URLSegment'); var isNew = urlSegmentField.value.i...
JavaScript
var ToggleCompositeField = Class.create(); ToggleCompositeField.prototype = { initialize: function() { var rules = {}; rules['#' + this.id + ' .trigger'] = { onclick: function(e) { this.toggle(); Event.stop(e); return false; }.bind(this) }; Behaviour.register(rules); // close content by defa...
JavaScript
(function($) { $('.formattingHelpText').hide(); $('.formattingHelpToggle').click(function() { $(this).parent().find('.formattingHelpText').toggle(); return false; }) })(jQuery);
JavaScript
if(typeof(ss) == 'undefined') ss = {}; /* * Lightweight clientside i18n implementation. * Caution: Only available after DOM loaded because we need to detect the language * * For non-i18n stub implementation, see sapphire/javascript/i18nx.js * * Based on jQuery i18n plugin: 1.0.0 Feb-10-2008 * * Dual licens...
JavaScript
HasManyFileField = Class.create(); HasManyFileField.applyTo('div.hasmanyfile'); HasManyFileField.prototype = { initialize: function() { HasManyFileFieldAddButton.applyToChildren(this, 'a.addFile'); HasManyFileFieldRemoveButton.applyToChildren(this, 'a.removeFile'); HasManyFileFieldUploadButton.applyToChildren(th...
JavaScript
var DropdownTime = []; TimeBehaviour = { initialise : function () { this.isOpen = false; this.icon = $( this.id + '-icon' ); this.icon.onclick = this.toggle.bind( this ); this.dropdowntime = $( this.id + '-dropdowntime' ); var dropdown = '<select id="' + this.id + '-dropdowntime' + '-select'...
JavaScript
/** * Functions for HtmlEditorFields in the back end. * Includes the JS for the ImageUpload forms. * * Relies on the jquery.form.js plugin to power the * ajax / iframe submissions */ (function($) { $(document).ready(function() { /** * On page refresh load the initial images (in root) */ if($("#Fold...
JavaScript
window.onload = function() { resourcePath = jQuery('form').attr('action'); jQuery("fieldset input:first").attr('autocomplete', 'off').autocomplete({list: ["mark rickerby", "maxwell sparks"]}); jQuery("fieldset input:first").bind('activate.autocomplete', function(e){ type = jQuery("fieldset input:first").a...
JavaScript
TableListField = Class.create(); TableListField.prototype = { errorMessage: "Error talking to server", initialize: function() { var rules = {}; rules['#'+this.id+' table.data a.deletelink'] = { onclick: this.deleteRecord.bind(this) }; rules['#'+this.id+' th a'] = { onclick: this.refresh.bind(thi...
JavaScript
ComplexTableFieldPopupForm = Class.create(); ComplexTableFieldPopupForm.prototype = { initialize: function() { var rules = {}; Behaviour.register(rules); } } ComplexTableFieldPopupForm.applyTo('#ComplexTableField_Popup_DetailForm'); ComplexTableFieldPopupForm.applyTo('#ComplexTableField_Popup_AddForm');
JavaScript
function windowName(suffix) { var base = document.getElementsByTagName('base')[0].href.replace('http://','').replace(/\//g,'_').replace(/\./g,'_'); return base + suffix; } (function($) { $('#switchView a.newWindow').live('click', function() { var w = window.open(this.href, windowName(this.target)); w.focus(...
JavaScript
(function($) { $('#Form_DeleteFileForm_action_delete').click(function(e) { var deleteMessage = ss.i18n._t('FILEIFRAMEFIELD.CONFIRMDELETE', 'Are you sure you want to delete this file?'); if(typeof(parent.jQuery.fn.dialog) != 'undefined') { var buttons = {}; var $dialog = undefined; var $delete...
JavaScript
(function($) { $('.field.date input.text').live('click', function() { var holder = $(this).parents('.field.date:first'), config = holder.metadata(); if(!config.showcalendar) return; if(config.locale && $.datepicker.regional[config.locale]) { config = $.extend(config, $.datepicker.regional[config.locale], {...
JavaScript
$(document).ready(function() { /** * Toggle field readonly modes, if check configuration comes from * _ss_environment (values populated on reload). */ $('#use_environment').click(function(e) { if(!$(this).is(':checked')) { $('.configured-by-env').removeAttr('disabled'); } else { $('.configured-by-en...
JavaScript
UserPhoto = function (config) { if (typeof config == 'object') { for (var prop in config) { this[prop] = config[prop]; } } this.uploadedPhotos = new Array(); for (var i = 0; i < this.maxPhotoCount; ++i) { this.uploadedPhotos[i] = (i >= config.loaded ? 0 : 1); } ...
JavaScript
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang('placeholder','he',{placeholder:{title:'מאפייני שומר מקום',toolbar:'צור שומר מקום',text:'תוכן שומר המקום',edit:'ערוך שומר מקום',textMissing:'שו...
JavaScript
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang('placeholder','en',{placeholder:{title:'Placeholder Properties',toolbar:'Create Placeholder',text:'Placeholder Text',edit:'Edit Placeholder',te...
JavaScript
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.add('docprops',{init:function(a){var b=new CKEDITOR.dialogCommand('docProps');b.modes={wysiwyg:a.config.fullPage};a.addCommand('docProps',b);CKEDITOR.d...
JavaScript
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang('uicolor','he',{uicolor:{title:'בחירת צבע ממשק משתמש',preview:'תצוגה מקדימה',config:'הדבק את הטקסט הבא לתוך הקובץ config.js',predefined:'קבוצות...
JavaScript
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang('uicolor','en',{uicolor:{title:'UI Color Picker',preview:'Live preview',config:'Paste this string into your config.js file',predefined:'Predefi...
JavaScript
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */
JavaScript
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.setLang('devtools','en',{devTools:{title:'Element Information',dialogName:'Dialog window name',tabName:'Tab name',elementId:'Element ID',elementType:'E...
JavaScript
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.editorConfig = function( config ) { config.language = 'ru'; config.toolbar = [ { name: 'styles', items : [ 'Font','FontSize' ] }, { name:...
JavaScript
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ // Compressed version of core/ckeditor_base.js. See original for instructions. /*jsl:ignore*/ if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'',vers...
JavaScript
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ // Compressed version of core/ckeditor_base.js. See original for instructions. /*jsl:ignore*/ if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'',vers...
JavaScript
/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net) * Licensed under the MIT License (LICENSE.txt). * * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. * Thanks to: Seamus Leahy for adding deltaX and delta...
JavaScript
/*! * Media helper for fancyBox * version: 1.0.5 (Tue, 23 Oct 2012) * @requires fancyBox v2.0 or later * * Usage: * $(".fancybox").fancybox({ * helpers : { * media: true * } * }); * * Set custom URL parameters: * $(".fancybox").fancybox({ * helpers : { * ...
JavaScript
/*! * Buttons helper for fancyBox * version: 1.0.5 (Mon, 15 Oct 2012) * @requires fancyBox v2.0 or later * * Usage: * $(".fancybox").fancybox({ * helpers : { * buttons: { * position : 'top' * } * } * }); * */ (function ($) { //Shortcut for ...
JavaScript
/*! * Thumbnail helper for fancyBox * version: 1.0.7 (Mon, 01 Oct 2012) * @requires fancyBox v2.0 or later * * Usage: * $(".fancybox").fancybox({ * helpers : { * thumbs: { * width : 50, * height : 50 * } * } * }); * */ (fun...
JavaScript
//Определение координат элемента: вариант 1 function getOffsetSum(elem) { var top=0, left=0 while(elem) { top = top + parseFloat(elem.offsetTop) left = left + parseFloat(elem.offsetLeft) elem = elem.offsetParent } return {top: Math.round(top), left: Math.ro...
JavaScript
/* * jquery-counter plugin * * Refactoring of http://jquery-countdown.googlecode.com */ (function($){ var default_options = { stepTime: 60, // startTime and format MUST follow the same format. // also you cannot specify a format unordered (e.g. hh:ss:mm is wrong) format: "dd:hh:mm:ss", startTim...
JavaScript