thin_man 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 18d3ad1b7b7d906597566cf1b1d8f2bc529f82be
4
- data.tar.gz: 81c67a1a5e66e4a4403d68bc4ec27adaacd6dfc3
3
+ metadata.gz: ab4643e96764c84831a83b8c4b242ee8ada0e56f
4
+ data.tar.gz: 4c7df768a22ffed25a56de567990c0cc75244181
5
5
  SHA512:
6
- metadata.gz: b99ae5b6516c58f94e85077e1534a0d4b2db6dbbee324610adb647c6cc841b3658f4226bc741438050b1b224dddcd4ec5fb9b432cb223cf52872c512aa6b294d
7
- data.tar.gz: 52ed6c0bf877bc1773fd8e8937369de0bb7adea7381824247af62bf69977cf277720cdf5bc26ca24eebc09ee02a5218e07fc6b9652b17d613690c0706a2675db
6
+ metadata.gz: 26a7f1159cece9927f5b68df7e07cb842c53d925fb030c52ecc754c03c5edd860ecebb802e5a20d5064c3abc404d6294edf5a8616de625bd195f3fada43fe9ee
7
+ data.tar.gz: 29076217914f036bcadb2f9def4c4e64e4b9d21556f2aa05751cf2f2a4c0a2c8d55c137282300b07566ded70f18f47f14f5d8a5e977f7f2159aa522a5438bcc5
@@ -286,17 +286,16 @@ var initThinMan = function(){
286
286
  }
287
287
  }),
288
288
  AjaxSorter: Class.extend({
289
- init: function(jq_obj){
290
- var sort_container = jq_obj;
291
- var base_url = sort_container.data('url');
292
- sort_container.sortable({
289
+ init: function($sort_container){
290
+ var base_url = $sort_container.data('url');
291
+ $sort_container.sortable({
293
292
  helper: "clone",
294
293
  tolerance: 'pointer',
295
294
  stop: function( event, ui) {
296
- new thin_man.AjaxSortSubmission(sort_container);
295
+ new thin_man.AjaxSortSubmission($sort_container);
297
296
  }
298
297
  });
299
- jq_obj.disableSelection();
298
+ $sort_container.disableSelection();
300
299
  }
301
300
  })
302
301
  };
@@ -435,7 +434,11 @@ var initThinMan = function(){
435
434
  ajaxSuccess: function(){
436
435
 
437
436
  }
438
- })
437
+ });
438
+ thin_man.loadClasses = function(){
439
+ window.any_time_manager.registerListWithClasses({'sortable' : 'AjaxSorter'},'thin_man');
440
+ window.any_time_manager.load();
441
+ };
439
442
  $(document).ready(function(){
440
443
  $(document).on('click','[data-ajax-link]',function(e){
441
444
  e.preventDefault();
@@ -462,13 +465,27 @@ var initThinMan = function(){
462
465
  new thin_man.AjaxPushState($(this))
463
466
  })
464
467
 
465
- $('[data-sortable]').each(function(){
466
- new thin_man.AjaxSorter($(this));
467
- });
468
+ if(typeof window.any_time_manager === "undefined" && typeof window.loading_any_time_manager === "undefined"){
469
+ window.loading_any_time_manager = true;
470
+ $.getScript("https://cdn.rawgit.com/edraut/anytime_manager/9f710d2280e68ea6156551728cb7e2d537a06ee6/anytime_manager.js",function(){
471
+ window.loading_any_time_manager = false
472
+ thin_man.loadClasses();
473
+ });
474
+ }else if(typeof window.any_time_manager === "undefined"){
475
+ if(typeof window.any_time_load_functions === 'undefined'){
476
+ window.any_time_load_functions = []
477
+ }
478
+ window.any_time_load_functions.push(thin_man.loadClasses)
479
+ }else{
480
+ thin_man.loadClasses();
481
+ };
468
482
 
469
483
  });
470
484
 
471
485
  };
486
+ $('[data-sortable]').each(function(){
487
+ new thin_man.AjaxSorter($(this));
488
+ });
472
489
 
473
490
  if(typeof Class === "undefined"){
474
491
  $.getScript('https://rawgit.com/edraut/js_inheritance/a6c1e40986ecb276335b0a0b1792abd01f05ff6c/inheritance.js', function(){
@@ -1,3 +1,3 @@
1
1
  module ThinMan
2
- VERSION = "0.8.1"
2
+ VERSION = "0.8.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thin_man
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Draut, Adam Bialek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-04 00:00:00.000000000 Z
11
+ date: 2015-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails