{I" class:ETI"ProcessedAsset;FI"logical_path;TI"alchemy/alchemy.base.js;FI" pathname;TI"q/Users/tvd/.rvm/gems/ruby-2.1.2/gems/alchemy_cms-3.0.0/app/assets/javascripts/alchemy/alchemy.base.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;Tl+9ÚþSI" length;Ti›I" digest;TI"%3de74b73298f1ee7abfd94d6c15ea4da;FI" source;TI"›(function() { if (typeof window.Alchemy === 'undefined') { window.Alchemy = {}; } $.fx.speeds._default = 400; $.extend(Alchemy, { pictureSelector: function() { var $picture_selects, $selected_item_tools; $selected_item_tools = $(".selected_item_tools"); $picture_selects = $(".picture_tool.select input"); $picture_selects.on("change", function() { if ($picture_selects.filter(":checked").size() > 0) { $selected_item_tools.show(); } else { $selected_item_tools.hide(); } if (this.checked) { $(this).parent().addClass("visible").removeClass("hidden"); } else { $(this).parent().removeClass("visible").addClass("hidden"); } }); $("a#edit_multiple_pictures").on("click", function(e) { var $this, picture_ids, url; $this = $(this); picture_ids = $("input:checkbox", "#picture_archive").serialize(); url = $this.attr("href") + "?" + picture_ids; Alchemy.openDialog(url, { title: $this.attr("title"), size: '400x295' }); return false; }); }, pleaseWaitOverlay: function(show) { var $overlay, spinner; if (show == null) { show = true; } $overlay = $('#overlay'); if (show) { spinner = Alchemy.Spinner.medium(); $overlay.append(spinner.spin().el); $overlay.show(); } else { $overlay.find('.spinner').remove(); $overlay.hide(); } }, ImageLoader: function(scope, options) { if (scope == null) { scope = document; } if (options == null) { options = { color: '#fff' }; } return $('img', scope).each(function() { var $parent, image, spinner; image = $(this).hide(); $parent = image.parent(); spinner = Alchemy.Spinner.small(options); spinner.spin($parent[0]); image.on('load', function() { spinner.stop(); return image.fadeIn(400); }); return image.on('error', function() { spinner.stop(); return $parent.html(''); }); }); }, removePicture: function(selector) { var $element, $form_field; $form_field = $(selector); $element = $form_field.parents(".element_editor"); if ($form_field) { $form_field.val(""); $form_field.prev().remove(); $form_field.parent().addClass("missing"); Alchemy.setElementDirty($element); } }, setElementSaved: function(selector) { var $element; $element = $(selector); Alchemy.setElementClean(selector); Alchemy.Buttons.enable($element); return true; }, SelectBox: function(scope) { $("select.alchemy_selectbox", scope).select2({ minimumResultsForSearch: 7, dropdownAutoWidth: true }); }, Buttons: function(options) { $("button, input:submit, a.button").button(options); }, selectOrCreateCellTab: function(cell_name, label) { var $cells, $tab; $cells = $('#cells'); $tab = $("#cell_" + cell_name); if ($tab.length === 0) { $("
  • " + label + "
  • ").appendTo('#cells .ui-tabs-nav'); $tab = $("
    "); $cells.append($tab); $cells.tabs().tabs('refresh'); } $cells.tabs().tabs('option', 'active', $('#cells > div').index($tab)); }, buildTabbedCells: function(label) { var $cells; $cells = $('
    '); $('#cell_for_other_elements').wrap($cells); $('#cells').prepend("").tabs('paging', { follow: true, followOnSelect: true }); }, debug: function(e) { if (window["console"]) { console.debug(e); console.trace(); } }, getUrlParam: function(name) { var results; results = new RegExp("[\\?&]" + name + "=([^&#]*)").exec(window.location.href); if (results) { results[1] || 0; } }, isiPhone: navigator.userAgent.match(/iPhone/i) !== null, isiPad: navigator.userAgent.match(/iPad/i) !== null, isiPod: navigator.userAgent.match(/iPod/i) !== null, isiOS: navigator.userAgent.match(/iPad|iPhone|iPod/i) !== null, isFirefox: navigator.userAgent.match(/Firefox/i) !== null, isChrome: navigator.userAgent.match(/Chrome/i) !== null, isSafari: navigator.userAgent.match(/Safari/i) !== null, isIE: navigator.userAgent.match(/MSIE/i) !== null }); Alchemy.getBrowserVersion = function(browser) { if (Alchemy["is" + browser]) { parseInt(navigator.userAgent.match(new RegExp(browser + ".[0-9]+", "i"))[0].replace(new RegExp(browser + "."), ""), 10); } else { null; } }; Alchemy.ChromeVersion = Alchemy.getBrowserVersion("Chrome"); Alchemy.FirefoxVersion = Alchemy.getBrowserVersion("Firefox"); Alchemy.SafariVersion = Alchemy.getBrowserVersion("Safari"); Alchemy.IEVersion = Alchemy.getBrowserVersion("MSIE"); }).call(this); ;TI"dependency_digest;TI"%953e316dc79177521787431f83245651;FI"required_paths;T[I"q/Users/tvd/.rvm/gems/ruby-2.1.2/gems/alchemy_cms-3.0.0/app/assets/javascripts/alchemy/alchemy.base.js.coffee;FI"dependency_paths;T[{I" path;TI"q/Users/tvd/.rvm/gems/ruby-2.1.2/gems/alchemy_cms-3.0.0/app/assets/javascripts/alchemy/alchemy.base.js.coffee;FI" mtime;TI"2014-08-28T09:28:57+02:00;TI" digest;TI"%327095573192e5cd28d9518450ff4213;FI" _version;TI"%1005ed9f20e25fb0a0599a7017dd0e6b;F