hooch 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/hooch.js +66 -22
- data/lib/hooch/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 425e8e9996820877bf0ef97a786bc9092a82c4b3
|
4
|
+
data.tar.gz: e008d306a17d7abc57879f692ed3f07c28bdbcde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e43be232b6648814239b03c193414a7325696c43dc2dadd9c82e37f63726d286504d96d231564822c4932ae0bf8b23f4a700aa6700c4eb61a4f58d8df24bee3
|
7
|
+
data.tar.gz: 6923b1d87eadf0376acac23631fead26fb607efd59c7d21669806e7b25c7d88a1a7e8aef3a51233f8c140476efc5669d87179d87d3106fe1ee677109f2966977
|
@@ -1,3 +1,69 @@
|
|
1
|
+
/* Simple JavaScript Inheritance
|
2
|
+
* By John Resig http://ejohn.org/
|
3
|
+
* MIT Licensed.
|
4
|
+
*/
|
5
|
+
// Inspired by base2 and Prototype
|
6
|
+
(function(){
|
7
|
+
var initializing = false, fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/;
|
8
|
+
// The base Class implementation (does nothing)
|
9
|
+
this.Class = function(){};
|
10
|
+
|
11
|
+
// Create a new Class that inherits from this class
|
12
|
+
Class.extend = function(prop) {
|
13
|
+
var _super = this.prototype;
|
14
|
+
|
15
|
+
// Instantiate a base class (but only create the instance,
|
16
|
+
// don't run the init constructor)
|
17
|
+
initializing = true;
|
18
|
+
var prototype = new this();
|
19
|
+
initializing = false;
|
20
|
+
|
21
|
+
// Copy the properties over onto the new prototype
|
22
|
+
for (var name in prop) {
|
23
|
+
// Check if we're overwriting an existing function
|
24
|
+
prototype[name] = typeof prop[name] == "function" &&
|
25
|
+
typeof _super[name] == "function" && fnTest.test(prop[name]) ?
|
26
|
+
(function(name, fn){
|
27
|
+
return function() {
|
28
|
+
var tmp = this._super;
|
29
|
+
|
30
|
+
// Add a new ._super() method that is the same method
|
31
|
+
// but on the super-class
|
32
|
+
this._super = _super[name];
|
33
|
+
|
34
|
+
// The method only need to be bound temporarily, so we
|
35
|
+
// remove it when we're done executing
|
36
|
+
var ret = fn.apply(this, arguments);
|
37
|
+
this._super = tmp;
|
38
|
+
|
39
|
+
return ret;
|
40
|
+
};
|
41
|
+
})(name, prop[name]) :
|
42
|
+
prop[name];
|
43
|
+
}
|
44
|
+
|
45
|
+
// The dummy class constructor
|
46
|
+
function Class() {
|
47
|
+
// All construction is actually done in the init method
|
48
|
+
if ( !initializing && this.init )
|
49
|
+
this.init.apply(this, arguments);
|
50
|
+
}
|
51
|
+
|
52
|
+
// Populate our constructed prototype object
|
53
|
+
Class.prototype = prototype;
|
54
|
+
|
55
|
+
// Enforce the constructor to be what we expect
|
56
|
+
Class.prototype.constructor = Class;
|
57
|
+
|
58
|
+
// And make this class extendable
|
59
|
+
Class.extend = arguments.callee;
|
60
|
+
|
61
|
+
return Class;
|
62
|
+
};
|
63
|
+
})();
|
64
|
+
/*End Simple Inheritance*/
|
65
|
+
|
66
|
+
/*Begin Hooch.js*/
|
1
67
|
var Toggler = Class.extend({
|
2
68
|
init: function(jq_obj){
|
3
69
|
this.jq_obj = jq_obj;
|
@@ -417,14 +483,6 @@ var IhHistoryState = Class.extend({
|
|
417
483
|
this.state = $.extend(true, this.state, new_state);
|
418
484
|
}
|
419
485
|
})
|
420
|
-
var ReplaceDelete = DeleteLink.extend({
|
421
|
-
ajaxSuccess: function(data,textStatus,jqXHR){
|
422
|
-
this.target[this.insert_method](data);
|
423
|
-
},
|
424
|
-
ajaxBefore: function(jqXHR){
|
425
|
-
//noop
|
426
|
-
}
|
427
|
-
})
|
428
486
|
var GoProxy = Class.extend({
|
429
487
|
init: function($proxy){
|
430
488
|
this.first_submit = true;
|
@@ -607,16 +665,12 @@ $(window).bind("popstate", function(e){
|
|
607
665
|
})
|
608
666
|
});
|
609
667
|
$(document).ready(function(){
|
610
|
-
$('[data-default_tab="true"]').tab('show');
|
611
668
|
$(document).on('change','[data-toggler]',function(){
|
612
669
|
new Toggler($(this));
|
613
670
|
})
|
614
671
|
$('[data-toggler]').each(function(){
|
615
672
|
new Toggler($(this));
|
616
673
|
})
|
617
|
-
$('[data-zendesk_opener]').click(function(){
|
618
|
-
$("#zenbox_tab").click();
|
619
|
-
})
|
620
674
|
$('[data-disable_forms]').each(function(){
|
621
675
|
new DisableForms($(this));
|
622
676
|
})
|
@@ -624,16 +678,6 @@ $(document).ready(function(){
|
|
624
678
|
new Link($(this));
|
625
679
|
})
|
626
680
|
// Initailizes auto complete for select inputs
|
627
|
-
$("[data-autocomplete='full_width']").chosen({
|
628
|
-
width: "100%"
|
629
|
-
});
|
630
|
-
$("[data-autocomplete]").chosen();
|
631
|
-
|
632
|
-
$('[data-redirect-path]:first').each(function(){
|
633
|
-
var redirect_seconds = $(this).data('redirect-seconds') * 1000;
|
634
|
-
var redirect_path = $(this).data('redirect-path');
|
635
|
-
setTimeout(function(){window.location = redirect_path},redirect_seconds);
|
636
|
-
})
|
637
681
|
$('input,select,textarea').filter(':visible:enabled:first').each(function(){
|
638
682
|
if(!$(this).data('date-picker')){
|
639
683
|
$(this).focus();
|
data/lib/hooch/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hooch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Draut
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|