Merge branch 'design_team' into ldap for NCCU 0229 demo on Redmine
Conflicts: app/views/devise/passwords/new.html.erb app/views/devise/sessions/new.html.erb
No files matched your search
|
After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
@@ -0,0 +1,7 @@
|
||||
// This is a manifest file that'll be compiled into including all the files listed below.
|
||||
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
|
||||
// be included in the compiled file accessible from http://example.com/assets/application.js
|
||||
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
||||
// the compiled file.
|
||||
//
|
||||
//= require new_admin
|
||||
@@ -0,0 +1,122 @@
|
||||
$(document).ready(function(){
|
||||
var result = '',
|
||||
title_text = '',
|
||||
link_text = '',
|
||||
summary_text = '',
|
||||
startDate_text = '',
|
||||
startMon_text = '',
|
||||
startDay_text = '',
|
||||
endDate_text = '',
|
||||
time_text = '',
|
||||
selet = 0,
|
||||
xmlLength = '',
|
||||
indexA = '',
|
||||
indexB = '',
|
||||
indexC = '',
|
||||
month = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
|
||||
checking = 1,
|
||||
$events = $('.events'),
|
||||
$mon = $('.events .mon'),
|
||||
$day = $('.events .day'),
|
||||
$link_text = $('.events .event_name'),
|
||||
$time = $('.events .event_info'),
|
||||
$next = $('.events .links_next'),
|
||||
$prev = $('.events .links_prev'),
|
||||
objLength = $events.find('ul > li').length;
|
||||
$next.on("click", function(){
|
||||
if (checking&&selet < xmlLength) {
|
||||
$('.links_prev').removeClass('disabled')
|
||||
selet+=objLength;
|
||||
$events.find('ul').fadeOut("fast", function () {
|
||||
resetText()
|
||||
$events.find('ul').fadeIn("fast" ,getEvent(selet));
|
||||
});
|
||||
if ((xmlLength-selet) == objLength) {
|
||||
$('.links_next').addClass('disabled')
|
||||
checking = 0;
|
||||
} else if ((xmlLength-selet) < objLength) {
|
||||
$('.links_next').addClass('disabled')
|
||||
checking = 0;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
});
|
||||
$prev.on("click", function(){
|
||||
if (selet > 0) {
|
||||
$('.links_next').removeClass('disabled')
|
||||
checking = 1;
|
||||
selet-=objLength;
|
||||
$events.find('ul').fadeOut("fast", function () {
|
||||
$events.find('ul').fadeIn("fast" ,getEvent(selet));
|
||||
});
|
||||
if ((xmlLength-selet) == xmlLength ) {
|
||||
$('.links_prev').addClass('disabled')
|
||||
}
|
||||
}
|
||||
return false;
|
||||
});
|
||||
getEvent(selet);
|
||||
function resetText() {
|
||||
$events.find('li').find($mon).html('');
|
||||
$events.find('li').find($day).html('');
|
||||
$events.find('li').find($link_text).html('');
|
||||
$events.find('li').find($link_text).attr('href', '');
|
||||
$events.find('li').find($time).html('');
|
||||
}
|
||||
function getEvent(selet){
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "/static/Other.xml",
|
||||
dataType: "xml",
|
||||
timeout: 1000,
|
||||
error: function(xml){
|
||||
$events.find('.links_next').addClass('disabled')
|
||||
$events.find('.error_mag').show();
|
||||
$events.find('ul').hide();
|
||||
$events.find('.error_mag').html("讀取錯誤");
|
||||
},
|
||||
success: function(xml) {
|
||||
xmlLength = $(xml).find('entry').length;
|
||||
$(xml).find('entry').slice(selet, selet+objLength).each(function(i){
|
||||
title_text = $(this).find('title').text()
|
||||
link_text = $(this).find('link').attr('href')
|
||||
summary_text = $(this).find('summary').text()
|
||||
indexA = summary_text.indexOf("-");
|
||||
indexB = summary_text.indexOf(" ");
|
||||
indexC = summary_text.indexOf("/");
|
||||
//清除前後空白字元
|
||||
summary_text = jQuery.trim(summary_text);
|
||||
//篩選標題
|
||||
title_text = title_text.slice(0, 16)
|
||||
if (summary_text.length == 31) {
|
||||
startDate_text = summary_text.slice(0, indexA);
|
||||
startMon_text = startDate_text.slice((indexC+1), (indexC+3));
|
||||
startDay_text = startDate_text.slice(7);
|
||||
endDate_text = summary_text.slice((indexA+1), indexB);
|
||||
time_text = summary_text.slice((indexB+1));
|
||||
} else {
|
||||
startDate_text = summary_text.slice(0, indexB);
|
||||
startMon_text = startDate_text.slice((indexC+1), (indexC+3));
|
||||
startDay_text = startDate_text.slice(7);
|
||||
endDate_text = '';
|
||||
time_text = summary_text.slice((indexB+1));
|
||||
}
|
||||
if(startMon_text.slice(0, 1) == '0'){
|
||||
startMon_text = month[startMon_text.slice(1)-1];
|
||||
} else {
|
||||
startMon_text = month[startMon_text-1];
|
||||
}
|
||||
$events.find('li').eq(i).find($mon).html(startMon_text);
|
||||
$events.find('li').eq(i).find($day).html(startDay_text);
|
||||
$events.find('li').eq(i).find($link_text).html(title_text+"…");
|
||||
$events.find('li').eq(i).find($link_text).attr('href', link_text);
|
||||
$events.find('li').eq(i).find($time).html('時間:'+time_text);
|
||||
//console.log();
|
||||
/*$('<li></li>')
|
||||
.html('<div class="event_date"><span class="mon">'+startMon_text+'</span><span class="day">'+startDay_text+'</div>')
|
||||
.appendTo('.events ul');*/
|
||||
});//close each(
|
||||
}
|
||||
}); //close $.ajax(
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Isotope v1.5.11
|
||||
* An exquisite jQuery plugin for magical layouts
|
||||
* http://isotope.metafizzy.co
|
||||
*
|
||||
* Commercial use requires one-time license fee
|
||||
* http://metafizzy.co/#licenses
|
||||
*
|
||||
* Copyright 2012 David DeSandro / Metafizzy
|
||||
*/
|
||||
(function(a,b,c){var d=a.document,e=a.Modernizr,f=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},g="Moz Webkit O Ms".split(" "),h=function(a){var b=d.documentElement.style,c;if(typeof b[a]=="string")return a;a=f(a);for(var e=0,h=g.length;e<h;e++){c=g[e]+a;if(typeof b[c]=="string")return c}},i=h("transform"),j=h("transitionProperty"),k={csstransforms:function(){return!!i},csstransforms3d:function(){var a=!!h("perspective");if(a){var c=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),d="@media ("+c.join("transform-3d),(")+"modernizr)",e=b("<style>"+d+"{#modernizr{height:3px}}"+"</style>").appendTo("head"),f=b('<div id="modernizr" />').appendTo("html");a=f.height()===3,f.remove(),e.remove()}return a},csstransitions:function(){return!!j}},l;if(e)for(l in k)e.hasOwnProperty(l)||e.addTest(l,k[l]);else{e=a.Modernizr={_version:"1.6ish: miniModernizr for Isotope"};var m=" ",n;for(l in k)n=k[l](),e[l]=n,m+=" "+(n?"":"no-")+l;b("html").addClass(m)}if(e.csstransforms){var o=e.csstransforms3d?{translate:function(a){return"translate3d("+a[0]+"px, "+a[1]+"px, 0) "},scale:function(a){return"scale3d("+a+", "+a+", 1) "}}:{translate:function(a){return"translate("+a[0]+"px, "+a[1]+"px) "},scale:function(a){return"scale("+a+") "}},p=function(a,c,d){var e=b.data(a,"isoTransform")||{},f={},g,h={},j;f[c]=d,b.extend(e,f);for(g in e)j=e[g],h[g]=o[g](j);var k=h.translate||"",l=h.scale||"",m=k+l;b.data(a,"isoTransform",e),a.style[i]=m};b.cssNumber.scale=!0,b.cssHooks.scale={set:function(a,b){p(a,"scale",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.scale?d.scale:1}},b.fx.step.scale=function(a){b.cssHooks.scale.set(a.elem,a.now+a.unit)},b.cssNumber.translate=!0,b.cssHooks.translate={set:function(a,b){p(a,"translate",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.translate?d.translate:[0,0]}}}var q,r;e.csstransitions&&(q={WebkitTransitionProperty:"webkitTransitionEnd",MozTransitionProperty:"transitionend",OTransitionProperty:"oTransitionEnd",transitionProperty:"transitionEnd"}[j],r=h("transitionDuration"));var s=b.event,t;s.special.smartresize={setup:function(){b(this).bind("resize",s.special.smartresize.handler)},teardown:function(){b(this).unbind("resize",s.special.smartresize.handler)},handler:function(a,b){var c=this,d=arguments;a.type="smartresize",t&&clearTimeout(t),t=setTimeout(function(){jQuery.event.handle.apply(c,d)},b==="execAsap"?0:100)}},b.fn.smartresize=function(a){return a?this.bind("smartresize",a):this.trigger("smartresize",["execAsap"])},b.Isotope=function(a,c,d){this.element=b(c),this._create(a),this._init(d)};var u=["overflow","position","width","height"],v=b(a);b.Isotope.settings={resizable:!0,layoutMode:"masonry",containerClass:"isotope",itemClass:"isotope-item",hiddenClass:"isotope-hidden",hiddenStyle:{opacity:0,scale:.001},visibleStyle:{opacity:1,scale:1},animationEngine:"best-available",animationOptions:{queue:!1,duration:800},sortBy:"original-order",sortAscending:!0,resizesContainer:!0,transformsEnabled:!b.browser.opera,itemPositionDataEnabled:!1},b.Isotope.prototype={_create:function(a){this.options=b.extend({},b.Isotope.settings,a),this.styleQueue=[],this.elemCount=0;var c=this.element[0].style;this.originalStyle={};for(var d=0,e=u.length;d<e;d++){var f=u[d];this.originalStyle[f]=c[f]||""}this.element.css({overflow:"hidden",position:"relative"}),this._updateAnimationEngine(),this._updateUsingTransforms();var g={"original-order":function(a,b){b.elemCount++;return b.elemCount},random:function(){return Math.random()}};this.options.getSortData=b.extend(this.options.getSortData,g),this.reloadItems(),this.offset={left:parseInt(this.element.css("padding-left"),10),top:parseInt(this.element.css("padding-top"),10)};var h=this;setTimeout(function(){h.element.addClass(h.options.containerClass)},0),this.options.resizable&&v.bind("smartresize.isotope",function(){h.resize()}),this.element.delegate("."+this.options.hiddenClass,"click",function(){return!1})},_getAtoms:function(a){var b=this.options.itemSelector,c=b?a.filter(b).add(a.find(b)):a,d={position:"absolute"};this.usingTransforms&&(d.left=0,d.top=0),c.css(d).addClass(this.options.itemClass),this.updateSortData(c,!0);return c},_init:function(a){this.$filteredAtoms=this._filter(this.$allAtoms),this._sort(),this.reLayout(a)},option:function(a){if(b.isPlainObject(a)){this.options=b.extend(!0,this.options,a);var c;for(var d in a)c="_update"+f(d),this[c]&&this[c]()}},_updateAnimationEngine:function(){var a=this.options.animationEngine.toLowerCase().replace(/[ _\-]/g,""),b;switch(a){case"css":case"none":b=!1;break;case"jquery":b=!0;break;default:b=!e.csstransitions}this.isUsingJQueryAnimation=b,this._updateUsingTransforms()},_updateTransformsEnabled:function(){this._updateUsingTransforms()},_updateUsingTransforms:function(){var a=this.usingTransforms=this.options.transformsEnabled&&e.csstransforms&&e.csstransitions&&!this.isUsingJQueryAnimation;a||(delete this.options.hiddenStyle.scale,delete this.options.visibleStyle.scale),thiLine truncated
|
||||
@@ -7,6 +7,7 @@
|
||||
//= require jquery
|
||||
//= require jquery_ujs
|
||||
//= require bootstrap
|
||||
//= require jquery.isotope.min
|
||||
//= require jquery.tinyscrollbar.min
|
||||
//= require orbit-1.0
|
||||
//= require tinymce-jquery
|
||||
@@ -1,6 +1,6 @@
|
||||
var viewportwidth;
|
||||
var viewportheight;
|
||||
function resize(){
|
||||
var viewportwidth,
|
||||
viewportheight;
|
||||
function resize() {
|
||||
viewportheight=$(window).height();
|
||||
viewportwidth=$(window).width();
|
||||
if(window.navigator.userAgent.indexOf("MSIE")>0){
|
||||
@@ -9,34 +9,62 @@ function resize(){
|
||||
}
|
||||
}
|
||||
$(document).ready(function(){
|
||||
$(document).on('click', '.orbit-bar-member', function(){
|
||||
$(this).hasClass('open') ? $(this).removeClass('open') : $(this).addClass('open');
|
||||
$('.bar-login .dropdown-menu').toggle();
|
||||
return false;
|
||||
});
|
||||
|
||||
$(document).click(function() {
|
||||
$('.orbit-bar-member').removeClass("open");
|
||||
$('.bar-login .dropdown-menu').hide();
|
||||
});
|
||||
|
||||
$(document).on('click', '.bar-login .dropdown-menu', function(e) {
|
||||
e.stopPropagation();
|
||||
$('.bar-login .dropdown-menu').show();
|
||||
});
|
||||
|
||||
$('.tip').tooltip({
|
||||
placement: "left"
|
||||
});
|
||||
|
||||
$(function() {
|
||||
var $role = $('.select-role');
|
||||
$('.privacy').each(function($i) {
|
||||
$(this).click(function() {
|
||||
switch ($i) {
|
||||
case 0:
|
||||
$role.slideUp(300);
|
||||
break;
|
||||
case 1:
|
||||
$role.slideDown(300);
|
||||
break;
|
||||
}
|
||||
});
|
||||
});
|
||||
$(document).on('click', '.privacy', function() {
|
||||
switch ($(this).val()) {
|
||||
case 'true':
|
||||
$(this).parents('.controls').children('.select-role').slideUp(300);
|
||||
break;
|
||||
case 'false':
|
||||
$(this).parents('.controls').children('.select-role').slideDown(300);
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.toggle-tr-edit', function() {
|
||||
$(this).parents('tr').next('.qe-block').removeClass('hide');
|
||||
$(this).parents('tr').next('.qe-block').find('.qe-edit-div').addClass('hide');
|
||||
$(this).parents('tr').next('.qe-block').find('#qe-' + $(this).attr('rel')).toggleClass('hide');
|
||||
});
|
||||
|
||||
$(document).on('click', '.sort-header > .sort', function() {
|
||||
$.getScript($(this).attr('rel'));
|
||||
});
|
||||
|
||||
/*tinyscrollbar&windows-Size*/
|
||||
resize();
|
||||
$('#main-sidebar').css("height", viewportheight-40);
|
||||
//$('#content-wrap .viewport').css("height", viewportheight-44);
|
||||
//$('#content-wrap').css("width", viewportwidth-186);
|
||||
$('#main-sidebar .viewport').css("height", viewportheight-40);
|
||||
$('.post-title').css("width", viewportwidth-495);
|
||||
$('#main-sidebar').tinyscrollbar();
|
||||
$('#main-sidebar').tinyscrollbar({ size:(viewportheight-44)});
|
||||
$('.detal-list').tinyscrollbar();
|
||||
$('#main-sidebar').tinyscrollbar({size:(viewportheight-44)});
|
||||
|
||||
/*isotope*/
|
||||
var $container = $('#isotope');
|
||||
$container.isotope({
|
||||
itemSelector : '.item',
|
||||
layoutMode : 'masonry',
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
@@ -44,5 +72,6 @@ $(window).resize(function(){
|
||||
resize();
|
||||
$('#main-sidebar').css("height", viewportheight-40);
|
||||
$('#main-sidebar .viewport').css("height", viewportheight-40);
|
||||
$('.post-title').css("width", viewportwidth-495);
|
||||
$('#main-sidebar').tinyscrollbar({ size:(viewportheight-44)});
|
||||
});
|
||||
});
|
||||
@@ -1,4 +1,7 @@
|
||||
$(document).ready(function() {
|
||||
$('body').prepend("<div id='orbit_bar'/>");
|
||||
ajax_load_proc($('#orbit_bar'), '/load_orbit_bar');
|
||||
$('body').prepend("<div id='orbit_bar_temp'/>");
|
||||
$("#orbit_bar_temp").load('/load_orbit_bar',function(){
|
||||
$('body').prepend($(this).html());
|
||||
$(this).remove();
|
||||
});
|
||||
});
|
||||
@@ -2,7 +2,7 @@ $("div.editable").live("mouseenter mouseleave", function (event) {
|
||||
$(this).children('.edit_link').toggle();
|
||||
});
|
||||
|
||||
$("#page_design_id").live('change', function() {
|
||||
$("#page_design").live('change', function() {
|
||||
$.getScript($(this).attr('rel') + '/' + $(this).val() + '/reload_themes');
|
||||
});
|
||||
|
||||
|
||||
@@ -7,5 +7,4 @@
|
||||
//= require jquery
|
||||
//= require jquery_ujs
|
||||
//= require page_edit
|
||||
//= require side_bar_history
|
||||
//= require rc
|
||||
//= require side_bar_history
|
||||
@@ -16,8 +16,8 @@ h1, h2, h3, h4, h5, h6 {
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.5) inset;
|
||||
padding:9px;
|
||||
}
|
||||
hr {
|
||||
margin: 5px 0;
|
||||
.qe-block hr {
|
||||
margin: 5px 10px 5px 0;
|
||||
}
|
||||
.label-tags {
|
||||
background-color: #FF5B00;
|
||||
@@ -31,10 +31,6 @@ hr {
|
||||
.dropdown-menu {
|
||||
min-width: 90px;
|
||||
}
|
||||
.form-horizontal .form-actions {
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
.subhead {
|
||||
padding-bottom: 0;
|
||||
margin-bottom: 9px;
|
||||
@@ -105,4 +101,7 @@ table .span1-2 {
|
||||
width: 94px;
|
||||
float: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
.qe-block .form-horizontal .form-actions {
|
||||
text-align:right;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
ul.hmenu {
|
||||
list-style: none;
|
||||
margin: 0 0 2em;
|
||||
padding: 0;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
ul.hmenu li {
|
||||
display: inline;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
/*
|
||||
*This is a manifest file that'll automatically include all the stylesheets available in this directory
|
||||
*and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
|
||||
*the top of the compiled file, but it's generally better to create a new file per style scope.
|
||||
*= require new_admin
|
||||
*/
|
||||
@@ -0,0 +1,109 @@
|
||||
#isotope {
|
||||
margin-top: 2px;
|
||||
background-color:#f4f4f4;
|
||||
}
|
||||
.isotope-item {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.isotope-hidden.isotope-item {
|
||||
pointer-events: none;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/**** Isotope CSS3 transitions ****/
|
||||
|
||||
.isotope,
|
||||
.isotope .isotope-item {
|
||||
-webkit-transition-duration: 0.8s;
|
||||
-moz-transition-duration: 0.8s;
|
||||
-o-transition-duration: 0.8s;
|
||||
transition-duration: 0.8s;
|
||||
}
|
||||
|
||||
.isotope {
|
||||
-webkit-transition-property: height, width;
|
||||
-moz-transition-property: height, width;
|
||||
-o-transition-property: height, width;
|
||||
transition-property: height, width;
|
||||
}
|
||||
|
||||
.isotope .isotope-item {
|
||||
-webkit-transition-property: -webkit-transform, opacity;
|
||||
-moz-transition-property: -moz-transform, opacity;
|
||||
-o-transition-property: top, left, opacity;
|
||||
transition-property: transform, opacity;
|
||||
}
|
||||
|
||||
/**** disabling Isotope CSS3 transitions ****/
|
||||
|
||||
.isotope.no-transition,
|
||||
.isotope.no-transition .isotope-item,
|
||||
.isotope .isotope-item.no-transition {
|
||||
-webkit-transition-duration: 0s;
|
||||
-moz-transition-duration: 0s;
|
||||
-o-transition-duration: 0s;
|
||||
transition-duration: 0s;
|
||||
}
|
||||
.w-a {
|
||||
width: 388px;
|
||||
}
|
||||
.w-b {
|
||||
width: 802px;
|
||||
}
|
||||
.h-a {
|
||||
height: 315px;
|
||||
}
|
||||
.h-b {
|
||||
height: 699px;
|
||||
}
|
||||
.item {
|
||||
margin: 5px 0 15px 15px;
|
||||
}
|
||||
.item h3 {
|
||||
margin: 5px 0;
|
||||
}
|
||||
.item h3 [class^="icons-"] {
|
||||
margin: 3px 5px 0 3px;
|
||||
}
|
||||
.item .detail {
|
||||
padding: 5px;
|
||||
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
box-shadow: 0 3px 3px rgba(0, 0, 0, 0.1);
|
||||
-webkit-box-shadow: 0 3px 3px rgba(0, 0, 0, 0.1);
|
||||
-moz-box-shadow: 0 3px 3px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.item .detail .totle {
|
||||
font-size: 50px;
|
||||
padding:10px 5px 20px 0;
|
||||
margin: 0px;
|
||||
text-align: right;
|
||||
border-bottom:1px solid #d9d9d9;
|
||||
}
|
||||
.item .detail .totle span {
|
||||
display: block;
|
||||
font-size:18px;
|
||||
color: #333;
|
||||
padding-left: 5px;
|
||||
text-align:left;
|
||||
}
|
||||
.item .detail .table th, .item .detail .table td {
|
||||
border-top: none;
|
||||
border-bottom: 1px solid #DDDDDD;
|
||||
}
|
||||
.item .detail .table tr td:first-child {
|
||||
color: #666;;
|
||||
}
|
||||
.item .detail .table tr td:last-child {
|
||||
text-align:right;
|
||||
}
|
||||
.item .h-a .my_scroll .viewport {
|
||||
height: 248px;
|
||||
}
|
||||
.item .h-b .my_scroll .viewport {
|
||||
height: 632px;
|
||||
}
|
||||
@@ -11,6 +11,10 @@
|
||||
}
|
||||
.main-list thead th {
|
||||
background-color: rgba(0,0,0,0.05);
|
||||
border-right: 1px solid #ddd;
|
||||
}
|
||||
.main-list thead th:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
.main-list .span1 {
|
||||
min-width: 32px;
|
||||
@@ -28,9 +32,9 @@
|
||||
height:40px;
|
||||
}
|
||||
.main-list tbody .quick-edit .nav {
|
||||
left: -55px;
|
||||
/*left: -55px;*/
|
||||
position: absolute;
|
||||
top: -3px;
|
||||
/*top: -3px;*/
|
||||
width: 350px;
|
||||
}
|
||||
.main-list td {
|
||||
@@ -40,11 +44,55 @@
|
||||
margin-top: 15px;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
.main-list tr:hover .hide {
|
||||
.main-list tr.with_action:hover .hide {
|
||||
display:block !important;
|
||||
}
|
||||
.main-list .label-group {
|
||||
position: relative;
|
||||
height: 40px;
|
||||
}
|
||||
.main-list .label-td {
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
height: 60px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
.main-list .label-td:hover {
|
||||
height: auto;
|
||||
text-align: center;
|
||||
padding: 5px 5px 8px;
|
||||
left: -6px;
|
||||
top: -6px;
|
||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0px 5px 10px rgba(0,0,0,0.2);
|
||||
-moz-box-shadow: 0px 5px 10px rgba(0,0,0,0.2);
|
||||
-webkit-box-shadow: 0px 5px 10px rgba(0,0,0,0.2);
|
||||
border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
z-index: 5;
|
||||
}
|
||||
.route-group .route {
|
||||
padding: 0;
|
||||
}
|
||||
.route-group .route .breadcrumb {
|
||||
border-width: 0!important;
|
||||
}
|
||||
.qe-block td {
|
||||
height:auto;
|
||||
padding: 0;
|
||||
}
|
||||
.qe-block .table td, .qe-block .table th {
|
||||
padding: 8px;
|
||||
}
|
||||
.qe-block .form-horizontal {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.qe-block .form-actions {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
legend {
|
||||
font-size: 15px;
|
||||
|
||||
@@ -11,4 +11,5 @@
|
||||
*= require widget
|
||||
*= require style
|
||||
*= require scroll_style
|
||||
*= require isotope
|
||||
*/
|
||||
@@ -1,15 +0,0 @@
|
||||
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
|
||||
-webkit-text-size-adjust:none;
|
||||
}
|
||||
/*自定*/
|
||||
input:focus, select:focus, textarea:focus {
|
||||
outline:none;
|
||||
-moz-outline-radius: 0;
|
||||
}
|
||||
.clear:after {
|
||||
content:".";
|
||||
clear:both;
|
||||
display:block;
|
||||
height:0;
|
||||
visibility:hidden;
|
||||
}
|
||||
@@ -1,34 +1,9 @@
|
||||
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
vertical-align: baseline;
|
||||
-webkit-text-size-adjust:none;
|
||||
}
|
||||
/* HTML5 display-role reset for older browsers */
|
||||
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
|
||||
display: block;
|
||||
}
|
||||
a {
|
||||
text-decoration:none;
|
||||
}
|
||||
body {
|
||||
line-height: 1;
|
||||
}
|
||||
ol, ul {
|
||||
list-style: none;
|
||||
}
|
||||
blockquote, q {
|
||||
quotes: none;
|
||||
}
|
||||
blockquote:before, blockquote:after, q:before, q:after {
|
||||
content: '';
|
||||
content: none;
|
||||
}
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
html, body{
|
||||
background: url(<%= asset_path 'background.jpg' %>) repeat left top;
|
||||
height: 100%;
|
||||
}
|
||||
/*自定*/
|
||||
input:focus, select:focus, textarea:focus {
|
||||
@@ -42,3 +17,7 @@ input:focus, select:focus, textarea:focus {
|
||||
height:0;
|
||||
visibility:hidden;
|
||||
}
|
||||
a:link, a:hover, a:visited, a:active {
|
||||
outline: none; /* for Firefox */
|
||||
hlbr:expression(this.onFocus=this.blur()); /* for IE */
|
||||
}
|
||||
@@ -1,513 +0,0 @@
|
||||
//Created by Harry Bomrah on Sep 21 2011
|
||||
$rss = jQuery.noConflict();
|
||||
var rcom={
|
||||
//Pass dom and will return binded dom with starting year till current
|
||||
insertDatePanel : function(dom,year){
|
||||
if(!year)year=1901;
|
||||
if(dom=="")return false;
|
||||
domid=dom.attr("id");
|
||||
var dt = new Date();
|
||||
current_year=dt.getFullYear();
|
||||
var dthtml="Year: <select name='"+domid+"_year'>";
|
||||
for(i=current_year;i>=year;i--){
|
||||
dthtml+="<option value='"+i+"'>"+i+"</option>";
|
||||
}
|
||||
dthtml+="</select> Date: <select name='"+domid+"_date'>";
|
||||
for(i=1;i<=31;i++){
|
||||
if(i<10)
|
||||
dthtml+="<option value='0"+i+"'>"+i+"</option>";
|
||||
else
|
||||
dthtml+="<option value='"+i+"'>"+i+"</option>";
|
||||
}
|
||||
dthtml+="</select> Month: <select name='"+domid+"_month'>";
|
||||
var months= Array("","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
|
||||
for(i=1;i<12;i++){
|
||||
if(i<10)
|
||||
dthtml+="<option value='0"+i+"'>"+months[i]+"</option>";
|
||||
else
|
||||
dthtml+="<option value='"+i+"'>"+months[i]+"</option>";
|
||||
}
|
||||
dthtml+="</select>";
|
||||
dom.html(dthtml);
|
||||
},
|
||||
|
||||
//loading overlay around a dom...
|
||||
loadingWrapper : function(dom, display){
|
||||
if(display){
|
||||
dom.prepend("<div id='loading_wrapper' class='loading'></div>");
|
||||
$rss("#loading_wrapper").height(dom.height());
|
||||
$rss("#loading_wrapper").width(dom.width());
|
||||
}else{
|
||||
domId=dom.attr("id");
|
||||
$rss("#"+domId+" #loading_wrapper").remove();
|
||||
}
|
||||
},
|
||||
|
||||
//validating a dom....
|
||||
validate : function(dom, validation, errormsg){
|
||||
var domValue = dom.val();
|
||||
var error = false;
|
||||
var regex="";
|
||||
var msg = "";
|
||||
switch(validation){
|
||||
case "required":
|
||||
if(domValue=="")error=true;
|
||||
msg="Cannot be empty.";
|
||||
break;
|
||||
case "email":
|
||||
regex=/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
|
||||
msg="Invalid Email Address.";
|
||||
break;
|
||||
case "number":
|
||||
regex=/^\d*[0-9](|.\d*[0-9]|,\d*[0-9])?$/;
|
||||
msg = "Only numbers are accepted.";
|
||||
break;
|
||||
case "alphanumeric":
|
||||
regex=/^\s*[a-zA-Z0-9,\s]+\s*$/;
|
||||
msg="Only numbers, alphabets and spaces are allowed.";
|
||||
break;
|
||||
}
|
||||
domId=dom.attr("name");
|
||||
if(errormsg=="")errormsg=msg;
|
||||
if(regex!="")if(!regex.test(domValue))error=true;
|
||||
if(error){$rss("#"+domId+"_error").remove();dom.after("<span id='"+domId+"_error' class='error'>"+errormsg+"</span>");return false;} else{ $rss("#"+domId+"_error").remove();return true;}
|
||||
},
|
||||
|
||||
bindToSpinner : function(dom,data,callbackFn){
|
||||
var domId = dom.attr("id");
|
||||
var dhtml="";
|
||||
var spinnerValue=Array();
|
||||
var spinnerDisplay=Array();
|
||||
$rss.each(data,function(i,it){
|
||||
$rss.each(data[i],function(key,it){
|
||||
spinnerValue.push(it);
|
||||
});
|
||||
});
|
||||
dhtml="<select name='"+domId+"'>";
|
||||
for(i=0,y=1,z=0;i<spinnerValue.length/2;i++,y+=2,z+=2){
|
||||
dhtml+="<option value='"+spinnerValue[z]+"'>"+spinnerValue[y]+"</option>";
|
||||
}
|
||||
dhtml+="</select>";
|
||||
dom.html(dhtml);
|
||||
if(typeof callbackFn=="function")
|
||||
callbackFn.call(this, dhtml);
|
||||
},
|
||||
|
||||
//binds the recieved json to a table
|
||||
bindToTable : function(dom,data,headers,actions,css_class,callbackFn){
|
||||
if(!css_class)css_class="";
|
||||
var dhtml="<table width='100%' cellpadding='5' cellspacing='5' class='"+css_class+"' ><thead><tr>";
|
||||
var domId = dom.attr("id");
|
||||
if(actions){
|
||||
var btnTitles=Array();
|
||||
var btnFunctions=Array();
|
||||
$rss.each(actions,function(title,func){
|
||||
btnTitles.push(title);
|
||||
btnFunctions.push(func);
|
||||
});
|
||||
rcom.translate(btnTitles,function(convertedData){
|
||||
btnTitles=convertedData.slice();
|
||||
|
||||
rcom.translate(headers,function(convertedData){
|
||||
headers=convertedData;
|
||||
if(!data)return;
|
||||
$rss.each(headers,function(i,head){
|
||||
dhtml+="<th>"+head+"</th>";
|
||||
});
|
||||
dhtml+="</thead></tr>";
|
||||
if(data.length==0)dhtml+="<tr><td colspan='"+headers.length+"' align='center'>No Data</td></tr>";
|
||||
$rss.each(data,function(i,item){
|
||||
var cl="";
|
||||
if(i%2!=0)cl="even";
|
||||
dhtml+="<tr id='"+domId+"_"+item.id+"' class='"+cl+"'>";
|
||||
$rss.each(item,function(i,it){
|
||||
if(i!="id"){
|
||||
if(it==null)it="Not Set";
|
||||
dhtml+="<td align='center'>"+it+"</td>";
|
||||
}
|
||||
})
|
||||
dhtml+="<td align='center'>";
|
||||
for(x=0;x<btnTitles.length;x++){
|
||||
dhtml+="<button onclick='"+btnFunctions[x]+"("+item.id+")'>"+btnTitles[x]+"</button>";
|
||||
}
|
||||
dhtml+="</td>";
|
||||
dhtml+="</tr>";
|
||||
});
|
||||
dhtml+="</table>";
|
||||
dom.html(dhtml);
|
||||
});
|
||||
});
|
||||
}else{
|
||||
rcom.translate(headers,function(convertedData){
|
||||
headers=convertedData;
|
||||
if(!data)return;
|
||||
if(headers.length>0){
|
||||
$rss.each(headers,function(i,head){
|
||||
dhtml+="<th>"+head+"</th>";
|
||||
});
|
||||
}
|
||||
dhtml+="</thead></tr>";
|
||||
if(data.length==0)dhtml+="<tr><td colspan='"+headers.length+"' align='center'>No Data</td></tr>";
|
||||
|
||||
$rss.each(data,function(i,item){
|
||||
var cl="";
|
||||
if(i%2!=0)cl="even";
|
||||
dhtml+="<tr id='"+domId+"_"+item.id+"' class='"+cl+"'>";
|
||||
$rss.each(item,function(i,it){
|
||||
if(i!="id"){
|
||||
if(it==null)it="Not Set";
|
||||
dhtml+="<td align='center'>"+it+"</td>";
|
||||
}
|
||||
})
|
||||
dhtml+="</tr>";
|
||||
});
|
||||
dhtml+="</table>";
|
||||
dom.html(dhtml);
|
||||
});
|
||||
}
|
||||
|
||||
if(typeof callbackFn=="function")
|
||||
callbackFn.call(this, dhtml);
|
||||
},
|
||||
//convert to date string which can be directly inserted in database or according to any format.
|
||||
convertToInsertableDate : function(y,m,d,format){
|
||||
var dt="";
|
||||
if(m<10)m="0"+m;
|
||||
if(d<10)d="0"+d;
|
||||
switch(format){
|
||||
case "yyyy-mm-dd":
|
||||
dt= y+"-"+m+"-"+d;
|
||||
break;
|
||||
case "dd-mm-yyyy":
|
||||
dt= d+"-"+m+"-"+y;
|
||||
break;
|
||||
case "mm-dd-yyyy":
|
||||
dt= m+"-"+d+"-"+y;
|
||||
break;
|
||||
default:
|
||||
dt= y+"-"+m+"-"+d;
|
||||
break;
|
||||
}
|
||||
return dt;
|
||||
},
|
||||
//a fucntion to show specific divs and hide all other
|
||||
showDoms : function(doms){
|
||||
$rss("body").find("div").each(function(){$rss(this).hide();});
|
||||
$rss.each(doms,function(i,dom){
|
||||
dom.show();
|
||||
});
|
||||
},
|
||||
|
||||
//a function to translate the word or array..
|
||||
translate : function(data,callbackFn){
|
||||
var cdata="";
|
||||
var status =true;
|
||||
if(!data){
|
||||
if(typeof callbackFn=="function")
|
||||
callbackFn.call(this,cdata);
|
||||
status=false;
|
||||
}
|
||||
if(data==""){
|
||||
if(typeof callbackFn=="function")
|
||||
callbackFn.call(this,cdata);
|
||||
status=false;
|
||||
}
|
||||
if(status){
|
||||
$rss.getJSON("../../classes/translate.php", {fn:"translateThis",tData:data},function(convertedData){
|
||||
if(typeof callbackFn=="function")
|
||||
callbackFn.call(this, convertedData);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// a function to bind JSON to list
|
||||
bindToList : function(dom,data,callbackFn){
|
||||
var domId = dom.attr("id");
|
||||
var dhtml="";
|
||||
var listValue=Array();
|
||||
var listDisplay=Array();
|
||||
$rss.each(data,function(i,it){
|
||||
$rss.each(data[i],function(key,it){
|
||||
listValue.push(it);
|
||||
});
|
||||
});
|
||||
dhtml="<ul id='"+domId+"_list'>";
|
||||
for(i=0,y=1,z=0;i<listValue.length/2;i++,y+=2,z+=2){
|
||||
dhtml+="<li id='li_"+listValue[z]+"'>"+listValue[y]+"</li>";
|
||||
}
|
||||
dhtml+="</ul>";
|
||||
dom.html(dhtml);
|
||||
if(typeof callbackFn=="function")
|
||||
callbackFn.call(this,dhtml);
|
||||
},
|
||||
makeDraggable : function(handler,dom){
|
||||
handler.css("position","absolute");
|
||||
dom.css("position","absolute");
|
||||
var puranix=0;
|
||||
var nayeex=0;
|
||||
var puraniy=0;
|
||||
var nayeey=0;
|
||||
var offset="";
|
||||
var zIndex=dom.css("z-index");
|
||||
handler.mousedown(function(e){
|
||||
puranix=e.clientX;
|
||||
puraniy=e.clientY;
|
||||
offset=dom.offset();
|
||||
$rss(this).mousemove(function(e){
|
||||
nayeex=e.clientX-puranix;
|
||||
nayeex+=offset.left;
|
||||
nayeey=e.clientY-puraniy;
|
||||
nayeey+=offset.top;
|
||||
dom.css({"left":nayeex+"px","top":nayeey+"px","z-index":"9999"});
|
||||
})
|
||||
}).mouseup(function(){
|
||||
$rss(this).unbind("mousemove");
|
||||
dom.css("z-index",zIndex);
|
||||
})
|
||||
},
|
||||
|
||||
//automatically scrolls to the bottom of the div
|
||||
scrollToBottom : function(dom){
|
||||
var domId = dom.attr("id");
|
||||
// var domScrollHeight = document.getElementById(domId).scrollHeight;
|
||||
var obj = document.getElementById(domId);
|
||||
|
||||
if((obj.scrollTop+100) >= (obj.scrollHeight - obj.offsetHeight))
|
||||
dom.scrollTop(obj.scrollHeight);
|
||||
},
|
||||
|
||||
/*ajax loading of images... needs following settings
|
||||
dom:in which images ve to be loaded
|
||||
url:the server url for making ajax calls
|
||||
limit:how many images to load
|
||||
divClass:the class of div surrounding each image
|
||||
nameClass:class for span showing name
|
||||
fn:function to be called in on the server
|
||||
imageSrc:the image source of all the images.
|
||||
bindTo:to bind images to a onclick function or else will be binded to normal a tag.
|
||||
urlKey:to specify the key of the value.. if bindTo is used, this will be neglected..
|
||||
returns json;
|
||||
*/
|
||||
loadImages : function(settings,callbackFn){
|
||||
|
||||
var dom = settings.dom;
|
||||
var domid= dom.attr("id");
|
||||
var temp_array=Array();
|
||||
var starting = $rss("#"+domid+" img:last").attr("id");
|
||||
if(typeof starting != 'undefined'){
|
||||
starting = starting.substr(4,starting.length-1);
|
||||
}else{starting = 0};
|
||||
var temp_var="";
|
||||
var json = "";
|
||||
var dhtml="";
|
||||
var extraparam="";
|
||||
if(typeof settings.extraParam != "undefined"){
|
||||
extraparam = settings.extraParam;
|
||||
}
|
||||
$rss.getJSON(settings.url,{fn:settings.fn,id:settings.whereId,limit:settings.limit,start:starting,extra:extraparam},function(images){
|
||||
json = eval(images);
|
||||
$rss.each(images,function(i,pic){
|
||||
var temp_array=Array();
|
||||
var a_var=Array();
|
||||
var name_var="";
|
||||
var title="";
|
||||
$rss.each(pic,function(i,value){
|
||||
temp_array.push(value);
|
||||
})
|
||||
if(temp_array.length>=4){
|
||||
name_var="<span class='"+settings.nameClass+"'>"+temp_array[3]+"</span></div>"
|
||||
}
|
||||
if(temp_array[2]==null)
|
||||
title = "";
|
||||
else
|
||||
title = temp_array[2];
|
||||
if(typeof settings.bindTo!="undefined"){
|
||||
a_var[1]="onclick='"+settings.bindTo+"("+temp_array[0]+");return false;'";
|
||||
a_var[0]="";
|
||||
}else{a_var[0]='?'+settings.urlKey+'='+temp_array[0];a_var[1]="";}
|
||||
dhtml="<div class='"+settings.divClass+"' id='img_holder_"+temp_array[0]+"' ><a href='"+a_var[0]+"' "+a_var[1]+" title='"+title+"'><img id='pic_"+temp_array[0]+"' style='display:none' src='"+settings.imageSrc+temp_array[1]+"' /></a>"+name_var;
|
||||
dom.delay(100).append(dhtml);
|
||||
$rss("#pic_"+pic.id).delay(100).fadeIn(200);
|
||||
|
||||
})
|
||||
if(typeof callbackFn=="function")
|
||||
callbackFn.call(this,json);
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
|
||||
//function to get url variables...
|
||||
getUrlVars : function(){
|
||||
var vars = [], hash;
|
||||
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
|
||||
for(var i = 0; i < hashes.length; i++){
|
||||
hash = hashes[i].split('=');
|
||||
vars.push(hash[0]);
|
||||
vars[hash[0]] = hash[1];
|
||||
}
|
||||
return vars;
|
||||
},
|
||||
/*function to open a modalwindow on a page.. self reliant no images, no css needed.
|
||||
settings
|
||||
|
||||
width:in percentage or pixcel
|
||||
height:in percentage or pixcel
|
||||
closeBtn:true or false
|
||||
envClose:closing through background click, true or flase
|
||||
loadDiv:load html from a div
|
||||
loadPage:load a page
|
||||
loadHtml: load html
|
||||
|
||||
*/
|
||||
modalWindow : function(settings,callbackFn){
|
||||
|
||||
var envClose = settings.envClose;
|
||||
var dhtml="";
|
||||
if(typeof envClose == "undefined")
|
||||
envClose = true;
|
||||
var closeBtn = settings.closeBtn;
|
||||
if(typeof closeBtn == "undefined")
|
||||
closeBtn = true;
|
||||
|
||||
var rgmaskHeight = $rss(window).height();
|
||||
var rgmaskWidth = $rss(window).width();
|
||||
var tempheight = settings.height;
|
||||
var tempwidth = settings.width;
|
||||
|
||||
if(typeof tempheight!="undefined"){
|
||||
if(tempheight.charAt(tempheight.length-1)=='%')
|
||||
tempheight=(rgmaskHeight*parseInt(tempheight.substr(0,tempheight.length)))/100;
|
||||
}else{tempheight="auto";}
|
||||
|
||||
if(typeof tempwidth!="undefined"){
|
||||
if(tempwidth.charAt(tempwidth.length-1)=='%')
|
||||
tempwidth=(rgmaskWidth*parseInt(tempwidth.substr(0,tempwidth.length)))/100;
|
||||
}else{tempwidth="auto";}
|
||||
|
||||
$rss("body").append('<div class="rgmask" id="rgsheath" style="height:'+rgmaskHeight+'px"></div>');
|
||||
$rss("#rgsheath").css({background: "#000", width: "100%", position: "fixed", top: 0, left: 0,opacity:0.9,'z-index':199});
|
||||
$rss("body").append('<div id="rgWindow"></div>');
|
||||
$rss("#rgWindow").css({"position": "fixed", "z-index": "999", "background": "#fff", "border": "solid 3px #ccc", "padding": "20px", "overflow": "hidden", "border-radius": "12px", "-webkit-border-radius": "12px", "-moz-border-radius": "12px", "-ms-border-radius": "12px", "box-shadow": "0 0 20px rgba(0,0,0,0.9)","-webkit-box-shadow": "0 0 20px rgba(0,0,0,0.9)","-moz-box-shadow": "0 0 20px rgba(0,0,0,0.9)","-ms-box-shadow": "0 0 20px rgba(0,0,0,0.9)"});
|
||||
var rgWTop = (rgmaskHeight-20)/2;
|
||||
var rgWLeft = (rgmaskWidth-20)/2;
|
||||
$rss("#rgWindow").css({top:rgWTop+"px", left:rgWLeft+"px"});
|
||||
if(typeof settings.loadDiv!="undefined"){
|
||||
dhtml = $rss("#"+settings.loadDiv).html();
|
||||
$rss("#rgWindow").html(dhtml).hide();
|
||||
prepareWindow();
|
||||
}
|
||||
if(typeof settings.loadHtml!="undefined"){
|
||||
dhtml = settings.loadHtml;
|
||||
$rss("#rgWindow").html(dhtml).hide();
|
||||
prepareWindow();
|
||||
}
|
||||
if(typeof settings.loadPage!="undefined"){
|
||||
$rss("#rgWindow").load(settings.loadPage,function(){$rss(this).hide();dhtml=$rss(this).html();prepareWindow();});
|
||||
}
|
||||
function prepareWindow(){
|
||||
if(tempheight!="auto")
|
||||
rgWTop = (rgmaskHeight-tempheight)/2;
|
||||
else{
|
||||
tempheight=$rss("#rgWindow").height();
|
||||
rgWTop=(rgmaskHeight-tempheight)/2;
|
||||
}
|
||||
if(tempwidth!="auto")
|
||||
rgWLeft = (rgmaskWidth-tempwidth)/2;
|
||||
else{
|
||||
tempwidth=$rss("#rgWindow").width();
|
||||
rgWLeft=(rgmaskWidth-tempwidth)/2;
|
||||
}
|
||||
$rss("#rgWindow").empty().show();
|
||||
var closebtn = "";
|
||||
if(closeBtn)
|
||||
closebtn='<a href="" style="display:block; width:28px; height:28px; line-height:28px; text-align:center; position:absolute; right:6px; top: 6px; font-family:Tahoma; font-weight:bold; border:solid 1px #ccc; border-radius: 15px;text-shadow:1px 1px 0 #fff; background:#f6f6f6; font-size:14px; text-decoration:none; color:#666" id="close_modal">X</a>';
|
||||
$rss("#rgWindow").animate({"width":tempwidth+"px","height":tempheight+"px",top:rgWTop+"px", left:rgWLeft+"px"},500,function(){$rss("#rgWindow").html(closebtn+"<div id='rgContent' style='overflow:auto; overflow-x:none; height:"+tempheight+"px;'>"+dhtml+"</div>");
|
||||
$rss("#close_modal").mouseover(function(){$rss(this).css("color","#999");}).mouseout(function(){$rss(this).css("color","#666");})
|
||||
$rss("#close_modal").click(function(){
|
||||
$rss("#rgWindow").empty();
|
||||
var x = (rgmaskHeight-20)/2;
|
||||
var y = (rgmaskWidth-20)/2;
|
||||
$rss("#rgWindow").animate({top:x+"px", left:y+"px","width":"50px","height":"50px"},300,function(){$rss(this).fadeOut(100).remove();$rss("#rgsheath").fadeOut(500).remove();});
|
||||
return false;
|
||||
})
|
||||
if(envClose)
|
||||
$rss("#rgsheath").click(function(){
|
||||
$rss("#rgWindow").empty();
|
||||
var x = (rgmaskHeight-20)/2;
|
||||
var y = (rgmaskWidth-20)/2;
|
||||
$rss("#rgWindow").animate({top:x+"px", left:y+"px","width":"50px","height":"50px"},300,function(){$rss(this).fadeOut(100).remove();$rss("#rgsheath").fadeOut(500).remove();});})
|
||||
|
||||
if(typeof callbackFn=="function")
|
||||
callbackFn.call(this,dhtml);
|
||||
});
|
||||
}
|
||||
},
|
||||
modalWindowClose : function(callbackFn){
|
||||
if($rss("#rgWindow").length>0){
|
||||
$rss("#rgWindow").empty();
|
||||
var rgmaskHeight = $rss(window).height();
|
||||
var rgmaskWidth = $rss(window).width();
|
||||
var x = (rgmaskHeight-20)/2;
|
||||
var y = (rgmaskWidth-20)/2
|
||||
$rss("#rgWindow").animate({top:x+"px", left:y+"px","width":"50px","height":"50px"},300,function(){$rss(this).fadeOut(100).remove();$rss("#rgsheath").fadeOut(500).remove();})
|
||||
}
|
||||
if(typeof callbackFn=="function")
|
||||
callbackFn.call(this,"harry");
|
||||
},
|
||||
bindDomToHead : function(dom){
|
||||
var gc = dom.css("background");
|
||||
var t = dom.offset();
|
||||
var gw = dom.width();
|
||||
$rss(window).scroll(function(){
|
||||
var wt = $rss(window).scrollTop();
|
||||
if ( wt > t.top ) {
|
||||
var cssObj = {
|
||||
'position':'fixed',
|
||||
'top':0,
|
||||
'width':gw,
|
||||
'background':gc,
|
||||
'box-shadow':'0 1px 0 rgba(0,0,0,0.2)',
|
||||
'z-index':99
|
||||
}
|
||||
dom.css(cssObj);
|
||||
} else {
|
||||
dom.attr('style',"");
|
||||
}
|
||||
});
|
||||
},
|
||||
progressBar : function(dom,settings){
|
||||
var domid = dom.prop("id");
|
||||
if($rss("#rss_progressbar_div_"+domid).length==0){
|
||||
if(typeof settings.top == "undefined")
|
||||
settings.value = 1;
|
||||
if(typeof settings.top == "undefined")
|
||||
settings.top = (dom.height()-12)/2;
|
||||
dom.append("<div id='rss_progressbar_div_"+domid+"' style='display:none;padding: 2px;background: #333;background: -webkit-linear-gradient(#111, #333);background: -moz-linear-gradient(#111, #333);background: -ms-linear-gradient(#111, #333);position: absolute;top: "+settings.top+"px;left: 50%;margin-left: -45%;width: 84%;box-shadow: inset 0 0 2px #000;border-radius: 4px;'><div id='rss_progressbar_"+domid+"' style='height: 8px; background: #36c;background: -webkit-linear-gradient(#7A98E7, #36c);background: -moz-linear-gradient(#7A98E7, #36c);background: -ms-linear-gradient(#7A98E7, #36c);border-radius: 2px; width: "+settings.value+"%;'></div></div>");
|
||||
$rss("#rss_progressbar_div_"+domid).fadeIn(500);
|
||||
}
|
||||
},
|
||||
progressBarValue : function(dom,value){
|
||||
var domid = dom.prop("id");
|
||||
if($rss("#rss_progressbar_div_"+domid).length==1){
|
||||
$rss("#rss_progressbar_"+domid).animate({"width":value+"%"},100);
|
||||
|
||||
}
|
||||
},
|
||||
progressBarClose : function(dom){
|
||||
var domid = dom.prop("id");
|
||||
$rss("#rss_progressbar_div_"+domid).fadeOut(500,function(){$(this).remove();});
|
||||
},
|
||||
getInternetExplorerVersion: function(){
|
||||
var rv = -1; // Return value assumes failure.
|
||||
if (navigator.appName == 'Microsoft Internet Explorer')
|
||||
{
|
||||
var ua = navigator.userAgent;
|
||||
var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
|
||||
if (re.exec(ua) != null)
|
||||
rv = parseFloat( RegExp.$1 );
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
$ = jQuery.noConflict();
|
||||
@@ -1,85 +1,94 @@
|
||||
|
||||
#back_sidebar {
|
||||
background: url(<%= asset_path "75.png" %>) repeat scroll left top transparent;
|
||||
box-shadow: 3px 0 4px #472A12;
|
||||
border-right: 1px solid #121212;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
#back_sidebar h1 {
|
||||
background: url(<%= asset_path "h1_bg.png" %>) repeat-x scroll left top transparent;
|
||||
border-bottom: 1px solid #1B1B1B;
|
||||
border-top: 1px solid #424344;
|
||||
color: #FFFFFF;
|
||||
font-size: 16px;
|
||||
font-weight: normal;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
margin: 0;
|
||||
padding-left: 10px;
|
||||
text-shadow: 0 -1px 0 #000000;
|
||||
}
|
||||
#back_sidebar .list {
|
||||
color:#fff;
|
||||
font-size:12px;
|
||||
background:url(<%= asset_path "line.png" %>) repeat-x left bottom;
|
||||
}
|
||||
#back_sidebar .list li {
|
||||
background:url(<%= asset_path "sidebar_li.jpg" %>) repeat-x left top;
|
||||
border-top:1px solid #424344;
|
||||
border-bottom:1px solid #000000;
|
||||
}
|
||||
#back_sidebar .list li:hover {
|
||||
background-position:left bottom;
|
||||
border-top:1px solid #406cc3;
|
||||
border-bottom:1px solid #242628;
|
||||
}
|
||||
#back_sidebar .list li a {
|
||||
display: block;
|
||||
padding: 7px 0 6px 12px;
|
||||
color:#c4c4c4;
|
||||
}
|
||||
#back_sidebar .list li a span {
|
||||
background:url(<%= asset_path "add_mamber.png" %>) left top no-repeat;
|
||||
text-shadow: 0px 1px 0px #000;
|
||||
line-height: 18px;
|
||||
padding: 2px 0 1px 35px;
|
||||
}
|
||||
#back_sidebar .list li a:hover span {
|
||||
background-position:left bottom;
|
||||
color:#eeeeee;
|
||||
}
|
||||
#back_sidebar .users .list .set_1 {
|
||||
background-position:left bottom;
|
||||
border-top:1px solid #406cc3;
|
||||
border-bottom:1px solid #242628;
|
||||
}
|
||||
#back_sidebar .users .list .set_1 a span {
|
||||
background-position:left bottom;
|
||||
color:#eeeeee;
|
||||
}
|
||||
#back_sidebar .roles .list .set_2 {
|
||||
background-position:left bottom;
|
||||
border-top:1px solid #406cc3;
|
||||
border-bottom:1px solid #242628;
|
||||
}
|
||||
#back_sidebar .roles .list .set_2 a span {
|
||||
background-position:left bottom;
|
||||
color:#eeeeee;
|
||||
}
|
||||
#sidebar .infos .list .set_3 {
|
||||
background-position:left bottom;
|
||||
border-top:1px solid #406cc3;
|
||||
border-bottom:1px solid #242628;
|
||||
}
|
||||
#sidebar .infos .list .set_3 a span {
|
||||
background-position:left bottom;
|
||||
color:#eeeeee;
|
||||
}
|
||||
#sidebar .translations_setup {
|
||||
margin-top: 42px;
|
||||
|
||||
#back_sidebar {
|
||||
background: url(<%= asset_path "75.png" %>) repeat scroll left top transparent;
|
||||
box-shadow: 3px 0 4px #472A12;
|
||||
border-right: 1px solid #121212;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
#back_sidebar h1 {
|
||||
background: url(<%= asset_path "h1_bg.png" %>) repeat-x scroll left top transparent;
|
||||
border-bottom: 1px solid #1B1B1B;
|
||||
border-top: 1px solid #424344;
|
||||
color: #FFFFFF;
|
||||
font-size: 16px;
|
||||
font-weight: normal;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
margin: 0;
|
||||
padding-left: 10px;
|
||||
text-shadow: 0 -1px 0 #000000;
|
||||
}
|
||||
#back_sidebar .list {
|
||||
background:url(<%= asset_path "line.png" %>) repeat-x left bottom;
|
||||
color:#fff;
|
||||
font-size:12px;
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
#back_sidebar .list li {
|
||||
background:url(<%= asset_path "sidebar_li.jpg" %>) repeat-x left top;
|
||||
border-top:1px solid #424344;
|
||||
border-bottom:1px solid #000000;
|
||||
list-style:none;
|
||||
}
|
||||
#back_sidebar .list li:hover {
|
||||
background-position:left bottom;
|
||||
border-top:1px solid #406cc3;
|
||||
border-bottom:1px solid #242628;
|
||||
}
|
||||
#back_sidebar .list li a {
|
||||
display: block;
|
||||
padding: 7px 0 6px 12px;
|
||||
color:#c4c4c4;
|
||||
}
|
||||
#back_sidebar .list li a span {
|
||||
background:url(<%= asset_path "add_mamber.png" %>) left top no-repeat;
|
||||
text-shadow: 0px 1px 0px #000;
|
||||
line-height: 18px;
|
||||
padding: 2px 0 1px 35px;
|
||||
}
|
||||
#back_sidebar .list li a:hover span {
|
||||
background-position:left bottom;
|
||||
color:#eeeeee;
|
||||
}
|
||||
#back_sidebar .list li ul{
|
||||
padding:0 0 0 15px;
|
||||
}
|
||||
#back_sidebar .list li ul ul{
|
||||
padding:0;
|
||||
}
|
||||
#back_sidebar .users .list .set_1 {
|
||||
background-position:left bottom;
|
||||
border-top:1px solid #406cc3;
|
||||
border-bottom:1px solid #242628;
|
||||
}
|
||||
#back_sidebar .users .list .set_1 a span {
|
||||
background-position:left bottom;
|
||||
color:#eeeeee;
|
||||
}
|
||||
#back_sidebar .roles .list .set_2 {
|
||||
background-position:left bottom;
|
||||
border-top:1px solid #406cc3;
|
||||
border-bottom:1px solid #242628;
|
||||
}
|
||||
#back_sidebar .roles .list .set_2 a span {
|
||||
background-position:left bottom;
|
||||
color:#eeeeee;
|
||||
}
|
||||
#sidebar .infos .list .set_3 {
|
||||
background-position:left bottom;
|
||||
border-top:1px solid #406cc3;
|
||||
border-bottom:1px solid #242628;
|
||||
}
|
||||
#sidebar .infos .list .set_3 a span {
|
||||
background-position:left bottom;
|
||||
color:#eeeeee;
|
||||
}
|
||||
#sidebar .translations_setup {
|
||||
margin-top: 42px;
|
||||
}
|
||||
@@ -1,29 +1,73 @@
|
||||
@font-face{
|
||||
font-family: 'WebSymbolsRegular';
|
||||
src: url(<%= asset_path "websymbols-regular-webfont.eot" %>);
|
||||
src: url(<%= asset_path "websymbols-regular-webfont.eot?#iefix" %>) format('embedded-opentype'),
|
||||
url(<%= asset_path "websymbols-regular-webfont.woff" %>) format('woff'),
|
||||
url(<%= asset_path "websymbols-regular-webfont.ttf" %>) format('truetype'),
|
||||
url(<%= asset_path "websymbols-regular-webfont.svg#WebSymbolsRegular" %>) format('svg');
|
||||
src: url(<%= asset_path 'fonts/websymbols-regular-webfont.eot' %>);
|
||||
src: url(<%= asset_path 'fonts/websymbols-regular-webfont.eot?#iefix' %>) format('embedded-opentype'),
|
||||
url(<%= asset_path 'fonts/websymbols-regular-webfont.woff' %>) format('woff'),
|
||||
url(<%= asset_path 'fonts/websymbols-regular-webfont.ttf' %>) format('truetype'),
|
||||
url(<%= asset_path 'fonts/websymbols-regular-webfont.svg#WebSymbolsRegular' %>) format('svg');
|
||||
}
|
||||
.login-logo {
|
||||
text-indent: -9999px;
|
||||
background: url(<%= asset_path 'sign-in-logo.png' %>) no-repeat center 40px;
|
||||
padding-top: 40px;
|
||||
height: 160px;
|
||||
}
|
||||
|
||||
#orbit-bar {
|
||||
margin-bottom: 0;
|
||||
position:fixed;
|
||||
width:100%;
|
||||
z-index: 99;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
#orbit-bar .navbar-inner {
|
||||
height: 28px;
|
||||
-moz-border-radius: 0px;
|
||||
-webkit-border-radius: 0px;
|
||||
border-radius: 0px;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 1px;
|
||||
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(127, 149, 165, 1), 0 -1px 0 rgba(31, 32, 36, 1) inset;
|
||||
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(127, 149, 165, 1), 0 -1px 0 rgba(31, 32, 36, 1) inset;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(127, 149, 165, 1), 0 -1px 0 rgba(31, 32, 36, 1) inset;
|
||||
background-image: -moz-linear-gradient(top, #545b60, #191a1c);
|
||||
background-image: -ms-linear-gradient(top, #545b60, #191a1c);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#545b60), to(#191a1c));
|
||||
background-image: -webkit-linear-gradient(top, #545b60, #191a1c);
|
||||
background-image: -o-linear-gradient(top, #545b60, #191a1c);
|
||||
background-image: linear-gradient(top, #545b60, #191a1c);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#545b60', endColorstr='#191a1c', GradientType=0);
|
||||
}
|
||||
#orbit-bar .navbar-search {
|
||||
float: none;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
}
|
||||
#orbit-bar .nav.pull-right {
|
||||
margin-right: -20px;
|
||||
}
|
||||
#orbit-bar .search-query {
|
||||
background-image: url(<%= asset_path 'main-search.png' %>);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 5px 6px;
|
||||
padding-left: 25px;
|
||||
/*background-color: rgba(255, 255, 255, 0.8);
|
||||
color: #333;
|
||||
text-shadow: 0px 1px 0px #FFF;*/
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3) inset, 0 1px 0 rgba(255, 255, 255, 0.15);
|
||||
}
|
||||
#orbit-bar .search-query:focus {
|
||||
/*background-color: rgba(255, 255, 255, 0.9);
|
||||
text-shadow: 0px 1px 0px #FFF;*/
|
||||
background-position: 6px 7px;
|
||||
}
|
||||
#orbit-bar .container {
|
||||
width:100%;
|
||||
}
|
||||
#orbit-bar .orbit-logo .brand {
|
||||
background: url(<%= asset_path "orbit-bar.png" %>) no-repeat -162px top;
|
||||
background: url(<%= asset_path 'orbit-bar.png' %>) no-repeat -162px -5px;
|
||||
text-indent:-9999px;
|
||||
padding: 5px 20px 4px;
|
||||
}
|
||||
#orbit-bar .orbit-logo .brand:hover {
|
||||
background-color: rgba(0,157,220,1);
|
||||
@@ -38,59 +82,270 @@
|
||||
background-color: rgba(0,157,220,1);
|
||||
}
|
||||
#orbit-bar .nav > li > a {
|
||||
background-image: url(<%= asset_path "orbit-bar.png" %>);
|
||||
background-image: url(<%= asset_path 'orbit-bar.png' %>);
|
||||
background-repeat:no-repeat;
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
text-indent: -9999px;
|
||||
padding:12px;
|
||||
padding:6px;
|
||||
}
|
||||
#orbit-bar .nav > li > a.orbit-bar-home {
|
||||
background-position: -4px -4px;
|
||||
background-position: -10px -10px;
|
||||
}
|
||||
#orbit-bar .nav > li > a.orbit-bar-desktop {
|
||||
background-position: -100px -4px;
|
||||
}
|
||||
#orbit-bar .nav > li > a.orbit-bar-logout {
|
||||
background-position: -38px -4px;
|
||||
margin: 0 10px 0 0;
|
||||
#orbit-bar .nav > li > a.orbit-bar-member {
|
||||
background-position: -4px -37px;
|
||||
}
|
||||
#orbit-bar .nav > li > a.orbit-bar-search {
|
||||
background-position: -68px -4px;
|
||||
#orbit-bar .nav > li > a.orbit-bar-member {
|
||||
background-position: -10px -43px;
|
||||
}
|
||||
#orbit-bar .log {
|
||||
margin: 0 10px 0 0;
|
||||
#orbit-bar .nav > li > a.orbit-bar-language {
|
||||
background-position: -42px -42px;
|
||||
}
|
||||
#orbit-bar .log input {
|
||||
margin: 5px 0 0;
|
||||
.language-menu .active {
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
background-color: #0088cc;
|
||||
}
|
||||
|
||||
#main-sidebar {
|
||||
background-color: #FFFFFF;
|
||||
width: 155px;
|
||||
padding-right: 4px;
|
||||
border-right: 1px solid rgba(0,0,0,.3);
|
||||
position:fixed;
|
||||
top:40px;
|
||||
z-index: 88;
|
||||
#orbit-bar .nav > li > a.orbit-bar-account {
|
||||
background-image: none;
|
||||
height: 22px;
|
||||
padding: 3px;
|
||||
text-indent: inherit;
|
||||
min-width: 110px;
|
||||
width: auto !important;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#main-wrap {
|
||||
margin-left:160px;
|
||||
padding-top: 40px;
|
||||
position: relative;
|
||||
#orbit-bar .nav span.member-name {
|
||||
display: inline-block;
|
||||
float: right;
|
||||
line-height: 22px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
#main-wrap > .form-actions {
|
||||
text-align: center;
|
||||
padding: 17px 20px 27px;
|
||||
#orbit-bar .nav img.member-img {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
max-width: 22px;
|
||||
}
|
||||
#orbit-bar .account-menu {
|
||||
right: 5px;
|
||||
}
|
||||
#orbit-bar .bar-login {
|
||||
|
||||
}
|
||||
#orbit-bar .bar-login .open, #orbit-bar .open .orbit-bar-account {
|
||||
background-color: #009DDC;
|
||||
}
|
||||
#orbit-bar .bar-login .dropdown-menu {
|
||||
padding: 0 0 10px;
|
||||
max-width: 260px;
|
||||
}
|
||||
#orbit-bar .bar-login .dropdown-menu .log {
|
||||
margin: 10px 15px 0;
|
||||
list-style: none outside none;
|
||||
}
|
||||
#orbit-bar .bar-login .dropdown-menu .log .title {
|
||||
background: url(<%= asset_path 'sign-in-logo2.png' %>) no-repeat center center;
|
||||
height: 70px;
|
||||
}
|
||||
#orbit-bar .bar-login .dropdown-menu .log form {
|
||||
margin: 0 0 8px;
|
||||
}
|
||||
#orbit-bar .bar-login .dropdown-menu .log input {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#orbit-bar .bar-login .dropdown-menu .log .span2 {
|
||||
width: 183px;
|
||||
}
|
||||
#orbit-bar .bar-login .dropdown-menu .log .forgot {
|
||||
margin-bottom: 20px;
|
||||
padding: 3px 0 0;
|
||||
float: right;
|
||||
display: inline-block;
|
||||
color: #0088CC;
|
||||
}
|
||||
#orbit-bar .bar-login .dropdown-menu .log .input-prepend {
|
||||
margin-top: 20px;
|
||||
}
|
||||
#orbit-bar .bar-login .dropdown-menu .log .remember {
|
||||
margin-top: 5px;
|
||||
}
|
||||
#orbit-bar .bar-login .dropdown-menu .log .forgot:hover {
|
||||
padding: 3px 0 0;
|
||||
float: right;
|
||||
display: inline-block;
|
||||
color: #005580;
|
||||
text-decoration: underline;
|
||||
background-color: transparent;
|
||||
}
|
||||
#orbit-bar .bar-login .dropdown-menu .log .btn {
|
||||
width: 220px;
|
||||
}
|
||||
#orbit-bar .bar-login .dropdown-menu .log .divider {
|
||||
position:relative;
|
||||
overflow: inherit;
|
||||
margin: 20px 0;
|
||||
}
|
||||
#orbit-bar .bar-login .dropdown-menu .log .divider span {
|
||||
position: absolute;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background-color: #FFF;
|
||||
color: #666;
|
||||
top: -9px;
|
||||
left: 100px;
|
||||
font-size:16px;
|
||||
text-align: center;
|
||||
}
|
||||
#orbit-bar .bar-login .dropdown-menu .register {
|
||||
color: #FFFFFF;
|
||||
margin: 0 15px;
|
||||
width: 188px;
|
||||
}
|
||||
#main-sidebar {
|
||||
background: url(<%= asset_path 'background.jpg' %>) repeat left top;
|
||||
width: 155px;
|
||||
padding-right: 4px;
|
||||
border-right: 1px solid rgba(0,0,0,.2);
|
||||
position:fixed;
|
||||
top: 42px;
|
||||
z-index: 88;
|
||||
}
|
||||
#main-sidebar .nav {
|
||||
padding-top: 5px;
|
||||
}
|
||||
#main-sidebar .nav > li.active > a [class^="icons-"] {
|
||||
background-image: url(<%= asset_path 'icons_pack_white.png' %>);
|
||||
}
|
||||
#main-sidebar .nav > li > .nav {
|
||||
margin-left: -14px;
|
||||
margin-bottom: 5px;
|
||||
width: 155px;
|
||||
padding: 0;
|
||||
background-color: #FFF;
|
||||
/*border-radius: 0px 0px 8px 0px;
|
||||
-webkit-border-radius: 0px 0px 8px 0px;
|
||||
-moz-border-radius: 0px 0px 8px 0px;*/
|
||||
box-shadow: 0px 2px 1px rgba(0,0,0,0.1);
|
||||
-moz-box-shadow: 0px 2px 1px rgba(0,0,0,0.1);
|
||||
-webkit-box-shadow: 0px 2px 1px rgba(0,0,0,0.1);
|
||||
}
|
||||
#main-sidebar .nav > li > .nav > li > a {
|
||||
margin-left: 0;
|
||||
padding-left: 19px;
|
||||
color: #999;
|
||||
}
|
||||
#main-sidebar .nav > li > .nav > li > a:hover {
|
||||
color: #000;
|
||||
background-color: #d7eeff;
|
||||
}
|
||||
#main-sidebar .nav > li > .nav > li.active > a {
|
||||
background-color: #b7b7b7;
|
||||
color: #fff;
|
||||
}
|
||||
#main-wrap {
|
||||
background-color: #FFF;
|
||||
margin-left:160px;
|
||||
padding-top: 42px;
|
||||
padding-bottom: 18px;
|
||||
position: relative;
|
||||
min-height: 100%;
|
||||
}
|
||||
#main-wrap > .form-actions {
|
||||
background-color: #FFF;
|
||||
text-align: center;
|
||||
padding: 17px 20px 0;
|
||||
margin: 0;
|
||||
border-top: none;
|
||||
}
|
||||
#main-wrap .subnav {
|
||||
height: auto;
|
||||
min-height: 36px;
|
||||
}
|
||||
#main-wrap .pagination {
|
||||
margin: 18px 0 0;
|
||||
text-align: center;
|
||||
}
|
||||
.main-list .route-group td {
|
||||
border: none;
|
||||
}
|
||||
#main-wrap .route-group .breadcrumb {
|
||||
background-image: none;
|
||||
border-radius: 0;
|
||||
-moz-border-radius: 0;
|
||||
-webkit-border-radius: 0;
|
||||
border-width: 0 0 1px 0;
|
||||
box-shadow: none;
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
margin-bottom: 0px;
|
||||
padding: 7px 8px 5px;
|
||||
}
|
||||
#main-wrap .breadcrumb li {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
#sub-wiget {
|
||||
clear: right;
|
||||
float: right;
|
||||
padding-right: 10px;
|
||||
padding-top: 8px;
|
||||
position: relative;
|
||||
margin-bottom: 13px;
|
||||
width: 304px;
|
||||
}
|
||||
.main-wiget .widget-box {
|
||||
margin: 5px 0;
|
||||
width: 100%;
|
||||
}
|
||||
#poststuff .form-actions {
|
||||
background-color: transparent;
|
||||
text-align: right;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
margin-bottom: 0;
|
||||
clear: both;
|
||||
}
|
||||
#poststuff form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
#post-body {
|
||||
float: left;
|
||||
clear: left;
|
||||
width: 100%;
|
||||
margin-right: -340px;
|
||||
}
|
||||
#post-body .title input[type=text] {
|
||||
margin-bottom: 0;
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
}
|
||||
#post-body .btn-group {
|
||||
margin-left: 5px;
|
||||
}
|
||||
#post-body .well {
|
||||
margin: 0;
|
||||
border-radius: 0px;
|
||||
-moz-border-radius: 0px;
|
||||
box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
-webkit-box-shadow: none;
|
||||
border-top: none;
|
||||
}
|
||||
#post-body .editor {
|
||||
background-color: #333333;
|
||||
height: 20px;
|
||||
margin: 8px 0;
|
||||
width: 100%;
|
||||
}
|
||||
#post-body-content {
|
||||
margin-right: 320px;
|
||||
padding: 8px 0 8px 6px;
|
||||
}
|
||||
.filter .accordion-heading > a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
@@ -117,27 +372,21 @@
|
||||
border-top-color: #0088CC;
|
||||
margin-top: 6px;
|
||||
}
|
||||
.accordion-group .web-symbol:after {
|
||||
font-family: 'WebSymbolsRegular';
|
||||
content: "{";
|
||||
margin-left: 2px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
.filter .active {
|
||||
background-color: #0088CC;
|
||||
}
|
||||
.filter .active a {
|
||||
color: #FFF;
|
||||
}
|
||||
.filter .active .web-symbol:after {
|
||||
content: "}";
|
||||
}
|
||||
.filters {
|
||||
background-color: rgba(0,0,0,0.025);
|
||||
background-color: rgba(0,0,0,0.075);
|
||||
-webkit-box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.2);
|
||||
-moz-box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.filters > div {
|
||||
background-color: #dadada;
|
||||
}
|
||||
.filters .btn {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
@@ -148,11 +397,106 @@
|
||||
.filters .filter-clear {
|
||||
padding: 5px 5px 0;
|
||||
border-top: 1px solid rgba(0,0,0,0.1);
|
||||
background-color: rgba(0,0,0,0.025);
|
||||
text-align: right;
|
||||
margin: 0 5px;
|
||||
-webkit-box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.5);
|
||||
-moz-box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.5);
|
||||
box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
.filters .in {
|
||||
border-bottom: 1px solid rgba(0,0,0,0.07)
|
||||
/*border-bottom: 1px solid rgba(0,0,0,0.07)*/
|
||||
}
|
||||
.sign-in {
|
||||
width: 360px;
|
||||
margin: 0 auto 70px;
|
||||
background-color: #FFF;
|
||||
-moz-border-radius: 0 0 5px 5px;
|
||||
-webkit-border-radius: 0 0 5px 5px;
|
||||
border-radius: 0 0 5px 5px;
|
||||
-moz-box-shadow: 0 2px 2px rgba(143, 143, 143, 0.38);
|
||||
-webkit-box-shadow: 0 2px 2px rgba(143, 143, 143, 0.38);
|
||||
box-shadow: 0 2px 2px rgba(143, 143, 143, 0.38);
|
||||
border-width: 0px 1px 1px 1px;
|
||||
border-style: none solid solid solid;
|
||||
border-color: transparent #c6c6c6 #c6c6c6 #c6c6c6;
|
||||
}
|
||||
#signin-header {
|
||||
width: 340px;
|
||||
margin: 30px auto 0;
|
||||
line-height: 25px;
|
||||
padding: 5px 10px;
|
||||
border-width: 1px 1px 0px 1px;
|
||||
border-style: solid solid none solid;
|
||||
border-color: #c6c6c6 #c6c6c6 transparent #c6c6c6;
|
||||
background-color: #006dcc;
|
||||
background-image: -moz-linear-gradient(top, #dadada, #c0c0c0);
|
||||
background-image: -ms-linear-gradient(top, #dadada, #c0c0c0);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#dadada), to(#c0c0c0));
|
||||
background-image: -webkit-linear-gradient(top, #dadada, #c0c0c0);
|
||||
background-image: -o-linear-gradient(top, #dadada, #c0c0c0);
|
||||
background-image: linear-gradient(top, #dadada, #c0c0c0);
|
||||
-moz-border-radius: 5px 5px 0px 0px ;
|
||||
-webkit-border-radius: 5px 5px 0px 0px;
|
||||
border-radius: 5px 5px 0px 0px;
|
||||
-moz-box-shadow: 0 1px 0px rgba(20, 20, 20, 0.3);
|
||||
-webkit-box-shadow: 0 1px 0px rgba(20, 20, 20, 0.3);
|
||||
box-shadow: 0 1px 0px rgba(20, 20, 20, 0.3);
|
||||
}
|
||||
#signin-header h3 {
|
||||
color: #848484;
|
||||
text-shadow: 0 1px 0 #e9e9e9;
|
||||
}
|
||||
#sign-footer {
|
||||
width: 100%;
|
||||
position:fixed;
|
||||
bottom: 0;
|
||||
height: 40px;
|
||||
background-color: #dadada;
|
||||
color: #7a7a7a;
|
||||
box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.3);
|
||||
-moz-box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.3);
|
||||
-webkit-box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
#sign-footer p {
|
||||
line-height: 40px;
|
||||
padding: 0 10px;
|
||||
text-align: right;
|
||||
}
|
||||
.sign-in .control-group label {
|
||||
text-align: left;
|
||||
width: auto;
|
||||
font-size: 15px;
|
||||
}
|
||||
.sign-in .forgot {
|
||||
padding-top: 5px;
|
||||
}
|
||||
.sign-in .content {
|
||||
padding: 10px;
|
||||
}
|
||||
.sign-in .form-actions {
|
||||
padding: 17px 10px 18px;
|
||||
margin: 0;
|
||||
-moz-border-radius: 0px 0px 5px 5px;
|
||||
-webkit-border-radius: 0px 0px 5px 5px;
|
||||
border-radius: 0px 0px 5px 5px;
|
||||
}
|
||||
.sign-in form {
|
||||
margin: 0;
|
||||
}
|
||||
.sign-in .control-group .help-inline {
|
||||
display:none;
|
||||
}
|
||||
.sign-in .error .help-inline {
|
||||
display:inline-block;
|
||||
}
|
||||
.web-symbol:after {
|
||||
font-family: 'WebSymbolsRegular';
|
||||
content: "{";
|
||||
margin-left: 2px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
.active .web-symbol:after {
|
||||
content: "}";
|
||||
}
|
||||
/*icons*/
|
||||
.the-icons i:after {
|
||||
@@ -166,12 +510,36 @@
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
[class^="text-"] {
|
||||
font-size: 15px !important;
|
||||
}
|
||||
.text-blue {
|
||||
color: #0088CC !important;
|
||||
}
|
||||
.text-red {
|
||||
color: #CC3300 !important;
|
||||
}
|
||||
.text-yellow {
|
||||
color: #ffcc00 !important;
|
||||
}
|
||||
.text-orange {
|
||||
color: #f7941d !important;
|
||||
}
|
||||
.text-purple {
|
||||
color: #a864a8 !important;
|
||||
}
|
||||
.text-palm {
|
||||
color: #a67c52 !important;
|
||||
}
|
||||
.text-green {
|
||||
color: #39b54a !important;
|
||||
}
|
||||
[class^="icons-"] {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
vertical-align: text-top;
|
||||
background-image: url(<%= asset_path "icons_pack.png" %>);
|
||||
background-image: url(<%= asset_path 'icons_pack.png' %>);
|
||||
background-position: 16px 16px;
|
||||
background-repeat: no-repeat;
|
||||
*margin-right: .3em;
|
||||
@@ -181,7 +549,7 @@
|
||||
*margin-left: 0;
|
||||
}
|
||||
.icons-white {
|
||||
background-image: url(<%= asset_path "icons_pack_white.png" %>);
|
||||
background-image: url(<%= asset_path 'icons_pack_white.png' %>);
|
||||
}
|
||||
/*1*/
|
||||
.icons-pencil {
|
||||
@@ -295,6 +663,12 @@
|
||||
.icons-calendars {
|
||||
background-position: -384px -96px;
|
||||
}
|
||||
.icons-out {
|
||||
background-position: -416px -96px;
|
||||
}
|
||||
.icons-desktop {
|
||||
background-position: -448px -96px;
|
||||
}
|
||||
/*5*/
|
||||
.icons-page-blank {
|
||||
background-position: 0px -128px;
|
||||
@@ -309,6 +683,9 @@
|
||||
background-position: -0px -128px;
|
||||
}
|
||||
/*6*/
|
||||
.icons-globe {
|
||||
background-position: -96px -160px;
|
||||
}
|
||||
.icons-structure {
|
||||
background-position: -352px -160px;
|
||||
}
|
||||
@@ -414,6 +791,9 @@
|
||||
background-position: -0px -512px;
|
||||
}
|
||||
/*18*/
|
||||
.icons-help {
|
||||
background-position: -160px -544px;
|
||||
}
|
||||
.icons- {
|
||||
background-position: -0px -544px;
|
||||
}
|
||||
@@ -424,6 +804,9 @@
|
||||
.icons-plus {
|
||||
background-position: -288px -576px;
|
||||
}
|
||||
.icons-power {
|
||||
background-position: -0px -608px;
|
||||
}
|
||||
/*20*/
|
||||
.icons- {
|
||||
background-position: -0px -608px;
|
||||
|
||||
@@ -5,26 +5,34 @@
|
||||
background-color: #FFF;
|
||||
overflow: hidden;
|
||||
min-width: 300px;
|
||||
border: 1px solid #DDD;
|
||||
border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
margin: 0 0 5px 5px;
|
||||
position:relative;
|
||||
}
|
||||
.widget-box .widget-title {
|
||||
background: #999;
|
||||
color: #FFF;
|
||||
padding-left: 5px;
|
||||
border-radius: 5px 5px 0 0;
|
||||
-moz-border-radius: 5px 5px 0 0;
|
||||
-webkit-border-radius: 5px 5px 0 0;
|
||||
background-image: -moz-linear-gradient(top, #B7B7B7, #9d9d9d);
|
||||
background-image: -ms-linear-gradient(top, #B7B7B7, #9d9d9d);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#B7B7B7), to(#9d9d9d));
|
||||
background-image: -webkit-linear-gradient(top, #B7B7B7, #9d9d9d);
|
||||
background-image: -o-linear-gradient(top, #B7B7B7, #9d9d9d);
|
||||
background-image: linear-gradient(top, #B7B7B7, #9d9d9d);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#B7B7B7', endColorstr='#9d9d9d', GradientType=0);
|
||||
}
|
||||
.widget-box .widget-title [class^="icons-"] {
|
||||
margin: 3px 5px 0 2px;
|
||||
}
|
||||
.widget-box .widget-content {
|
||||
padding: 10px;
|
||||
border-width: 0 1px 1px;
|
||||
border-style: solid;
|
||||
border-color: #CCCCCC;
|
||||
border-radius: 0 0 5px 5px;
|
||||
-moz-border-radius: 0 0 5px 5px;
|
||||
-webkit-border-radius: 0 0 5px 5px;
|
||||
}
|
||||
.widget-box .form-horizontal .control-group > label {
|
||||
width: 50px;
|
||||
|
||||
@@ -15,21 +15,6 @@ class Admin::ItemsController < ApplicationController
|
||||
@item = get_homepage
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
#TODO
|
||||
# Allow to move items down and up different parents
|
||||
# def up
|
||||
# @item = Item.find(params[:id])
|
||||
# @item.move_higher
|
||||
# redirect_to admin_items_url( :parent_name => @item.parent_name )
|
||||
# end
|
||||
#
|
||||
# def down
|
||||
# @item = Item.find(params[:id])
|
||||
# @item.move_lower
|
||||
# redirect_to admin_items_url( :parent_name => @item.parent_name )
|
||||
# end
|
||||
|
||||
protected
|
||||
|
||||
|
||||
@@ -12,13 +12,11 @@ class Admin::LinksController < ApplicationController
|
||||
|
||||
def new
|
||||
@item = Link.new
|
||||
@item.is_published = true
|
||||
@item.parent_id = Page.find(params[:parent_id]).id rescue nil
|
||||
@item.parent = Page.find(params[:parent_id]) rescue nil
|
||||
end
|
||||
|
||||
def edit
|
||||
@item = Link.find(params[:id])
|
||||
@i18n_variable = @item.i18n_variable
|
||||
end
|
||||
|
||||
def create
|
||||
@@ -34,7 +32,6 @@ class Admin::LinksController < ApplicationController
|
||||
end
|
||||
else
|
||||
flash.now[:error] = t('admin.create_error_link')
|
||||
@i18n_variable = @item.i18n_variable
|
||||
render :action => "new"
|
||||
end
|
||||
end
|
||||
@@ -52,7 +49,6 @@ class Admin::LinksController < ApplicationController
|
||||
end
|
||||
else
|
||||
flash.now[:error] = t('admin.update_error_link')
|
||||
@i18n_variable = @item.i18n_variable
|
||||
render :action => "edit"
|
||||
end
|
||||
end
|
||||
@@ -60,7 +56,6 @@ class Admin::LinksController < ApplicationController
|
||||
def destroy
|
||||
@item = Link.find(params[:id])
|
||||
@item.destroy
|
||||
@item.destroy_i18n_variable
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
redirect_to admin_items_url
|
||||
|
||||
@@ -11,6 +11,7 @@ class Admin::ModuleAppsController < ApplicationController
|
||||
|
||||
def reload_frontend_pages
|
||||
@module_app = ModuleApp.find(params[:id])
|
||||
@categories = @module_app.key.eql?('announcement') ? BulletinCategory.all : nil
|
||||
respond_to do |format|
|
||||
format.js {}
|
||||
end
|
||||
|
||||
@@ -26,6 +26,12 @@ class Admin::PagePartsController < ApplicationController
|
||||
@module_app = @part.module_app ? @part.module_app : @module_apps[0]
|
||||
@r_tag = @part.public_r_tag.blank? ? LIST[:public_r_tags][0] : @part.public_r_tag
|
||||
@tag_objects = @r_tag.classify.constantize.all
|
||||
case @module_app.key
|
||||
when 'bulletin'
|
||||
@categories = BulletinCategory.all
|
||||
when 'web_resource'
|
||||
@categories = WebLinkCategory.all
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
@@ -58,6 +64,12 @@ class Admin::PagePartsController < ApplicationController
|
||||
|
||||
def reload_widgets
|
||||
@module_app = ModuleApp.find(params[:id])
|
||||
case @module_app.key
|
||||
when 'announcement'
|
||||
@categories = BulletinCategory.all
|
||||
when 'web_resource'
|
||||
@categories = WebLinkCategory.all
|
||||
end
|
||||
respond_to do |format|
|
||||
format.js {}
|
||||
end
|
||||
|
||||
@@ -19,24 +19,28 @@ class Admin::PagesController < ApplicationController
|
||||
|
||||
def new
|
||||
@item = Page.new
|
||||
@item.parent = Item.find(params[:parent_id]) rescue nil
|
||||
@apps = ModuleApp.all
|
||||
@item.is_published = true
|
||||
@item.parent_id = @parent_item.id rescue nil
|
||||
@designs = Design.all.entries
|
||||
@default_design = Design.first
|
||||
@design = Design.first
|
||||
end
|
||||
|
||||
def edit
|
||||
@item = Page.find(params[:id])
|
||||
@apps = ModuleApp.all
|
||||
@i18n_variable = @item.i18n_variable
|
||||
@designs = Design.all.entries
|
||||
@design = @item.design
|
||||
@design = @item.design ? @item.design : @designs.first
|
||||
@app_frontend_urls = @item.module_app.app_pages if @item.module_app
|
||||
@categories = BulletinCategory.all if @item.module_app && @item.module_app.key.eql?('announcement')
|
||||
end
|
||||
|
||||
def create
|
||||
@item = Page.new(params[:page])
|
||||
|
||||
if @item.module_app.key == 'page_content'
|
||||
@item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id )
|
||||
end
|
||||
|
||||
if @item.save
|
||||
flash.now[:notice] = t('admin.create_success_page')
|
||||
respond_to do |format|
|
||||
@@ -47,13 +51,20 @@ class Admin::PagesController < ApplicationController
|
||||
end
|
||||
else
|
||||
flash.now[:error] = t('admin.create_error_page')
|
||||
@i18n_variable = @item.i18n_variable
|
||||
@apps = ModuleApp.all
|
||||
@designs = Design.all.entries
|
||||
@design = Design.first
|
||||
render :action => "new"
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
@item = Page.find(params[:id])
|
||||
|
||||
if @item.module_app && @item.module_app.key == 'page_content' && @item.page_contexts.blank?
|
||||
@item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id )
|
||||
end
|
||||
|
||||
if @item.update_attributes(params[:page])
|
||||
flash[:notice] = t('admin.update_success_page')
|
||||
respond_to do |format|
|
||||
@@ -70,8 +81,6 @@ class Admin::PagesController < ApplicationController
|
||||
def destroy
|
||||
@item = Page.find(params[:id])
|
||||
@item.destroy
|
||||
@item.destroy_page_parts
|
||||
@item.destroy_i18n_variable
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
redirect_to admin_items_url( :parent_id => @item.parent_id )
|
||||
|
||||
@@ -3,6 +3,8 @@ class ApplicationController < ActionController::Base
|
||||
|
||||
include ParserFrontEnd, ParserBackEnd
|
||||
|
||||
layout :layout_by_resource
|
||||
|
||||
helper :all
|
||||
before_filter :set_locale, :set_site
|
||||
|
||||
@@ -104,6 +106,12 @@ class ApplicationController < ActionController::Base
|
||||
Item.first(:conditions => {:parent_id => nil})
|
||||
end
|
||||
|
||||
|
||||
def layout_by_resource
|
||||
if devise_controller?
|
||||
"devise"
|
||||
else
|
||||
"application"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
@@ -1,7 +1,7 @@
|
||||
class ObitFrontendComponentController< ApplicationController
|
||||
before_filter :setup_vars
|
||||
before_filter {|c| c.front_end_available(@app_title)}
|
||||
layout 'production'
|
||||
layout 'module_widget'
|
||||
|
||||
def setup_vars
|
||||
@app_title = request.fullpath.split('/')[2]
|
||||
|
||||
@@ -13,13 +13,16 @@ class PagesController < ApplicationController
|
||||
|
||||
def show
|
||||
#begin
|
||||
item = Item.first(:conditions => {:full_name => params[:page_name]})
|
||||
case item._type
|
||||
when 'Page'
|
||||
@item = item
|
||||
render_page(params[:id])
|
||||
when 'Link'
|
||||
redirect_to "http://#{item[:url]}"
|
||||
@item = Item.first(:conditions => {:full_name => params[:page_name]})
|
||||
if @item && @item.is_published
|
||||
case @item._type
|
||||
when 'Page'
|
||||
render_page(params[:id])
|
||||
when 'Link'
|
||||
redirect_to "http://#{@item[:url]}"
|
||||
end
|
||||
else
|
||||
render :file => "#{Rails.root}/public/404.html", :status => :not_found
|
||||
end
|
||||
#rescue
|
||||
# render :file => "#{Rails.root}/public/404.html", :status => :not_found
|
||||
@@ -35,14 +38,18 @@ class PagesController < ApplicationController
|
||||
end
|
||||
|
||||
def load_orbit_bar
|
||||
render :partial => 'layouts/orbit_bar'
|
||||
render :partial => 'layouts/orbit_bar', :locals => {:referer => request.referer}
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def get_item
|
||||
module_app = ModuleApp.first(:conditions => {:key => params[:app_name]})
|
||||
@item = Item.first(:conditions => {:module_app_id => module_app.id, :app_frontend_url => params[:app_action]})
|
||||
if params[:category_id]
|
||||
@item = Item.first(:conditions => {:module_app_id => module_app.id, :app_frontend_url => params[:app_action], :category => params[:category_id]})
|
||||
else
|
||||
@item = Item.first(:conditions => {:module_app_id => module_app.id, :app_frontend_url => params[:app_action]})
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
@@ -11,7 +11,7 @@ module Admin::ItemHelper
|
||||
end
|
||||
ret << "<ul class='list'>"
|
||||
ret << "<li>"
|
||||
ret << (link_to node.name, dest)
|
||||
ret << (link_to node.i18n_variable[I18n.locale], dest)
|
||||
ret << ' | ' << (link_to t('admin.edit'), eval("edit_admin_#{node._type.downcase}_path(node)")) if node._type.eql?('Page')
|
||||
ret << ' | ' << (link_to t('admin.new_page'), new_admin_page_path(:parent_id => node.id), :class => 'new_page') if node._type.eql?('Page')
|
||||
ret << ' | ' << (link_to t('admin.new_link'), new_admin_link_path(:parent_id => node.id), :class => 'new_link') if node._type.eql?('Page')
|
||||
|
||||
@@ -21,26 +21,38 @@ module ApplicationHelper
|
||||
end
|
||||
|
||||
# Clean the link back
|
||||
# Remove the locale but keep all the other params
|
||||
def get_go_back
|
||||
begin
|
||||
if request.url.include?('locale=')
|
||||
session[:last_page]
|
||||
else
|
||||
target = request.referer.split('?')
|
||||
vars = target[1].split('&') rescue []
|
||||
vars.delete_if {|var| var.include? 'locale=' }
|
||||
session[:last_page] = if vars.size > 0
|
||||
target[0].to_s + '?' + vars.join('&')
|
||||
else
|
||||
target[0].to_s
|
||||
end
|
||||
session[:last_page] = remove_locale(request.referer)
|
||||
end
|
||||
rescue
|
||||
eval(params[:controller].split('/').join('_') << '_url')
|
||||
end
|
||||
end
|
||||
|
||||
# Remove the locale but keep all the other params
|
||||
def remove_locale(url)
|
||||
target = url.split('?')
|
||||
vars = target[1].split('&') rescue []
|
||||
vars.delete_if {|var| var.include? 'locale=' }
|
||||
if vars.size > 0
|
||||
target[0].to_s + '?' + vars.join('&')
|
||||
else
|
||||
target[0].to_s
|
||||
end
|
||||
end
|
||||
|
||||
def add_locale(url, locale)
|
||||
if url.include?('?')
|
||||
url + "&locale=#{locale}"
|
||||
else
|
||||
url + "?locale=#{locale}"
|
||||
end
|
||||
end
|
||||
|
||||
def message_for_item(message, item = nil)
|
||||
if item.is_a?(Array)
|
||||
message % link_to(*item)
|
||||
@@ -55,5 +67,44 @@ module ApplicationHelper
|
||||
render :partial => partial, :object => new_object, :locals => {:f => f}
|
||||
end
|
||||
end
|
||||
|
||||
def active_for_controllers(*controller_names)
|
||||
controller_names.include?(controller.controller_name) ? 'active' : nil
|
||||
end
|
||||
|
||||
def visible_for_controllers(*controller_names)
|
||||
controller_names.include?(controller.controller_name) ? '' : 'hide'
|
||||
end
|
||||
|
||||
def active_for_action(controller_name, action_name)
|
||||
(controller.controller_name.eql?(controller_name) && controller.action_name.eql?(action_name)) ? 'active' : nil
|
||||
end
|
||||
|
||||
def sortable(column)
|
||||
direction = (column == params[:sort] && params[:direction] == "asc") ? "desc" : "asc"
|
||||
{:sort => column, :direction => direction}
|
||||
end
|
||||
|
||||
def is_sort_active?(name)
|
||||
res = ''
|
||||
res << ' select' if params[:sort].eql?(name)
|
||||
res << ' active' if params[:sort].eql?(name) && params[:direction].eql?('asc')
|
||||
res
|
||||
end
|
||||
|
||||
def is_sort?(name)
|
||||
' web-symbol' if params[:sort].eql?(name)
|
||||
end
|
||||
|
||||
def add_filter(param_name, value)
|
||||
filter = params[:filter] rescue nil
|
||||
if filter && filter.has_key(param_name)
|
||||
filter[param_name] << value
|
||||
elsif filter
|
||||
filter.merge({param_name => [value]})
|
||||
else
|
||||
{param_name => [value]}
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
@@ -20,7 +20,7 @@ class Design
|
||||
validates_presence_of :title
|
||||
validates_presence_of :author
|
||||
|
||||
# after_save :parse_css_for_images
|
||||
after_save :parse_css_for_images
|
||||
|
||||
def new_files=(*attrs)
|
||||
attrs[0].map do |key,items_ary| #Loop by JSs,Themes,Imgs
|
||||
|
||||
@@ -5,15 +5,13 @@ class Item
|
||||
|
||||
field :name, :index => true
|
||||
field :full_name, :index => true
|
||||
field :parent_id, :index => true
|
||||
field :parent_name
|
||||
field :position, :type => Integer
|
||||
field :is_published, :type => Boolean, :default => true, :index => true
|
||||
field :is_published, :type => Boolean, :default => false, :index => true
|
||||
|
||||
validates_format_of :name, :with => /^[0-9a-zA-Z\-_]+$/
|
||||
validates :name, :exclusion => { :in => LIST[:forbidden_item_names] }
|
||||
validates_uniqueness_of :name, :scope => :parent_id
|
||||
validates_presence_of :name, :full_name, :position, :is_published
|
||||
validates_presence_of :name, :full_name, :position
|
||||
|
||||
belongs_to :parent, :class_name => "Item"
|
||||
has_one :i18n_variable, :as => :language_value, :autosave => true, :dependent => :destroy
|
||||
@@ -47,9 +45,6 @@ class Item
|
||||
self.position = (max_page)? max_page + 1 : 1
|
||||
end
|
||||
|
||||
# Set the parent value
|
||||
self.parent_name = Item.first(:conditions => {:id => self.parent_id} ).name rescue nil
|
||||
|
||||
# Build the full_name from the ancestors array
|
||||
full_node = self.ancestors.map{ |a| a.name }.push( self.name )
|
||||
# Remove root node if not root
|
||||
|
||||
@@ -7,6 +7,7 @@ class Page < Item
|
||||
belongs_to :design
|
||||
belongs_to :module_app
|
||||
has_many :page_parts, :autosave => true, :dependent => :destroy
|
||||
has_many :page_contexts, :autosave => true, :dependent => :destroy
|
||||
accepts_nested_attributes_for :page_parts, :allow_destroy => true
|
||||
|
||||
before_save :create_parts
|
||||
|
||||
@@ -52,5 +52,9 @@ class User
|
||||
value = values.detect {|value| value.attribute_field_id == field_id} rescue nil
|
||||
value ? value : self.attribute_values.build
|
||||
end
|
||||
|
||||
def self.from_id(id)
|
||||
User.find(id) rescue nil
|
||||
end
|
||||
|
||||
end
|
||||
@@ -1 +1,464 @@
|
||||
Dashboard
|
||||
<div id="isotope">
|
||||
<div class="item element">
|
||||
<h3><i class="icons-member"></i><a href="">Member</a></h3>
|
||||
<div class="detail w-a h-a">
|
||||
<p class="totle"><span>Quantity</span>9,517</p>
|
||||
<div class="detal-list my_scroll">
|
||||
<div class="scrollbar">
|
||||
<div class="track">
|
||||
<div class="thumb">
|
||||
<div class="end"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="viewport">
|
||||
<div class="overview">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>University</td>
|
||||
<td>2,304</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Master</td>
|
||||
<td>783</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Doctor</td>
|
||||
<td>45</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Staff</td>
|
||||
<td>62</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Teacher</td>
|
||||
<td>52</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Professor</td>
|
||||
<td>20</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Assistant Professor</td>
|
||||
<td>41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Substitute teacher</td>
|
||||
<td>37</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lecturer</td>
|
||||
<td>41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Part-time teacher</td>
|
||||
<td>20</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item element">
|
||||
<h3><i class="icons-content"></i><a href="">Content</a></h3>
|
||||
<div class="detail w-a h-a">
|
||||
<p class="totle"><span>Quantity</span>9,517</p>
|
||||
<div class="detal-list my_scroll">
|
||||
<div class="scrollbar">
|
||||
<div class="track">
|
||||
<div class="thumb">
|
||||
<div class="end"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="viewport">
|
||||
<div class="overview">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>University</td>
|
||||
<td>2,304</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Master</td>
|
||||
<td>783</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Doctor</td>
|
||||
<td>45</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Staff</td>
|
||||
<td>62</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Teacher</td>
|
||||
<td>52</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Professor</td>
|
||||
<td>20</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Assistant Professor</td>
|
||||
<td>41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Substitute teacher</td>
|
||||
<td>37</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lecturer</td>
|
||||
<td>41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Part-time teacher</td>
|
||||
<td>20</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item element">
|
||||
<h3><i class="icons-asset"></i><a href="">Asset</a></h3>
|
||||
<div class="detail w-a h-a">
|
||||
<p class="totle"><span>Quantity</span>9,517</p>
|
||||
<div class="detal-list my_scroll">
|
||||
<div class="scrollbar">
|
||||
<div class="track">
|
||||
<div class="thumb">
|
||||
<div class="end"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="viewport">
|
||||
<div class="overview">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>University</td>
|
||||
<td>2,304</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Master</td>
|
||||
<td>783</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Doctor</td>
|
||||
<td>45</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Staff</td>
|
||||
<td>62</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Teacher</td>
|
||||
<td>52</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Professor</td>
|
||||
<td>20</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Assistant Professor</td>
|
||||
<td>41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Substitute teacher</td>
|
||||
<td>37</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lecturer</td>
|
||||
<td>41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Part-time teacher</td>
|
||||
<td>20</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item element">
|
||||
<h3><i class="icons-"></i><a href="">Traffic</a></h3>
|
||||
<div class="detail w-a h-b">
|
||||
<p class="totle"><span>Quantity</span>9,517</p>
|
||||
<div class="detal-list my_scroll">
|
||||
<div class="scrollbar">
|
||||
<div class="track">
|
||||
<div class="thumb">
|
||||
<div class="end"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="viewport">
|
||||
<div class="overview">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>University</td>
|
||||
<td>2,304</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Master</td>
|
||||
<td>783</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Doctor</td>
|
||||
<td>45</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Staff</td>
|
||||
<td>62</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Teacher</td>
|
||||
<td>52</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Professor</td>
|
||||
<td>20</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Assistant Professor</td>
|
||||
<td>41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Substitute teacher</td>
|
||||
<td>37</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lecturer</td>
|
||||
<td>41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Part-time teacher</td>
|
||||
<td>20</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Staff</td>
|
||||
<td>62</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Teacher</td>
|
||||
<td>52</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Professor</td>
|
||||
<td>20</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Assistant Professor</td>
|
||||
<td>41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Substitute teacher</td>
|
||||
<td>37</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lecturer</td>
|
||||
<td>41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Part-time teacher</td>
|
||||
<td>20</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Staff</td>
|
||||
<td>62</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Teacher</td>
|
||||
<td>52</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Professor</td>
|
||||
<td>20</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Assistant Professor</td>
|
||||
<td>41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Substitute teacher</td>
|
||||
<td>37</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lecturer</td>
|
||||
<td>41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Part-time teacher</td>
|
||||
<td>20</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Staff</td>
|
||||
<td>62</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Teacher</td>
|
||||
<td>52</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Professor</td>
|
||||
<td>20</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Assistant Professor</td>
|
||||
<td>41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Substitute teacher</td>
|
||||
<td>37</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lecturer</td>
|
||||
<td>41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Part-time teacher</td>
|
||||
<td>20</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item element">
|
||||
<h3><i class="icons-"></i><a href="">Site info</a></h3>
|
||||
<div class="detail w-b h-a">
|
||||
<p class="totle"><span>Quantity</span>9,517</p>
|
||||
<div class="detal-list my_scroll">
|
||||
<div class="scrollbar">
|
||||
<div class="track">
|
||||
<div class="thumb">
|
||||
<div class="end"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="viewport">
|
||||
<div class="overview">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>University</td>
|
||||
<td>2,304</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Master</td>
|
||||
<td>783</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Doctor</td>
|
||||
<td>45</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Staff</td>
|
||||
<td>62</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Teacher</td>
|
||||
<td>52</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Professor</td>
|
||||
<td>20</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Assistant Professor</td>
|
||||
<td>41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Substitute teacher</td>
|
||||
<td>37</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lecturer</td>
|
||||
<td>41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Part-time teacher</td>
|
||||
<td>20</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item element">
|
||||
<h3><i class="icons-"></i><a href="">Connection</a></h3>
|
||||
<div class="detail w-a h-a">
|
||||
<p class="totle"><span>Quantity</span>9,517</p>
|
||||
<div class="detal-list my_scroll">
|
||||
<div class="scrollbar">
|
||||
<div class="track">
|
||||
<div class="thumb">
|
||||
<div class="end"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="viewport">
|
||||
<div class="overview">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>University</td>
|
||||
<td>2,304</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Master</td>
|
||||
<td>783</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Doctor</td>
|
||||
<td>45</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Staff</td>
|
||||
<td>62</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Teacher</td>
|
||||
<td>52</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Professor</td>
|
||||
<td>20</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Assistant Professor</td>
|
||||
<td>41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Substitute teacher</td>
|
||||
<td>37</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lecturer</td>
|
||||
<td>41</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Part-time teacher</td>
|
||||
<td>20</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -18,7 +18,7 @@
|
||||
<td>
|
||||
<%= design.title %>
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills hide">
|
||||
<ul class="nav nav-pills">
|
||||
<li><%= link_to t(:edit), edit_admin_design_path(design), :class => 'edit' %></li>
|
||||
<li class="dropdown"><%= link_to t(:delete), admin_design_path(design), :confirm => t('sure?'), :method => :delete, :class => 'delete' %></li>
|
||||
</ul>
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
<%= f.error_messages %>
|
||||
<%= f.hidden_field :parent_id %>
|
||||
<%= f.hidden_field :parent, :value => @item.parent.id %>
|
||||
|
||||
<p>
|
||||
<%= f.label :name, "Name" %>
|
||||
<%= f.text_field :name, :class => 'text' %>
|
||||
</p>
|
||||
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<p>
|
||||
<%= label_tag "link[title]", "#{t('admin.title')} #{locale}" %>
|
||||
<%= text_field_tag "link[i18n_variable][#{locale}]", (@i18n_variable[locale] if @i18n_variable), :class => 'text' %>
|
||||
</p>
|
||||
<%= f.fields_for :i18n_variable, (@item.new_record? ? @item.build_i18n_variable : @item.i18n_variable) do |f| %>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<p>
|
||||
<%= f.label :locale, "#{t('admin.title')} #{I18nVariable.from_locale(locale)}" %>
|
||||
<%= f.text_field locale %>
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
$('#app_page_url').html("<%= escape_javascript(select 'page','app_frontend_url', @module_app.app_pages) %>");
|
||||
$('#app_page_url').html("<%= escape_javascript(select 'page', 'app_frontend_url', @module_app.app_pages) %>");
|
||||
$('#app_page_category').html("<%= escape_javascript(select 'page', 'category', @categories.collect{|category| [category.i18n_variable[I18n.locale], category.id]}) if @categories %>");
|
||||
@@ -1,5 +1,3 @@
|
||||
<%= @part.inspect %><br/><br/>
|
||||
|
||||
<%= form_for @part, :url => admin_page_part_path(@part) do |f| %>
|
||||
|
||||
<% LIST[:page_part_kinds].each do |kind| %>
|
||||
|
||||
@@ -4,4 +4,9 @@
|
||||
|
||||
<span id='widget_list'>
|
||||
<%= f.select :widget_path, @module_app.widgets.collect{|widget| [widget.humanize, widget]}, :selected => @part.widget_path %>
|
||||
</span>
|
||||
|
||||
|
||||
<span id="widget_category">
|
||||
<%= render 'widget_categories' %>
|
||||
</span>
|
||||
@@ -2,7 +2,7 @@
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<div>
|
||||
<%= I18nVariable.from_locale(locale) %>
|
||||
<%= f.text_field locale %>
|
||||
<%= f.text_area locale %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -0,0 +1 @@
|
||||
<%= select 'page_part', 'category', @categories.collect{|category| [category.i18n_variable[I18n.locale], category.id]}, :selected => (@part ? @part[:category] : nil) if @categories && @categories.size > 0 %>
|
||||
@@ -1 +1,2 @@
|
||||
$('#widget_list select').html("<%= j options_for_select(@module_app.widgets.collect{|widget| [widget.humanize, widget]}) %>")
|
||||
$('#widget_list select').html("<%= j options_for_select(@module_app.widgets.collect{|widget| [widget.humanize, widget]}) %>")
|
||||
$('#widget_category').html("<%= j render 'widget_categories' %>")
|
||||
@@ -1,39 +1,33 @@
|
||||
<%= f.error_messages %>
|
||||
<%= f.hidden_field :parent_id %>
|
||||
<%= f.hidden_field :parent, :value => (@item.parent.id rescue nil) %>
|
||||
|
||||
<p>
|
||||
<%= f.label :name, t('admin.name') %>
|
||||
<%= f.text_field :name, :class => 'text' %>
|
||||
</p>
|
||||
|
||||
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<p>
|
||||
<%= label_tag "page[title]", "#{t('admin.title')} #{locale}" %>
|
||||
<%= text_field_tag "page[i18n_variable][#{locale}]", (@i18n_variable[locale] if @i18n_variable), :class => 'text' %>
|
||||
</p>
|
||||
<%= f.fields_for :i18n_variable, (@item.new_record? ? @item.build_i18n_variable : @item.i18n_variable) do |f| %>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<p>
|
||||
<%= f.label :locale, "#{t('admin.title')} #{I18nVariable.from_locale(locale)}" %>
|
||||
<%= f.text_field locale %>
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<%= t('admin.design_name') %>
|
||||
<% if @design %>
|
||||
<%= f.collection_select :design_id, @designs, :id, :title, {}, :rel => admin_pages_path %>
|
||||
<% else %>
|
||||
<%= f.select :design_id, @designs.collect { |d| [d.title, d.id] }, {:selected => @default_design.id}, {:rel => admin_pages_path} %>
|
||||
<% end %>
|
||||
<%= f.collection_select :design, @designs, :id, :title, {:selected => @design.id}, {:rel => admin_pages_path} %>
|
||||
</p>
|
||||
<p>
|
||||
<%= t('admin.theme') %>
|
||||
<% if @design %>
|
||||
<%= f.select :theme_id, @design.themes.collect { |t| [t.name.capitalize, t.id] }, :include_blank => true %>
|
||||
<% else %>
|
||||
<%= f.select :theme_id, @default_design.themes.collect { |t| [t.name.capitalize, t.id] }, :include_blank => true %>
|
||||
<% end %>
|
||||
<%= f.select :theme_id, @design.themes.collect { |t| [t.name.capitalize, t.id] }, :include_blank => true %>
|
||||
</p>
|
||||
<p>
|
||||
<%= t('admin.module_app') %>
|
||||
<%= render :partial => "admin/module_apps/app_selector", :locals => { :f => f } %>
|
||||
<span id="app_page_url"><%= select('page','app_frontend_url', @app_frontend_urls ) rescue ''%> </span>
|
||||
<span id="app_page_url"><%= select('page','app_frontend_url', @app_frontend_urls, :selected => @item.app_frontend_url ) rescue ''%> </span>
|
||||
<span id="app_page_category"><%= select('page','category', @categories.collect{|category| [category.i18n_variable[I18n.locale], category.id]}, :selected => @item[:category] ) rescue ''%> </span>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :is_published, "#{t('admin.is_published')} ?" %>
|
||||
|
||||
@@ -1,12 +1,22 @@
|
||||
<h2>Forgot your password?</h2>
|
||||
|
||||
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email %></div>
|
||||
|
||||
<div><%= f.submit "Send me reset password instructions" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "devise/shared/links" %>
|
||||
<h1 class="login-logo"><%= t(:ruling_site) %></h1>
|
||||
<div id="signin-header">
|
||||
<h3><%= t(:forgot_password) %></h3>
|
||||
</div>
|
||||
<div id="container" class="sign-in">
|
||||
<%= form_for :user, :url => user_password_path, :html => {:class => 'user_new form-horizontal'} do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
<div class="content">
|
||||
<div class="main">
|
||||
<div class="control-group clear">
|
||||
<%= f.label :email %>
|
||||
<%= f.email_field :email, :placeholder => t(:email), :style => "width: 330px;" %>
|
||||
<span class="help-inline">Please correct the error</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions clear">
|
||||
<%= content_tag :button, "Send me reset password instructions", :type => :submit, :class => 'btn btn-primary pull-right' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -1,17 +1,35 @@
|
||||
<h2>Sign in</h2>
|
||||
|
||||
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
|
||||
<div><%= f.label :nccu_ldap_uid %><br />
|
||||
<%= f.text_field :nccu_ldap_uid %></div>
|
||||
|
||||
<div><%= f.label :password %><br />
|
||||
<%= f.password_field :password %></div>
|
||||
|
||||
<% if devise_mapping.rememberable? -%>
|
||||
<div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
|
||||
<% end -%>
|
||||
|
||||
<div><%= f.submit "Sign in" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "devise/shared/links" %>
|
||||
<h1 class="login-logo"><%= t(:ruling_site) %></h1>
|
||||
<div id="signin-header">
|
||||
<h3><%= t(:login) %></h3>
|
||||
</div>
|
||||
<div id="container" class="sign-in">
|
||||
<%= form_for :user, :url => user_session_path, :html => {:class => 'user_new form-horizontal'} do |f| %>
|
||||
<div class="content">
|
||||
<p class="notice hide">Notice</p>
|
||||
<p class="alert hide">You need to sign in or sign up before continuing.</p>
|
||||
<div class="main">
|
||||
<div class="control-group clear">
|
||||
<%= f.label :email %>
|
||||
<%= f.email_field :email, :placeholder => t(:email), :style => "width: 330px;" %>
|
||||
<span class="help-inline">Please correct the error</span>
|
||||
</div>
|
||||
<div class="control-group clear">
|
||||
<%= link_to t(:forgot_password), new_user_password_path, :class => 'pull-right forgot' %>
|
||||
<%= f.label :password %>
|
||||
<%= f.password_field :password, :placeholder => t(:dots), :style => "width: 330px;" %>
|
||||
<span class="help-inline">Please correct the error</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions clear">
|
||||
<div class=" pull-left">
|
||||
<label for="user_remember_me">
|
||||
<%= f.check_box :remember_me, :style => "display: inline-block;" %>
|
||||
<span style="display: inline-block;height: 10px;"><%= t(:remember_me) %></span>
|
||||
</label>
|
||||
</div>
|
||||
<%= content_tag :button, t(:login), :type => :submit, :class => 'btn btn-primary pull-right' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -1,9 +1,3 @@
|
||||
<% if controller.controller_name.eql?('pages') %>
|
||||
<link href='/assets/bootstrap.css.erb' rel='stylesheet' type='text/css'/>
|
||||
<link href='/assets/style.css.erb' rel='stylesheet' type='text/css'/>
|
||||
<script type='text/javascript' src='/assets/bootstrap.js'></script>
|
||||
<% end %>
|
||||
|
||||
<header id="orbit-bar" class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<div class="container clear">
|
||||
@@ -11,36 +5,98 @@
|
||||
<a class="brand dropdown-toggle" data-toggle="dropdown" href="#">Orbit</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-dashboard') + t('admin.dashboard'), admin_dashboards_path %></li>
|
||||
<li><a href="#"><i class="icons-content"></i>Content</a></li>
|
||||
<li><a href="#"><i class="icons-content"></i><%= t('admin.content') %></a></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-member') + t('admin.member'), admin_users_path %></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-asset') + t('admin.asset'), admin_assets_path %></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#"><i class="icons-structure"></i>Structure</a></li>
|
||||
<li><a href="#"><i class="icons-plus-cube"></i>Add Item</a></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-structure') + t('admin.structure'), admin_items_path %></li>
|
||||
<li><a href="#"><i class="icons-plus-cube"></i><%= t('admin.add_item') %></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="nav">
|
||||
<li><%= link_to t(:homepage), root_path, :class => 'orbit-bar-home' %></li>
|
||||
<li><a class="orbit-bar-desktop" href="#">Desktop</a></li>
|
||||
</ul>
|
||||
<ul class="nav pull-right">
|
||||
<li class="dropdown language">
|
||||
<a class="dropdown-toggle orbit-bar-language" href="#" data-toggle="dropdown">language</a>
|
||||
<ul class="dropdown-menu language-menu">
|
||||
<% @site_in_use_locales.each do |locale| %>
|
||||
<%= content_tag :li, (link_to t(:_locale, :locale => locale), add_locale(remove_locale((referer rescue request.fullpath)), locale)), :class => (I18n.locale.eql?(locale.to_sym) ? 'active' : nil) %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
<% if user_signed_in? %>
|
||||
<li><%= link_to t(:logout), destroy_user_session_path, :class => 'orbit-bar-logout' %></li>
|
||||
<li class="dropdown active clear">
|
||||
<a class="orbit-bar-account" href="#" data-toggle="dropdown">
|
||||
<!-- <img src="images/menber-pic.png" /> -->
|
||||
<%= image_tag current_user.avatar.thumb.url, :class => 'member-img' %>
|
||||
<span class="member-name"><%= current_user.name %></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu account-menu">
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="icons-wrench"></i>
|
||||
<%= t(:account_settings) %>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="orbit-bar-desktop" href="#">
|
||||
<i class="icons-desktop"></i>
|
||||
<%= t(:desktop) %>
|
||||
</a>
|
||||
</li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-out') + t(:logout), destroy_user_session_path %></li>
|
||||
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="icons-help"></i>
|
||||
<%= t(:help) %>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<% else %>
|
||||
<li>
|
||||
<%= form_for "user", :url => user_session_path, :html => {:class => 'log'} do |f| %>
|
||||
<%= f.text_field :email, :class => 'input-small', :placeholder => t(:email) %>
|
||||
<%= f.password_field :password, :class => 'input-small', :placeholder => t(:password) %>
|
||||
<%= content_tag :button, t(:login), :type => :submit, :class => 'btn' %>
|
||||
<% end %>
|
||||
<li class="dropdown bar-login">
|
||||
<a class="dropdown-toggle orbit-bar-member" href="#"><%= t(:login) %></a>
|
||||
<div class="dropdown-menu">
|
||||
<ul class="log">
|
||||
<li class="title"></li>
|
||||
|
||||
<%= form_for :user, :url => user_session_path do |f| %>
|
||||
<li>
|
||||
<div class="input-prepend">
|
||||
<span class="add-on"><i class="icon-user"></i></span>
|
||||
<%= f.text_field :email, :class => 'span2', :placeholder => t(:email), :size => 16 %>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="input-prepend">
|
||||
<span class="add-on"><i class="icon-lock"></i></span>
|
||||
<%= f.password_field :password, :class => 'span2', :placeholder => t(:password), :size => 16 %>
|
||||
</div>
|
||||
</li>
|
||||
<li class="clear">
|
||||
<%= link_to t(:forgot_password), new_user_password_path, :class => 'forgot' %>
|
||||
</li>
|
||||
<li>
|
||||
<%= content_tag :button, t(:login), :type => :submit, :class => 'btn btn-primary' %>
|
||||
<label class="remember" for="user_remember_me">
|
||||
<%= f.check_box :remember_me %>
|
||||
<span style="display: inline-block;height: 10px;"><%= t(:remember_me) %></span>
|
||||
</label>
|
||||
</li>
|
||||
<li class="divider"><span><%= t(:or_lower) %></span></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<%= link_to t(:register), new_user_registration_path, :class => 'btn btn-danger register' %>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
<li>
|
||||
<form class="navbar-search pull-left" action="">
|
||||
<input class="search-query span2" type="text" placeholder="Search">
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="navbar-search span6" action="">
|
||||
<input class="search-query span4" type="text" placeholder="Search NCCU">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
@@ -1,7 +1,33 @@
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-purchase') + t('admin.purchase'), admin_purchases_path %></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-announcement') + t('admin.announcement'), panel_announcement_back_end_bulletins_path %></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-member') + t('admin.member'), admin_users_path %></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-page') + t('admin.page'), admin_items_path %></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-window-block') + t('admin.design'), admin_designs_path %></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-link') + t('admin.link'), nil %></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-cog') + t('admin.site_settings'), nil %></li>
|
||||
<%= content_tag :li, :class => active_for_controllers('purchases') do -%>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-purchase') + t('admin.purchase'), admin_purchases_path %>
|
||||
<% end -%>
|
||||
|
||||
<%= content_tag :li, :class => active_for_controllers('bulletins', 'tags', 'bulletin_categorys') do -%>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-announcement') + t('admin.announcement'), panel_announcement_back_end_bulletins_path %>
|
||||
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('bulletins', 'tags', 'bulletin_categorys')) do -%>
|
||||
<%= content_tag :li, link_to(t('admin.all_articles'), panel_announcement_back_end_bulletins_path), :class => active_for_action('bulletins', 'index') %>
|
||||
<%= content_tag :li, link_to(t('admin.add_new'), new_panel_announcement_back_end_bulletin_path), :class => active_for_action('bulletins', 'new') %>
|
||||
<%= content_tag :li, link_to(t('admin.categories'), panel_announcement_back_end_bulletin_categorys_path), :class => active_for_action('bulletin_categorys', 'index') %>
|
||||
<%= content_tag :li, link_to(t('admin.tags'), panel_announcement_back_end_tags_path), :class => active_for_action('tags', 'index') %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
||||
<%= content_tag :li, :class => active_for_controllers('users') do -%>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-member') + t('admin.member'), panel_web_resource_back_end_web_links_path %>
|
||||
<% end -%>
|
||||
|
||||
<%= content_tag :li, :class => active_for_controllers(nil) do -%>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-page') + t('admin.page'), panel_page_content_back_end_page_contexts_path %>
|
||||
<% end -%>
|
||||
|
||||
<%= content_tag :li, :class => active_for_controllers('designs') do -%>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-window-block') + t('admin.design'), admin_designs_path %>
|
||||
<% end -%>
|
||||
|
||||
<%= content_tag :li, :class => active_for_controllers(nil) do -%>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-link') + t('admin.link'), nil %>
|
||||
<% end -%>
|
||||
|
||||
<%= content_tag :li, :class => active_for_controllers(nil) do -%>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-cog') + t('admin.site_settings'), nil %>
|
||||
<% end -%>
|
||||
@@ -0,0 +1,20 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><%= @title || APP_CONFIG['orbit'] %></title>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<%= stylesheet_link_tag "devise" %>
|
||||
<%= javascript_include_tag "devise" %>
|
||||
<%= csrf_meta_tag %>
|
||||
</head>
|
||||
<body>
|
||||
<%= render 'layouts/orbit_bar' %>
|
||||
<%= yield %>
|
||||
<div id="sign-footer">
|
||||
<p>Rulingcom</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<%#= stylesheet_link_tag "module_widget" %>
|
||||
<%= javascript_include_tag "module_widget" %>
|
||||
<%= csrf_meta_tag %>
|
||||
</head>
|
||||
<body>
|
||||
<%= yield %>
|
||||
</body>
|
||||
</html>
|
||||