alchemy 1.0.3 → 8.4.4
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 +7 -0
- data/LICENSE +24 -17
- data/README.md +538 -4
- data/lib/alchemy.rb +3 -2
- metadata +61 -223
- data/Rakefile +0 -21
- data/app/assets/fonts/alchemy/LiberationSans-Bold-webfont.eot +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Bold-webfont.svg +0 -154
- data/app/assets/fonts/alchemy/LiberationSans-Bold-webfont.ttf +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Bold-webfont.woff +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-BoldItalic-webfont.eot +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-BoldItalic-webfont.svg +0 -154
- data/app/assets/fonts/alchemy/LiberationSans-BoldItalic-webfont.ttf +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-BoldItalic-webfont.woff +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Italic-webfont.eot +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Italic-webfont.svg +0 -154
- data/app/assets/fonts/alchemy/LiberationSans-Italic-webfont.ttf +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Italic-webfont.woff +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Regular-webfont.eot +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Regular-webfont.svg +0 -154
- data/app/assets/fonts/alchemy/LiberationSans-Regular-webfont.ttf +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Regular-webfont.woff +0 -0
- data/app/assets/fonts/alchemy/Red Hat Liberation License.txt +0 -78
- data/app/assets/fonts/alchemy/overpass_bold-web.eot +0 -0
- data/app/assets/fonts/alchemy/overpass_bold-web.svg +0 -470
- data/app/assets/fonts/alchemy/overpass_bold-web.ttf +0 -0
- data/app/assets/fonts/alchemy/overpass_bold-web.woff +0 -0
- data/app/assets/fonts/alchemy/overpass_regular-web.eot +0 -0
- data/app/assets/fonts/alchemy/overpass_regular-web.svg +0 -470
- data/app/assets/fonts/alchemy/overpass_regular-web.ttf +0 -0
- data/app/assets/fonts/alchemy/overpass_regular-web.woff +0 -0
- data/app/assets/images/alchemy/icons/action-icons.png +0 -0
- data/app/assets/images/alchemy/icons/arrow_icon.png +0 -0
- data/app/assets/images/alchemy/icons/chosen-sprite.png +0 -0
- data/app/assets/images/alchemy/icons/error_icon.png +0 -0
- data/app/assets/images/alchemy/icons/objects.png +0 -0
- data/app/assets/images/alchemy/icons/spinner.gif +0 -0
- data/app/assets/images/alchemy/icons/spinner_head.gif +0 -0
- data/app/assets/images/alchemy/icons/success_icon.png +0 -0
- data/app/assets/images/alchemy/icons/warning_icon.png +0 -0
- data/app/assets/javascripts/alchemy/flash_messages.js +0 -12
- data/app/assets/javascripts/alchemy/forms.js +0 -25
- data/app/assets/javascripts/alchemy/i18n.js +0 -36
- data/app/assets/javascripts/alchemy/login.js +0 -130
- data/app/assets/javascripts/alchemy/password.js +0 -99
- data/app/assets/stylesheets/alchemy/components/_chosen.scss +0 -423
- data/app/assets/stylesheets/alchemy/components/_content.scss +0 -58
- data/app/assets/stylesheets/alchemy/components/_helpers.scss +0 -38
- data/app/assets/stylesheets/alchemy/components/_media.scss +0 -49
- data/app/assets/stylesheets/alchemy/components/_media_object.scss +0 -22
- data/app/assets/stylesheets/alchemy/components/_normalize.scss +0 -396
- data/app/assets/stylesheets/alchemy/components/_shared.scss +0 -18
- data/app/assets/stylesheets/alchemy/components/buttons/_buttons.scss +0 -278
- data/app/assets/stylesheets/alchemy/components/buttons/_buttons_vars.scss +0 -11
- data/app/assets/stylesheets/alchemy/components/flash_messages/_flash_messages.scss +0 -93
- data/app/assets/stylesheets/alchemy/components/flash_messages/_flash_messages_vars.scss +0 -3
- data/app/assets/stylesheets/alchemy/components/fonts/_liberation.scss +0 -44
- data/app/assets/stylesheets/alchemy/components/fonts/_overpass.scss +0 -24
- data/app/assets/stylesheets/alchemy/components/footer/_footer.scss +0 -53
- data/app/assets/stylesheets/alchemy/components/footer/_footer_vars.scss +0 -4
- data/app/assets/stylesheets/alchemy/components/forms/_forms.scss +0 -552
- data/app/assets/stylesheets/alchemy/components/forms/_forms_ie.scss +0 -45
- data/app/assets/stylesheets/alchemy/components/forms/_forms_mixins.scss +0 -18
- data/app/assets/stylesheets/alchemy/components/forms/_forms_responsive.scss +0 -167
- data/app/assets/stylesheets/alchemy/components/forms/_forms_vars.scss +0 -25
- data/app/assets/stylesheets/alchemy/components/header/_header.scss +0 -216
- data/app/assets/stylesheets/alchemy/components/header/_header_vars.scss +0 -11
- data/app/assets/stylesheets/alchemy/components/login/_login.scss +0 -173
- data/app/assets/stylesheets/alchemy/components/login/_login_mixins.scss +0 -7
- data/app/assets/stylesheets/alchemy/components/login/_login_vars.scss +0 -19
- data/app/assets/stylesheets/alchemy/components/sprites/_sprites.scss +0 -110
- data/app/assets/stylesheets/alchemy/components/sprites/_sprites_mixins.scss +0 -9
- data/app/assets/stylesheets/alchemy/components/text/_text.scss +0 -30
- data/app/assets/stylesheets/alchemy/components/text/_text_vars.scss +0 -1
- data/app/assets/stylesheets/alchemy/composites/content_elements.scss +0 -6
- data/app/assets/stylesheets/alchemy/composites/login.scss +0 -9
- data/app/assets/stylesheets/alchemy/composites/shell.scss +0 -4
- data/app/assets/stylesheets/alchemy/partials/_base.scss +0 -8
- data/app/assets/stylesheets/alchemy/partials/_colors.scss +0 -99
- data/app/assets/stylesheets/alchemy/partials/_mixins.scss +0 -24
- data/app/assets/stylesheets/alchemy/partials/_vars.scss +0 -31
- data/app/helpers/alchemy/gettext_translations.rb +0 -28
- data/app/helpers/alchemy/layout_helper.rb +0 -35
- data/app/helpers/alchemy/rails_translations.rb +0 -21
- data/app/helpers/alchemy/translation_helper.rb +0 -19
- data/app/views/alchemy/layouts/_change_password_layout.html.haml +0 -20
- data/app/views/alchemy/layouts/_common_i18n.haml +0 -4
- data/app/views/alchemy/layouts/_header_layout.haml +0 -13
- data/app/views/alchemy/layouts/_login_layout.html.haml +0 -58
- data/app/views/alchemy/layouts/_user_session_layout.haml +0 -17
- data/app/views/alchemy/layouts/base.html.haml +0 -20
- data/app/views/alchemy/layouts/shell_layout.haml +0 -10
- data/lib/alchemy/engine.rb +0 -8
- data/lib/alchemy/version.rb +0 -3
- data/test/alchemy_test.rb +0 -7
- data/test/test_helper.rb +0 -9
- data/vendor/assets/javascripts/alchemy/handlebars.js +0 -2201
- data/vendor/assets/javascripts/alchemy/html5shiv.js +0 -298
- data/vendor/assets/javascripts/alchemy/jquery/jquery-1.6.2.js +0 -8981
- data/vendor/assets/javascripts/alchemy/jquery/plugins/chosen.jquery.js +0 -1003
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/excanvas.js +0 -1427
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/excanvas.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.colorhelpers.js +0 -179
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.colorhelpers.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.crosshair.js +0 -167
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.crosshair.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.fillbetween.js +0 -183
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.fillbetween.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.image.js +0 -238
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.image.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.js +0 -2599
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.min.js +0 -6
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.navigate.js +0 -336
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.navigate.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.pie.js +0 -750
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.pie.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.resize.js +0 -60
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.resize.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.selection.js +0 -344
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.selection.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.stack.js +0 -184
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.stack.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.symbol.js +0 -70
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.symbol.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.threshold.js +0 -103
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.threshold.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/blank.svg +0 -3
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/custom_test.js +0 -67
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svg.css +0 -9
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svg.js +0 -1101
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svg.min.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svg.pack.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svgfilter.js +0 -396
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svgfilter.min.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svgfilter.pack.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svggraph.js +0 -1337
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svggraph.min.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svggraph.pack.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/lion.svg +0 -161
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/test.js +0 -714
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ajaxfileupload.js +0 -205
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ba-bbq.js +0 -1137
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ba-resize.js +0 -246
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.cookie.js +0 -92
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.easing.1.3.js +0 -205
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.fancyqueries.js +0 -106
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.flash.js +0 -288
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.form.js +0 -964
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.hoverIntent.js +0 -106
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jeditable.ajaxupload.js +0 -62
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jeditable.js +0 -556
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jnotify.js +0 -210
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jscrollpane.js +0 -1390
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jscrollpane.min.js +0 -11
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.linkHover.js +0 -89
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.loadmask.min.js +0 -10
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.mousewheel.js +0 -78
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.multiselect.filter.js +0 -176
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.multiselect.js +0 -668
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.pack.js +0 -11
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.periodicalupdater.js +0 -175
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.sortElements.js +0 -75
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.sparkline.min.js +0 -94
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.text-overflow.js +0 -60
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.timepickr.js +0 -214
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.timers.js +0 -142
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.tipsy.js +0 -358
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.treeTable.js +0 -226
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.trunk8.js +0 -203
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ui.multiselect.js +0 -338
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ui.totop.js +0 -58
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.uitablefilter.js +0 -95
- data/vendor/assets/javascripts/alchemy/jquery/plugins/ui.spinner.js +0 -683
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_highlight-hard_75_dadada_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_highlight-hard_75_e6e6e6_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_highlight-hard_95_ffffff_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_highlight-soft_80_e0e0e0_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_inset-hard_65_ffffff_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_inset-soft_95_fef1ec_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-icons_8f8f8f_256x240.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-icons_97baed_256x240.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/jquery-ui-1.8.11.custom.css +0 -573
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/js/jquery-1.5.1.min.js +0 -16
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/js/jquery-ui-1.8.11.custom.min.js +0 -783
- data/vendor/assets/javascripts/alchemy/rails.js +0 -331
- data/vendor/assets/javascripts/alchemy/underscore-1.3.1.js +0 -999
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
var CUI = CUI ? CUI : {};
|
|
2
|
-
|
|
3
|
-
CUI.closeFlashMessage = function() {
|
|
4
|
-
$('.flash_hud .control').click(function(){
|
|
5
|
-
$(this).closest($('.flash_hud')).slideUp(100).fadeOut(100);
|
|
6
|
-
});
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
$(document).ready(function() {
|
|
10
|
-
CUI.closeFlashMessage();
|
|
11
|
-
});
|
|
12
|
-
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
var CUI = CUI ? CUI : {};
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
CUI.toggleInput = function() {
|
|
5
|
-
var inputValue = "";
|
|
6
|
-
|
|
7
|
-
$('.control_group.checkbox.inline .control input[type="checkbox"]').click(function(){
|
|
8
|
-
var checkbox = $(this);
|
|
9
|
-
var input = $('.control_group.checkbox.inline .input > input');
|
|
10
|
-
var isDisabled = checkbox.prop('checked');
|
|
11
|
-
|
|
12
|
-
input.attr('disabled', isDisabled);
|
|
13
|
-
|
|
14
|
-
if(isDisabled) {
|
|
15
|
-
inputValue = input.val();
|
|
16
|
-
input.val('');
|
|
17
|
-
} else {
|
|
18
|
-
input.val(inputValue);
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
$(document).ready(function() {
|
|
24
|
-
CUI.toggleInput();
|
|
25
|
-
});
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
Copyright 2012 Red Hat, Inc.
|
|
3
|
-
|
|
4
|
-
This software is licensed to you under the GNU General Public
|
|
5
|
-
License as published by the Free Software Foundation; either version
|
|
6
|
-
2 of the License (GPLv2) or (at your option) any later version.
|
|
7
|
-
There is NO WARRANTY for this software, express or implied,
|
|
8
|
-
including the implied warranties of MERCHANTABILITY,
|
|
9
|
-
NON-INFRINGEMENT, or FITNESS FOR A PARTICULAR PURPOSE. You should
|
|
10
|
-
have received a copy of GPLv2 along with this software; if not, see
|
|
11
|
-
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
|
12
|
-
*/
|
|
13
|
-
var CUI = CUI || {};
|
|
14
|
-
|
|
15
|
-
CUI.i18n = (function(){
|
|
16
|
-
var strings = {},
|
|
17
|
-
|
|
18
|
-
localize = function(data){
|
|
19
|
-
var key;
|
|
20
|
-
|
|
21
|
-
for (key in data) {
|
|
22
|
-
if( data.hasOwnProperty(key) ){
|
|
23
|
-
strings[key] = data[key];
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
get_string = function(string) {
|
|
28
|
-
return strings[string];
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
return {
|
|
32
|
-
localize : localize,
|
|
33
|
-
get_string : get_string
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
})();
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
Copyright 2011 Red Hat, Inc.
|
|
3
|
-
|
|
4
|
-
This software is licensed to you under the GNU General Public
|
|
5
|
-
License as published by the Free Software Foundation; either version
|
|
6
|
-
2 of the License (GPLv2) or (at your option) any later version.
|
|
7
|
-
There is NO WARRANTY for this software, express or implied,
|
|
8
|
-
including the implied warranties of MERCHANTABILITY,
|
|
9
|
-
NON-INFRINGEMENT, or FITNESS FOR A PARTICULAR PURPOSE. You should
|
|
10
|
-
have received a copy of GPLv2 along with this software; if not, see
|
|
11
|
-
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
|
12
|
-
*/
|
|
13
|
-
var CUI = CUI ? CUI : {};
|
|
14
|
-
CUI.Login = {};
|
|
15
|
-
|
|
16
|
-
$(document).ready(function() {
|
|
17
|
-
|
|
18
|
-
CUI.Login.Events.register();
|
|
19
|
-
|
|
20
|
-
$('#password_link').click(function(e){
|
|
21
|
-
e.preventDefault();
|
|
22
|
-
$('.card#password_reset').animate({ 'left' : '0px' }, 'slow').css('z-index', 1);
|
|
23
|
-
});
|
|
24
|
-
$('#username_link').click(function(e){
|
|
25
|
-
e.preventDefault();
|
|
26
|
-
$('.card#username_recovery').animate({ 'left' : '0px' }, 'slow').css('z-index', 1);
|
|
27
|
-
});
|
|
28
|
-
$('#password_reset_return_link').click(function(e){
|
|
29
|
-
e.preventDefault();
|
|
30
|
-
$('.card#password_reset').animate({ 'left' : '-360px' }, 'slow', function(){
|
|
31
|
-
$(this).css('z-index', -1);
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
$('#username_recovery_return_link').click(function(e){
|
|
35
|
-
e.preventDefault();
|
|
36
|
-
$('.card#username_recovery').animate({ 'left' : '-360px' }, 'slow', function(){
|
|
37
|
-
$(this).css('z-index', -1);
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
$('#login_btn').click(function(){
|
|
41
|
-
CUI.Login.Actions.toggleSpinner();
|
|
42
|
-
});
|
|
43
|
-
$(document).bind("ajax:complete",
|
|
44
|
-
function(evt, data, status, xhr){
|
|
45
|
-
if(status == "success") {
|
|
46
|
-
$('form .spinner').fadeOut('fast');
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
$('#username').focus();
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
CUI.Login.Actions = (function($){
|
|
54
|
-
var show_password = function(input_field, input_reveal_field, show){
|
|
55
|
-
var password;
|
|
56
|
-
|
|
57
|
-
if( show ){
|
|
58
|
-
password = input_field.val();
|
|
59
|
-
input_field.hide();
|
|
60
|
-
input_reveal_field.val(password).show();
|
|
61
|
-
} else {
|
|
62
|
-
password = input_reveal_field.val();
|
|
63
|
-
input_reveal_field.hide();
|
|
64
|
-
input_field.val(password).show();
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
add_hash_input = function(parent){
|
|
68
|
-
if (window.location.hash != "") {
|
|
69
|
-
$('<input>').attr({
|
|
70
|
-
type: 'hidden',
|
|
71
|
-
id: 'hash_anchor',
|
|
72
|
-
name: 'hash_anchor',
|
|
73
|
-
value: window.location.hash
|
|
74
|
-
}).appendTo(parent);
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
interstitial_switcher_animation = function(num_orgs, redir_path){
|
|
78
|
-
if(parseInt(num_orgs, 10) > 1){
|
|
79
|
-
$('#interstitial').trigger({type:'login'});
|
|
80
|
-
} else if(redir_path){
|
|
81
|
-
CUI.Login.Actions.toggleSpinner();
|
|
82
|
-
window.location.href = redir_path;
|
|
83
|
-
} else {
|
|
84
|
-
window.location.reload();
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
toggleSpinner = function(){
|
|
88
|
-
$('#login_form .spinner').fadeToggle('fast');
|
|
89
|
-
},
|
|
90
|
-
redirecter = function(url){
|
|
91
|
-
if ($.browser.msie){
|
|
92
|
-
window.location = url;
|
|
93
|
-
} else {
|
|
94
|
-
window.location.href = url;
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
return {
|
|
99
|
-
show_password : show_password,
|
|
100
|
-
add_hash_input : add_hash_input,
|
|
101
|
-
interstitial_switcher_animation : interstitial_switcher_animation,
|
|
102
|
-
redirecter : redirecter,
|
|
103
|
-
toggleSpinner : toggleSpinner
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
})(jQuery);
|
|
107
|
-
|
|
108
|
-
CUI.Login.Events = (function($, actions){
|
|
109
|
-
var register = function(){
|
|
110
|
-
$('#reveal').change(function(){
|
|
111
|
-
actions.show_password($('#password-input'), $('#password-input-reveal'), $(this).is(':checked'));
|
|
112
|
-
});
|
|
113
|
-
$('#login_form').live('submit', function(e) {
|
|
114
|
-
actions.add_hash_input(this);
|
|
115
|
-
});
|
|
116
|
-
//if you have an #interstitial container for an interstitial, this will function. otherwise it won't.
|
|
117
|
-
// this is for alchemy
|
|
118
|
-
var interstitial = $('#interstitial');
|
|
119
|
-
if (interstitial.length){
|
|
120
|
-
$('#interstitial').bind('login', function(event){
|
|
121
|
-
CUI.Login.Actions.toggleSpinner();
|
|
122
|
-
interstitial.animate({ 'left' : '0px' }, 'slow').css('z-index', 1);
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
return {
|
|
127
|
-
register : register
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
})(jQuery, CUI.Login.Actions);
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
Copyright 2011 Red Hat, Inc.
|
|
3
|
-
|
|
4
|
-
This software is licensed to you under the GNU General Public
|
|
5
|
-
License as published by the Free Software Foundation; either version
|
|
6
|
-
2 of the License (GPLv2) or (at your option) any later version.
|
|
7
|
-
There is NO WARRANTY for this software, express or implied,
|
|
8
|
-
including the implied warranties of MERCHANTABILITY,
|
|
9
|
-
NON-INFRINGEMENT, or FITNESS FOR A PARTICULAR PURPOSE. You should
|
|
10
|
-
have received a copy of GPLv2 along with this software; if not, see
|
|
11
|
-
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
|
12
|
-
*/
|
|
13
|
-
var CUI = CUI ? CUI : {};
|
|
14
|
-
CUI.Password = {};
|
|
15
|
-
|
|
16
|
-
$(document).ready(function() {
|
|
17
|
-
var actions = CUI.Password.Actions($('#save_password'));
|
|
18
|
-
CUI.Password.Events.register(actions);
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
CUI.Password.Events = (function($){
|
|
22
|
-
var register = function(actions) {
|
|
23
|
-
$('#password_field').live('keyup', function(){
|
|
24
|
-
var password = $('#password_field').val(),
|
|
25
|
-
confirm = $('#confirm_field').val(),
|
|
26
|
-
conflict_tag = $('#password_conflict');
|
|
27
|
-
|
|
28
|
-
actions.verifyPassword(password, confirm, conflict_tag);
|
|
29
|
-
});
|
|
30
|
-
$('#confirm_field').live('keyup', function(){
|
|
31
|
-
var password = $('#password_field').val(),
|
|
32
|
-
confirm = $('#confirm_field').val(),
|
|
33
|
-
conflict_tag = $('#password_conflict');
|
|
34
|
-
|
|
35
|
-
actions.verifyPassword(password, confirm, conflict_tag);
|
|
36
|
-
});
|
|
37
|
-
$('#save_password').live('click', function(){
|
|
38
|
-
var password = $('#password_field').val();
|
|
39
|
-
|
|
40
|
-
actions.changePassword(password);
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
return {
|
|
45
|
-
register : register
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
})(jQuery);
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
CUI.Password.Actions = function(save_button){
|
|
52
|
-
var resetPassword = false,
|
|
53
|
-
|
|
54
|
-
verifyPassword = function(password, confirm, conflict_tag) {
|
|
55
|
-
if( password !== confirm ){
|
|
56
|
-
conflict_tag.removeClass('invisible');
|
|
57
|
-
save_button.addClass("disabled");
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
conflict_tag.addClass('invisible');
|
|
61
|
-
save_button.removeClass("disabled");
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
changePassword = function(password) {
|
|
65
|
-
var button = save_button,
|
|
66
|
-
url = button.attr("data-url");
|
|
67
|
-
|
|
68
|
-
if( !button.hasClass("disabled") ){
|
|
69
|
-
button.addClass("disabled");
|
|
70
|
-
|
|
71
|
-
$.ajax({
|
|
72
|
-
type: "PUT",
|
|
73
|
-
url: url,
|
|
74
|
-
data: { "user":{"password":password}},
|
|
75
|
-
cache: false,
|
|
76
|
-
success: function(data, textStatus, xhr) {
|
|
77
|
-
button.removeClass("disabled");
|
|
78
|
-
if (resetPassword && xhr.status < 400) {
|
|
79
|
-
// this is a password reset, so we'll redirect the user to the login page
|
|
80
|
-
window.location.replace(KT.routes.root_path());
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
error: function(e) {
|
|
84
|
-
button.removeClass('disabled');
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
resettingPassword = function(resetValue) {
|
|
90
|
-
resetPassword = resetValue;
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
return {
|
|
94
|
-
verifyPassword: verifyPassword,
|
|
95
|
-
changePassword: changePassword,
|
|
96
|
-
resettingPassword: resettingPassword
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
};
|