Sha256: 4920cf2ba20a67ebc50c1c670481932bed87072c17b6fabaedea5d0ff7c8ae74

Contents?: true

Size: 1.46 KB

Versions: 24

Compression:

Stored size: 1.46 KB

Contents

var FORGE = {
  features: {
    assets: {}
  },

  helpers: {},

  init: function() {
    $('input.datepicker').datepicker({ dateFormat: "yy-mm-dd" });
    FORGE.setupFancybox();
    FORGE.setupMediaElementJs();
    FORGE.features.assets.dialog.init();
    FORGE.features.buttons.init();
    FORGE.features.mainMenu.init();
    FORGE.features.notifications.init();
    FORGE.features.i18n.init();
    FORGE.features.help.init();
    FORGE.features.forms.init();
    FORGE.features.fileSelectWidget.init();
    FORGE.assetDrawer = new FORGE.features.assets.Drawer('#asset-drawer');
    FORGE.assetDrawer.init();
    FORGE.features.videoFeeds.init();
  },

  setupFancybox: function() {
    var setup = function() {
      $('a.fancybox').fancybox({titlePosition: 'over', overlayOpacity: 0.8, overlayColor: '#333'});
      $('a.fancybox.notitle').fancybox({titleShow: 'false', overlayOpacity: 0.8, overlayColor: '#333'});
    };
    setup();
    $(document).ajaxStop(function () { setup(); });
  },

  setupMediaElementJs: function (options) {
    $('video,audio').mediaelementplayer(options);
  },

  loadInDialog: function (url, dialogOptions) {
    var options = $.extend({width: 500, close: function() { div.remove(); }, modal: true}, dialogOptions);
    var id = new Date().getTime();
    $div = $('<div />').attr('id', id);
    $.ajax({
      url: url,
      dataType: 'HTML',
      success: function(data) {
        $div.html(data);
        $div.dialog(options);
      }
    });
  }
};

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
forge-cli-0.1.10 lib/forge/app/assets/javascripts/forge/forge.js
forge-cli-0.1.9 lib/forge/app/assets/javascripts/forge/forge.js
forge-cli-0.1.8 lib/forge/lib/assets/javascripts/forge/forge.js
forge-cli-0.1.7 lib/forge/lib/assets/javascripts/forge/forge.js
forge-cli-0.1.6 lib/forge/lib/assets/javascripts/forge/forge.js
forge-cli-0.1.5 lib/forge/lib/assets/javascripts/forge/forge.js
forge-cli-0.1.4 lib/forge/lib/assets/javascripts/forge/forge.js
forge-cli-0.1.3 lib/forge/lib/assets/javascripts/forge/forge.js
forge-cli-0.1.2 lib/forge/lib/assets/javascripts/forge/forge.js
forge-cli-0.1.1 lib/forge/lib/assets/javascripts/forge/forge.js
forge-cli-0.1.0 lib/forge/lib/assets/javascripts/forge/forge.js
forge-cli-0.0.18 lib/forge/lib/assets/javascripts/forge/forge.js
forge-cli-0.0.17 lib/forge/lib/assets/javascripts/forge/forge.js
forge-cli-0.0.16 lib/forge/lib/assets/javascripts/forge/forge.js
forge-cli-0.0.15 lib/forge/lib/assets/javascripts/forge/forge.js
forge-cli-0.0.14 lib/forge/lib/assets/javascripts/forge/forge.js
forge-cli-0.0.13 lib/forge/lib/assets/javascripts/forge/forge.js
forge-cli-0.0.12 lib/forge/lib/assets/javascripts/forge/forge.js
forge-cli-0.0.11 lib/forge/lib/assets/javascripts/forge/forge.js
forge-cli-0.0.10 lib/forge/lib/assets/javascripts/forge/forge.js