Skip to content

Commit 7b9db0e

Browse files
author
Nicolas
committed
Init repository
0 parents  commit 7b9db0e

40 files changed

+5623
-0
lines changed

assets/fonts/FontAwesome.otf

61.4 KB
Binary file not shown.
37.3 KB
Binary file not shown.

assets/fonts/fontawesome-webfont.svg

Lines changed: 414 additions & 0 deletions
Loading
78.8 KB
Binary file not shown.
43.4 KB
Binary file not shown.

assets/images/warning.png

613 Bytes
Loading

assets/javascripts/bootstrap.js

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
/*
2+
BootstrapSwitch
3+
*/
4+
function setBootstrapSwitch() {
5+
$('.bootstrap-switch').each(function(index, element) {
6+
installBootstrapSwitch(element);
7+
});
8+
}
9+
10+
function installBootstrapSwitch(element) {
11+
$(element).bootstrapSwitch();
12+
$(element).on('switch-change', function (e, data) {
13+
var element = $(data.el);
14+
var value = data.value;
15+
element.val(value);
16+
});
17+
}
18+
19+
20+
/*
21+
BootstrapAlert
22+
*/
23+
function setBootstrapAlert(){
24+
$('.alert').each(function(index, element){
25+
$(element).alert();
26+
});
27+
}
28+
29+
function addAlertMessage(object){
30+
$(object.target)
31+
.append(
32+
$('<div>')
33+
.attr('class', 'alert fade in ' + object.type)
34+
.html(object.message)
35+
.prepend(
36+
$('<button>')
37+
.attr('class', 'close')
38+
.attr('type', 'button')
39+
.attr('data-dismiss', 'alert')
40+
.html('&times;')
41+
)
42+
)
43+
44+
setBootstrapAlert();
45+
}
46+
47+
48+
/*
49+
BootstrapTooltips
50+
*/
51+
function setBootstrapToolTips(){
52+
$('.tooltips').each(function(index, element) {
53+
$(element).tooltip({
54+
position: {
55+
my: "left+15 left",
56+
at: "right center",
57+
using: function( position, feedback ) {
58+
$(this).css(position);
59+
$('<div>')
60+
.addClass( 'arrow left' )
61+
.addClass( feedback.vertical )
62+
.addClass( feedback.horizontal )
63+
.appendTo( this );
64+
}
65+
}
66+
});
67+
});
68+
}
69+
70+
71+
/*
72+
JQueryModalBox
73+
*/
74+
$(window).resize(function() {
75+
$(".ui-dialog-content").dialog("option", "position", ['center', 'center']);
76+
});
77+
78+
79+
// Transform div in Dialog box
80+
function initModalBoxes(modals){
81+
82+
$(modals.modal_list).each(function() {
83+
84+
var buttons_list = {};
85+
86+
if (this.mode == 'standard'){
87+
buttons_list[modals.label_save] = function(){$(this).find('form').submit();};
88+
buttons_list[modals.label_cancel] = function(){$(this).dialog('close');};
89+
} else if (this.mode == 'close-only'){
90+
buttons_list[modals.label_ok] = function(){$(this).dialog('close');};
91+
}
92+
93+
$(this.target).dialog({
94+
resizable: false,
95+
autoOpen: false,
96+
height: 'auto',
97+
width: 'auto',
98+
position: ['center', 'center'],
99+
modal: true,
100+
hide: {
101+
effect: "fade",
102+
duration: 500
103+
},
104+
buttons: buttons_list,
105+
});
106+
107+
setUpModalBox(this.source, this.target);
108+
});
109+
}
110+
111+
112+
// Bind links on Dialog box
113+
function setUpModalBox(source, target) {
114+
$(source).each(function() {
115+
$(this).on('click', function() {
116+
var title = $(this).html();
117+
$.get($(this).attr('href'), function(data){
118+
$(target).html(data);
119+
$(target).dialog('option', 'title', title);
120+
$(target).dialog('open');
121+
});
122+
return false;
123+
});
124+
});
125+
}
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
/* ==========================================================
2+
* bootstrap-alert.js v2.3.2
3+
* http://getbootstrap.com/2.3.2/javascript.html#alerts
4+
* ==========================================================
5+
* Copyright 2013 Twitter, Inc.
6+
*
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* ========================================================== */
19+
20+
21+
!function ($) {
22+
23+
"use strict"; // jshint ;_;
24+
25+
26+
/* ALERT CLASS DEFINITION
27+
* ====================== */
28+
29+
var dismiss = '[data-dismiss="alert"]'
30+
, Alert = function (el) {
31+
$(el).on('click', dismiss, this.close)
32+
}
33+
34+
Alert.prototype.close = function (e) {
35+
var $this = $(this)
36+
, selector = $this.attr('data-target')
37+
, $parent
38+
39+
if (!selector) {
40+
selector = $this.attr('href')
41+
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
42+
}
43+
44+
$parent = $(selector)
45+
46+
e && e.preventDefault()
47+
48+
$parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
49+
50+
$parent.trigger(e = $.Event('close'))
51+
52+
if (e.isDefaultPrevented()) return
53+
54+
$parent.removeClass('in')
55+
56+
function removeElement() {
57+
$parent
58+
.trigger('closed')
59+
.remove()
60+
}
61+
62+
$.support.transition && $parent.hasClass('fade') ?
63+
$parent.on($.support.transition.end, removeElement) :
64+
removeElement()
65+
}
66+
67+
68+
/* ALERT PLUGIN DEFINITION
69+
* ======================= */
70+
71+
var old = $.fn.alert
72+
73+
$.fn.alert = function (option) {
74+
return this.each(function () {
75+
var $this = $(this)
76+
, data = $this.data('alert')
77+
if (!data) $this.data('alert', (data = new Alert(this)))
78+
if (typeof option == 'string') data[option].call($this)
79+
})
80+
}
81+
82+
$.fn.alert.Constructor = Alert
83+
84+
85+
/* ALERT NO CONFLICT
86+
* ================= */
87+
88+
$.fn.alert.noConflict = function () {
89+
$.fn.alert = old
90+
return this
91+
}
92+
93+
94+
/* ALERT DATA-API
95+
* ============== */
96+
97+
$(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
98+
99+
}(window.jQuery);

assets/javascripts/plugins/bootstrap_switch.js

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)