Переглянути джерело

Merge pull request #498 from spenceralger/extended-jquery-fix

Fix for jQuery extensions
spenceralger 12 роки тому
батько
коміт
fd0b1986e8

Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/app/app.js


+ 1 - 1
dist/app/components/require.config.js

@@ -1,4 +1,4 @@
 /*! kibana - v3.0.0m3pre - 2013-09-14
  * Copyright (c) 2013 Rashid Khan; Licensed Apache License */
 
-require.config({baseUrl:"app",paths:{config:"../config",settings:"components/settings",kbn:"components/kbn",css:"../vendor/require/css",text:"../vendor/require/text",moment:"../vendor/moment",filesaver:"../vendor/filesaver",angular:"../vendor/angular/angular","angular-strap":"../vendor/angular/angular-strap","angular-sanitize":"../vendor/angular/angular-sanitize",timepicker:"../vendor/angular/timepicker",datepicker:"../vendor/angular/datepicker",underscore:"components/underscore.extended","underscore-src":"../vendor/underscore",bootstrap:"../vendor/bootstrap/bootstrap",jquery:"components/jquery.extended","jquery-src":"../vendor/jquery/jquery-1.8.0","jquery.flot":"../vendor/jquery/jquery.flot","jquery.flot.pie":"../vendor/jquery/jquery.flot.pie","jquery.flot.selection":"../vendor/jquery/jquery.flot.selection","jquery.flot.stack":"../vendor/jquery/jquery.flot.stack","jquery.flot.time":"../vendor/jquery/jquery.flot.time",modernizr:"../vendor/modernizr-2.6.1",elasticjs:"../vendor/elasticjs/elastic-angular-client"},shim:{underscore:{exports:"_"},angular:{deps:["jquery"],exports:"angular"},bootstrap:{deps:["jquery"]},modernizr:{exports:"Modernizr"},"jquery-src":{init:function(a){return function(){var b=a.jQuery;return require.undef("jquery"),b}}(this)},"jquery.flot":["jquery"],"jquery.flot.pie":["jquery","jquery.flot"],"jquery.flot.selection":["jquery","jquery.flot"],"jquery.flot.stack":["jquery","jquery.flot"],"jquery.flot.time":["jquery","jquery.flot"],"angular-sanitize":["angular"],"angular-cookies":["angular"],"angular-loader":["angular"],"angular-mocks":["angular"],"angular-resource":["angular"],"angular-route":["angular"],"angular-touch":["angular"],"angular-strap":["angular","bootstrap","timepicker","datepicker"],timepicker:["jquery","bootstrap"],datepicker:["jquery","bootstrap"],elasticjs:["angular","../vendor/elasticjs/elastic"]}});
+require.config({baseUrl:"app",paths:{config:"../config",settings:"components/settings",kbn:"components/kbn",css:"../vendor/require/css",text:"../vendor/require/text",moment:"../vendor/moment",filesaver:"../vendor/filesaver",angular:"../vendor/angular/angular","angular-strap":"../vendor/angular/angular-strap","angular-sanitize":"../vendor/angular/angular-sanitize",timepicker:"../vendor/angular/timepicker",datepicker:"../vendor/angular/datepicker",underscore:"components/underscore.extended","underscore-src":"../vendor/underscore",bootstrap:"../vendor/bootstrap/bootstrap",jquery:"../vendor/jquery/jquery-1.8.0","jquery.kbn":"components/jquery.kbn","jquery.flot":"../vendor/jquery/jquery.flot","jquery.flot.pie":"../vendor/jquery/jquery.flot.pie","jquery.flot.selection":"../vendor/jquery/jquery.flot.selection","jquery.flot.stack":"../vendor/jquery/jquery.flot.stack","jquery.flot.time":"../vendor/jquery/jquery.flot.time",modernizr:"../vendor/modernizr-2.6.1",elasticjs:"../vendor/elasticjs/elastic-angular-client"},shim:{underscore:{exports:"_"},angular:{deps:["jquery"],exports:"angular"},bootstrap:{deps:["jquery"]},modernizr:{exports:"Modernizr"},jquery:{exports:"jQuery"},"jquery.flot":["jquery"],"jquery.flot.pie":["jquery","jquery.flot"],"jquery.flot.selection":["jquery","jquery.flot"],"jquery.flot.stack":["jquery","jquery.flot"],"jquery.flot.time":["jquery","jquery.flot"],"angular-sanitize":["angular"],"angular-cookies":["angular"],"angular-loader":["angular"],"angular-mocks":["angular"],"angular-resource":["angular"],"angular-route":["angular"],"angular-touch":["angular"],"angular-strap":["angular","bootstrap","timepicker","datepicker"],timepicker:["jquery","bootstrap"],datepicker:["jquery","bootstrap"],elasticjs:["angular","../vendor/elasticjs/elastic"]}});

+ 1 - 1
dist/build.txt

@@ -2,7 +2,6 @@
 app/app.js
 ----------------
 vendor/jquery/jquery-1.8.0.js
-app/components/jquery.extended.js
 vendor/angular/angular.js
 vendor/underscore.js
 app/components/underscore.extended.js
@@ -13,6 +12,7 @@ vendor/angular/angular-sanitize.js
 vendor/angular/timepicker.js
 vendor/angular/datepicker.js
 vendor/angular/angular-strap.js
+app/components/jquery.kbn.js
 app/components/settings.js
 app/services/alertSrv.js
 vendor/modernizr-2.6.1.js

+ 2 - 1
src/app/app.js

@@ -10,7 +10,8 @@ define([
   'elasticjs',
   'bootstrap',
   'angular-sanitize',
-  'angular-strap'
+  'angular-strap',
+  'extend-jquery'
 ],
 function (angular, $, _, appLevelRequire) {
   "use strict";

+ 1 - 1
src/app/components/jquery.extended.js → src/app/components/extend-jquery.js

@@ -1,4 +1,4 @@
-define(['jquery-src'],
+define(['jquery'],
 function ($) {
   'use strict';
 

+ 6 - 13
src/app/components/require.config.js

@@ -23,8 +23,10 @@ require.config({
     'underscore-src':         '../vendor/underscore',
     bootstrap:                '../vendor/bootstrap/bootstrap',
 
-    jquery:                   'components/jquery.extended',
-    'jquery-src':             '../vendor/jquery/jquery-1.8.0',
+    jquery:                   '../vendor/jquery/jquery-1.8.0',
+
+    'extend-jquery':          'components/extend-jquery.js',
+
     'jquery.flot':            '../vendor/jquery/jquery.flot',
     'jquery.flot.pie':        '../vendor/jquery/jquery.flot.pie',
     'jquery.flot.selection':  '../vendor/jquery/jquery.flot.selection',
@@ -54,17 +56,8 @@ require.config({
       exports: 'Modernizr'
     },
 
-    'jquery-src': {
-      init: (function (global) {
-        'use strict';
-        return function () {
-          var jQuery = global.jQuery;
-          // jquery defines itself, but we want to extend it and provide our version as the 'jquery'
-          // package
-          require.undef('jquery');
-          return jQuery;
-        };
-      })(this)
+    jquery: {
+      exports: 'jQuery'
     },
 
     // simple dependency declatation

Деякі файли не було показано, через те що забагато файлів було змінено