html5-starter 0.2.3b → 0.2.9b
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.
- data/README.md +2 -2
- data/stylesheets/_html5-boilerplate.scss +1 -11
- data/stylesheets/html5-boilerplate/_helpers.scss +10 -17
- data/stylesheets/html5-boilerplate/_normalize.scss +214 -0
- data/stylesheets/html5-boilerplate/_print.scss +5 -10
- data/templates/project/files/404.html +42 -38
- data/templates/project/files/crossdomain.xml +8 -8
- data/templates/project/files/gitattributes.txt +1 -0
- data/templates/project/files/gitignore.txt +8 -3
- data/templates/project/files/htaccess +215 -158
- data/templates/project/files/humans.txt +43 -43
- data/templates/project/files/robots.txt +4 -5
- data/templates/project/index.html +34 -47
- data/templates/project/javascripts/libs/{jquery-1.5.1.js → jquery-1.7.1.js} +3125 -2175
- data/templates/project/javascripts/libs/jquery-1.7.1.min.js +4 -0
- data/templates/project/javascripts/libs/modernizr-2.5.3.min.js +4 -0
- data/templates/project/javascripts/plugins.js +4 -8
- data/templates/project/javascripts/script.js +1 -19
- data/templates/project/manifest.rb +6 -24
- data/templates/project/partials/_boilerplate-defaults.scss +7 -11
- data/templates/project/style.scss +28 -51
- metadata +10 -30
- data/stylesheets/html5-boilerplate/_fonts.scss +0 -38
- data/stylesheets/html5-boilerplate/_handheld.scss +0 -8
- data/stylesheets/html5-boilerplate/_reset.scss +0 -48
- data/stylesheets/html5-boilerplate/_styles.scss +0 -84
- data/templates/project/files/build/build.xml +0 -821
- data/templates/project/files/build/buildinfo.properties +0 -5
- data/templates/project/files/build/config/buildinfo.properties +0 -5
- data/templates/project/files/build/config/default.properties +0 -80
- data/templates/project/files/build/config/project.properties +0 -56
- data/templates/project/files/build/createproject.sh +0 -50
- data/templates/project/files/build/runbuildscript.bat +0 -5
- data/templates/project/files/build/tools/ant-contrib-1.0b3.jar +0 -0
- data/templates/project/files/build/tools/htmlcompressor-1.1.jar +0 -0
- data/templates/project/files/build/tools/jpegtran.exe +0 -0
- data/templates/project/files/build/tools/optipng-0.6.4-exe/LICENSE.txt +0 -21
- data/templates/project/files/build/tools/optipng-0.6.4-exe/optipng.exe +0 -0
- data/templates/project/files/build/tools/yuicompressor-2.4.5.jar +0 -0
- data/templates/project/handheld.scss +0 -8
- data/templates/project/javascripts/libs/dd_belatedpng.js +0 -13
- data/templates/project/javascripts/libs/jquery-1.5.1.min.js +0 -16
- data/templates/project/javascripts/libs/modernizr-1.7.min.js +0 -2
- data/templates/project/javascripts/rails.js +0 -156
@@ -1,156 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* jquery-ujs
|
3
|
-
*
|
4
|
-
* http://github.com/rails/jquery-ujs/blob/master/src/rails.js
|
5
|
-
*
|
6
|
-
* This rails.js file supports jQuery 1.4.3 and 1.4.4 .
|
7
|
-
*
|
8
|
-
*/
|
9
|
-
|
10
|
-
jQuery(function ($) {
|
11
|
-
var csrf_token = $('meta[name=csrf-token]').attr('content'),
|
12
|
-
csrf_param = $('meta[name=csrf-param]').attr('content');
|
13
|
-
|
14
|
-
$.fn.extend({
|
15
|
-
/**
|
16
|
-
* Triggers a custom event on an element and returns the event result
|
17
|
-
* this is used to get around not being able to ensure callbacks are placed
|
18
|
-
* at the end of the chain.
|
19
|
-
*
|
20
|
-
* TODO: deprecate with jQuery 1.4.2 release, in favor of subscribing to our
|
21
|
-
* own events and placing ourselves at the end of the chain.
|
22
|
-
*/
|
23
|
-
triggerAndReturn: function (name, data) {
|
24
|
-
var event = new $.Event(name);
|
25
|
-
this.trigger(event, data);
|
26
|
-
|
27
|
-
return event.result !== false;
|
28
|
-
},
|
29
|
-
|
30
|
-
/**
|
31
|
-
* Handles execution of remote calls. Provides following callbacks:
|
32
|
-
*
|
33
|
-
* - ajax:before - is execute before the whole thing begings
|
34
|
-
* - ajax:loading - is executed before firing ajax call
|
35
|
-
* - ajax:success - is executed when status is success
|
36
|
-
* - ajax:complete - is execute when status is complete
|
37
|
-
* - ajax:failure - is execute in case of error
|
38
|
-
* - ajax:after - is execute every single time at the end of ajax call
|
39
|
-
*/
|
40
|
-
callRemote: function () {
|
41
|
-
var el = this,
|
42
|
-
method = el.attr('method') || el.attr('data-method') || 'GET',
|
43
|
-
url = el.attr('action') || el.attr('href'),
|
44
|
-
dataType = el.attr('data-type') || ($.ajaxSettings && $.ajaxSettings.dataType);
|
45
|
-
|
46
|
-
if (url === undefined) {
|
47
|
-
throw "No URL specified for remote call (action or href must be present).";
|
48
|
-
} else {
|
49
|
-
if (el.triggerAndReturn('ajax:before')) {
|
50
|
-
var data = el.is('form') ? el.serializeArray() : [];
|
51
|
-
$.ajax({
|
52
|
-
url: url,
|
53
|
-
data: data,
|
54
|
-
dataType: dataType,
|
55
|
-
type: method.toUpperCase(),
|
56
|
-
beforeSend: function (xhr) {
|
57
|
-
el.trigger('ajax:loading', xhr);
|
58
|
-
},
|
59
|
-
success: function (data, status, xhr) {
|
60
|
-
el.trigger('ajax:success', [data, status, xhr]);
|
61
|
-
},
|
62
|
-
complete: function (xhr) {
|
63
|
-
el.trigger('ajax:complete', xhr);
|
64
|
-
},
|
65
|
-
error: function (xhr, status, error) {
|
66
|
-
el.trigger('ajax:failure', [xhr, status, error]);
|
67
|
-
}
|
68
|
-
});
|
69
|
-
}
|
70
|
-
|
71
|
-
el.trigger('ajax:after');
|
72
|
-
}
|
73
|
-
}
|
74
|
-
});
|
75
|
-
|
76
|
-
/**
|
77
|
-
* confirmation handler
|
78
|
-
*/
|
79
|
-
|
80
|
-
$('body').delegate('a[data-confirm], button[data-confirm], input[data-confirm]', 'click.rails', function () {
|
81
|
-
var el = $(this);
|
82
|
-
if (el.triggerAndReturn('confirm')) {
|
83
|
-
if (!confirm(el.attr('data-confirm'))) {
|
84
|
-
return false;
|
85
|
-
}
|
86
|
-
}
|
87
|
-
});
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
/**
|
92
|
-
* remote handlers
|
93
|
-
*/
|
94
|
-
$('form[data-remote]').live('submit.rails', function (e) {
|
95
|
-
$(this).callRemote();
|
96
|
-
e.preventDefault();
|
97
|
-
});
|
98
|
-
|
99
|
-
$('a[data-remote],input[data-remote]').live('click.rails', function (e) {
|
100
|
-
$(this).callRemote();
|
101
|
-
e.preventDefault();
|
102
|
-
});
|
103
|
-
|
104
|
-
$('a[data-method]:not([data-remote])').live('click.rails', function (e){
|
105
|
-
var link = $(this),
|
106
|
-
href = link.attr('href'),
|
107
|
-
method = link.attr('data-method'),
|
108
|
-
form = $('<form method="post" action="'+href+'"></form>'),
|
109
|
-
metadata_input = '<input name="_method" value="'+method+'" type="hidden" />';
|
110
|
-
|
111
|
-
if (csrf_param !== undefined && csrf_token !== undefined) {
|
112
|
-
metadata_input += '<input name="'+csrf_param+'" value="'+csrf_token+'" type="hidden" />';
|
113
|
-
}
|
114
|
-
|
115
|
-
form.hide()
|
116
|
-
.append(metadata_input)
|
117
|
-
.appendTo('body');
|
118
|
-
|
119
|
-
e.preventDefault();
|
120
|
-
form.submit();
|
121
|
-
});
|
122
|
-
|
123
|
-
/**
|
124
|
-
* disable-with handlers
|
125
|
-
*/
|
126
|
-
var disable_with_input_selector = 'input[data-disable-with]',
|
127
|
-
disable_with_form_remote_selector = 'form[data-remote]:has(' + disable_with_input_selector + ')',
|
128
|
-
disable_with_form_not_remote_selector = 'form:not([data-remote]):has(' + disable_with_input_selector + ')';
|
129
|
-
|
130
|
-
var disable_with_input_function = function () {
|
131
|
-
$(this).find(disable_with_input_selector).each(function () {
|
132
|
-
var input = $(this);
|
133
|
-
input.data('enable-with', input.val())
|
134
|
-
.attr('value', input.attr('data-disable-with'))
|
135
|
-
.attr('disabled', 'disabled');
|
136
|
-
});
|
137
|
-
};
|
138
|
-
|
139
|
-
$(disable_with_form_remote_selector).live('ajax:before.rails', disable_with_input_function);
|
140
|
-
$(disable_with_form_not_remote_selector).live('submit.rails', disable_with_input_function);
|
141
|
-
|
142
|
-
$(disable_with_form_remote_selector).live('ajax:complete.rails', function () {
|
143
|
-
$(this).find(disable_with_input_selector).each(function () {
|
144
|
-
var input = $(this);
|
145
|
-
input.removeAttr('disabled')
|
146
|
-
.val(input.data('enable-with'));
|
147
|
-
});
|
148
|
-
});
|
149
|
-
|
150
|
-
var jqueryVersion = $().jquery;
|
151
|
-
|
152
|
-
if ( (jqueryVersion === '1.4') || (jqueryVersion === '1.4.1') || (jqueryVersion === '1.4.2') ){
|
153
|
-
alert('This rails.js does not support the jQuery version you are using. Please read documentation.');
|
154
|
-
}
|
155
|
-
|
156
|
-
});
|