You've already forked joomla_test
first commit
This commit is contained in:
7
templates/protostar/js/application.js
Normal file
7
templates/protostar/js/application.js
Normal file
@ -0,0 +1,7 @@
|
||||
$('.dropdown-toggle').dropdown()
|
||||
$('.collapse').collapse('show')
|
||||
$('#myModal').modal('hide')
|
||||
$('.typeahead').typeahead()
|
||||
$('.tabs').button()
|
||||
$('.tip').tooltip()
|
||||
$(".alert-message").alert()
|
45
templates/protostar/js/classes.js
Normal file
45
templates/protostar/js/classes.js
Normal file
@ -0,0 +1,45 @@
|
||||
// Add classes
|
||||
|
||||
window.onload=function() {
|
||||
var input = document.getElementsByTagName("input");
|
||||
for (var i = 0; i < input.length; i++) {
|
||||
if (input[i].className == 'button') {
|
||||
input[i].className = 'btn btn-primary';
|
||||
}
|
||||
}
|
||||
|
||||
var button = document.getElementsByTagName("button");
|
||||
for (var i = 0; i < input.length; i++) {
|
||||
if (button[i].className == 'button') {
|
||||
button[i].className = 'btn btn-primary';
|
||||
}
|
||||
}
|
||||
|
||||
var p = document.getElementsByTagName("p");
|
||||
for (var i = 0; i < p.length; i++) {
|
||||
if (p[i].className == 'readmore') {
|
||||
p[i].className = 'btn';
|
||||
}
|
||||
}
|
||||
|
||||
var table = document.getElementsByTagName("table");
|
||||
for (var i = 0; i < table.length; i++) {
|
||||
if (table[i].className == 'category') {
|
||||
table[i].className = 'table table-striped';
|
||||
}
|
||||
}
|
||||
|
||||
var ul = document.getElementsByTagName("ul");
|
||||
for (var i = 0; i < ul.length; i++) {
|
||||
if (ul[i].className == 'actions') {
|
||||
ul[i].className = 'nav nav-pills';
|
||||
}
|
||||
}
|
||||
|
||||
var ul = document.getElementsByTagName("ul");
|
||||
for (var i = 0; i < ul.length; i++) {
|
||||
if (ul[i].className == 'pagenav') {
|
||||
ul[i].className = 'pagination';
|
||||
}
|
||||
}
|
||||
}
|
1
templates/protostar/js/index.html
Normal file
1
templates/protostar/js/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
45
templates/protostar/js/template.js
Normal file
45
templates/protostar/js/template.js
Normal file
@ -0,0 +1,45 @@
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage Templates.protostar
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @since 3.2
|
||||
*/
|
||||
|
||||
(function($)
|
||||
{
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('*[rel=tooltip]').tooltip()
|
||||
|
||||
// Turn radios into btn-group
|
||||
$('.radio.btn-group label').addClass('btn');
|
||||
$(".btn-group label:not(.active)").click(function()
|
||||
{
|
||||
var label = $(this);
|
||||
var input = $('#' + label.attr('for'));
|
||||
|
||||
if (!input.prop('checked')) {
|
||||
label.closest('.btn-group').find("label").removeClass('active btn-success btn-danger btn-primary');
|
||||
if (input.val() == '') {
|
||||
label.addClass('active btn-primary');
|
||||
} else if (input.val() == 0) {
|
||||
label.addClass('active btn-danger');
|
||||
} else {
|
||||
label.addClass('active btn-success');
|
||||
}
|
||||
input.prop('checked', true);
|
||||
}
|
||||
});
|
||||
$(".btn-group input[checked=checked]").each(function()
|
||||
{
|
||||
if ($(this).val() == '') {
|
||||
$("label[for=" + $(this).attr('id') + "]").addClass('active btn-primary');
|
||||
} else if ($(this).val() == 0) {
|
||||
$("label[for=" + $(this).attr('id') + "]").addClass('active btn-danger');
|
||||
} else {
|
||||
$("label[for=" + $(this).attr('id') + "]").addClass('active btn-success');
|
||||
}
|
||||
});
|
||||
})
|
||||
})(jQuery);
|
Reference in New Issue
Block a user