Delete unused files.
No files matched your search
@@ -1,415 +0,0 @@
|
||||
<div class="btn-group" data-toggle="buttons-radio">
|
||||
<label href="#none" class="btn btn-large <%= @subpart.nil? || @subpart.kind == "none" ? 'active' : '' rescue nil %>" data-toggle="tab">
|
||||
<%= t("page_part_kinds.none") %>
|
||||
<input type="radio" <%= @subpart.kind == "none" ? "checked" : "" rescue nil %> class="hide widget_type_class" value="none" name="page_part[sub_parts_attributes][<%= @select_number %>][kind]" />
|
||||
</label>
|
||||
<label href="#text" class="btn btn-large <%= @subpart.kind == "text" ? 'active' : '' rescue nil %>" data-toggle="tab">
|
||||
<%= t("page_part_kinds.text") %>
|
||||
<input type="radio" class="hide widget_type_class" <%= @subpart.kind == "text" ? "checked" : "" rescue nil %> value="text" name="page_part[sub_parts_attributes][<%= @select_number %>][kind]" />
|
||||
</label>
|
||||
<!-- <label href="#public_r_tag" class="btn btn-large" data-toggle="tab"> -->
|
||||
<%#= t("page_part_kinds.public_r_tag") %>
|
||||
<%#= sub.radio_button :kind, "public_r_tag", class: "hide" %>
|
||||
<!-- </label> -->
|
||||
<label href="#module_widget" class="btn btn-large <%= @subpart.kind == "module_widget" ? 'active' : '' rescue nil %>" data-toggle="tab">
|
||||
<%= t("page_part_kinds.module_widget") %>
|
||||
<input type="radio" class="hide widget_type_class" value="module_widget" <%= @subpart.kind == "module_widget" ? "checked" : "" rescue nil %> name="page_part[sub_parts_attributes][<%= @select_number %>][kind]" />
|
||||
|
||||
</label>
|
||||
</div>
|
||||
<fieldset>
|
||||
<div class="input-area tab-content">
|
||||
<div id="none" class="parts-none tab-pane fade in <%= @subpart.nil? || @subpart.kind == "none" ? 'active' : '' rescue nil %>"><%= t(:select_one_function) %></div>
|
||||
<div id="text" class="tab-pane fade in <%= @subpart.kind == "text" ? 'active' : '' rescue nil %>">
|
||||
<div class="nav-name">
|
||||
<strong><%= t(:language) %></strong>
|
||||
</div>
|
||||
<ul class="nav nav-pills language-nav">
|
||||
<% @site_in_use_locales.each_with_index do |locale, i| %>
|
||||
<li class="<%= 'active' if i == 0 %>">
|
||||
<a href=".<%= locale %>" data-toggle="tab"><%= t(locale.to_s) %></a>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<div class="tab-content language-area">
|
||||
<% @site_in_use_locales.each_with_index do |locale, i| %>
|
||||
<div class="tab-pane fade <%= locale %> <%= 'active in' if i == 0 %>">
|
||||
<div class="control-group input-content">
|
||||
<label class="control-label muted"><%= t(:content) %></label>
|
||||
<div class="controls">
|
||||
<div class="textarea">
|
||||
<textarea name="page_part[sub_parts_attributes][<%= @select_number %>][content_translations][<%= locale.to_s %>]" class="ckeditor input-block-level"><%= @subpart.content_translations[locale] rescue nil %></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="module_widget" class="tab-pane fade in <%= @subpart.kind == "module_widget" ? 'active' : '' rescue nil %>">
|
||||
<% @site_in_use_locales.each do |locale| %>
|
||||
<div class="control-group input-content">
|
||||
<label class="control-label muted">Widget <%= t(:name) %>(<%= t(locale.to_s) %>) :</label>
|
||||
<div class="controls">
|
||||
<input name="page_part[sub_parts_attributes][<%= @select_number %>][title_translations][<%= locale.to_s %>]" value="<%= @subpart.title_translations[locale.to_s] rescue nil %>" />
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="control-group input-content">
|
||||
<%= f.label :module_app_id, t(:module) + " :", class: "control-label muted" %>
|
||||
<div class="controls">
|
||||
<%= select_tag("page_part[sub_parts_attributes][#{@select_number}][module]", options_for_select(@modules.map{|m| [t('module_name.'+m.key),m.key]}, (@subpart.module rescue nil)),{:include_blank => true,"class" => "input-xlarge change module_name", data: {"fv-validation" => "custom_not_empty;", "fv-messages" => "Cannot be empty.;"}}) %>
|
||||
</div>
|
||||
</div>
|
||||
<% if @child_page_count > 0 %>
|
||||
<div class="control-group input-content">
|
||||
<label class="control-label muted">Apply to sub-pages :</label>
|
||||
<div class="controls">
|
||||
<input type="checkbox" name="apply_to_subpage" value="1" />
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div id="widgets_selection_area">
|
||||
<% if params[:action] == "edit_sub_part" && @kind == "module_widget"%>
|
||||
<%= render :partial => "widget_form" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<%= f.submit t(:update_), class: "btn btn-primary" %>
|
||||
<button type="button" class="btn" onclick="window.history.back()"><%= t(:cancel) %></button>
|
||||
</div>
|
||||
</fieldset>
|
||||
<script src="/assets/lib/jquery-ui-1.12.1/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* 修正bootstap.js和jquery-ui.js間的衝突,使tab按鈕能正常運作 */
|
||||
var Button = function (element, options) {
|
||||
this.$element = $(element)
|
||||
this.options = $.extend({}, $.fn.button.defaults, options)
|
||||
}
|
||||
|
||||
Button.prototype.setState = function (state) {
|
||||
var d = 'disabled'
|
||||
, $el = this.$element
|
||||
, data = $el.data()
|
||||
, val = $el.is('input') ? 'val' : 'html'
|
||||
|
||||
state = state + 'Text'
|
||||
data.resetText || $el.data('resetText', $el[val]())
|
||||
|
||||
$el[val](data[state] || this.options[state])
|
||||
|
||||
// push to event loop to allow forms to submit
|
||||
setTimeout(function () {
|
||||
state == 'loadingText' ?
|
||||
$el.addClass(d).attr(d, d) :
|
||||
$el.removeClass(d).removeAttr(d)
|
||||
}, 0)
|
||||
}
|
||||
|
||||
Button.prototype.toggle = function () {
|
||||
var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
|
||||
|
||||
$parent && $parent
|
||||
.find('.active')
|
||||
.removeClass('active')
|
||||
|
||||
this.$element.toggleClass('active')
|
||||
}
|
||||
|
||||
/* BUTTON PLUGIN DEFINITION
|
||||
* ======================== */
|
||||
|
||||
var old = $.fn.button
|
||||
|
||||
$.fn.button = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
, data = $this.data('button')
|
||||
, options = typeof option == 'object' && option
|
||||
if (!data) $this.data('button', (data = new Button(this, options)))
|
||||
if (option == 'toggle') data.toggle()
|
||||
else if (option) data.setState(option)
|
||||
})
|
||||
}
|
||||
/* 修正bootstap.js和jquery-ui.js間的衝突,使tab按鈕能正常運作 */
|
||||
</script>
|
||||
<link rel="stylesheet" href="/assets/lib/jquery-ui-1.12.1/jquery-ui.min.css">
|
||||
<script>
|
||||
$('.btn-primary').attr('onclick',"return checkArea()");
|
||||
var textID = new Array($('.ckeditor').length);
|
||||
$(document).ready(function(){
|
||||
for(var i=0 ; i< $('.ckeditor').length ; i++){
|
||||
if($('.ckeditor').eq(i).attr("id") == "" || $('.ckeditor').eq(i).attr("id") == undefined){
|
||||
$('.ckeditor').eq(i).attr("id","ckeditorArea"+i);
|
||||
textID[i] = "ckeditorArea"+i
|
||||
}else{
|
||||
textID[i] = $('.ckeditor').eq(i).attr("id");
|
||||
}
|
||||
try{
|
||||
CKEDITOR.replace(textID[i])
|
||||
}catch(e){};
|
||||
}
|
||||
});
|
||||
function checkArea(){
|
||||
var flag = 1;//1=>true
|
||||
if( $(".fakeArea").length !=0 )
|
||||
$(".fakeArea").remove();
|
||||
var k = 0; //k=0 => 所有iframe的title都有加
|
||||
var k1 = 0;//k1=0 => 所有img的title和alt都有加
|
||||
var k2 = 0;//k2=0 => 所有a的title都有加
|
||||
for(var i=0 ; i< $('.ckeditor').length ; i++){
|
||||
$("#"+textID[i]).before("<div class='fakeArea' style='display:none;'></div>");
|
||||
var Data = CKEDITOR.instances[textID[i]].getData();
|
||||
$(".fakeArea").eq(i).html(Data);
|
||||
/* change the font-size unit from px to em start*/
|
||||
function changepxToem(that){
|
||||
for(var i=0;i<that.querySelectorAll('*').length;i++){
|
||||
if(that.querySelectorAll('*')[i].style.fontSize.search('px') != -1)
|
||||
that.querySelectorAll('*')[i].style.fontSize = Number(that.querySelectorAll('*')[i].style.fontSize.split('px')[0]) / 16 + 'em';
|
||||
}
|
||||
}
|
||||
changepxToem(document.querySelectorAll('.fakeArea')[i]);
|
||||
/* change the font-size unit from px to em end*/
|
||||
if($('.fakeArea:eq('+i+') iframe').length != 0){
|
||||
for(var j=0;j<$('.fakeArea:eq('+i+') iframe').length;j++){
|
||||
if($('.fakeArea:eq('+i+') iframe').eq(j).attr('title') == undefined || $('.fakeArea:eq('+i+') iframe').eq(j).attr('title') ==''){
|
||||
k += 1;
|
||||
};
|
||||
};
|
||||
for(var j=0;j<$('.fakeArea:eq('+i+') img').length;j++){
|
||||
if($('.fakeArea:eq('+i+') img').eq(j).attr('title') == undefined || $('.fakeArea:eq('+i+') img').eq(j).attr('title') =='' || $('.fakeArea:eq('+i+') img').eq(j).attr('alt') == undefined || $('.fakeArea:eq('+i+') img').eq(j).attr('alt') ==''){
|
||||
k1 += 1;
|
||||
};
|
||||
}
|
||||
for(var j=0;j<$('.fakeArea:eq('+i+') a').length;j++){
|
||||
if($('.fakeArea:eq('+i+') a').eq(j).attr('href') != undefined || $('.fakeArea:eq('+i+') a').eq(j).attr('href') !=''){
|
||||
if($('.fakeArea:eq('+i+') a').eq(j).attr('title') == undefined || $('.fakeArea:eq('+i+') a').eq(j).attr('title') ==''){
|
||||
k2 += 1;
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
};
|
||||
function setIframe(){
|
||||
for(var i=0 ; i< $('.ckeditor').length ; i++){
|
||||
for(var j=0;j<$('.fakeArea:eq('+i+') iframe').length;j++){
|
||||
if($('.fakeArea:eq('+i+') iframe').eq(j).attr('title') == undefined || $('.fakeArea:eq('+i+') iframe').eq(j).attr('title') ==''){
|
||||
if($('.fakeArea:eq('+i+') iframe').eq(j).attr('src').search("facebook") != -1)
|
||||
$('.fakeArea:eq('+i+') iframe').eq(j).attr('title',"facebook");
|
||||
else if($('.fakeArea:eq('+i+') iframe').eq(j).attr('src').search("twitframe") != -1)
|
||||
$('.fakeArea:eq('+i+') iframe').eq(j).attr('title',"twitter");
|
||||
else if($('.fakeArea:eq('+i+') iframe').eq(j).attr('src').search("google") != -1)
|
||||
$('.fakeArea:eq('+i+') iframe').eq(j).attr('title',"google");
|
||||
else if($('.fakeArea:eq('+i+') iframe').eq(j).attr('src').search("youtube") != -1)
|
||||
$('.fakeArea:eq('+i+') iframe').eq(j).attr('title',"youtube");
|
||||
}
|
||||
};
|
||||
CKEDITOR.instances[textID[i]].setData($('.fakeArea').eq(i).html());
|
||||
};
|
||||
};
|
||||
function setImg(){
|
||||
for(var i=0 ; i< $('.ckeditor').length ; i++){
|
||||
for(var j=0;j<$('.fakeArea:eq('+i+') img').length;j++){
|
||||
if($('.fakeArea:eq('+i+') img').eq(j).attr('title') == undefined || $('.fakeArea:eq('+i+') img').eq(j).attr('title') =='' || $('.fakeArea:eq('+i+') img').eq(j).attr('alt') == undefined || $('.fakeArea:eq('+i+') img').eq(j).attr('alt') ==''){
|
||||
if($('.fakeArea:eq('+i+') img').eq(j).attr('title') == undefined || $('.fakeArea:eq('+i+') img').eq(j).attr('title') =='' ){
|
||||
if($('.ckeditor').eq(i).attr('name').search('zh_tw') != -1)
|
||||
$('.fakeArea:eq('+i+') img').eq(j).attr('title','這是一張圖片')
|
||||
else if($('.ckeditor').eq(i).attr('name').search('en') != -1)
|
||||
$('.fakeArea:eq('+i+') img').eq(j).attr('title','This is a image')
|
||||
};
|
||||
if($('.fakeArea:eq('+i+') img').eq(j).attr('alt') == undefined || $('.fakeArea:eq('+i+') img').eq(j).attr('alt') =='' ){
|
||||
if($('.ckeditor').eq(i).attr('name').search('zh_tw') != -1)
|
||||
$('.fakeArea:eq('+i+') img').eq(j).attr('alt','這是一張圖片')
|
||||
else if($('.ckeditor').eq(i).attr('name').search('en') != -1)
|
||||
$('.fakeArea:eq('+i+') img').eq(j).attr('alt','This is a image')
|
||||
};
|
||||
}
|
||||
}
|
||||
CKEDITOR.instances[textID[i]].setData($('.fakeArea').eq(i).html());
|
||||
};
|
||||
};
|
||||
function setAtitle(){
|
||||
for(var i=0 ; i< $('.ckeditor').length ; i++){
|
||||
for(var j=0;j<$('.fakeArea:eq('+i+') a').length;j++){
|
||||
if($('.fakeArea:eq('+i+') a').eq(j).attr("href") != "" || $('.fakeArea:eq('+i+') a').eq(j).attr("href") != undefined ){
|
||||
var titlestr="";
|
||||
if($('.fakeArea:eq('+i+') a').eq(j).attr('target')=='_self')
|
||||
titlestr += '在本視窗開啟 ';
|
||||
else if($('.fakeArea:eq('+i+') a').eq(j).attr('target') == '_blank')
|
||||
titlestr += '在新視窗開啟 ';
|
||||
if($('.fakeArea:eq('+i+') a').eq(j).attr('title')=="" || $('.fakeArea:eq('+i+') a').eq(j).attr('title')==undefined && $('.fakeArea:eq('+i+') a').eq(j).html().search('</') == -1)
|
||||
titlestr += $('.fakeArea:eq('+i+') a').eq(j).html().trim();
|
||||
else if($('.fakeArea:eq('+i+') a').eq(j).attr('title')=="" || $('.fakeArea:eq('+i+') a').eq(j).attr('title') == undefined && $('.fakeArea:eq('+i+') a').eq(j).find('>span').length==1)
|
||||
titlestr += $('.fakeArea:eq('+i+') a').eq(j).find('>span').html().trim();
|
||||
else if($('.fakeArea:eq('+i+') a').eq(j).attr('title') =="" || $('.fakeArea:eq('+i+') a').eq(j).attr('title') == undefined){
|
||||
try{
|
||||
if($('.fakeArea:eq('+i+') a').eq(j).html().trim().split('>').length==2)
|
||||
titlestr += $('.fakeArea:eq('+i+') a').eq(j).html().trim().split('>')[1].trim();
|
||||
else if($('.fakeArea:eq('+i+') a').eq(j).html().trim().split('>').length==3)
|
||||
titlestr += $('.fakeArea:eq('+i+') a').eq(j).html().trim().split('>')[2].trim();
|
||||
}catch(e){};
|
||||
}
|
||||
else
|
||||
titlestr += $('.fakeArea:eq('+i+') a').eq(j).attr('title');
|
||||
if(titlestr.search('<img') != -1)
|
||||
titlestr = "這是一張照片";
|
||||
if(titlestr != "")
|
||||
$('.fakeArea:eq('+i+') a').eq(j).attr('title',titlestr);
|
||||
};
|
||||
};
|
||||
CKEDITOR.instances[textID[i]].setData($('.fakeArea').eq(i).html());
|
||||
};
|
||||
};
|
||||
if( k != 0){
|
||||
if($(".active > [data-toggle='tab']").attr("href") == ".zh_tw"){
|
||||
alert('請加上iframe的title');
|
||||
i = 0;
|
||||
$("#"+textID[i]).before("<div id='dialog-confirm' title='要使用默認的iframe title嗎?'>"+
|
||||
"<p><span class='ui-icon ui-icon-alert' style='float:left; margin:0 7px 20px 0;'></span>"+
|
||||
"按下確認後,將自動新增iframe的title,若按下否,則可自行設定title。</p>"
|
||||
+"</div>");
|
||||
$( "#dialog-confirm" ).dialog({
|
||||
resizable: false,
|
||||
height:200,
|
||||
modal: true,
|
||||
buttons: {
|
||||
"確認": function(){setIframe();$( this ).dialog( "close" );},
|
||||
"取消": function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
}
|
||||
});
|
||||
}else if($(".active > [data-toggle='tab']").attr("href") == ".en"){
|
||||
alert('please write down iframe title');
|
||||
i = 1;
|
||||
$("#"+textID[i]).before("<div id='dialog-confirm' title='Do you want to use default title of the iframes?'>"+
|
||||
"<p><span class='ui-icon ui-icon-alert' style='float:left; margin:0 7px 20px 0;'></span>"+
|
||||
"After click confirm button,title of the iframes will be auto generated.And after click confirm button,you can set up title of the iframes by yourself.</p>"
|
||||
+"</div>");
|
||||
$( "#dialog-confirm" ).dialog({
|
||||
resizable: false,
|
||||
height:200,
|
||||
modal: true,
|
||||
buttons: {
|
||||
"confirm": function(){setIframe();$( this ).dialog( "close" );},
|
||||
"Cancel": function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
flag = 0;
|
||||
}else{
|
||||
if( k1!= 0){
|
||||
if($(".active > [data-toggle='tab']").attr("href") == ".zh_tw"){
|
||||
alert('請加上img的title');
|
||||
i = 0;
|
||||
$("#"+textID[i]).before("<div id='dialog-confirm' title='要使用默認的圖片標題和替代文字嗎?'>"+
|
||||
"<p><span class='ui-icon ui-icon-alert' style='float:left; margin:0 7px 20px 0;'></span>"+
|
||||
"按下確認後,將自動新增img的title和alt,若按下否,則可自行設定title和alt。</p>"
|
||||
+"</div>");
|
||||
$( "#dialog-confirm" ).dialog({
|
||||
resizable: false,
|
||||
height:200,
|
||||
modal: true,
|
||||
buttons: {
|
||||
"確認": function(){setImg();$( this ).dialog( "close" );},
|
||||
"取消": function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
}
|
||||
});
|
||||
}else if($(".active > [data-toggle='tab']").attr("href") == ".en"){
|
||||
alert('please write down img title');
|
||||
i = 1;
|
||||
$("#"+textID[i]).before("<div id='dialog-confirm' title='Do you want to use default title and alt of the images?'>"+
|
||||
"<p><span class='ui-icon ui-icon-alert' style='float:left; margin:0 7px 20px 0;'></span>"+
|
||||
"After click confirm button,title and alt of the images will be auto generated."
|
||||
+"And after click confirm button,you can set up title and alt of the images by yourself.</p>"
|
||||
+"</div>");
|
||||
$( "#dialog-confirm" ).dialog({
|
||||
resizable: false,
|
||||
height:200,
|
||||
modal: true,
|
||||
buttons: {
|
||||
"confirm": function(){setImg();$( this ).dialog( "close" );},
|
||||
"Cancel": function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
flag = 0;
|
||||
}else{
|
||||
if( k2!= 0){
|
||||
if($(".active > [data-toggle='tab']").attr("href") == ".zh_tw"){
|
||||
alert('請加上a標籤的title');
|
||||
i = 0;
|
||||
$("#"+textID[i]).before("<div id='dialog-confirm' title='要使用默認的a標籤標題嗎?'>"+
|
||||
"<p><span class='ui-icon ui-icon-alert' style='float:left; margin:0 7px 20px 0;'></span>"+
|
||||
"按下確認後,將自動新增img的title和alt,若按下否,則可自行設定title和alt。</p>"
|
||||
+"</div>");
|
||||
$( "#dialog-confirm" ).dialog({
|
||||
resizable: false,
|
||||
height:200,
|
||||
modal: true,
|
||||
buttons: {
|
||||
"確認": function(){setAtitle();$( this ).dialog( "close" );},
|
||||
"取消": function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
}
|
||||
});
|
||||
}else if($(".active > [data-toggle='tab']").attr("href") == ".en"){
|
||||
alert('please write down title of the a labels');
|
||||
i = 1;
|
||||
$("#"+textID[i]).before("<div id='dialog-confirm' title='Do you want to use default title of the a label?'>"+
|
||||
"<p><span class='ui-icon ui-icon-alert' style='float:left; margin:0 7px 20px 0;'></span>"+
|
||||
"After click confirm button,title of the a label will be auto generated."
|
||||
+"And after click confirm button,you can set up title of the a label by yourself.</p>"
|
||||
+"</div>");
|
||||
$( "#dialog-confirm" ).dialog({
|
||||
resizable: false,
|
||||
height:200,
|
||||
modal: true,
|
||||
buttons: {
|
||||
"confirm": function(){setAtitle();$( this ).dialog( "close" );},
|
||||
"Cancel": function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
flag = 0;
|
||||
}else{
|
||||
for(var i=0 ; i< $('.ckeditor').length ; i++){
|
||||
CKEDITOR.instances[textID[i]].setData($('.fakeArea').eq(i).html()); //將修改完的data(font-size from px to em)放回textarea
|
||||
}
|
||||
}
|
||||
}
|
||||
if(flag != 0)
|
||||
flag = 1;
|
||||
};
|
||||
if(flag == 1)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$('*[data-toggle=buttons-radio] label').click(function(){
|
||||
$('*[data-toggle=buttons-radio] input[type=radio]').removeAttr("checked");
|
||||
$(this).find("input[type=radio]").prop("checked","checked");
|
||||
})
|
||||
|
||||
var formValidator = new FormValidator($("form.page_part_form_validate"));
|
||||
formValidator.validate_functions.custom_not_empty = function(value){
|
||||
var widget_type = formValidator.form.find("input.widget_type_class:checked").val();
|
||||
widget_type = (typeof widget_type === "undefined" ? "none" : widget_type);
|
||||
return ((widget_type == "module_widget" && value == "") ? false : true);
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -1,359 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><%= current_site.title %> | <%= t('dashboard_') %></title>
|
||||
<script type="text/javascript">
|
||||
var currentLocaleForCKEDITOR = "<%= (I18n.locale.to_s == "zh_tw" || I18n.locale.to_s == "zh_cn" ? "zh" : I18n.locale.to_s) %>";
|
||||
</script>
|
||||
<%= render 'shared/meta' %>
|
||||
<%= render 'shared/google_font' %>
|
||||
<%= stylesheet_link_tag "back_end", media: "all", "data-turbolinks-track" => true %>
|
||||
<%= stylesheet_link_tag params[:controller] if Rails.application.assets.find_asset "#{params[:controller]}.css" %>
|
||||
<%= yield :page_specific_css %>
|
||||
<%= javascript_include_tag "back_end" %>
|
||||
<%= render 'shared/ie_html5_fix' %>
|
||||
<%= javascript_include_tag params[:controller] if Rails.application.assets.find_asset "#{params[:controller]}.js" %>
|
||||
<%= yield :page_specific_javascript %>
|
||||
<%= csrf_meta_tags %>
|
||||
</head>
|
||||
<body id="dashboards">
|
||||
<%= render_orbit_bar %>
|
||||
<%= render 'layouts/side_bar' %>
|
||||
<section id="main-wrap">
|
||||
<div class="wrap-inner">
|
||||
<% if @module_app.present?%>
|
||||
<div id="filter" class="topnav clearfix">
|
||||
<ul class="breadcrumb text-info pull-left">
|
||||
<%= back_end_breadcrumb %>
|
||||
</ul>
|
||||
<%= yield :right_nav %>
|
||||
</div>
|
||||
<%end%>
|
||||
<%= yield %>
|
||||
</div>
|
||||
</section>
|
||||
<%= javascript_include_tag "lib/pageslide.js" %>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>$('.fileupload.fileupload-exist').remove();</script>
|
||||
<script src="/assets/lib/jquery-ui-1.12.1/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* 修正bootstap.js和jquery-ui.js間的衝突,使tab按鈕能正常運作 */
|
||||
var Button = function (element, options) {
|
||||
this.$element = $(element)
|
||||
this.options = $.extend({}, $.fn.button.defaults, options)
|
||||
}
|
||||
|
||||
Button.prototype.setState = function (state) {
|
||||
var d = 'disabled'
|
||||
, $el = this.$element
|
||||
, data = $el.data()
|
||||
, val = $el.is('input') ? 'val' : 'html'
|
||||
|
||||
state = state + 'Text'
|
||||
data.resetText || $el.data('resetText', $el[val]())
|
||||
|
||||
$el[val](data[state] || this.options[state])
|
||||
|
||||
// push to event loop to allow forms to submit
|
||||
setTimeout(function () {
|
||||
state == 'loadingText' ?
|
||||
$el.addClass(d).attr(d, d) :
|
||||
$el.removeClass(d).removeAttr(d)
|
||||
}, 0)
|
||||
}
|
||||
|
||||
Button.prototype.toggle = function () {
|
||||
var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
|
||||
|
||||
$parent && $parent
|
||||
.find('.active')
|
||||
.removeClass('active')
|
||||
|
||||
this.$element.toggleClass('active')
|
||||
}
|
||||
|
||||
/* BUTTON PLUGIN DEFINITION
|
||||
* ======================== */
|
||||
|
||||
var old = $.fn.button
|
||||
|
||||
$.fn.button = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
, data = $this.data('button')
|
||||
, options = typeof option == 'object' && option
|
||||
if (!data) $this.data('button', (data = new Button(this, options)))
|
||||
if (option == 'toggle') data.toggle()
|
||||
else if (option) data.setState(option)
|
||||
})
|
||||
}
|
||||
/* 修正bootstap.js和jquery-ui.js間的衝突,使tab按鈕能正常運作 */
|
||||
</script>
|
||||
<link rel="stylesheet" href="/assets/lib/jquery-ui-1.12.1/jquery-ui.min.css">
|
||||
<script>
|
||||
$('.btn-primary').attr('onclick',"return checkArea()");
|
||||
var textID = new Array($('.ckeditor').length);
|
||||
$(document).ready(function(){
|
||||
for(var i=0 ; i< $('.ckeditor').length ; i++){
|
||||
if($('.ckeditor').eq(i).attr("id") == "" || $('.ckeditor').eq(i).attr("id") == undefined){
|
||||
$('.ckeditor').eq(i).attr("id","ckeditorArea"+i);
|
||||
textID[i] = "ckeditorArea"+i
|
||||
}else{
|
||||
textID[i] = $('.ckeditor').eq(i).attr("id");
|
||||
}
|
||||
try{
|
||||
CKEDITOR.replace(textID[i])
|
||||
}catch(e){};
|
||||
}
|
||||
});
|
||||
function checkArea(){
|
||||
var flag = 1;//1=>true
|
||||
if( $(".fakeArea").length !=0 )
|
||||
$(".fakeArea").remove();
|
||||
var k = 0; //k=0 => 所有iframe的title都有加
|
||||
var k1 = 0;//k1=0 => 所有img的title和alt都有加
|
||||
var k2 = 0;//k2=0 => 所有a的title都有加
|
||||
for(var i=0 ; i< $('.ckeditor').length ; i++){
|
||||
$("#"+textID[i]).before("<div class='fakeArea' style='display:none;'></div>");
|
||||
var Data = CKEDITOR.instances[textID[i]].getData();
|
||||
$(".fakeArea").eq(i).html(Data);
|
||||
/* change the font-size unit from px to em start*/
|
||||
function changepxToem(that){
|
||||
for(var i=0;i<that.querySelectorAll('*').length;i++){
|
||||
if(that.querySelectorAll('*')[i].style.fontSize.search('px') != -1)
|
||||
that.querySelectorAll('*')[i].style.fontSize = Number(that.querySelectorAll('*')[i].style.fontSize.split('px')[0]) / 16 + 'em';
|
||||
}
|
||||
}
|
||||
changepxToem(document.querySelectorAll('.fakeArea')[i]);
|
||||
/* change the font-size unit from px to em end*/
|
||||
if($('.fakeArea:eq('+i+') iframe').length != 0){
|
||||
for(var j=0;j<$('.fakeArea:eq('+i+') iframe').length;j++){
|
||||
if($('.fakeArea:eq('+i+') iframe').eq(j).attr('title') == undefined || $('.fakeArea:eq('+i+') iframe').eq(j).attr('title') ==''){
|
||||
k += 1;
|
||||
};
|
||||
};
|
||||
for(var j=0;j<$('.fakeArea:eq('+i+') img').length;j++){
|
||||
if($('.fakeArea:eq('+i+') img').eq(j).attr('title') == undefined || $('.fakeArea:eq('+i+') img').eq(j).attr('title') =='' || $('.fakeArea:eq('+i+') img').eq(j).attr('alt') == undefined || $('.fakeArea:eq('+i+') img').eq(j).attr('alt') ==''){
|
||||
k1 += 1;
|
||||
};
|
||||
}
|
||||
for(var j=0;j<$('.fakeArea:eq('+i+') a').length;j++){
|
||||
if($('.fakeArea:eq('+i+') a').eq(j).attr('href') != undefined || $('.fakeArea:eq('+i+') a').eq(j).attr('href') !=''){
|
||||
if($('.fakeArea:eq('+i+') a').eq(j).attr('title') == undefined || $('.fakeArea:eq('+i+') a').eq(j).attr('title') ==''){
|
||||
k2 += 1;
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
};
|
||||
function setIframe(){
|
||||
for(var i=0 ; i< $('.ckeditor').length ; i++){
|
||||
for(var j=0;j<$('.fakeArea:eq('+i+') iframe').length;j++){
|
||||
if($('.fakeArea:eq('+i+') iframe').eq(j).attr('title') == undefined || $('.fakeArea:eq('+i+') iframe').eq(j).attr('title') ==''){
|
||||
if($('.fakeArea:eq('+i+') iframe').eq(j).attr('src').search("facebook") != -1)
|
||||
$('.fakeArea:eq('+i+') iframe').eq(j).attr('title',"facebook");
|
||||
else if($('.fakeArea:eq('+i+') iframe').eq(j).attr('src').search("twitframe") != -1)
|
||||
$('.fakeArea:eq('+i+') iframe').eq(j).attr('title',"twitter");
|
||||
else if($('.fakeArea:eq('+i+') iframe').eq(j).attr('src').search("google") != -1)
|
||||
$('.fakeArea:eq('+i+') iframe').eq(j).attr('title',"google");
|
||||
else if($('.fakeArea:eq('+i+') iframe').eq(j).attr('src').search("youtube") != -1)
|
||||
$('.fakeArea:eq('+i+') iframe').eq(j).attr('title',"youtube");
|
||||
}
|
||||
};
|
||||
CKEDITOR.instances[textID[i]].setData($('.fakeArea').eq(i).html());
|
||||
};
|
||||
};
|
||||
function setImg(){
|
||||
for(var i=0 ; i< $('.ckeditor').length ; i++){
|
||||
for(var j=0;j<$('.fakeArea:eq('+i+') img').length;j++){
|
||||
if($('.fakeArea:eq('+i+') img').eq(j).attr('title') == undefined || $('.fakeArea:eq('+i+') img').eq(j).attr('title') =='' || $('.fakeArea:eq('+i+') img').eq(j).attr('alt') == undefined || $('.fakeArea:eq('+i+') img').eq(j).attr('alt') ==''){
|
||||
if($('.fakeArea:eq('+i+') img').eq(j).attr('title') == undefined || $('.fakeArea:eq('+i+') img').eq(j).attr('title') =='' ){
|
||||
if($('.ckeditor').eq(i).attr('name').search('zh_tw') != -1)
|
||||
$('.fakeArea:eq('+i+') img').eq(j).attr('title','這是一張圖片')
|
||||
else if($('.ckeditor').eq(i).attr('name').search('en') != -1)
|
||||
$('.fakeArea:eq('+i+') img').eq(j).attr('title','This is a image')
|
||||
};
|
||||
if($('.fakeArea:eq('+i+') img').eq(j).attr('alt') == undefined || $('.fakeArea:eq('+i+') img').eq(j).attr('alt') =='' ){
|
||||
if($('.ckeditor').eq(i).attr('name').search('zh_tw') != -1)
|
||||
$('.fakeArea:eq('+i+') img').eq(j).attr('alt','這是一張圖片')
|
||||
else if($('.ckeditor').eq(i).attr('name').search('en') != -1)
|
||||
$('.fakeArea:eq('+i+') img').eq(j).attr('alt','This is a image')
|
||||
};
|
||||
}
|
||||
}
|
||||
CKEDITOR.instances[textID[i]].setData($('.fakeArea').eq(i).html());
|
||||
};
|
||||
};
|
||||
function setAtitle(){
|
||||
for(var i=0 ; i< $('.ckeditor').length ; i++){
|
||||
for(var j=0;j<$('.fakeArea:eq('+i+') a').length;j++){
|
||||
if($('.fakeArea:eq('+i+') a').eq(j).attr("href") != "" || $('.fakeArea:eq('+i+') a').eq(j).attr("href") != undefined ){
|
||||
var titlestr="";
|
||||
if($('.fakeArea:eq('+i+') a').eq(j).attr('target')=='_self')
|
||||
titlestr += '在本視窗開啟 ';
|
||||
else if($('.fakeArea:eq('+i+') a').eq(j).attr('target') == '_blank')
|
||||
titlestr += '在新視窗開啟 ';
|
||||
if($('.fakeArea:eq('+i+') a').eq(j).attr('title')=="" || $('.fakeArea:eq('+i+') a').eq(j).attr('title')==undefined && $('.fakeArea:eq('+i+') a').eq(j).html().search('</') == -1)
|
||||
titlestr += $('.fakeArea:eq('+i+') a').eq(j).html().trim();
|
||||
else if($('.fakeArea:eq('+i+') a').eq(j).attr('title')=="" || $('.fakeArea:eq('+i+') a').eq(j).attr('title') == undefined && $('.fakeArea:eq('+i+') a').eq(j).find('>span').length==1)
|
||||
titlestr += $('.fakeArea:eq('+i+') a').eq(j).find('>span').html().trim();
|
||||
else if($('.fakeArea:eq('+i+') a').eq(j).attr('title') =="" || $('.fakeArea:eq('+i+') a').eq(j).attr('title') == undefined){
|
||||
try{
|
||||
if($('.fakeArea:eq('+i+') a').eq(j).html().trim().split('>').length==2)
|
||||
titlestr += $('.fakeArea:eq('+i+') a').eq(j).html().trim().split('>')[1].trim();
|
||||
else if($('.fakeArea:eq('+i+') a').eq(j).html().trim().split('>').length==3)
|
||||
titlestr += $('.fakeArea:eq('+i+') a').eq(j).html().trim().split('>')[2].trim();
|
||||
}catch(e){};
|
||||
}
|
||||
else
|
||||
titlestr += $('.fakeArea:eq('+i+') a').eq(j).attr('title');
|
||||
if(titlestr.search('<img') != -1)
|
||||
titlestr = "這是一張照片";
|
||||
if(titlestr != "")
|
||||
$('.fakeArea:eq('+i+') a').eq(j).attr('title',titlestr);
|
||||
};
|
||||
};
|
||||
CKEDITOR.instances[textID[i]].setData($('.fakeArea').eq(i).html());
|
||||
};
|
||||
};
|
||||
if( k != 0){
|
||||
if($(".active > [data-toggle='tab']").attr("href") == ".zh_tw"){
|
||||
alert('請加上iframe的title');
|
||||
i = 0;
|
||||
$("#"+textID[i]).before("<div id='dialog-confirm' title='要使用默認的iframe title嗎?'>"+
|
||||
"<p><span class='ui-icon ui-icon-alert' style='float:left; margin:0 7px 20px 0;'></span>"+
|
||||
"按下確認後,將自動新增iframe的title,若按下否,則可自行設定title。</p>"
|
||||
+"</div>");
|
||||
$( "#dialog-confirm" ).dialog({
|
||||
resizable: false,
|
||||
height:200,
|
||||
modal: true,
|
||||
buttons: {
|
||||
"確認": function(){setIframe();$( this ).dialog( "close" );},
|
||||
"取消": function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
}
|
||||
});
|
||||
}else if($(".active > [data-toggle='tab']").attr("href") == ".en"){
|
||||
alert('please write down iframe title');
|
||||
i = 1;
|
||||
$("#"+textID[i]).before("<div id='dialog-confirm' title='Do you want to use default title of the iframes?'>"+
|
||||
"<p><span class='ui-icon ui-icon-alert' style='float:left; margin:0 7px 20px 0;'></span>"+
|
||||
"After click confirm button,title of the iframes will be auto generated.And after click confirm button,you can set up title of the iframes by yourself.</p>"
|
||||
+"</div>");
|
||||
$( "#dialog-confirm" ).dialog({
|
||||
resizable: false,
|
||||
height:200,
|
||||
modal: true,
|
||||
buttons: {
|
||||
"confirm": function(){setIframe();$( this ).dialog( "close" );},
|
||||
"Cancel": function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
flag = 0;
|
||||
}else{
|
||||
if( k1!= 0){
|
||||
if($(".active > [data-toggle='tab']").attr("href") == ".zh_tw"){
|
||||
alert('請加上img的title');
|
||||
i = 0;
|
||||
$("#"+textID[i]).before("<div id='dialog-confirm' title='要使用默認的圖片標題和替代文字嗎?'>"+
|
||||
"<p><span class='ui-icon ui-icon-alert' style='float:left; margin:0 7px 20px 0;'></span>"+
|
||||
"按下確認後,將自動新增img的title和alt,若按下否,則可自行設定title和alt。</p>"
|
||||
+"</div>");
|
||||
$( "#dialog-confirm" ).dialog({
|
||||
resizable: false,
|
||||
height:200,
|
||||
modal: true,
|
||||
buttons: {
|
||||
"確認": function(){setImg();$( this ).dialog( "close" );},
|
||||
"取消": function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
}
|
||||
});
|
||||
}else if($(".active > [data-toggle='tab']").attr("href") == ".en"){
|
||||
alert('please write down img title');
|
||||
i = 1;
|
||||
$("#"+textID[i]).before("<div id='dialog-confirm' title='Do you want to use default title and alt of the images?'>"+
|
||||
"<p><span class='ui-icon ui-icon-alert' style='float:left; margin:0 7px 20px 0;'></span>"+
|
||||
"After click confirm button,title and alt of the images will be auto generated."
|
||||
+"And after click confirm button,you can set up title and alt of the images by yourself.</p>"
|
||||
+"</div>");
|
||||
$( "#dialog-confirm" ).dialog({
|
||||
resizable: false,
|
||||
height:200,
|
||||
modal: true,
|
||||
buttons: {
|
||||
"confirm": function(){setImg();$( this ).dialog( "close" );},
|
||||
"Cancel": function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
flag = 0;
|
||||
}else{
|
||||
if( k2!= 0){
|
||||
if($(".active > [data-toggle='tab']").attr("href") == ".zh_tw"){
|
||||
alert('請加上a標籤的title');
|
||||
i = 0;
|
||||
$("#"+textID[i]).before("<div id='dialog-confirm' title='要使用默認的a標籤標題嗎?'>"+
|
||||
"<p><span class='ui-icon ui-icon-alert' style='float:left; margin:0 7px 20px 0;'></span>"+
|
||||
"按下確認後,將自動新增img的title和alt,若按下否,則可自行設定title和alt。</p>"
|
||||
+"</div>");
|
||||
$( "#dialog-confirm" ).dialog({
|
||||
resizable: false,
|
||||
height:200,
|
||||
modal: true,
|
||||
buttons: {
|
||||
"確認": function(){setAtitle();$( this ).dialog( "close" );},
|
||||
"取消": function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
}
|
||||
});
|
||||
}else if($(".active > [data-toggle='tab']").attr("href") == ".en"){
|
||||
alert('please write down title of the a labels');
|
||||
i = 1;
|
||||
$("#"+textID[i]).before("<div id='dialog-confirm' title='Do you want to use default title of the a label?'>"+
|
||||
"<p><span class='ui-icon ui-icon-alert' style='float:left; margin:0 7px 20px 0;'></span>"+
|
||||
"After click confirm button,title of the a label will be auto generated."
|
||||
+"And after click confirm button,you can set up title of the a label by yourself.</p>"
|
||||
+"</div>");
|
||||
$( "#dialog-confirm" ).dialog({
|
||||
resizable: false,
|
||||
height:200,
|
||||
modal: true,
|
||||
buttons: {
|
||||
"confirm": function(){setAtitle();$( this ).dialog( "close" );},
|
||||
"Cancel": function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
flag = 0;
|
||||
}else{
|
||||
for(var i=0 ; i< $('.ckeditor').length ; i++){
|
||||
CKEDITOR.instances[textID[i]].setData($('.fakeArea').eq(i).html()); //將修改完的data(font-size from px to em)放回textarea
|
||||
}
|
||||
}
|
||||
}
|
||||
if(flag != 0)
|
||||
flag = 1;
|
||||
};
|
||||
if(flag == 1)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
};
|
||||
</script>
|
||||
@@ -1,333 +0,0 @@
|
||||
Authors ordered by first contribution
|
||||
A list of current team members is available at http://jqueryui.com/about
|
||||
|
||||
Paul Bakaus <paul.bakaus@gmail.com>
|
||||
Richard Worth <rdworth@gmail.com>
|
||||
Yehuda Katz <wycats@gmail.com>
|
||||
Sean Catchpole <sean@sunsean.com>
|
||||
John Resig <jeresig@gmail.com>
|
||||
Tane Piper <piper.tane@gmail.com>
|
||||
Dmitri Gaskin <dmitrig01@gmail.com>
|
||||
Klaus Hartl <klaus.hartl@gmail.com>
|
||||
Stefan Petre <stefan.petre@gmail.com>
|
||||
Gilles van den Hoven <gilles@webunity.nl>
|
||||
Micheil Bryan Smith <micheil@brandedcode.com>
|
||||
Jörn Zaefferer <joern.zaefferer@gmail.com>
|
||||
Marc Grabanski <m@marcgrabanski.com>
|
||||
Keith Wood <kbwood@iinet.com.au>
|
||||
Brandon Aaron <brandon.aaron@gmail.com>
|
||||
Scott González <scott.gonzalez@gmail.com>
|
||||
Eduardo Lundgren <eduardolundgren@gmail.com>
|
||||
Aaron Eisenberger <aaronchi@gmail.com>
|
||||
Joan Piedra <theneojp@gmail.com>
|
||||
Bruno Basto <b.basto@gmail.com>
|
||||
Remy Sharp <remy@leftlogic.com>
|
||||
Bohdan Ganicky <bohdan.ganicky@gmail.com>
|
||||
David Bolter <david.bolter@gmail.com>
|
||||
Chi Cheng <cloudream@gmail.com>
|
||||
Ca-Phun Ung <pazu2k@gmail.com>
|
||||
Ariel Flesler <aflesler@gmail.com>
|
||||
Maggie Wachs <maggie@filamentgroup.com>
|
||||
Scott Jehl <scottjehl@gmail.com>
|
||||
Todd Parker <todd@filamentgroup.com>
|
||||
Andrew Powell <andrew@shellscape.org>
|
||||
Brant Burnett <btburnett3@gmail.com>
|
||||
Douglas Neiner <doug@dougneiner.com>
|
||||
Paul Irish <paul.irish@gmail.com>
|
||||
Ralph Whitbeck <ralph.whitbeck@gmail.com>
|
||||
Thibault Duplessis <thibault.duplessis@gmail.com>
|
||||
Dominique Vincent <dominique.vincent@toitl.com>
|
||||
Jack Hsu <jack.hsu@gmail.com>
|
||||
Adam Sontag <ajpiano@ajpiano.com>
|
||||
Carl Fürstenberg <carl@excito.com>
|
||||
Kevin Dalman <development@allpro.net>
|
||||
Alberto Fernández Capel <afcapel@gmail.com>
|
||||
Jacek Jędrzejewski (http://jacek.jedrzejewski.name)
|
||||
Ting Kuei <ting@kuei.com>
|
||||
Samuel Cormier-Iijima <sam@chide.it>
|
||||
Jon Palmer <jonspalmer@gmail.com>
|
||||
Ben Hollis <bhollis@amazon.com>
|
||||
Justin MacCarthy <Justin@Rubystars.biz>
|
||||
Eyal Kobrigo <kobrigo@hotmail.com>
|
||||
Tiago Freire <tiago.freire@gmail.com>
|
||||
Diego Tres <diegotres@gmail.com>
|
||||
Holger Rüprich <holger@rueprich.de>
|
||||
Ziling Zhao <zilingzhao@gmail.com>
|
||||
Mike Alsup <malsup@gmail.com>
|
||||
Robson Braga Araujo <robsonbraga@gmail.com>
|
||||
Pierre-Henri Ausseil <ph.ausseil@gmail.com>
|
||||
Christopher McCulloh <cmcculloh@gmail.com>
|
||||
Andrew Newcomb <ext.github@preceptsoftware.co.uk>
|
||||
Lim Chee Aun <cheeaun@gmail.com>
|
||||
Jorge Barreiro <yortx.barry@gmail.com>
|
||||
Daniel Steigerwald <daniel@steigerwald.cz>
|
||||
John Firebaugh <john_firebaugh@bigfix.com>
|
||||
John Enters <github@darkdark.net>
|
||||
Andrey Kapitcyn <ru.m157y@gmail.com>
|
||||
Dmitry Petrov <dpetroff@gmail.com>
|
||||
Eric Hynds <eric@hynds.net>
|
||||
Chairat Sunthornwiphat <pipo@sixhead.com>
|
||||
Josh Varner <josh.varner@gmail.com>
|
||||
Stéphane Raimbault <stephane.raimbault@gmail.com>
|
||||
Jay Merrifield <fracmak@gmail.com>
|
||||
J. Ryan Stinnett <jryans@gmail.com>
|
||||
Peter Heiberg <peter@heiberg.se>
|
||||
Alex Dovenmuehle <adovenmuehle@gmail.com>
|
||||
Jamie Gegerson <git@jamiegegerson.com>
|
||||
Raymond Schwartz <skeetergraphics@gmail.com>
|
||||
Phillip Barnes <philbar@gmail.com>
|
||||
Kyle Wilkinson <kai@wikyd.org>
|
||||
Khaled AlHourani <me@khaledalhourani.com>
|
||||
Marian Rudzynski <mr@impaled.org>
|
||||
Jean-Francois Remy <jeff@melix.org>
|
||||
Doug Blood <dougblood@gmail.com>
|
||||
Filippo Cavallarin <filippo.cavallarin@codseq.it>
|
||||
Heiko Henning <heiko@thehennings.ch>
|
||||
Aliaksandr Rahalevich <saksmlz@gmail.com>
|
||||
Mario Visic <mario@mariovisic.com>
|
||||
Xavi Ramirez <xavi.rmz@gmail.com>
|
||||
Max Schnur <max.schnur@gmail.com>
|
||||
Saji Nediyanchath <saji89@gmail.com>
|
||||
Corey Frang <gnarf37@gmail.com>
|
||||
Aaron Peterson <aaronp123@yahoo.com>
|
||||
Ivan Peters <ivan@ivanpeters.com>
|
||||
Mohamed Cherif Bouchelaghem <cherifbouchelaghem@yahoo.fr>
|
||||
Marcos Sousa <falecomigo@marcossousa.com>
|
||||
Michael DellaNoce <mdellanoce@mailtrust.com>
|
||||
George Marshall <echosx@gmail.com>
|
||||
Tobias Brunner <tobias@strongswan.org>
|
||||
Martin Solli <msolli@gmail.com>
|
||||
David Petersen <public@petersendidit.com>
|
||||
Dan Heberden <danheberden@gmail.com>
|
||||
William Kevin Manire <williamkmanire@gmail.com>
|
||||
Gilmore Davidson <gilmoreorless@gmail.com>
|
||||
Michael Wu <michaelmwu@gmail.com>
|
||||
Adam Parod <mystic414@gmail.com>
|
||||
Guillaume Gautreau <guillaume+github@ghusse.com>
|
||||
Marcel Toele <EleotleCram@gmail.com>
|
||||
Dan Streetman <ddstreet@ieee.org>
|
||||
Matt Hoskins <matt@nipltd.com>
|
||||
Giovanni Giacobbi <giovanni@giacobbi.net>
|
||||
Kyle Florence <kyle.florence@gmail.com>
|
||||
Pavol Hluchý <lopo@losys.sk>
|
||||
Hans Hillen <hans.hillen@gmail.com>
|
||||
Mark Johnson <virgofx@live.com>
|
||||
Trey Hunner <treyhunner@gmail.com>
|
||||
Shane Whittet <whittet@gmail.com>
|
||||
Edward A Faulkner <ef@alum.mit.edu>
|
||||
Adam Baratz <adam@adambaratz.com>
|
||||
Kato Kazuyoshi <kato.kazuyoshi@gmail.com>
|
||||
Eike Send <eike.send@gmail.com>
|
||||
Kris Borchers <kris.borchers@gmail.com>
|
||||
Eddie Monge <eddie@eddiemonge.com>
|
||||
Israel Tsadok <itsadok@gmail.com>
|
||||
Carson McDonald <carson@ioncannon.net>
|
||||
Jason Davies <jason@jasondavies.com>
|
||||
Garrison Locke <gplocke@gmail.com>
|
||||
David Murdoch <david@davidmurdoch.com>
|
||||
Benjamin Scott Boyle <benjamins.boyle@gmail.com>
|
||||
Jesse Baird <jebaird@gmail.com>
|
||||
Jonathan Vingiano <jvingiano@gmail.com>
|
||||
Dylan Just <dev@ephox.com>
|
||||
Hiroshi Tomita <tomykaira@gmail.com>
|
||||
Glenn Goodrich <glenn.goodrich@gmail.com>
|
||||
Tarafder Ashek-E-Elahi <mail.ashek@gmail.com>
|
||||
Ryan Neufeld <ryan@neufeldmail.com>
|
||||
Marc Neuwirth <marc.neuwirth@gmail.com>
|
||||
Philip Graham <philip.robert.graham@gmail.com>
|
||||
Benjamin Sterling <benjamin.sterling@kenzomedia.com>
|
||||
Wesley Walser <waw325@gmail.com>
|
||||
Kouhei Sutou <kou@clear-code.com>
|
||||
Karl Kirch <karlkrch@gmail.com>
|
||||
Chris Kelly <ckdake@ckdake.com>
|
||||
Jason Oster <jay@kodewerx.org>
|
||||
Felix Nagel <info@felixnagel.com>
|
||||
Alexander Polomoshnov <alex.polomoshnov@gmail.com>
|
||||
David Leal <dgleal@gmail.com>
|
||||
Igor Milla <igor.fsp.milla@gmail.com>
|
||||
Dave Methvin <dave.methvin@gmail.com>
|
||||
Florian Gutmann <f.gutmann@chronimo.com>
|
||||
Marwan Al Jubeh <marwan.aljubeh@gmail.com>
|
||||
Milan Broum <midlis@googlemail.com>
|
||||
Sebastian Sauer <info@dynpages.de>
|
||||
Gaëtan Muller <m.gaetan89@gmail.com>
|
||||
Michel Weimerskirch <michel@weimerskirch.net>
|
||||
William Griffiths <william@ycymro.com>
|
||||
Stojce Slavkovski <stojce@gmail.com>
|
||||
David Soms <david.soms@gmail.com>
|
||||
David De Sloovere <david.desloovere@outlook.com>
|
||||
Michael P. Jung <michael.jung@terreon.de>
|
||||
Shannon Pekary <spekary@gmail.com>
|
||||
Dan Wellman <danwellman@hotmail.com>
|
||||
Matthew Edward Hutton <meh@corefiling.co.uk>
|
||||
James Khoury <james@jameskhoury.com>
|
||||
Rob Loach <robloach@gmail.com>
|
||||
Alberto Monteiro <betimbrasil@gmail.com>
|
||||
Alex Rhea <alex.rhea@gmail.com>
|
||||
Krzysztof Rosiński <rozwell69@gmail.com>
|
||||
Ryan Olton <oltonr@gmail.com>
|
||||
Genie <386@mail.com>
|
||||
Rick Waldron <waldron.rick@gmail.com>
|
||||
Ian Simpson <spoonlikesham@gmail.com>
|
||||
Lev Kitsis <spam4lev@gmail.com>
|
||||
TJ VanToll <tj.vantoll@gmail.com>
|
||||
Justin Domnitz <jdomnitz@gmail.com>
|
||||
Douglas Cerna <douglascerna@yahoo.com>
|
||||
Bert ter Heide <bertjh@hotmail.com>
|
||||
Jasvir Nagra <jasvir@gmail.com>
|
||||
Yuriy Khabarov <13real008@gmail.com>
|
||||
Harri Kilpiö <harri.kilpio@gmail.com>
|
||||
Lado Lomidze <lado.lomidze@gmail.com>
|
||||
Amir E. Aharoni <amir.aharoni@mail.huji.ac.il>
|
||||
Simon Sattes <simon.sattes@gmail.com>
|
||||
Jo Liss <joliss42@gmail.com>
|
||||
Guntupalli Karunakar <karunakarg@yahoo.com>
|
||||
Shahyar Ghobadpour <shahyar@gmail.com>
|
||||
Lukasz Lipinski <uzza17@gmail.com>
|
||||
Timo Tijhof <krinklemail@gmail.com>
|
||||
Jason Moon <jmoon@socialcast.com>
|
||||
Martin Frost <martinf55@hotmail.com>
|
||||
Eneko Illarramendi <eneko@illarra.com>
|
||||
EungJun Yi <semtlenori@gmail.com>
|
||||
Courtland Allen <courtlandallen@gmail.com>
|
||||
Viktar Varvanovich <non4eg@gmail.com>
|
||||
Danny Trunk <dtrunk90@gmail.com>
|
||||
Pavel Stetina <pavel.stetina@nangu.tv>
|
||||
Michael Stay <metaweta@gmail.com>
|
||||
Steven Roussey <sroussey@gmail.com>
|
||||
Michael Hollis <hollis21@gmail.com>
|
||||
Lee Rowlands <lee.rowlands@previousnext.com.au>
|
||||
Timmy Willison <timmywillisn@gmail.com>
|
||||
Karl Swedberg <kswedberg@gmail.com>
|
||||
Baoju Yuan <the_guy_1987@hotmail.com>
|
||||
Maciej Mroziński <maciej.k.mrozinski@gmail.com>
|
||||
Luis Dalmolin <luis.nh@gmail.com>
|
||||
Mark Aaron Shirley <maspwr@gmail.com>
|
||||
Martin Hoch <martin@fidion.de>
|
||||
Jiayi Yang <tr870829@gmail.com>
|
||||
Philipp Benjamin Köppchen <xgxtpbk@gws.ms>
|
||||
Sindre Sorhus <sindresorhus@gmail.com>
|
||||
Bernhard Sirlinger <bernhard.sirlinger@tele2.de>
|
||||
Jared A. Scheel <jared@jaredscheel.com>
|
||||
Rafael Xavier de Souza <rxaviers@gmail.com>
|
||||
John Chen <zhang.z.chen@intel.com>
|
||||
Robert Beuligmann <robertbeuligmann@gmail.com>
|
||||
Dale Kocian <dale.kocian@gmail.com>
|
||||
Mike Sherov <mike.sherov@gmail.com>
|
||||
Andrew Couch <andy@couchand.com>
|
||||
Marc-Andre Lafortune <github@marc-andre.ca>
|
||||
Nate Eagle <nate.eagle@teamaol.com>
|
||||
David Souther <davidsouther@gmail.com>
|
||||
Mathias Stenbom <mathias@stenbom.com>
|
||||
Sergey Kartashov <ebishkek@yandex.ru>
|
||||
Avinash R <nashpapa@gmail.com>
|
||||
Ethan Romba <ethanromba@gmail.com>
|
||||
Cory Gackenheimer <cory.gack@gmail.com>
|
||||
Juan Pablo Kaniefsky <jpkaniefsky@gmail.com>
|
||||
Roman Salnikov <bardt.dz@gmail.com>
|
||||
Anika Henke <anika@selfthinker.org>
|
||||
Samuel Bovée <samycookie2000@yahoo.fr>
|
||||
Fabrício Matté <ult_combo@hotmail.com>
|
||||
Viktor Kojouharov <vkojouharov@gmail.com>
|
||||
Pawel Maruszczyk (http://hrabstwo.net)
|
||||
Pavel Selitskas <p.selitskas@gmail.com>
|
||||
Bjørn Johansen <post@bjornjohansen.no>
|
||||
Matthieu Penant <thieum22@hotmail.com>
|
||||
Dominic Barnes <dominic@dbarnes.info>
|
||||
David Sullivan <david.sullivan@gmail.com>
|
||||
Thomas Jaggi <thomas@responsive.ch>
|
||||
Vahid Sohrabloo <vahid4134@gmail.com>
|
||||
Travis Carden <travis.carden@gmail.com>
|
||||
Bruno M. Custódio <bruno@brunomcustodio.com>
|
||||
Nathanael Silverman <nathanael.silverman@gmail.com>
|
||||
Christian Wenz <christian@wenz.org>
|
||||
Steve Urmston <steve@urm.st>
|
||||
Zaven Muradyan <megalivoithos@gmail.com>
|
||||
Woody Gilk <shadowhand@deviantart.com>
|
||||
Zbigniew Motyka <zbigniew.motyka@gmail.com>
|
||||
Suhail Alkowaileet <xsoh.k7@gmail.com>
|
||||
Toshi MARUYAMA <marutosijp2@yahoo.co.jp>
|
||||
David Hansen <hansede@gmail.com>
|
||||
Brian Grinstead <briangrinstead@gmail.com>
|
||||
Christian Klammer <christian314159@gmail.com>
|
||||
Steven Luscher <jquerycla@steveluscher.com>
|
||||
Gan Eng Chin <engchin.gan@gmail.com>
|
||||
Gabriel Schulhof <gabriel.schulhof@intel.com>
|
||||
Alexander Schmitz <arschmitz@gmail.com>
|
||||
Vilhjálmur Skúlason <vis@dmm.is>
|
||||
Siebrand Mazeland <siebrand@kitano.nl>
|
||||
Mohsen Ekhtiari <mohsenekhtiari@yahoo.com>
|
||||
Pere Orga <gotrunks@gmail.com>
|
||||
Jasper de Groot <mail@ugomobi.com>
|
||||
Stephane Deschamps <stephane.deschamps@gmail.com>
|
||||
Jyoti Deka <dekajp@gmail.com>
|
||||
Andrei Picus <office.nightcrawler@gmail.com>
|
||||
Ondrej Novy <novy@ondrej.org>
|
||||
Jacob McCutcheon <jacob.mccutcheon@gmail.com>
|
||||
Monika Piotrowicz <monika.piotrowicz@gmail.com>
|
||||
Imants Horsts <imants.horsts@inbox.lv>
|
||||
Eric Dahl <eric.c.dahl@gmail.com>
|
||||
Dave Stein <dave@behance.com>
|
||||
Dylan Barrell <dylan@barrell.com>
|
||||
Daniel DeGroff <djdegroff@gmail.com>
|
||||
Michael Wiencek <mwtuea@gmail.com>
|
||||
Thomas Meyer <meyertee@gmail.com>
|
||||
Ruslan Yakhyaev <ruslan@ruslan.io>
|
||||
Brian J. Dowling <bjd-dev@simplicity.net>
|
||||
Ben Higgins <ben@extrahop.com>
|
||||
Yermo Lamers <yml@yml.com>
|
||||
Patrick Stapleton <github@gdi2290.com>
|
||||
Trisha Crowley <trisha.crowley@gmail.com>
|
||||
Usman Akeju <akeju00+github@gmail.com>
|
||||
Rodrigo Menezes <rod333@gmail.com>
|
||||
Jacques Perrault <jacques_perrault@us.ibm.com>
|
||||
Frederik Elvhage <frederik.elvhage@googlemail.com>
|
||||
Will Holley <willholley@gmail.com>
|
||||
Uri Gilad <antishok@gmail.com>
|
||||
Richard Gibson <richard.gibson@gmail.com>
|
||||
Simen Bekkhus <sbekkhus91@gmail.com>
|
||||
Chen Eshchar <eshcharc@gmail.com>
|
||||
Bruno Pérel <brunoperel@gmail.com>
|
||||
Mohammed Alshehri <m@dralshehri.com>
|
||||
Lisa Seacat DeLuca <ldeluca@us.ibm.com>
|
||||
Anne-Gaelle Colom <coloma@westminster.ac.uk>
|
||||
Adam Foster <slimfoster@gmail.com>
|
||||
Luke Page <luke.a.page@gmail.com>
|
||||
Daniel Owens <daniel@matchstickmixup.com>
|
||||
Michael Orchard <morchard@scottlogic.co.uk>
|
||||
Marcus Warren <marcus@envoke.com>
|
||||
Nils Heuermann <nils@world-of-scripts.de>
|
||||
Marco Ziech <marco@ziech.net>
|
||||
Patricia Juarez <patrixd@gmail.com>
|
||||
Ben Mosher <me@benmosher.com>
|
||||
Ablay Keldibek <atomio.ak@gmail.com>
|
||||
Thomas Applencourt <thomas.applencourt@irsamc.ups-tlse.fr>
|
||||
Jiabao Wu <jiabao.foss@gmail.com>
|
||||
Eric Lee Carraway <github@ericcarraway.com>
|
||||
Victor Homyakov <vkhomyackov@gmail.com>
|
||||
Myeongjin Lee <aranet100@gmail.com>
|
||||
Liran Sharir <lsharir@gmail.com>
|
||||
Weston Ruter <weston@xwp.co>
|
||||
Mani Mishra <manimishra902@gmail.com>
|
||||
Hannah Methvin <hannahmethvin@gmail.com>
|
||||
Leonardo Balter <leonardo.balter@gmail.com>
|
||||
Benjamin Albert <benjamin_a5@yahoo.com>
|
||||
Michał Gołębiowski <m.goleb@gmail.com>
|
||||
Alyosha Pushak <alyosha.pushak@gmail.com>
|
||||
Fahad Ahmad <fahadahmad41@hotmail.com>
|
||||
Matt Brundage <github@mattbrundage.com>
|
||||
Francesc Baeta <francesc.baeta@gmail.com>
|
||||
Piotr Baran <piotros@wp.pl>
|
||||
Mukul Hase <mukulhase@gmail.com>
|
||||
Konstantin Dinev <kdinev@mail.bw.edu>
|
||||
Rand Scullard <rand@randscullard.com>
|
||||
Dan Strohl <dan@wjcg.net>
|
||||
Maksim Ryzhikov <rv.maksim@gmail.com>
|
||||
Amine HADDAD <haddad@allegorie.tv>
|
||||
Amanpreet Singh <apsdehal@gmail.com>
|
||||
Alexey Balchunas <bleshik@gmail.com>
|
||||
Peter Kehl <peter.kehl@gmail.com>
|
||||
Peter Dave Hello <hsu@peterdavehello.org>
|
||||
Johannes Schäfer <johnschaefer@gmx.de>
|
||||
Ville Skyttä <ville.skytta@iki.fi>
|
||||
Ryan Oriecuia <ryan.oriecuia@visioncritical.com>
|
||||
@@ -1,43 +0,0 @@
|
||||
Copyright jQuery Foundation and other contributors, https://jquery.org/
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/jquery/jquery-ui
|
||||
|
||||
The following license applies to all parts of this software except as
|
||||
documented below:
|
||||
|
||||
====
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
====
|
||||
|
||||
Copyright and related rights for sample code are waived via CC0. Sample
|
||||
code is defined as all source code contained within the demos directory.
|
||||
|
||||
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
====
|
||||
|
||||
All files located in the node_modules and external directories are
|
||||
externally maintained libraries used by this software which have their
|
||||
own licenses; we recommend you read them, as their terms may differ from
|
||||
the terms above.
|
||||
|
Before Width: | Height: | Size: 332 B |
|
Before Width: | Height: | Size: 333 B |
|
Before Width: | Height: | Size: 330 B |
|
Before Width: | Height: | Size: 333 B |
|
Before Width: | Height: | Size: 225 B |
|
Before Width: | Height: | Size: 223 B |
|
Before Width: | Height: | Size: 364 B |
|
Before Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 6.2 KiB |
@@ -1,7 +0,0 @@
|
||||
/*! jQuery UI - v1.12.1 - 2020-02-17
|
||||
* http://jqueryui.com
|
||||
* Includes: draggable.css, core.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, menu.css, button.css, controlgroup.css, checkboxradio.css, datepicker.css, dialog.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css
|
||||
* To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=hot-sneaks&cornerRadiusShadow=5px&offsetLeftShadow=8px&offsetTopShadow=8px&thicknessShadow=10px&opacityShadow=20&bgImgOpacityShadow=75&bgTextureShadow=flat&bgColorShadow=ba9217&opacityOverlay=80&bgImgOpacityOverlay=85&bgTextureOverlay=white_lines&bgColorOverlay=f7f7ba&iconColorError=ffeb33&fcError=ffffff&borderColorError=ff6b7f&bgImgOpacityError=50&bgTextureError=diagonals_small&bgColorError=ff3853&iconColorHighlight=88a206&fcHighlight=363636&borderColorHighlight=b4d100&bgImgOpacityHighlight=80&bgTextureHighlight=dots_medium&bgColorHighlight=ffff38&iconColorActive=ffffff&fcActive=ffffff&borderColorActive=ff6b7f&bgImgOpacityActive=40&bgTextureActive=diagonals_small&bgColorActive=db4865&iconColorHover=454545&fcHover=212121&borderColorHover=999999&bgImgOpacityHover=75&bgTextureHover=diagonals_small&bgColorHover=ccd232&iconColorDefault=ffffff&fcDefault=333333&borderColorDefault=93c3cd&bgImgOpacityDefault=50&bgTextureDefault=diagonals_small&bgColorDefault=93c3cd&iconColorContent=c02669&fcContent=2c4359&borderColorContent=aaaaaa&bgImgOpacityContent=75&bgTextureContent=flat&bgColorContent=ffffff&iconColorHeader=e1e463&fcHeader=e1e463&borderColorHeader=2c4359&bgImgOpacityHeader=35&bgTextureHeader=dots_small&bgColorHeader=35414f&cornerRadius=4px&fsDefault=1.2em&fwDefault=bold&ffDefault=Gill%20Sans%2CArial%2Csans-serif
|
||||
* Copyright jQuery Foundation and other contributors; Licensed MIT */
|
||||
|
||||
.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.00625em;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;font-size:100%}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-button{padding:.4em 1em;display:inline-block;position:relative;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2em;box-sizing:border-box;text-indent:-9999px;white-space:nowrap}input.ui-button.ui-button-icon-only{text-indent:0}.ui-button-icon-only .ui-icon{position:absolute;top:50%;left:50%;margin-top:-8px;margin-left:-8px}.ui-button.ui-icon-notext .ui-icon{padding:0;width:2.1em;height:2.1em;text-indent:-9999px;white-space:nowrap}input.ui-button.ui-icon-notext .ui-icon{width:auto;height:auto;text-indent:0;white-space:normal;padding:.4em 1em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-controlgroup{vertical-align:middle;display:inline-block}.ui-controlgroup > .ui-controlgroup-item{float:left;margin-left:0;margin-right:0}.ui-controlgroup > .ui-controlgroup-item:focus,.ui-controlgroup > .ui-controlgroup-item.ui-visual-focus{z-index:9999}.ui-controlgroup-vertical > .ui-controlgroup-item{display:block;float:none;width:100%;margin-top:0;margin-bottom:0;text-align:left}.ui-controlgroup-vertical .ui-controlgroup-item{box-sizing:border-box}.ui-controlgroup .ui-controlgroup-label{padding:.4em 1em}.ui-controlgroup .ui-controlgroup-label span{font-size:80%}.ui-controlgroup-horizontal .ui-controlgroup-label + .ui-controlgroup-item{border-left:none}.ui-controlgroup-vertical .ui-controlgroup-label + .ui-controlgroup-item{border-top:none}.ui-controlgroup-horizontal .ui-controlgroup-label.ui-widget-content{border-right:none}.ui-controlgroup-vertical .ui-controlgroup-label.ui-widget-content{border-bottom:none}.ui-controlgroup-vertical .ui-spinner-input{width:75%;width:calc( 100% - 2.4em )}.ui-controlgroup-vertical .ui-spinner .ui-spinner-up{border-top-style:solid}.ui-checkboxradio-label .ui-icon-bLine truncated
|
||||
@@ -1,13 +0,0 @@
|
||||
/*! jQuery UI - v1.12.1 - 2020-02-17
|
||||
* http://jqueryui.com
|
||||
* Includes: widget.js, position.js, data.js, disable-selection.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/draggable.js, widgets/droppable.js, widgets/resizable.js, widgets/selectable.js, widgets/sortable.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/selectmenu.js, widgets/slider.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js
|
||||
* Copyright jQuery Foundation and other contributors; Licensed MIT */
|
||||
|
||||
(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){function e(t){for(var e=t.css("visibility");"inherit"===e;)t=t.parent(),e=t.css("visibility");return"hidden"!==e}function i(t){for(var e,i;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}function s(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=n(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function n(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,o)}function o(){t.datepicker._isDisabledDatepicker(p.inline?p.dpDiv.parent()[0]:p.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function a(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}function r(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.ui=t.ui||{},t.ui.version="1.12.1";var h=0,l=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},h=e.split(".")[0];e=e.split(".")[1];var l=h+"-"+e;return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][l.toLowerCase()]=function(e){return!!t.data(e,l)},t[h]=t[h]||{},n=t[h][e],o=t[h][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(r[e]=s,void 0)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:h,widgetName:e,widgetFullName:l}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,s,n=l.call(arguments,1),o=0,a=n.length;a>Line truncated
|
||||
},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,n,o,a=this.options,r=this._isRootNode(this.scrollParent[0]),h=t.pageX,l=t.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,h=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o),"y"===a.axis&&(h=this.originalPageX),"x"===a.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,s){var n=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,n))})},stop:function(e,i,s){var n=t.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,t.each(s.sortables,function(){var t=this;t.isOver?(t.isOver=0,s.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,n))})},drag:function(e,i,s){t.each(s.sortables,function(){var n=!1,o=this;o.positionAbs=s.positionAbs,o.helperProportions=s.helperProportions,o.offset.click=s.offset.click,o._intersectsWith(o.containerCache)&&(n=!0,t.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(n=!1),n})),n?(o.isOver||(o.isOver=1,s._parent=i.helper.parent(),o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=s.offset.click.top,o.offset.click.left=s.offset.click.left,o.offset.parent.left-=s.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=s.offset.parent.top-o.offset.parent.top,s._trigger("toSortable",e),s.dropped=o.element,t.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,o.fromOutside=s),o.currentItem&&(o._mouseDrag(e),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(e),i.position=s._generatePosition(e,!0),s._trigger("fromSortable",e),s.dropped=!1,t.each(s.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor"Line truncated
|
||||
t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,g=s.maxWidth&&p>s.maxWidth,m=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(p+=l),v&&(f+=c),g&&(p-=l),m&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable,t.widget("ui.selectable",t.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e.elementPos=t(e.element[0]).offset(),e.selectees=t(e.options.filter,e.element[0]),e._addClass(e.selectees,"ui-selectee"),e.selectees.each(function(){var i=t(this),s=i.offset(),n={left:s.left-e.elementPos.left,top:s.top-e.elementPos.top};t.data(this,"selectable-item",{element:this,$element:i,left:n.left,top:n.top,right:n.left+i.outerWidth(),bottom:n.top+i.outerHeight(),startselected:!1,selected:i.hasClass("ui-selected"),selecting:i.hasClass("ui-selecting"),unselecting:i.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=t("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.elementPos=t(this.element[0]).offset(),this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(i._removeClass(s.$element,"ui-selected"),s.selected=!1,i._addClass(s.$element,"ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),i._removeClass(n.$element,s?"ui-unselecting":"ui-selected")._addClass(n.$element,s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):void 0}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,h=e.pageY;return o>r&&(i=r,r=o,o=i),a>h&&(i=h,h=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:h-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),l=!1,c={};i&&i.element!==s.element[0]&&(c.left=i.left+s.elementPos.left,c.right=i.right+s.elementPos.left,c.top=i.top+s.elementPos.top,c.bottom=i.bottom+s.elementPos.top,"touch"===n.tolerance?l=!(c.left>r||o>c.right||c.top>h||a>c.bottom):"fit"===n.tolerance&&(l=c.left>o&&r>c.right&&c.top>a&&h>c.bottom),l?(i.selected&&(s._removeClass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(s._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(s._addClass(i.$element,"ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaLine truncated
|
||||
},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?(this._activate(e),void 0):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),void 0)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:o=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[s-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),t(o).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var e=t(this),i=e.uniqueId().attr("id"),s=e.next(),n=s.uniqueId().attr("id");e.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===s?(e=n.height(),this.element.siblings(":visible").each(function(){var i=t(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(e-=i.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===s&&(e=0,this.headers.next().each(function(){var i=t(this).is(":visible");i||t(this).show(),e=Math.max(e,t(this).css("height","").height()),i||t(this).hide()}).height(e))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i,s,n=this.options,o=this.active,a=t(e.currentTarget),r=a[0]===o[0],h=r&&n.collapsible,l=h?t():a.next(),c=o.next(),u={oldHeader:o,oldPanel:c,newHeader:h?t():a,newPanel:l};e.preventDefault(),r&&!n.collapsible||this._trigger("beforeActivate",e,u)===!1||(n.active=h?!1:this.headers.index(a),this.active=r?t():a,this._toggle(u),this._removeClass(o,"ui-accordion-header-active","ui-state-active"),n.icons&&(i=o.children(".ui-accordion-header-icon"),this._removeClass(i,nulLine truncated
|
||||
},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]),t.ui.checkboxradio,t.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),t=this.element[0].disabled,null!=t&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(e){e.keyCode===t.ui.keyCode.SPACE&&(e.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(e,i){var s="iconPosition"!==e,n=s?this.options.iconPosition:i,o="top"===n||"bottom"===n;this.icon?s&&this._removeClass(this.icon,null,this.options.icon):(this.icon=t("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),s&&this._addClass(this.icon,null,i),this._attachIcon(n),o?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(n))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=void 0===t.showLabel?this.options.showLabel:t.showLabel,i=void 0===t.icon?this.options.icon:t.icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),this.element[0].disabled=e,e&&this.element.blur())},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),t.uiBackCompat!==!1&&(t.widget("ui.button",t.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){return"text"===t?(this._super("showLabel",e),void 0):("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments),void 0)}}),t.fn.button=function(e){return function(){return!this.length||this.length&&"INPUT"!==this[0Line truncated
|
||||
break;case U[1]-1:T+=" ui-datepicker-group-last",I=" ui-corner-"+(j?"left":"right");break;default:T+=" ui-datepicker-group-middle",I=""}T+="'>"}for(T+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+I+"'>"+(/all|left/.test(I)&&0===k?j?o:s:"")+(/all|right/.test(I)&&0===k?j?s:o:"")+this._generateMonthYearHeader(t,Z,te,Q,J,k>0||C>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",P=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)M=(w+c)%7,P+="<th scope='col'"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[M]+"'>"+p[M]+"</span></th>";for(T+=P+"</tr></thead><tbody>",S=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),N=(this._getFirstDayOfMonth(te,Z)-c+7)%7,H=Math.ceil((N+S)/7),A=$?this.maxRows>H?this.maxRows:H:H,this.maxRows=A,z=this._daylightSavingAdjust(new Date(te,Z,1-N)),O=0;A>O;O++){for(T+="<tr>",E=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(z)+"</td>":"",w=0;7>w;w++)W=m?m.apply(t.input?t.input[0]:null,[z]):[!0,""],F=z.getMonth()!==Z,L=F&&!v||!W[0]||Q&&Q>z||J&&z>J,E+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(z.getTime()===D.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===z.getTime()&&b.getTime()===D.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!_?"":" "+W[1]+(z.getTime()===G.getTime()?" "+this._currentClass:"")+(z.getTime()===Y.getTime()?" ui-datepicker-today":""))+"'"+(F&&!_||!W[2]?"":" title='"+W[2].replace(/'/g,"'")+"'")+(L?"":" data-handler='selectDay' data-event='click' data-month='"+z.getMonth()+"' data-year='"+z.getFullYear()+"'")+">"+(F&&!_?" ":L?"<span class='ui-state-default'>"+z.getDate()+"</span>":"<a class='ui-state-default"+(z.getTime()===Y.getTime()?" ui-state-highlight":"")+(z.getTime()===G.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+z.getDate()+"</a>")+"</td>",z.setDate(z.getDate()+1),z=this._daylightSavingAdjust(z);T+=E+"</tr>"}Z++,Z>11&&(Z=0,te++),T+="</tbody></table>"+($?"</div>"+(U[0]>0&&C===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=T}y+=x}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var h,l,c,u,d,p,f,g,m=this._get(t,"changeMonth"),_=this._get(t,"changeYear"),v=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(v||(b+=y+(!o&&m&&_?"":" ")),!t.yearshtml)if(t.yearshtml="",o||!_)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),v&&(b+=(!o&&m&&_?"":" ")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=Line truncated
|
||||
},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,h,l,c=this,u=this.options;return u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-c.values(e));(n>i||n===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),h=o.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-o.width()/2,top:e.pageY-h.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n,o=this.value(),a=this.values();this._hasMultipleValues()&&(n=this.values(e?0:1),o=this.values(e),2===this.options.values.length&&this.options.range===!0&&(i=0===e?Math.min(n,i):Math.max(n,i)),a[e]=i),i!==o&&(s=this._trigger("slide",t,this._uiHash(e,i,a)),s!==!1&&(this._hasMultipleValues()?this.values(e,i):this.value(i)))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),void 0;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),this._super(e,i),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(i),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=n-1;s>=0;s--)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.valuesLine truncated
|
||||
}),o.closing=!0,this._trigger("close",e,{tooltip:i}),o.hiding||(o.closing=!1)),void 0):(n.removeData("ui-tooltip-open"),void 0)},_tooltip:function(e){var i=t("<div>").attr("role","tooltip"),s=t("<div>").appendTo(i),n=i.uniqueId().attr("id");return this._addClass(s,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(e)),this.tooltips[n]={element:e,tooltip:i}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur"),o=s.element;n.target=n.currentTarget=o[0],e.close(n,!0),t("#"+i).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),t.uiBackCompat!==!1&&t.widget("ui.tooltip",t.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}}),t.ui.tooltip;var f="ui-effects-",g="ui-effects-style",m="ui-effects-animated",_=t;t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,o){var a,r=o.re.exec(i),h=r&&o.parse(r),l=o.space||"rgba";return h?(a=s[l](h),s[c[l].cache]=a[c[l].cache],n=s._rgba=a._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,a,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,r,h],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&0>t.inArray(null,u[o].slice(0,3))&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,o){var a,r=i[o.cache];return r&&(a=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),o=c[n],a=0===this.alpha()?l("transparent"):this,r=a[o.cache]||o.to(a._rgba),h=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],l=s[o],c=u[n.type]||{};null!==l&&(null===a?h[o]=l:(c.mod&&(l-a>c.mod/2?a+=c.mod:a-l>c.mod/2&&(a-=c.mod)),h[o]=i((l-a)*e+a,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+"Line truncated
|
||||
@@ -1,886 +0,0 @@
|
||||
/*!
|
||||
* jQuery UI CSS Framework 1.12.1
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://api.jqueryui.com/category/theming/
|
||||
*/
|
||||
.ui-draggable-handle {
|
||||
-ms-touch-action: none;
|
||||
touch-action: none;
|
||||
}
|
||||
/* Layout helpers
|
||||
----------------------------------*/
|
||||
.ui-helper-hidden {
|
||||
display: none;
|
||||
}
|
||||
.ui-helper-hidden-accessible {
|
||||
border: 0;
|
||||
clip: rect(0 0 0 0);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
}
|
||||
.ui-helper-reset {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
line-height: 1.3;
|
||||
text-decoration: none;
|
||||
font-size: 100%;
|
||||
list-style: none;
|
||||
}
|
||||
.ui-helper-clearfix:before,
|
||||
.ui-helper-clearfix:after {
|
||||
content: "";
|
||||
display: table;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.ui-helper-clearfix:after {
|
||||
clear: both;
|
||||
}
|
||||
.ui-helper-zfix {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
filter:Alpha(Opacity=0); /* support: IE8 */
|
||||
}
|
||||
|
||||
.ui-front {
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-disabled {
|
||||
cursor: default !important;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
.ui-icon {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-top: -.25em;
|
||||
position: relative;
|
||||
text-indent: -99999px;
|
||||
overflow: hidden;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.ui-widget-icon-block {
|
||||
left: 50%;
|
||||
margin-left: -8px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.ui-resizable {
|
||||
position: relative;
|
||||
}
|
||||
.ui-resizable-handle {
|
||||
position: absolute;
|
||||
font-size: 0.1px;
|
||||
display: block;
|
||||
-ms-touch-action: none;
|
||||
touch-action: none;
|
||||
}
|
||||
.ui-resizable-disabled .ui-resizable-handle,
|
||||
.ui-resizable-autohide .ui-resizable-handle {
|
||||
display: none;
|
||||
}
|
||||
.ui-resizable-n {
|
||||
cursor: n-resize;
|
||||
height: 7px;
|
||||
width: 100%;
|
||||
top: -5px;
|
||||
left: 0;
|
||||
}
|
||||
.ui-resizable-s {
|
||||
cursor: s-resize;
|
||||
height: 7px;
|
||||
width: 100%;
|
||||
bottom: -5px;
|
||||
left: 0;
|
||||
}
|
||||
.ui-resizable-e {
|
||||
cursor: e-resize;
|
||||
width: 7px;
|
||||
right: -5px;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
}
|
||||
.ui-resizable-w {
|
||||
cursor: w-resize;
|
||||
width: 7px;
|
||||
left: -5px;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
}
|
||||
.ui-resizable-se {
|
||||
cursor: se-resize;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
right: 1px;
|
||||
bottom: 1px;
|
||||
}
|
||||
.ui-resizable-sw {
|
||||
cursor: sw-resize;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
left: -5px;
|
||||
bottom: -5px;
|
||||
}
|
||||
.ui-resizable-nw {
|
||||
cursor: nw-resize;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
left: -5px;
|
||||
top: -5px;
|
||||
}
|
||||
.ui-resizable-ne {
|
||||
cursor: ne-resize;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
right: -5px;
|
||||
top: -5px;
|
||||
}
|
||||
.ui-selectable {
|
||||
-ms-touch-action: none;
|
||||
touch-action: none;
|
||||
}
|
||||
.ui-selectable-helper {
|
||||
position: absolute;
|
||||
z-index: 100;
|
||||
border: 1px dotted black;
|
||||
}
|
||||
.ui-sortable-handle {
|
||||
-ms-touch-action: none;
|
||||
touch-action: none;
|
||||
}
|
||||
.ui-accordion .ui-accordion-header {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
margin: 2px 0 0 0;
|
||||
padding: .5em .5em .5em .7em;
|
||||
font-size: 100%;
|
||||
}
|
||||
.ui-accordion .ui-accordion-content {
|
||||
padding: 1em 2.2em;
|
||||
border-top: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
.ui-autocomplete {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
cursor: default;
|
||||
}
|
||||
.ui-menu {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
display: block;
|
||||
outline: 0;
|
||||
}
|
||||
.ui-menu .ui-menu {
|
||||
position: absolute;
|
||||
}
|
||||
.ui-menu .ui-menu-item {
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
/* support: IE10, see #8844 */
|
||||
list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
|
||||
}
|
||||
.ui-menu .ui-menu-item-wrapper {
|
||||
position: relative;
|
||||
padding: 3px 1em 3px .4em;
|
||||
}
|
||||
.ui-menu .ui-menu-divider {
|
||||
margin: 5px 0;
|
||||
height: 0;
|
||||
font-size: 0;
|
||||
line-height: 0;
|
||||
border-width: 1px 0 0 0;
|
||||
}
|
||||
.ui-menu .ui-state-focus,
|
||||
.ui-menu .ui-state-active {
|
||||
margin: -1px;
|
||||
}
|
||||
|
||||
/* icon support */
|
||||
.ui-menu-icons {
|
||||
position: relative;
|
||||
}
|
||||
.ui-menu-icons .ui-menu-item-wrapper {
|
||||
padding-left: 2em;
|
||||
}
|
||||
|
||||
/* left-aligned */
|
||||
.ui-menu .ui-icon {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: .2em;
|
||||
margin: auto 0;
|
||||
}
|
||||
|
||||
/* right-aligned */
|
||||
.ui-menu .ui-menu-icon {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
.ui-button {
|
||||
padding: .4em 1em;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
line-height: normal;
|
||||
margin-right: .1em;
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
|
||||
/* Support: IE <= 11 */
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.ui-button,
|
||||
.ui-button:link,
|
||||
.ui-button:visited,
|
||||
.ui-button:hover,
|
||||
.ui-button:active {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* to make room for the icon, a width needs to be set here */
|
||||
.ui-button-icon-only {
|
||||
width: 2em;
|
||||
box-sizing: border-box;
|
||||
text-indent: -9999px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* no icon support for input elements */
|
||||
input.ui-button.ui-button-icon-only {
|
||||
text-indent: 0;
|
||||
}
|
||||
|
||||
/* button icon element(s) */
|
||||
.ui-button-icon-only .ui-icon {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-top: -8px;
|
||||
margin-left: -8px;
|
||||
}
|
||||
|
||||
.ui-button.ui-icon-notext .ui-icon {
|
||||
padding: 0;
|
||||
width: 2.1em;
|
||||
height: 2.1em;
|
||||
text-indent: -9999px;
|
||||
white-space: nowrap;
|
||||
|
||||
}
|
||||
|
||||
input.ui-button.ui-icon-notext .ui-icon {
|
||||
width: auto;
|
||||
height: auto;
|
||||
text-indent: 0;
|
||||
white-space: normal;
|
||||
padding: .4em 1em;
|
||||
}
|
||||
|
||||
/* workarounds */
|
||||
/* Support: Firefox 5 - 40 */
|
||||
input.ui-button::-moz-focus-inner,
|
||||
button.ui-button::-moz-focus-inner {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.ui-controlgroup {
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
}
|
||||
.ui-controlgroup > .ui-controlgroup-item {
|
||||
float: left;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
.ui-controlgroup > .ui-controlgroup-item:focus,
|
||||
.ui-controlgroup > .ui-controlgroup-item.ui-visual-focus {
|
||||
z-index: 9999;
|
||||
}
|
||||
.ui-controlgroup-vertical > .ui-controlgroup-item {
|
||||
display: block;
|
||||
float: none;
|
||||
width: 100%;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
text-align: left;
|
||||
}
|
||||
.ui-controlgroup-vertical .ui-controlgroup-item {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.ui-controlgroup .ui-controlgroup-label {
|
||||
padding: .4em 1em;
|
||||
}
|
||||
.ui-controlgroup .ui-controlgroup-label span {
|
||||
font-size: 80%;
|
||||
}
|
||||
.ui-controlgroup-horizontal .ui-controlgroup-label + .ui-controlgroup-item {
|
||||
border-left: none;
|
||||
}
|
||||
.ui-controlgroup-vertical .ui-controlgroup-label + .ui-controlgroup-item {
|
||||
border-top: none;
|
||||
}
|
||||
.ui-controlgroup-horizontal .ui-controlgroup-label.ui-widget-content {
|
||||
border-right: none;
|
||||
}
|
||||
.ui-controlgroup-vertical .ui-controlgroup-label.ui-widget-content {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/* Spinner specific style fixes */
|
||||
.ui-controlgroup-vertical .ui-spinner-input {
|
||||
|
||||
/* Support: IE8 only, Android < 4.4 only */
|
||||
width: 75%;
|
||||
width: calc( 100% - 2.4em );
|
||||
}
|
||||
.ui-controlgroup-vertical .ui-spinner .ui-spinner-up {
|
||||
border-top-style: solid;
|
||||
}
|
||||
|
||||
.ui-checkboxradio-label .ui-icon-background {
|
||||
box-shadow: inset 1px 1px 1px #ccc;
|
||||
border-radius: .12em;
|
||||
border: none;
|
||||
}
|
||||
.ui-checkboxradio-radio-label .ui-icon-background {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 1em;
|
||||
overflow: visible;
|
||||
border: none;
|
||||
}
|
||||
.ui-checkboxradio-radio-label.ui-checkboxradio-checked .ui-icon,
|
||||
.ui-checkboxradio-radio-label.ui-checkboxradio-checked:hover .ui-icon {
|
||||
background-image: none;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-width: 4px;
|
||||
border-style: solid;
|
||||
}
|
||||
.ui-checkboxradio-disabled {
|
||||
pointer-events: none;
|
||||
}
|
||||
.ui-datepicker {
|
||||
width: 17em;
|
||||
padding: .2em .2em 0;
|
||||
display: none;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-header {
|
||||
position: relative;
|
||||
padding: .2em 0;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-prev,
|
||||
.ui-datepicker .ui-datepicker-next {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
width: 1.8em;
|
||||
height: 1.8em;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-prev-hover,
|
||||
.ui-datepicker .ui-datepicker-next-hover {
|
||||
top: 1px;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-prev {
|
||||
left: 2px;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-next {
|
||||
right: 2px;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-prev-hover {
|
||||
left: 1px;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-next-hover {
|
||||
right: 1px;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-prev span,
|
||||
.ui-datepicker .ui-datepicker-next span {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
margin-left: -8px;
|
||||
top: 50%;
|
||||
margin-top: -8px;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-title {
|
||||
margin: 0 2.3em;
|
||||
line-height: 1.8em;
|
||||
text-align: center;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-title select {
|
||||
font-size: 1em;
|
||||
margin: 1px 0;
|
||||
}
|
||||
.ui-datepicker select.ui-datepicker-month,
|
||||
.ui-datepicker select.ui-datepicker-year {
|
||||
width: 45%;
|
||||
}
|
||||
.ui-datepicker table {
|
||||
width: 100%;
|
||||
font-size: .9em;
|
||||
border-collapse: collapse;
|
||||
margin: 0 0 .4em;
|
||||
}
|
||||
.ui-datepicker th {
|
||||
padding: .7em .3em;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
border: 0;
|
||||
}
|
||||
.ui-datepicker td {
|
||||
border: 0;
|
||||
padding: 1px;
|
||||
}
|
||||
.ui-datepicker td span,
|
||||
.ui-datepicker td a {
|
||||
display: block;
|
||||
padding: .2em;
|
||||
text-align: right;
|
||||
text-decoration: none;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-buttonpane {
|
||||
background-image: none;
|
||||
margin: .7em 0 0 0;
|
||||
padding: 0 .2em;
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
border-bottom: 0;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-buttonpane button {
|
||||
float: right;
|
||||
margin: .5em .2em .4em;
|
||||
cursor: pointer;
|
||||
padding: .2em .6em .3em .6em;
|
||||
width: auto;
|
||||
overflow: visible;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
|
||||
float: left;
|
||||
}
|
||||
|
||||
/* with multiple calendars */
|
||||
.ui-datepicker.ui-datepicker-multi {
|
||||
width: auto;
|
||||
}
|
||||
.ui-datepicker-multi .ui-datepicker-group {
|
||||
float: left;
|
||||
}
|
||||
.ui-datepicker-multi .ui-datepicker-group table {
|
||||
width: 95%;
|
||||
margin: 0 auto .4em;
|
||||
}
|
||||
.ui-datepicker-multi-2 .ui-datepicker-group {
|
||||
width: 50%;
|
||||
}
|
||||
.ui-datepicker-multi-3 .ui-datepicker-group {
|
||||
width: 33.3%;
|
||||
}
|
||||
.ui-datepicker-multi-4 .ui-datepicker-group {
|
||||
width: 25%;
|
||||
}
|
||||
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
|
||||
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
|
||||
border-left-width: 0;
|
||||
}
|
||||
.ui-datepicker-multi .ui-datepicker-buttonpane {
|
||||
clear: left;
|
||||
}
|
||||
.ui-datepicker-row-break {
|
||||
clear: both;
|
||||
width: 100%;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
/* RTL support */
|
||||
.ui-datepicker-rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-prev {
|
||||
right: 2px;
|
||||
left: auto;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-next {
|
||||
left: 2px;
|
||||
right: auto;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-prev:hover {
|
||||
right: 1px;
|
||||
left: auto;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-next:hover {
|
||||
left: 1px;
|
||||
right: auto;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane {
|
||||
clear: right;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button {
|
||||
float: left;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
|
||||
.ui-datepicker-rtl .ui-datepicker-group {
|
||||
float: right;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
|
||||
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
|
||||
border-right-width: 0;
|
||||
border-left-width: 1px;
|
||||
}
|
||||
|
||||
/* Icons */
|
||||
.ui-datepicker .ui-icon {
|
||||
display: block;
|
||||
text-indent: -99999px;
|
||||
overflow: hidden;
|
||||
background-repeat: no-repeat;
|
||||
left: .5em;
|
||||
top: .3em;
|
||||
}
|
||||
.ui-dialog {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
padding: .2em;
|
||||
outline: 0;
|
||||
}
|
||||
.ui-dialog .ui-dialog-titlebar {
|
||||
padding: .4em 1em;
|
||||
position: relative;
|
||||
}
|
||||
.ui-dialog .ui-dialog-title {
|
||||
float: left;
|
||||
margin: .1em 0;
|
||||
white-space: nowrap;
|
||||
width: 90%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.ui-dialog .ui-dialog-titlebar-close {
|
||||
position: absolute;
|
||||
right: .3em;
|
||||
top: 50%;
|
||||
width: 20px;
|
||||
margin: -10px 0 0 0;
|
||||
padding: 1px;
|
||||
height: 20px;
|
||||
}
|
||||
.ui-dialog .ui-dialog-content {
|
||||
position: relative;
|
||||
border: 0;
|
||||
padding: .5em 1em;
|
||||
background: none;
|
||||
overflow: auto;
|
||||
}
|
||||
.ui-dialog .ui-dialog-buttonpane {
|
||||
text-align: left;
|
||||
border-width: 1px 0 0 0;
|
||||
background-image: none;
|
||||
margin-top: .5em;
|
||||
padding: .3em 1em .5em .4em;
|
||||
}
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
|
||||
float: right;
|
||||
}
|
||||
.ui-dialog .ui-dialog-buttonpane button {
|
||||
margin: .5em .4em .5em 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
.ui-dialog .ui-resizable-n {
|
||||
height: 2px;
|
||||
top: 0;
|
||||
}
|
||||
.ui-dialog .ui-resizable-e {
|
||||
width: 2px;
|
||||
right: 0;
|
||||
}
|
||||
.ui-dialog .ui-resizable-s {
|
||||
height: 2px;
|
||||
bottom: 0;
|
||||
}
|
||||
.ui-dialog .ui-resizable-w {
|
||||
width: 2px;
|
||||
left: 0;
|
||||
}
|
||||
.ui-dialog .ui-resizable-se,
|
||||
.ui-dialog .ui-resizable-sw,
|
||||
.ui-dialog .ui-resizable-ne,
|
||||
.ui-dialog .ui-resizable-nw {
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
}
|
||||
.ui-dialog .ui-resizable-se {
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
.ui-dialog .ui-resizable-sw {
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
.ui-dialog .ui-resizable-ne {
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
.ui-dialog .ui-resizable-nw {
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
.ui-draggable .ui-dialog-titlebar {
|
||||
cursor: move;
|
||||
}
|
||||
.ui-progressbar {
|
||||
height: 2em;
|
||||
text-align: left;
|
||||
overflow: hidden;
|
||||
}
|
||||
.ui-progressbar .ui-progressbar-value {
|
||||
margin: -1px;
|
||||
height: 100%;
|
||||
}
|
||||
.ui-progressbar .ui-progressbar-overlay {
|
||||
background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");
|
||||
height: 100%;
|
||||
filter: alpha(opacity=25); /* support: IE8 */
|
||||
opacity: 0.25;
|
||||
}
|
||||
.ui-progressbar-indeterminate .ui-progressbar-value {
|
||||
background-image: none;
|
||||
}
|
||||
.ui-selectmenu-menu {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: none;
|
||||
}
|
||||
.ui-selectmenu-menu .ui-menu {
|
||||
overflow: auto;
|
||||
overflow-x: hidden;
|
||||
padding-bottom: 1px;
|
||||
}
|
||||
.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup {
|
||||
font-size: 1em;
|
||||
font-weight: bold;
|
||||
line-height: 1.5;
|
||||
padding: 2px 0.4em;
|
||||
margin: 0.5em 0 0 0;
|
||||
height: auto;
|
||||
border: 0;
|
||||
}
|
||||
.ui-selectmenu-open {
|
||||
display: block;
|
||||
}
|
||||
.ui-selectmenu-text {
|
||||
display: block;
|
||||
margin-right: 20px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.ui-selectmenu-button.ui-button {
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
width: 14em;
|
||||
}
|
||||
.ui-selectmenu-icon.ui-icon {
|
||||
float: right;
|
||||
margin-top: 0;
|
||||
}
|
||||
.ui-slider {
|
||||
position: relative;
|
||||
text-align: left;
|
||||
}
|
||||
.ui-slider .ui-slider-handle {
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
width: 1.2em;
|
||||
height: 1.2em;
|
||||
cursor: default;
|
||||
-ms-touch-action: none;
|
||||
touch-action: none;
|
||||
}
|
||||
.ui-slider .ui-slider-range {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
font-size: .7em;
|
||||
display: block;
|
||||
border: 0;
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
/* support: IE8 - See #6727 */
|
||||
.ui-slider.ui-state-disabled .ui-slider-handle,
|
||||
.ui-slider.ui-state-disabled .ui-slider-range {
|
||||
filter: inherit;
|
||||
}
|
||||
|
||||
.ui-slider-horizontal {
|
||||
height: .8em;
|
||||
}
|
||||
.ui-slider-horizontal .ui-slider-handle {
|
||||
top: -.3em;
|
||||
margin-left: -.6em;
|
||||
}
|
||||
.ui-slider-horizontal .ui-slider-range {
|
||||
top: 0;
|
||||
height: 100%;
|
||||
}
|
||||
.ui-slider-horizontal .ui-slider-range-min {
|
||||
left: 0;
|
||||
}
|
||||
.ui-slider-horizontal .ui-slider-range-max {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.ui-slider-vertical {
|
||||
width: .8em;
|
||||
height: 100px;
|
||||
}
|
||||
.ui-slider-vertical .ui-slider-handle {
|
||||
left: -.3em;
|
||||
margin-left: 0;
|
||||
margin-bottom: -.6em;
|
||||
}
|
||||
.ui-slider-vertical .ui-slider-range {
|
||||
left: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.ui-slider-vertical .ui-slider-range-min {
|
||||
bottom: 0;
|
||||
}
|
||||
.ui-slider-vertical .ui-slider-range-max {
|
||||
top: 0;
|
||||
}
|
||||
.ui-spinner {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.ui-spinner-input {
|
||||
border: none;
|
||||
background: none;
|
||||
color: inherit;
|
||||
padding: .222em 0;
|
||||
margin: .2em 0;
|
||||
vertical-align: middle;
|
||||
margin-left: .4em;
|
||||
margin-right: 2em;
|
||||
}
|
||||
.ui-spinner-button {
|
||||
width: 1.6em;
|
||||
height: 50%;
|
||||
font-size: .5em;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
cursor: default;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
right: 0;
|
||||
}
|
||||
/* more specificity required here to override default borders */
|
||||
.ui-spinner a.ui-spinner-button {
|
||||
border-top-style: none;
|
||||
border-bottom-style: none;
|
||||
border-right-style: none;
|
||||
}
|
||||
.ui-spinner-up {
|
||||
top: 0;
|
||||
}
|
||||
.ui-spinner-down {
|
||||
bottom: 0;
|
||||
}
|
||||
.ui-tabs {
|
||||
position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
||||
padding: .2em;
|
||||
}
|
||||
.ui-tabs .ui-tabs-nav {
|
||||
margin: 0;
|
||||
padding: .2em .2em 0;
|
||||
}
|
||||
.ui-tabs .ui-tabs-nav li {
|
||||
list-style: none;
|
||||
float: left;
|
||||
position: relative;
|
||||
top: 0;
|
||||
margin: 1px .2em 0 0;
|
||||
border-bottom-width: 0;
|
||||
padding: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.ui-tabs .ui-tabs-nav .ui-tabs-anchor {
|
||||
float: left;
|
||||
padding: .5em 1em;
|
||||
text-decoration: none;
|
||||
}
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-active {
|
||||
margin-bottom: -1px;
|
||||
padding-bottom: 1px;
|
||||
}
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
|
||||
.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
|
||||
cursor: text;
|
||||
}
|
||||
.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
|
||||
cursor: pointer;
|
||||
}
|
||||
.ui-tabs .ui-tabs-panel {
|
||||
display: block;
|
||||
border-width: 0;
|
||||
padding: 1em 1.4em;
|
||||
background: none;
|
||||
}
|
||||
.ui-tooltip {
|
||||
padding: 8px;
|
||||
position: absolute;
|
||||
z-index: 9999;
|
||||
max-width: 300px;
|
||||
}
|
||||
body .ui-tooltip {
|
||||
border-width: 2px;
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
/*! jQuery UI - v1.12.1 - 2020-02-17
|
||||
* http://jqueryui.com
|
||||
* Copyright jQuery Foundation and other contributors; Licensed MIT */
|
||||
|
||||
.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;font-size:100%}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-button{padding:.4em 1em;display:inline-block;position:relative;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2em;box-sizing:border-box;text-indent:-9999px;white-space:nowrap}input.ui-button.ui-button-icon-only{text-indent:0}.ui-button-icon-only .ui-icon{position:absolute;top:50%;left:50%;margin-top:-8px;margin-left:-8px}.ui-button.ui-icon-notext .ui-icon{padding:0;width:2.1em;height:2.1em;text-indent:-9999px;white-space:nowrap}input.ui-button.ui-icon-notext .ui-icon{width:auto;height:auto;text-indent:0;white-space:normal;padding:.4em 1em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-controlgroup{vertical-align:middle;display:inline-block}.ui-controlgroup > .ui-controlgroup-item{float:left;margin-left:0;margin-right:0}.ui-controlgroup > .ui-controlgroup-item:focus,.ui-controlgroup > .ui-controlgroup-item.ui-visual-focus{z-index:9999}.ui-controlgroup-vertical > .ui-controlgroup-item{display:block;float:none;width:100%;margin-top:0;margin-bottom:0;text-align:left}.ui-controlgroup-vertical .ui-controlgroup-item{box-sizing:border-box}.ui-controlgroup .ui-controlgroup-label{padding:.4em 1em}.ui-controlgroup .ui-controlgroup-label span{font-size:80%}.ui-controlgroup-horizontal .ui-controlgroup-label + .ui-controlgroup-item{border-left:none}.ui-controlgroup-vertical .ui-controlgroup-label + .ui-controlgroup-item{border-top:none}.ui-controlgroup-horizontal .ui-controlgroup-label.ui-widget-content{border-right:none}.ui-controlgroup-vertical .ui-controlgroup-label.ui-widget-content{border-bottom:none}.ui-controlgroup-vertical .ui-spinner-input{width:75%;width:calc( 100% - 2.4em )}.ui-controlgroup-vertical .ui-spinner .ui-spinner-up{border-top-style:solid}.ui-checkboxradio-label .ui-icon-backgLine truncated
|
||||
@@ -1,443 +0,0 @@
|
||||
/*!
|
||||
* jQuery UI CSS Framework 1.12.1
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://api.jqueryui.com/category/theming/
|
||||
*
|
||||
* To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=hot-sneaks&cornerRadiusShadow=5px&offsetLeftShadow=8px&offsetTopShadow=8px&thicknessShadow=10px&opacityShadow=20&bgImgOpacityShadow=75&bgTextureShadow=flat&bgColorShadow=ba9217&opacityOverlay=80&bgImgOpacityOverlay=85&bgTextureOverlay=white_lines&bgColorOverlay=f7f7ba&iconColorError=ffeb33&fcError=ffffff&borderColorError=ff6b7f&bgImgOpacityError=50&bgTextureError=diagonals_small&bgColorError=ff3853&iconColorHighlight=88a206&fcHighlight=363636&borderColorHighlight=b4d100&bgImgOpacityHighlight=80&bgTextureHighlight=dots_medium&bgColorHighlight=ffff38&iconColorActive=ffffff&fcActive=ffffff&borderColorActive=ff6b7f&bgImgOpacityActive=40&bgTextureActive=diagonals_small&bgColorActive=db4865&iconColorHover=454545&fcHover=212121&borderColorHover=999999&bgImgOpacityHover=75&bgTextureHover=diagonals_small&bgColorHover=ccd232&iconColorDefault=ffffff&fcDefault=333333&borderColorDefault=93c3cd&bgImgOpacityDefault=50&bgTextureDefault=diagonals_small&bgColorDefault=93c3cd&iconColorContent=c02669&fcContent=2c4359&borderColorContent=aaaaaa&bgImgOpacityContent=75&bgTextureContent=flat&bgColorContent=ffffff&iconColorHeader=e1e463&fcHeader=e1e463&borderColorHeader=2c4359&bgImgOpacityHeader=35&bgTextureHeader=dots_small&bgColorHeader=35414f&cornerRadius=4px&fsDefault=1.2em&fwDefault=bold&ffDefault=Gill%20Sans%2CArial%2Csans-serif
|
||||
*/
|
||||
|
||||
|
||||
/* Component containers
|
||||
----------------------------------*/
|
||||
.ui-widget {
|
||||
font-family: Gill Sans,Arial,sans-serif;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
.ui-widget .ui-widget {
|
||||
font-size: 1em;
|
||||
}
|
||||
.ui-widget input,
|
||||
.ui-widget select,
|
||||
.ui-widget textarea,
|
||||
.ui-widget button {
|
||||
font-family: Gill Sans,Arial,sans-serif;
|
||||
font-size: 1em;
|
||||
}
|
||||
.ui-widget.ui-widget-content {
|
||||
border: 1px solid #93c3cd;
|
||||
}
|
||||
.ui-widget-content {
|
||||
border: 1px solid #aaaaaa;
|
||||
background: #ffffff;
|
||||
color: #2c4359;
|
||||
}
|
||||
.ui-widget-content a {
|
||||
color: #2c4359;
|
||||
}
|
||||
.ui-widget-header {
|
||||
border: 1px solid #2c4359;
|
||||
background: #35414f url("images/ui-bg_dots-small_35_35414f_2x2.png") 50% 50% repeat;
|
||||
color: #e1e463;
|
||||
font-weight: bold;
|
||||
}
|
||||
.ui-widget-header a {
|
||||
color: #e1e463;
|
||||
}
|
||||
|
||||
/* Interaction states
|
||||
----------------------------------*/
|
||||
.ui-state-default,
|
||||
.ui-widget-content .ui-state-default,
|
||||
.ui-widget-header .ui-state-default,
|
||||
.ui-button,
|
||||
|
||||
/* We use html here because we need a greater specificity to make sure disabled
|
||||
works properly when clicked or hovered */
|
||||
html .ui-button.ui-state-disabled:hover,
|
||||
html .ui-button.ui-state-disabled:active {
|
||||
border: 1px solid #93c3cd;
|
||||
background: #93c3cd url("images/ui-bg_diagonals-small_50_93c3cd_40x40.png") 50% 50% repeat;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
.ui-state-default a,
|
||||
.ui-state-default a:link,
|
||||
.ui-state-default a:visited,
|
||||
a.ui-button,
|
||||
a:link.ui-button,
|
||||
a:visited.ui-button,
|
||||
.ui-button {
|
||||
color: #333333;
|
||||
text-decoration: none;
|
||||
}
|
||||
.ui-state-hover,
|
||||
.ui-widget-content .ui-state-hover,
|
||||
.ui-widget-header .ui-state-hover,
|
||||
.ui-state-focus,
|
||||
.ui-widget-content .ui-state-focus,
|
||||
.ui-widget-header .ui-state-focus,
|
||||
.ui-button:hover,
|
||||
.ui-button:focus {
|
||||
border: 1px solid #999999;
|
||||
background: #ccd232 url("images/ui-bg_diagonals-small_75_ccd232_40x40.png") 50% 50% repeat;
|
||||
font-weight: bold;
|
||||
color: #212121;
|
||||
}
|
||||
.ui-state-hover a,
|
||||
.ui-state-hover a:hover,
|
||||
.ui-state-hover a:link,
|
||||
.ui-state-hover a:visited,
|
||||
.ui-state-focus a,
|
||||
.ui-state-focus a:hover,
|
||||
.ui-state-focus a:link,
|
||||
.ui-state-focus a:visited,
|
||||
a.ui-button:hover,
|
||||
a.ui-button:focus {
|
||||
color: #212121;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.ui-visual-focus {
|
||||
box-shadow: 0 0 3px 1px rgb(94, 158, 214);
|
||||
}
|
||||
.ui-state-active,
|
||||
.ui-widget-content .ui-state-active,
|
||||
.ui-widget-header .ui-state-active,
|
||||
a.ui-button:active,
|
||||
.ui-button:active,
|
||||
.ui-button.ui-state-active:hover {
|
||||
border: 1px solid #ff6b7f;
|
||||
background: #db4865 url("images/ui-bg_diagonals-small_40_db4865_40x40.png") 50% 50% repeat;
|
||||
font-weight: bold;
|
||||
color: #ffffff;
|
||||
}
|
||||
.ui-icon-background,
|
||||
.ui-state-active .ui-icon-background {
|
||||
border: #ff6b7f;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.ui-state-active a,
|
||||
.ui-state-active a:link,
|
||||
.ui-state-active a:visited {
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-highlight,
|
||||
.ui-widget-content .ui-state-highlight,
|
||||
.ui-widget-header .ui-state-highlight {
|
||||
border: 1px solid #b4d100;
|
||||
background: #ffff38 url("images/ui-bg_dots-medium_80_ffff38_4x4.png") 50% 50% repeat;
|
||||
color: #363636;
|
||||
}
|
||||
.ui-state-checked {
|
||||
border: 1px solid #b4d100;
|
||||
background: #ffff38;
|
||||
}
|
||||
.ui-state-highlight a,
|
||||
.ui-widget-content .ui-state-highlight a,
|
||||
.ui-widget-header .ui-state-highlight a {
|
||||
color: #363636;
|
||||
}
|
||||
.ui-state-error,
|
||||
.ui-widget-content .ui-state-error,
|
||||
.ui-widget-header .ui-state-error {
|
||||
border: 1px solid #ff6b7f;
|
||||
background: #ff3853 url("images/ui-bg_diagonals-small_50_ff3853_40x40.png") 50% 50% repeat;
|
||||
color: #ffffff;
|
||||
}
|
||||
.ui-state-error a,
|
||||
.ui-widget-content .ui-state-error a,
|
||||
.ui-widget-header .ui-state-error a {
|
||||
color: #ffffff;
|
||||
}
|
||||
.ui-state-error-text,
|
||||
.ui-widget-content .ui-state-error-text,
|
||||
.ui-widget-header .ui-state-error-text {
|
||||
color: #ffffff;
|
||||
}
|
||||
.ui-priority-primary,
|
||||
.ui-widget-content .ui-priority-primary,
|
||||
.ui-widget-header .ui-priority-primary {
|
||||
font-weight: bold;
|
||||
}
|
||||
.ui-priority-secondary,
|
||||
.ui-widget-content .ui-priority-secondary,
|
||||
.ui-widget-header .ui-priority-secondary {
|
||||
opacity: .7;
|
||||
filter:Alpha(Opacity=70); /* support: IE8 */
|
||||
font-weight: normal;
|
||||
}
|
||||
.ui-state-disabled,
|
||||
.ui-widget-content .ui-state-disabled,
|
||||
.ui-widget-header .ui-state-disabled {
|
||||
opacity: .35;
|
||||
filter:Alpha(Opacity=35); /* support: IE8 */
|
||||
background-image: none;
|
||||
}
|
||||
.ui-state-disabled .ui-icon {
|
||||
filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
|
||||
}
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
.ui-icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
.ui-icon,
|
||||
.ui-widget-content .ui-icon {
|
||||
background-image: url("images/ui-icons_c02669_256x240.png");
|
||||
}
|
||||
.ui-widget-header .ui-icon {
|
||||
background-image: url("images/ui-icons_e1e463_256x240.png");
|
||||
}
|
||||
.ui-state-hover .ui-icon,
|
||||
.ui-state-focus .ui-icon,
|
||||
.ui-button:hover .ui-icon,
|
||||
.ui-button:focus .ui-icon {
|
||||
background-image: url("images/ui-icons_454545_256x240.png");
|
||||
}
|
||||
.ui-state-active .ui-icon,
|
||||
.ui-button:active .ui-icon {
|
||||
background-image: url("images/ui-icons_ffffff_256x240.png");
|
||||
}
|
||||
.ui-state-highlight .ui-icon,
|
||||
.ui-button .ui-state-highlight.ui-icon {
|
||||
background-image: url("images/ui-icons_88a206_256x240.png");
|
||||
}
|
||||
.ui-state-error .ui-icon,
|
||||
.ui-state-error-text .ui-icon {
|
||||
background-image: url("images/ui-icons_ffeb33_256x240.png");
|
||||
}
|
||||
.ui-button .ui-icon {
|
||||
background-image: url("images/ui-icons_ffffff_256x240.png");
|
||||
}
|
||||
|
||||
/* positioning */
|
||||
.ui-icon-blank { background-position: 16px 16px; }
|
||||
.ui-icon-caret-1-n { background-position: 0 0; }
|
||||
.ui-icon-caret-1-ne { background-position: -16px 0; }
|
||||
.ui-icon-caret-1-e { background-position: -32px 0; }
|
||||
.ui-icon-caret-1-se { background-position: -48px 0; }
|
||||
.ui-icon-caret-1-s { background-position: -65px 0; }
|
||||
.ui-icon-caret-1-sw { background-position: -80px 0; }
|
||||
.ui-icon-caret-1-w { background-position: -96px 0; }
|
||||
.ui-icon-caret-1-nw { background-position: -112px 0; }
|
||||
.ui-icon-caret-2-n-s { background-position: -128px 0; }
|
||||
.ui-icon-caret-2-e-w { background-position: -144px 0; }
|
||||
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
||||
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
||||
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
||||
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
||||
.ui-icon-triangle-1-s { background-position: -65px -16px; }
|
||||
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
||||
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
||||
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
||||
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
||||
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
||||
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
||||
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
||||
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
||||
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
||||
.ui-icon-arrow-1-s { background-position: -65px -32px; }
|
||||
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
||||
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
||||
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
||||
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
||||
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
||||
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
||||
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
||||
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
||||
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
||||
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
||||
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
||||
.ui-icon-arrowthick-1-n { background-position: 1px -48px; }
|
||||
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
||||
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
||||
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
||||
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
||||
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
||||
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
||||
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
||||
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
||||
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
||||
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
||||
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
||||
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
||||
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
||||
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
||||
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
||||
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
||||
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
||||
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
||||
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
||||
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
||||
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
||||
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
||||
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
||||
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
||||
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
||||
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
||||
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
||||
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
||||
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
||||
.ui-icon-extlink { background-position: -32px -80px; }
|
||||
.ui-icon-newwin { background-position: -48px -80px; }
|
||||
.ui-icon-refresh { background-position: -64px -80px; }
|
||||
.ui-icon-shuffle { background-position: -80px -80px; }
|
||||
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
||||
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
||||
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
||||
.ui-icon-folder-open { background-position: -16px -96px; }
|
||||
.ui-icon-document { background-position: -32px -96px; }
|
||||
.ui-icon-document-b { background-position: -48px -96px; }
|
||||
.ui-icon-note { background-position: -64px -96px; }
|
||||
.ui-icon-mail-closed { background-position: -80px -96px; }
|
||||
.ui-icon-mail-open { background-position: -96px -96px; }
|
||||
.ui-icon-suitcase { background-position: -112px -96px; }
|
||||
.ui-icon-comment { background-position: -128px -96px; }
|
||||
.ui-icon-person { background-position: -144px -96px; }
|
||||
.ui-icon-print { background-position: -160px -96px; }
|
||||
.ui-icon-trash { background-position: -176px -96px; }
|
||||
.ui-icon-locked { background-position: -192px -96px; }
|
||||
.ui-icon-unlocked { background-position: -208px -96px; }
|
||||
.ui-icon-bookmark { background-position: -224px -96px; }
|
||||
.ui-icon-tag { background-position: -240px -96px; }
|
||||
.ui-icon-home { background-position: 0 -112px; }
|
||||
.ui-icon-flag { background-position: -16px -112px; }
|
||||
.ui-icon-calendar { background-position: -32px -112px; }
|
||||
.ui-icon-cart { background-position: -48px -112px; }
|
||||
.ui-icon-pencil { background-position: -64px -112px; }
|
||||
.ui-icon-clock { background-position: -80px -112px; }
|
||||
.ui-icon-disk { background-position: -96px -112px; }
|
||||
.ui-icon-calculator { background-position: -112px -112px; }
|
||||
.ui-icon-zoomin { background-position: -128px -112px; }
|
||||
.ui-icon-zoomout { background-position: -144px -112px; }
|
||||
.ui-icon-search { background-position: -160px -112px; }
|
||||
.ui-icon-wrench { background-position: -176px -112px; }
|
||||
.ui-icon-gear { background-position: -192px -112px; }
|
||||
.ui-icon-heart { background-position: -208px -112px; }
|
||||
.ui-icon-star { background-position: -224px -112px; }
|
||||
.ui-icon-link { background-position: -240px -112px; }
|
||||
.ui-icon-cancel { background-position: 0 -128px; }
|
||||
.ui-icon-plus { background-position: -16px -128px; }
|
||||
.ui-icon-plusthick { background-position: -32px -128px; }
|
||||
.ui-icon-minus { background-position: -48px -128px; }
|
||||
.ui-icon-minusthick { background-position: -64px -128px; }
|
||||
.ui-icon-close { background-position: -80px -128px; }
|
||||
.ui-icon-closethick { background-position: -96px -128px; }
|
||||
.ui-icon-key { background-position: -112px -128px; }
|
||||
.ui-icon-lightbulb { background-position: -128px -128px; }
|
||||
.ui-icon-scissors { background-position: -144px -128px; }
|
||||
.ui-icon-clipboard { background-position: -160px -128px; }
|
||||
.ui-icon-copy { background-position: -176px -128px; }
|
||||
.ui-icon-contact { background-position: -192px -128px; }
|
||||
.ui-icon-image { background-position: -208px -128px; }
|
||||
.ui-icon-video { background-position: -224px -128px; }
|
||||
.ui-icon-script { background-position: -240px -128px; }
|
||||
.ui-icon-alert { background-position: 0 -144px; }
|
||||
.ui-icon-info { background-position: -16px -144px; }
|
||||
.ui-icon-notice { background-position: -32px -144px; }
|
||||
.ui-icon-help { background-position: -48px -144px; }
|
||||
.ui-icon-check { background-position: -64px -144px; }
|
||||
.ui-icon-bullet { background-position: -80px -144px; }
|
||||
.ui-icon-radio-on { background-position: -96px -144px; }
|
||||
.ui-icon-radio-off { background-position: -112px -144px; }
|
||||
.ui-icon-pin-w { background-position: -128px -144px; }
|
||||
.ui-icon-pin-s { background-position: -144px -144px; }
|
||||
.ui-icon-play { background-position: 0 -160px; }
|
||||
.ui-icon-pause { background-position: -16px -160px; }
|
||||
.ui-icon-seek-next { background-position: -32px -160px; }
|
||||
.ui-icon-seek-prev { background-position: -48px -160px; }
|
||||
.ui-icon-seek-end { background-position: -64px -160px; }
|
||||
.ui-icon-seek-start { background-position: -80px -160px; }
|
||||
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
||||
.ui-icon-seek-first { background-position: -80px -160px; }
|
||||
.ui-icon-stop { background-position: -96px -160px; }
|
||||
.ui-icon-eject { background-position: -112px -160px; }
|
||||
.ui-icon-volume-off { background-position: -128px -160px; }
|
||||
.ui-icon-volume-on { background-position: -144px -160px; }
|
||||
.ui-icon-power { background-position: 0 -176px; }
|
||||
.ui-icon-signal-diag { background-position: -16px -176px; }
|
||||
.ui-icon-signal { background-position: -32px -176px; }
|
||||
.ui-icon-battery-0 { background-position: -48px -176px; }
|
||||
.ui-icon-battery-1 { background-position: -64px -176px; }
|
||||
.ui-icon-battery-2 { background-position: -80px -176px; }
|
||||
.ui-icon-battery-3 { background-position: -96px -176px; }
|
||||
.ui-icon-circle-plus { background-position: 0 -192px; }
|
||||
.ui-icon-circle-minus { background-position: -16px -192px; }
|
||||
.ui-icon-circle-close { background-position: -32px -192px; }
|
||||
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
||||
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
||||
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
||||
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
||||
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
||||
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
||||
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
||||
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
||||
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
||||
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
||||
.ui-icon-circle-check { background-position: -208px -192px; }
|
||||
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
||||
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
||||
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
||||
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
||||
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
||||
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
||||
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
||||
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
||||
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
||||
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
||||
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
||||
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Corner radius */
|
||||
.ui-corner-all,
|
||||
.ui-corner-top,
|
||||
.ui-corner-left,
|
||||
.ui-corner-tl {
|
||||
border-top-left-radius: 4px;
|
||||
}
|
||||
.ui-corner-all,
|
||||
.ui-corner-top,
|
||||
.ui-corner-right,
|
||||
.ui-corner-tr {
|
||||
border-top-right-radius: 4px;
|
||||
}
|
||||
.ui-corner-all,
|
||||
.ui-corner-bottom,
|
||||
.ui-corner-left,
|
||||
.ui-corner-bl {
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
.ui-corner-all,
|
||||
.ui-corner-bottom,
|
||||
.ui-corner-right,
|
||||
.ui-corner-br {
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay {
|
||||
background: #f7f7ba url("images/ui-bg_white-lines_85_f7f7ba_40x100.png") 50% 50% repeat;
|
||||
opacity: .8;
|
||||
filter: Alpha(Opacity=80); /* support: IE8 */
|
||||
}
|
||||
.ui-widget-shadow {
|
||||
-webkit-box-shadow: 8px 8px 10px #ba9217;
|
||||
box-shadow: 8px 8px 10px #ba9217;
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
/*! jQuery UI - v1.12.1 - 2020-02-17
|
||||
* http://jqueryui.com
|
||||
* Copyright jQuery Foundation and other contributors; Licensed MIT */
|
||||
|
||||
.ui-widget{font-family:Gill Sans,Arial,sans-serif;font-size:1.2em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Gill Sans,Arial,sans-serif;font-size:1em}.ui-widget.ui-widget-content{border:1px solid #93c3cd}.ui-widget-content{border:1px solid #aaa;background:#fff;color:#2c4359}.ui-widget-content a{color:#2c4359}.ui-widget-header{border:1px solid #2c4359;background:#35414f url("images/ui-bg_dots-small_35_35414f_2x2.png") 50% 50% repeat;color:#e1e463;font-weight:bold}.ui-widget-header a{color:#e1e463}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default,.ui-button,html .ui-button.ui-state-disabled:hover,html .ui-button.ui-state-disabled:active{border:1px solid #93c3cd;background:#93c3cd url("images/ui-bg_diagonals-small_50_93c3cd_40x40.png") 50% 50% repeat;font-weight:bold;color:#333}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited,a.ui-button,a:link.ui-button,a:visited.ui-button,.ui-button{color:#333;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus,.ui-button:hover,.ui-button:focus{border:1px solid #999;background:#ccd232 url("images/ui-bg_diagonals-small_75_ccd232_40x40.png") 50% 50% repeat;font-weight:bold;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited,a.ui-button:hover,a.ui-button:focus{color:#212121;text-decoration:none}.ui-visual-focus{box-shadow:0 0 3px 1px rgb(94,158,214)}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active,a.ui-button:active,.ui-button:active,.ui-button.ui-state-active:hover{border:1px solid #ff6b7f;background:#db4865 url("images/ui-bg_diagonals-small_40_db4865_40x40.png") 50% 50% repeat;font-weight:bold;color:#fff}.ui-icon-background,.ui-state-active .ui-icon-background{border:#ff6b7f;background-color:#fff}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#fff;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #b4d100;background:#ffff38 url("images/ui-bg_dots-medium_80_ffff38_4x4.png") 50% 50% repeat;color:#363636}.ui-state-checked{border:1px solid #b4d100;background:#ffff38}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #ff6b7f;background:#ff3853 url("images/ui-bg_diagonals-small_50_ff3853_40x40.png") 50% 50% repeat;color:#fff}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#fff}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#fff}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_c02669_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_e1e463_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon,.ui-button:hover .ui-icon,.ui-button:focus .ui-icon{background-image:url("images/ui-icons_454545_256x240.png")}.ui-state-active .ui-icon,.ui-button:active .ui-icon{background-image:url("images/ui-icons_ffffff_256x240.png")}.ui-state-highlight .ui-icon,.ui-button .ui-state-highlight.ui-icon{background-image:url("images/ui-icons_88a206_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_ffeb33_256x240.png")}.ui-button .ui-icon{background-image:url("images/ui-icons_ffffff_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-caret-1-n{background-position:0 0}.ui-icon-caret-1-ne{background-position:-16px 0}.ui-icon-caret-1-e{background-position:-32px 0}.ui-icon-caret-1-se{background-position:-48px 0}.ui-icon-caret-1-s{background-position:-65px 0}.ui-icon-caret-1-sw{background-position:-80px 0}.ui-icon-caret-1-w{background-position:-96px 0}.ui-icon-caret-1-nw{background-position:-112px 0}.ui-icon-caret-2-n-s{background-position:-128px 0}.ui-icon-caret-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-poLine truncated
|
||||
@@ -1,74 +0,0 @@
|
||||
{
|
||||
"name": "jquery-ui",
|
||||
"title": "jQuery UI",
|
||||
"description": "A curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.",
|
||||
"version": "1.12.1",
|
||||
"homepage": "http://jqueryui.com",
|
||||
"author": {
|
||||
"name": "jQuery Foundation and other contributors",
|
||||
"url": "https://github.com/jquery/jquery-ui/blob/1.12.1/AUTHORS.txt"
|
||||
},
|
||||
"main": "ui/widget.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Scott González",
|
||||
"email": "scott.gonzalez@gmail.com",
|
||||
"url": "http://scottgonzalez.com"
|
||||
},
|
||||
{
|
||||
"name": "Jörn Zaefferer",
|
||||
"email": "joern.zaefferer@gmail.com",
|
||||
"url": "http://bassistance.de"
|
||||
},
|
||||
{
|
||||
"name": "Mike Sherov",
|
||||
"email": "mike.sherov@gmail.com",
|
||||
"url": "http://mike.sherov.com"
|
||||
},
|
||||
{
|
||||
"name": "TJ VanToll",
|
||||
"email": "tj.vantoll@gmail.com",
|
||||
"url": "http://tjvantoll.com"
|
||||
},
|
||||
{
|
||||
"name": "Felix Nagel",
|
||||
"email": "info@felixnagel.com",
|
||||
"url": "http://www.felixnagel.com"
|
||||
},
|
||||
{
|
||||
"name": "Alex Schmitz",
|
||||
"email": "arschmitz@gmail.com",
|
||||
"url": "https://github.com/arschmitz"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/jquery/jquery-ui.git"
|
||||
},
|
||||
"bugs": "https://bugs.jqueryui.com/",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "grunt"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"commitplease": "2.3.0",
|
||||
"grunt": "0.4.5",
|
||||
"grunt-bowercopy": "1.2.4",
|
||||
"grunt-cli": "0.1.13",
|
||||
"grunt-compare-size": "0.4.0",
|
||||
"grunt-contrib-concat": "0.5.1",
|
||||
"grunt-contrib-csslint": "0.5.0",
|
||||
"grunt-contrib-jshint": "0.12.0",
|
||||
"grunt-contrib-qunit": "1.0.1",
|
||||
"grunt-contrib-requirejs": "0.4.4",
|
||||
"grunt-contrib-uglify": "0.11.1",
|
||||
"grunt-git-authors": "3.1.0",
|
||||
"grunt-html": "6.0.0",
|
||||
"grunt-jscs": "2.1.0",
|
||||
"load-grunt-tasks": "3.4.0",
|
||||
"rimraf": "2.5.1",
|
||||
"testswarm": "1.1.0"
|
||||
},
|
||||
"keywords": []
|
||||
}
|
||||
@@ -1,486 +0,0 @@
|
||||
<% if params[:is_frontend_view] == "true" %>
|
||||
<% OrbitHelper.render_css_in_head(["basic/icon","lib/orbit_bar/orbit-bar"]) %>
|
||||
<% else %>
|
||||
<%= stylesheet_link_tag "basic/icon" %>
|
||||
<%= stylesheet_link_tag "lib/orbit_bar/orbit-bar" %>
|
||||
<% end %>
|
||||
<div id="orbit-bar">
|
||||
<% if current_user.nil? %>
|
||||
<label for="open-orbit-login" style="display:none;">Open login</label>
|
||||
<input type="checkbox" title="open login" id="open-orbit-login">
|
||||
<label for="open-orbit-login" class="cover"></label>
|
||||
<div class="login-window">
|
||||
<div class="login-header">
|
||||
<label tabindex="0" for="open-orbit-login" class="close">close</label>
|
||||
<h3><%= t(:login)+' ' +((current_site.title.nil? && current_site.title.blank? && current_site.mobile_orbit_bar_title.nil? && current_site.mobile_orbit_bar_title.blank?) ? "Orbit" : [current_site.mobile_orbit_bar_title,current_site.title].select{|title| !title.nil? && !title.blank?}.first) %></h3>
|
||||
</div>
|
||||
<div class="login-body">
|
||||
<%= form_tag "/sessions?locale=#{locale.to_s}", method: "post", :class => "container" do |f| %>
|
||||
<div class="prepend input-group">
|
||||
<span class="add input-group-addon"><i class="icon-user"></i></span>
|
||||
<label for="user_user_id" style="display:none;">Username</label>
|
||||
<input class="input" id="user_user_id" title="username" name="user_name" placeholder="<%= t("users.user_id") %>" size="30" title="username" type="text">
|
||||
</div>
|
||||
<div class="prepend input-group">
|
||||
<span class="add input-group-addon"><i class="icon-lock"></i></span>
|
||||
<label for="user_password" style="display:none;">Password</label>
|
||||
<input class="input" id="user_password" name="password" placeholder="<%= t(:password) %>" title="password" size="30" type="password">
|
||||
</div>
|
||||
<div class="login-submit-wrap">
|
||||
<div class="submit">
|
||||
<button class="login-btn" type="submit"><%= t(:login) %></button>
|
||||
</div>
|
||||
<% if current_site.google_oauth_enabled %>
|
||||
<div class="google-login">
|
||||
<a class="login-btn" href="/auth/google_oauth2">
|
||||
<i class="fa fa-google-plus"></i> Sign in
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if !current_site.sign_up_roles.empty? %>
|
||||
<div class="login-sign-up-btn"><a href="/users/new" rel="nofollow">Sign up now</a></div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<% end %>
|
||||
<input type="checkbox" id="open-orbit-nav" title="orbitbar">
|
||||
<div class="orbit-bar-inner" <%=((current_site.orbit_bar_background_color.blank? rescue true) ? nil : "style=background-color:#{current_site.orbit_bar_background_color};")%>>
|
||||
<label for="open-orbit-nav" <%=((current_site.orbit_bar_text_color.blank? rescue true) ? nil : "style=color:#{current_site.orbit_bar_text_color};border-color:#{current_site.orbit_bar_text_color};")%>>
|
||||
<i class="icons-list-2"></i>
|
||||
</label>
|
||||
<h2 class="orbit-bar-title">
|
||||
<a href="/" <%=((current_site.orbit_bar_text_color.blank? rescue true) ? nil : "style=color:#{current_site.orbit_bar_text_color};")%>><%= (current_site.title.nil? && current_site.title.blank? && current_site.mobile_orbit_bar_title.nil? && current_site.mobile_orbit_bar_title.blank?) ? "Orbit" : [current_site.mobile_orbit_bar_title,current_site.title].select{|title| !title.nil? && !title.blank?}.first %></a>
|
||||
</h2>
|
||||
<ul class="orbit-bar-menu">
|
||||
<li>
|
||||
<a class="orbit-bar-logo" href="#" title='<%= current_user.nil? ? ((I18n.locale.to_s =="zh_tw") ? "請登入以管理網站,按下開啟登入視窗" : "please login to manage web,click to open login window") : ((I18n.locale.to_s =="zh_tw") ? "按下關閉網站管理選單" : "click to close the menu for web manager") %>'>
|
||||
<img src="<%= current_site.default_image.url.nil? ? '/assets/orbit-logo.png' : current_site.default_image.url %>" alt="Orbit Bar Logo" />
|
||||
</a>
|
||||
<% if !current_user.nil? %>
|
||||
<ul class="sub_orbit_bar">
|
||||
<li>
|
||||
<a href="/<%= locale.to_s %>/admin/dashboards" class="sub_orbit_bar_text">
|
||||
<i class="icons-gauge"></i> <%= t(:dashboard_) %>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/<%= locale.to_s %>/admin/members?at=thumbnail" class="sub_orbit_bar_text">
|
||||
<i class="icons-users"></i> <%= t(:community_) %>
|
||||
</a>
|
||||
</li>
|
||||
<% if current_user.is_admin? %>
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
<a href="/<%= locale.to_s %>/admin/sites" tabindex="-1" class="sub_orbit_bar_text">
|
||||
<i class="icons-cog"></i> <%= t(:settings) %>
|
||||
</a>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/" class="orbit-bar-home" <%=((current_site.orbit_bar_text_color.blank? rescue true) ? nil : "style=color:#{current_site.orbit_bar_text_color};")%>>
|
||||
<i class="icons-house"></i>
|
||||
</a>
|
||||
</li>
|
||||
<% if !current_user.nil? && current_user.is_admin? && TicketStatus.unread.count > 0 %>
|
||||
<li>
|
||||
<a href="/admin/sites" class="orbit-bar-notification">
|
||||
<i class="icons-mail"></i>
|
||||
</a>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<ul class="orbit-bar-search-sign-language" <%=((current_site.orbit_bar_background_color.blank? rescue true) ? nil : "style=background-color:#{current_site.orbit_bar_background_color};")%>>
|
||||
<style>
|
||||
@media screen and (min-width:539px){
|
||||
.orbit-bar-search-sign-language{
|
||||
max-height:100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<%
|
||||
google_search_cx = current_site.search['sitesearch'] rescue nil
|
||||
is_google_seach_cx = google_search_cx =~ /^[0-9]+\:[0-9A-Za-z]+$/
|
||||
if !google_search_cx.blank? and is_google_seach_cx
|
||||
%>
|
||||
<li>
|
||||
<form id="search" method="get" action="https://www.google.com/cse" target="_blank">
|
||||
<input type="hidden" name="cx" value="<%= google_search_cx %>">
|
||||
<label style="display:none;" for="q">Google Search</label>
|
||||
<%= text_field_tag 'q', '', {:type => "search", :placeholder => t("search.sitesearch"), 'x-webkit-speech' => '', :title => "search"} %>
|
||||
</form>
|
||||
</li>
|
||||
<%
|
||||
else
|
||||
if !google_search_cx.blank? and !is_google_seach_cx
|
||||
search_domain = google_search_cx
|
||||
else
|
||||
search_domain = request.host_with_port
|
||||
end
|
||||
%>
|
||||
<li style="background-color:transparent;">
|
||||
<form id="search" method="get" action="https://www.google.com/custom" target="_blank" <%=((current_site.orbit_bar_background_color.blank? rescue true) ? nil : "style=border:0;")%>>
|
||||
<input type="hidden" name="client" value="pub-&" />
|
||||
<input type="hidden" name="ie" id="ie" value="utf-8" />
|
||||
<input type="hidden" name="oe" id="oe" value="utf-8" />
|
||||
<input type="hidden" name="cof" id="cof" value="AH:center;AWFID:03de271f1940eea3;" />
|
||||
<input type='hidden' name='domains' value='<%= search_domain %>'>
|
||||
<input type='hidden' name='sitesearch' value='<%= search_domain %>'>
|
||||
<label style="display:none;" for="q">Google Search</label>
|
||||
<%= text_field_tag 'q', '', {:type => "search", :placeholder => t("search.sitesearch"), 'x-webkit-speech' => '', :title => "search"} %>
|
||||
</form>
|
||||
</li>
|
||||
<% end %>
|
||||
<li style="background-color:transparent;" <%= current_user.nil? ? 'class=mobile_login_bar' : nil %>>
|
||||
<% if current_site.enable_language_options %>
|
||||
<% if @site_in_use_locales.count > 1 || current_site.enable_zh_cn %>
|
||||
<% zh_cn_added = 0 %>
|
||||
<% locale = session[:zh_cn] ? :zh_cn : I18n.locale %>
|
||||
<a id="languagebutton" href="#" title='<%= (I18n.locale.to_s =="zh_tw") ? "按下關閉語言選單" : "click to close language menu" %>'><span id="language" <%=((current_site.orbit_bar_text_color.blank? rescue true) ? nil : "style=color:#{current_site.orbit_bar_text_color};")%>><i class="icons-earth orbit-bar-language-icon"></i><span class="orbit-bar-language-text">Language</span></span></a>
|
||||
<ul <%=((current_site.orbit_bar_submenu_background_color.blank? rescue true) ? nil : "style=background-color:#{current_site.orbit_bar_submenu_background_color};")%>>
|
||||
<% @site_in_use_locales.each do |l| %>
|
||||
<%
|
||||
case l
|
||||
when :en
|
||||
accesskey = "e"
|
||||
when :zh_tw
|
||||
accesskey = "t"
|
||||
end
|
||||
%>
|
||||
<% if l.to_s == I18n.locale.to_s and !session['zh_cn'] %>
|
||||
<li class="<%= (l == I18n.locale and !session['zh_cn']) ? "active" : "" %>" <%=(current_site.orbit_bar_submenu_text_color.blank? rescue true) ? nil : "style=color:#{current_site.orbit_bar_submenu_text_color}!important;"%>>
|
||||
<%= t((l==:zh_tw ? :zh_tw_ : :_locale ), :locale => l) %>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="<%= (l == I18n.locale and !session['zh_cn']) ? "active" : "" %>">
|
||||
<a accesskey="<%= accesskey %>" href="<%= switch_language(l) %>" <%=(current_site.orbit_bar_submenu_text_color.blank? rescue true) ? nil : "style=color:#{current_site.orbit_bar_submenu_text_color}!important;"%>><%= t((l==:zh_tw ? :zh_tw_ : :_locale ), :locale => l) %></a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if current_site.enable_zh_cn and zh_cn_added == 0 and !request.path.include?("/admin/") %>
|
||||
<% zh_cn_added = 1 %>
|
||||
<% accesskey = "s" %>
|
||||
<% if locale == :zh_cn %>
|
||||
<li class="active">
|
||||
<%= t(:zh_cn, :locale => :zh_tw) %>
|
||||
</li>
|
||||
<% else %>
|
||||
<li>
|
||||
<a accesskey="<%= accesskey %>" href="<%= switch_language(:zh_cn) %>" <%=(current_site.orbit_bar_submenu_text_color.blank? rescue true) ? nil : "style=color:#{current_site.orbit_bar_submenu_text_color}!important;"%>><%= t(:zh_cn, :locale => :zh_tw) %></a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% if !current_user.nil? %>
|
||||
<li style="background-color:transparent;")>
|
||||
<span id="user" <%=((current_site.orbit_bar_text_color.blank? rescue true) ? nil : "style=color:#{current_site.orbit_bar_text_color};")%>><%= current_user.member_profile.name.nil? ? current_user.user_name : current_user.member_profile.name %></span>
|
||||
<ul <%=((current_site.orbit_bar_submenu_background_color.blank? rescue true) ? nil : "style=background-color:#{current_site.orbit_bar_submenu_background_color};")%>>
|
||||
<li ><%= link_to content_tag(:i, nil, class: 'icons-tools') + ' ' + t("users.change_passwd"),admin_member_edit_passwd_path(current_user.member_profile.to_param), tabindex: '-1' , style: ((current_site.orbit_bar_submenu_text_color.blank? rescue true) ? nil : "color:#{current_site.orbit_bar_submenu_text_color};") %></li>
|
||||
<li><%= link_to content_tag(:i, nil, class: 'icons-vcard') + ' ' + t("users.user_basic_data"),admin_member_path(current_user.member_profile.to_param), tabindex: '-1' , style: ((current_site.orbit_bar_submenu_text_color.blank? rescue true) ? nil : "color:#{current_site.orbit_bar_submenu_text_color};") %></li>
|
||||
<% if current_user.is_admin? && params[:is_frontend_view] == "true" %>
|
||||
<li>
|
||||
<% if params[:editmode] == "on" %>
|
||||
<a tabindex="-1" href="<%= request.fullpath.split("?").first %>" style="color:red;"><i class="icons-bolt"></i>Edit Mode Off</a>
|
||||
<% else %>
|
||||
<a tabindex="-1" href="<%= request.fullpath + "#{(request.query_parameters.empty? ? "?" : "&")}editmode=on" %>" <%=(current_site.orbit_bar_submenu_text_color.blank? rescue true) ? nil : "style=color:#{current_site.orbit_bar_submenu_text_color};"%>><i class="icons-bolt"></i>Edit Mode On</a>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
<li>
|
||||
<a href="/logout" <%=(current_site.orbit_bar_submenu_text_color.blank? rescue true) ? nil : "style=color:#{current_site.orbit_bar_submenu_text_color};"%>><i class="icons-logout"></i><%= t(:logout) %></a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li style='line-height:2.5em;background-color:transparent;'> <a href="/logout" style="color:white;font-size:0.8em"><span <%=((current_site.orbit_bar_text_color.blank? rescue true) ? nil : "style=color:#{current_site.orbit_bar_text_color};")%>><%= t(:logout) %></span><i class="icons-logout" <%=((current_site.orbit_bar_text_color.blank? rescue true) ? nil : " style=color:#{current_site.orbit_bar_text_color};")%>></i></a></li>
|
||||
<% else %>
|
||||
<li style="margin-right:-1em;" class="mobile_login_bar">
|
||||
<a id="accesskey_login" class="sr-only" accesskey="L" href="#" title="Login">:::</a>
|
||||
<a id="loginbutton" href="#" title='<%= (I18n.locale.to_s =="zh_tw") ? "按下開啟登入視窗" : "click to open login window" %>'>
|
||||
<label for="open-orbit-login" <%=((current_site.orbit_bar_text_color.blank? rescue true) ? nil : "style=color:#{current_site.orbit_bar_text_color};")%>>
|
||||
<i style="font-style: inherit;font-size: 0.8rem;width: 2.875em;text-align: right;vertical-align: middle;"><%= t(:login) %></i>
|
||||
<i class="icons-login" style="font-size: 1.4em;width: 1.875em;text-align: left;vertical-align: middle;"></i>
|
||||
</label>
|
||||
</a>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<% if(current_site.is_hidden_orbit_bar && !current_site.orbit_bar_background_color.blank? rescue false) %>
|
||||
<div class="orbitbar-line" style="background-color:<%=current_site.orbit_bar_background_color%>;height: 0.3em;position: fixed;z-index: 1000;width: 100%;top: 0;"></div>
|
||||
<% end %>
|
||||
<style>
|
||||
@media (max-width: 538px) {#orbit-bar ul.orbit-bar-search-sign-language > li + li{width:33.3333%;}}
|
||||
</style>
|
||||
<% if current_user.nil?%>
|
||||
<script>$('.orbit-bar-logo').off('click').on('click',function(){$("#open-orbit-login").click()});</script>
|
||||
<% else %>
|
||||
<script>
|
||||
var opentitle = '<%= (I18n.locale.to_s =="zh_tw") ? "按下開啟網站管理選單" : "click to open the menu for web manager" %>'
|
||||
var closetitle = '<%= (I18n.locale.to_s =="zh_tw") ? "按下關閉網站管理選單" : "click to close the menu for web manager" %>'
|
||||
$('.orbit-bar-logo').off('click').on('click',function(){
|
||||
if ($(this).parent().find('>ul').hasClass('show')) {
|
||||
$(this).parent().find('>ul').removeClass('show');
|
||||
$(this).attr('title',opentitle);
|
||||
} else {
|
||||
$(this).parent().parent().find('>li>ul').removeClass('show');
|
||||
$(this).parent().find('>ul').addClass('show');
|
||||
$(this).attr('title',closetitle);
|
||||
}});
|
||||
$('.orbit-bar-logo').parent().parent().find('>li>a').parent().addClass('showlist');
|
||||
$('.orbit-bar-logo').parent().parent().find('>li>').focus(function(e) {
|
||||
e.stopPropagation();
|
||||
$(this).parent().focus();
|
||||
if ($(this).parent().find('>ul').hasClass('show')) {
|
||||
} else {
|
||||
$(this).parent().parent().find('>li>ul').removeClass('show');
|
||||
$(this).parent().find('>ul').addClass('show');
|
||||
}
|
||||
});
|
||||
/* 逆向tab離開$('.orbit-bar-logo')時,會將其下層ul收起 start */
|
||||
$('*').focus(function(e) {
|
||||
e.stopPropagation();
|
||||
if(!$(this).parent().hasClass('showlist') && !$(this).parent().parent().parent().hasClass('showlist') ){
|
||||
$('.orbit-bar-logo').parent().parent().find('>li>ul').removeClass('show');
|
||||
}
|
||||
});
|
||||
/* 逆向tab離開$('.orbit-bar-logo')時,會將其下層ul收起 end */
|
||||
$('.orbit-bar-logo').focus(function(){
|
||||
if ($(this).parent().find('>ul').hasClass('show')) {
|
||||
$(this).attr('title',closetitle);
|
||||
} else {
|
||||
$(this).attr('title',opentitle);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<%end%>
|
||||
<script type="text/javascript">
|
||||
var opentitle = '<%= (I18n.locale.to_s =="zh_tw") ? "按下開啟語言選單" : "click to open language menu" %>'
|
||||
var closetitle = '<%= (I18n.locale.to_s =="zh_tw") ? "按下關閉語言選單" : "click to close language menu" %>'
|
||||
$('#languagebutton').off('click').on('click',function(){
|
||||
if ($(this).parent().find('>ul').hasClass('show')) {
|
||||
$(this).parent().find('>ul').removeClass('show');
|
||||
$(this).attr('title',opentitle);
|
||||
} else {
|
||||
$(this).parent().parent().find('>li>ul').removeClass('show');
|
||||
$(this).parent().find('>ul').addClass('show');
|
||||
$(this).attr('title',closetitle);
|
||||
}});
|
||||
$('#languagebutton').parent().parent().find('>li>a').parent().addClass('showli');
|
||||
$('#languagebutton').parent().parent().find('>li>').focus(function(e) {
|
||||
e.stopPropagation();
|
||||
$(this).parent().focus();
|
||||
if ($(this).parent().find('>ul').hasClass('show')) {
|
||||
} else {
|
||||
$(this).parent().parent().find('>li>ul').removeClass('show');
|
||||
$(this).parent().find('>ul').addClass('show');
|
||||
}
|
||||
});
|
||||
/* 逆向tab離開$('#languagebutton')時,會將其下層ul收起 start */
|
||||
$('*').focus(function(e) {
|
||||
e.stopPropagation();
|
||||
if(!$(this).parent().hasClass('showli') && !$(this).parent().parent().parent().hasClass('showli') ){
|
||||
$('#languagebutton').parent().parent().find('>li>ul').removeClass('show');
|
||||
}
|
||||
});
|
||||
/* 逆向tab離開$('#languagebutton')時,會將其下層ul收起 end */
|
||||
$('#languagebutton').focus(function(){
|
||||
if ($(this).parent().find('>ul').hasClass('show')) {
|
||||
$(this).attr('title',closetitle);
|
||||
} else {
|
||||
$(this).attr('title',opentitle);
|
||||
}
|
||||
});
|
||||
/* when tab key choose close,press enter to close login window start */
|
||||
function closelabel(e){
|
||||
var keynum;
|
||||
if(window.event) // IE
|
||||
{
|
||||
keynum = e.keyCode
|
||||
}
|
||||
else if(e.which) // Netscape/Firefox/Opera/chrome
|
||||
{
|
||||
keynum = e.which
|
||||
}
|
||||
if( keynum == 13 ){
|
||||
$("#open-orbit-login").click();
|
||||
};
|
||||
}
|
||||
$('label.close').attr('onkeydown','closelabel(event)');
|
||||
/* when tab key choose close,press enter to close login window end */
|
||||
$('#loginbutton >label').off('click').on('click',function(){$("#open-orbit-login").click()});
|
||||
$('#loginbutton').off('click').on('click',function(){$("#open-orbit-login").click()});
|
||||
$("#open-orbit-login").on("change",function(){
|
||||
if($(this).is(":checked")){
|
||||
/* press esc to close login window start */
|
||||
$(window).off('keydown').on('keydown',function(event){
|
||||
var e = event;
|
||||
var keynum;
|
||||
if(window.event) // IE
|
||||
{
|
||||
keynum = e.keyCode
|
||||
}
|
||||
else if(e.which) // Netscape/Firefox/Opera/chrome
|
||||
{
|
||||
keynum = e.which
|
||||
}
|
||||
if( keynum == 27 ){
|
||||
$("#open-orbit-login").click();
|
||||
};
|
||||
});
|
||||
$("#user_user_id").focus(); //when open login window,focus on the username
|
||||
}else
|
||||
$(window).off('keydown');
|
||||
/* press esc to close login window end */
|
||||
})
|
||||
$(".login-body form").on("submit",function(){
|
||||
$(this).append("<input type='hidden' name='referer_url' value='<%= request.original_url %>'/>");
|
||||
})
|
||||
<%
|
||||
for_js = @site_in_use_locales.map{|l| l.to_s}
|
||||
for_js << "zh_cn" if current_site.enable_zh_cn
|
||||
%>
|
||||
var I18n = {
|
||||
get locale(){ return "<%= (session[:locale] == 'zh_tw' ? (session[:zh_cn] ? 'zh_cn' : 'zh_tw' ) : session[:locale]) %>"},
|
||||
get validLocales(){return <%= for_js.to_json.html_safe %>},
|
||||
set locale(v){return false},
|
||||
set validLocales(v){return false}
|
||||
};
|
||||
</script>
|
||||
<% if current_site.is_hidden_orbit_bar %>
|
||||
<style>
|
||||
.orbit-bar--active {
|
||||
margin-top: 2.5em !important;
|
||||
}
|
||||
.orbit-bar--active .orbit-bar-toggle-icon {
|
||||
-webkit-transform: rotate(-180deg);
|
||||
transform: rotate(-180deg);
|
||||
-webkit-transform-origin: center 0.5625em;
|
||||
transform-origin: center 0.5625em;
|
||||
}
|
||||
.has-orbit-bar .orbit-bar-inner {
|
||||
margin-top: -2.5em;
|
||||
}
|
||||
.has-orbit-bar .orbit-bar-inner {
|
||||
-webkit-transition: <%=current_site.orbit_bar_animation_time.blank? ? '0.3s' : current_site.orbit_bar_animation_time rescue '0.3s' %> all ease-in;
|
||||
transition: <%=current_site.orbit_bar_animation_time.blank? ? '0.3s' : current_site.orbit_bar_animation_time rescue '0.3s' %> all ease-in;
|
||||
}
|
||||
.orbit-bar--active .orbit-bar-inner {
|
||||
margin-top: 0;
|
||||
}
|
||||
body {
|
||||
-webkit-transition: <%=current_site.orbit_bar_animation_time.blank? ? '0.3s' : current_site.orbit_bar_animation_time rescue '0.3s' %> margin ease-in;
|
||||
transition: <%=current_site.orbit_bar_animation_time.blank? ? '0.3s' : current_site.orbit_bar_animation_time rescue '0.3s' %> margin ease-in;
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
.has-orbit-bar .orbit-bar-toggle:hover {
|
||||
background-color: <%=current_site.orbit_bar_background_color.blank? ? '#144893' : current_site.orbit_bar_background_color rescue '#144893' %>;
|
||||
opacity: 1;
|
||||
}
|
||||
.has-orbit-bar .orbit-bar-toggle {
|
||||
-webkit-transition: <%=current_site.orbit_bar_animation_time.blank? ? '0.3s' : current_site.orbit_bar_animation_time rescue '0.3s' %> all ease-in;
|
||||
transition: <%=current_site.orbit_bar_animation_time.blank? ? '0.3s' : current_site.orbit_bar_animation_time rescue '0.3s' %> all ease-in;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
cursor: pointer;
|
||||
color: <%=current_site.orbit_bar_text_color.blank? ? '#fff' : current_site.orbit_bar_text_color rescue '#fff' %>;
|
||||
padding: 0.3125em 0.625em;
|
||||
background-color: <%=current_site.orbit_bar_background_color.blank? ? '#144893' : current_site.orbit_bar_background_color rescue '#144893' %>;
|
||||
opacity: 0.5;
|
||||
}
|
||||
.orbit-bar--active .orbit-bar-toggle {
|
||||
opacity: 1;
|
||||
top: 2.5em;
|
||||
}
|
||||
</style>
|
||||
<% if !(OrbitHelper.request || request).env["REQUEST_URI"].include?('admin') %>
|
||||
<script>
|
||||
var barState = window.localStorage.getItem('barState');
|
||||
function extendBar() {
|
||||
var $bar = $('#orbit-bar');
|
||||
var activeCls = 'orbit-bar--active';
|
||||
var noAnimationCls = 'orbit-bar--no-animation';
|
||||
var openState = 'open';
|
||||
var closeState = 'close';
|
||||
var $body = $(document.body);
|
||||
function createToggle() {
|
||||
var $el = $('<div class="orbit-bar-toggle"><i class="orbit-bar-toggle-icon fa fa-chevron-down"></i></div>');
|
||||
$el.on('click', function(e) {
|
||||
e.preventDefault();
|
||||
$body.removeClass(noAnimationCls);
|
||||
if (!$body.hasClass(activeCls)) {
|
||||
$body.addClass(activeCls);
|
||||
window.localStorage.setItem('barState', openState);
|
||||
} else {
|
||||
$body.removeClass(activeCls);
|
||||
window.localStorage.setItem('barState', closeState);
|
||||
}
|
||||
$('.orbitbar-line').slideToggle();
|
||||
});
|
||||
$bar.prepend($el);
|
||||
}
|
||||
$body.addClass('has-orbit-bar');
|
||||
$bar.find('.orbit-bar-inner').show();
|
||||
// check bar state from localstorage
|
||||
if (barState) {
|
||||
if (barState === openState) {
|
||||
$body.addClass(activeCls);
|
||||
$body.addClass(noAnimationCls);
|
||||
|
||||
} else {
|
||||
$body.removeClass(activeCls);
|
||||
}
|
||||
}
|
||||
createToggle();
|
||||
};
|
||||
$(document).ready(function(){
|
||||
if($('body').attr('id') != 'sideset')
|
||||
extendBar();
|
||||
})
|
||||
</script>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<style>
|
||||
@media screen and (min-width:539px){
|
||||
<% if(!current_site.orbit_bar_submenu_background_color.blank? rescue false)%>
|
||||
.sub_orbit_bar{
|
||||
background-color:<%=current_site.orbit_bar_submenu_background_color %>!important;
|
||||
}
|
||||
.orbit-bar-menu{
|
||||
background-color:transparent!important;
|
||||
}
|
||||
<%end%>
|
||||
<% if(!current_site.orbit_bar_submenu_text_color.blank? rescue false)%>
|
||||
.sub_orbit_bar_text{
|
||||
color:<%=current_site.orbit_bar_submenu_text_color%>!important;
|
||||
}
|
||||
<%end%>
|
||||
}
|
||||
@media screen and (max-width:538px){
|
||||
<% if(!current_site.orbit_bar_background_color.blank? rescue false)%>
|
||||
.sub_orbit_bar{
|
||||
background-color:<%=current_site.orbit_bar_background_color%>!important;
|
||||
}
|
||||
.orbit-bar-menu{
|
||||
background-color:<%=current_site.orbit_bar_background_color%>!important;
|
||||
}
|
||||
<%end%>
|
||||
<% if(!current_site.orbit_bar_text_color.blank? rescue false)%>
|
||||
.sub_orbit_bar_text{
|
||||
color:<%=current_site.orbit_bar_text_color%>!important;
|
||||
}
|
||||
<%end%>
|
||||
.mobile_login_bar{
|
||||
width: 50%!important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,479 +0,0 @@
|
||||
<% if params[:is_frontend_view] == "true" %>
|
||||
<% OrbitHelper.render_css_in_head(["basic/icon","lib/orbit_bar/orbit-bar-mobile"]) %>
|
||||
<% OrbitHelper.render_css_in_head(["basic/icon","lib/orbit_bar/orbit-bar"]) %>
|
||||
<% else %>
|
||||
<%= stylesheet_link_tag "basic/icon" %>
|
||||
<%= stylesheet_link_tag "lib/orbit_bar/orbit-bar-mobile" %>
|
||||
<%= stylesheet_link_tag "lib/orbit_bar/orbit-bar" %>
|
||||
<% end %>
|
||||
<div id="orbit-bar">
|
||||
<% if current_user.nil? %>
|
||||
<input type="checkbox" id="open-orbit-login">
|
||||
<label for="open-orbit-login" class="cover"></label>
|
||||
<div class="login-window">
|
||||
<div class="login-header">
|
||||
<label for="open-orbit-login" class="close">close</label>
|
||||
<h3><%= t(:login)+' ' +((current_site.title.nil? && current_site.title.blank? && current_site.mobile_orbit_bar_title.nil? && current_site.mobile_orbit_bar_title.blank?) ? "Orbit" : [current_site.mobile_orbit_bar_title,current_site.title].select{|title| !title.nil? && !title.blank?}.first) %></h3>
|
||||
</div>
|
||||
<div class="login-body">
|
||||
<%= form_tag "/sessions?locale=#{locale.to_s}", method: "post", :class => "container" do |f| %>
|
||||
<div class="prepend input-group">
|
||||
<span class="add input-group-addon"><i class="icon-user"></i></span>
|
||||
<input class="input" id="user_user_id" name="user_name" placeholder="<%= t("users.user_id") %>" size="30" type="text">
|
||||
</div>
|
||||
<div class="prepend input-group">
|
||||
<span class="add input-group-addon"><i class="icon-lock"></i></span>
|
||||
<input class="input" id="user_password" name="password" placeholder="<%= t(:password) %>" size="30" type="password">
|
||||
</div>
|
||||
<div class="login-submit-wrap">
|
||||
<div class="submit">
|
||||
<button class="login-btn" type="submit"><%= t(:login) %></button>
|
||||
</div>
|
||||
<% if current_site.google_oauth_enabled %>
|
||||
<div class="google-login">
|
||||
<a class="login-btn" href="/auth/google_oauth2">
|
||||
<i class="fa fa-google-plus"></i> Sign in
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="login-sign-up-btn"><a href="/users/new">Sign up now</a></div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<% end %>
|
||||
<input type="checkbox" id="open-orbit-nav">
|
||||
<div class="orbit-bar-inner" <%=((current_site.orbit_bar_background_color.blank? rescue true) ? nil : "style=background-color:#{current_site.orbit_bar_background_color};")%>>
|
||||
<label for="open-orbit-nav" <%=((current_site.orbit_bar_text_color.blank? rescue true) ? nil : "style=color:#{current_site.orbit_bar_text_color};border-color:#{current_site.orbit_bar_text_color};")%>>
|
||||
<i class="icons-list-2"></i>
|
||||
</label>
|
||||
<h2 class="orbit-bar-title">
|
||||
<a href="/" <%=((current_site.orbit_bar_text_color.blank? rescue true) ? nil : "style=color:#{current_site.orbit_bar_text_color};")%>><%= (current_site.title.nil? && current_site.title.blank? && current_site.mobile_orbit_bar_title.nil? && current_site.mobile_orbit_bar_title.blank?) ? "Orbit" : [current_site.mobile_orbit_bar_title,current_site.title].select{|title| !title.nil? && !title.blank?}.first %></a>
|
||||
</h2>
|
||||
<ul class="orbit-bar-menu">
|
||||
<li>
|
||||
<span class="orbit-bar-logo">
|
||||
<img src="<%= current_site.default_image.url.nil? ? '/assets/orbit-logo.png' : current_site.default_image.url %>" alt="Orbit Bar Logo" />
|
||||
</span>
|
||||
<% if !current_user.nil? %>
|
||||
<ul class="sub_orbit_bar">
|
||||
<li>
|
||||
<a href="/<%= locale.to_s %>/admin/dashboards" class="sub_orbit_bar_text">
|
||||
<i class="icons-gauge"></i> <%= t(:dashboard_) %>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/<%= locale.to_s %>/admin/members?at=thumbnail" class="sub_orbit_bar_text">
|
||||
<i class="icons-users"></i> <%= t(:community_) %>
|
||||
</a>
|
||||
</li>
|
||||
<% if current_user.is_admin? %>
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
<a href="/<%= locale.to_s %>/admin/sites" tabindex="-1" class="sub_orbit_bar_text">
|
||||
<i class="icons-cog"></i> <%= t(:settings) %>
|
||||
</a>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/" class="orbit-bar-home" <%=((current_site.orbit_bar_text_color.blank? rescue true) ? nil : "style=color:#{current_site.orbit_bar_text_color};")%>>
|
||||
<i class="icons-house"></i>
|
||||
</a>
|
||||
</li>
|
||||
<% if !current_user.nil? && current_user.is_admin? && TicketStatus.unread.count > 0 %>
|
||||
<li>
|
||||
<a href="/admin/sites" class="orbit-bar-notification">
|
||||
<i class="icons-mail"></i>
|
||||
</a>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<ul class="orbit-bar-search-sign-language" <%=((current_site.orbit_bar_background_color.blank? rescue true) ? nil : "style=background-color:#{current_site.orbit_bar_background_color};")%>>
|
||||
<style>
|
||||
@media screen and (min-width:539px){
|
||||
.orbit-bar-search-sign-language{
|
||||
max-height:100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<%
|
||||
google_search_cx = current_site.search['sitesearch'] rescue nil
|
||||
is_google_seach_cx = google_search_cx =~ /^[0-9]+\:[0-9A-Za-z]+$/
|
||||
if !google_search_cx.blank? and is_google_seach_cx
|
||||
%>
|
||||
<li style="background-color:transparent;">
|
||||
<form id="search" method="get" action="https://www.google.com/cse" target="_blank" <%=((current_site.orbit_bar_background_color.blank? rescue true) ? nil : "style=border:0;")%>>
|
||||
<input type="hidden" name="cx" value="<%= google_search_cx %>">
|
||||
<%= text_field_tag 'q', '', {:type => "search", :placeholder => t("search.sitesearch"), 'x-webkit-speech' => ''} %>
|
||||
</form>
|
||||
</li>
|
||||
<%
|
||||
else
|
||||
if !google_search_cx.blank? and !is_google_seach_cx
|
||||
search_domain = google_search_cx
|
||||
else
|
||||
search_domain = request.host_with_port
|
||||
end
|
||||
%>
|
||||
<li>
|
||||
<form id="search" method="get" action="https://www.google.com/custom" target="_blank">
|
||||
<input type="hidden" name="client" value="pub-&" />
|
||||
<input type="hidden" name="ie" id="ie" value="utf-8" />
|
||||
<input type="hidden" name="oe" id="oe" value="utf-8" />
|
||||
<input type="hidden" name="cof" id="cof" value="AH:center;AWFID:03de271f1940eea3;" />
|
||||
<input type='hidden' name='domains' value='<%= search_domain %>'>
|
||||
<input type='hidden' name='sitesearch' value='<%= search_domain %>'>
|
||||
<%= text_field_tag 'q', '', {:type => "search", :placeholder => t("search.sitesearch"), 'x-webkit-speech' => ''} %>
|
||||
</form>
|
||||
</li>
|
||||
<% end %>
|
||||
<li style="background-color:transparent;" <%= current_user.nil? ? 'class=mobile_login_bar' : nil %>>
|
||||
<% if current_site.enable_language_options %>
|
||||
<% if @site_in_use_locales.count > 1 || current_site.enable_zh_cn %>
|
||||
<% zh_cn_added = 0 %>
|
||||
<% locale = session[:zh_cn] ? :zh_cn : I18n.locale %>
|
||||
<span id="language" <%=((current_site.orbit_bar_text_color.blank? rescue true) ? nil : "style=color:#{current_site.orbit_bar_text_color};")%>><i class="icons-earth orbit-bar-language-icon"></i><span class="orbit-bar-language-text">Language</span></span>
|
||||
<ul <%=((current_site.orbit_bar_submenu_background_color.blank? rescue true) ? nil : "style=background-color:#{current_site.orbit_bar_submenu_background_color};")%>>
|
||||
<% @site_in_use_locales.each do |l| %>
|
||||
<%
|
||||
case l
|
||||
when :en
|
||||
accesskey = "e"
|
||||
when :zh_tw
|
||||
accesskey = "t"
|
||||
end
|
||||
%>
|
||||
<% if l.to_s == I18n.locale.to_s and !session['zh_cn'] %>
|
||||
<li class="<%= (l == I18n.locale and !session['zh_cn']) ? "active" : "" %>" <%=(current_site.orbit_bar_submenu_text_color.blank? rescue true) ? nil : "style=color:#{current_site.orbit_bar_submenu_text_color}!important;"%>>
|
||||
<%= t((l==:zh_tw ? :zh_tw_ : :_locale ), :locale => l) %>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="<%= (l == I18n.locale and !session['zh_cn']) ? "active" : "" %>">
|
||||
<a accesskey="<%= accesskey %>" href="<%= switch_language(l) %>" <%=(current_site.orbit_bar_submenu_text_color.blank? rescue true) ? nil : "style=color:#{current_site.orbit_bar_submenu_text_color}!important;"%>><%= t((l==:zh_tw ? :zh_tw_ : :_locale ), :locale => l) %></a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if current_site.enable_zh_cn and zh_cn_added == 0 and !request.path.include?("/admin/") %>
|
||||
<% zh_cn_added = 1 %>
|
||||
<% accesskey = "s" %>
|
||||
<% if locale == :zh_cn %>
|
||||
<li class="active">
|
||||
<%= t(:zh_cn, :locale => :zh_tw) %>
|
||||
</li>
|
||||
<% else %>
|
||||
<li>
|
||||
<a accesskey="<%= accesskey %>" href="<%= switch_language(:zh_cn) %>" <%=(current_site.orbit_bar_submenu_text_color.blank? rescue true) ? nil : "style=color:#{current_site.orbit_bar_submenu_text_color}!important;"%>><%= t(:zh_cn, :locale => :zh_tw) %></a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% if !current_user.nil? %>
|
||||
<li style="background-color:transparent;">
|
||||
<span id="user" style="float:left; <%=((current_site.orbit_bar_text_color.blank? rescue true) ? nil : 'color:'+current_site.orbit_bar_text_color+';')%>"><%= current_user.member_profile.name.nil? ? current_user.user_name : current_user.member_profile.name %></span>
|
||||
<span style="vertical-align: -webkit-baseline-middle;"><a href="/logout" <%=((current_site.orbit_bar_text_color.blank? rescue true) ? nil : "style=color:#{current_site.orbit_bar_text_color};")%>><i style="vertical-align:middle;font-style: inherit;"><%= t(:logout) %></i><i class="icons-logout" style="vertical-align:middle;"></i></a></span>
|
||||
<ul>
|
||||
<li><%= link_to content_tag(:i, nil, class: 'icons-tools') + ' ' + t("users.change_passwd"),admin_member_edit_passwd_path(current_user.member_profile.to_param), tabindex: '-1' , style: ((current_site.orbit_bar_submenu_text_color.blank? rescue true) ? nil : "color:#{current_site.orbit_bar_submenu_text_color};") %></li>
|
||||
<li><%= link_to content_tag(:i, nil, class: 'icons-vcard') + ' ' + t("users.user_basic_data"),admin_member_path(current_user.member_profile.to_param), tabindex: '-1' , style: ((current_site.orbit_bar_submenu_text_color.blank? rescue true) ? nil : "color:#{current_site.orbit_bar_submenu_text_color};") %></li>
|
||||
<% if current_user.is_admin? && params[:is_frontend_view] == "true" %>
|
||||
<li>
|
||||
<% if params[:editmode] == "on" %>
|
||||
<a tabindex="-1" href="<%= request.fullpath.split("?").first %>" style="color:red;"><i class="icons-bolt"></i>Edit Mode Off</a>
|
||||
<% else %>
|
||||
<a tabindex="-1" href="<%= request.fullpath + "#{(request.query_parameters.empty? ? "?" : "&")}editmode=on" %>" <%=(current_site.orbit_bar_submenu_text_color.blank? rescue true) ? nil : "style=color:#{current_site.orbit_bar_submenu_text_color};"%>><i class="icons-bolt"></i>Edit Mode On</a>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
<li>
|
||||
<a href="/logout" <%=(current_site.orbit_bar_submenu_text_color.blank? rescue true) ? nil : "style=color:#{current_site.orbit_bar_submenu_text_color};"%>><i class="icons-logout"></i><%= t(:logout) %></a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="mobile_login_bar">
|
||||
<a id="accesskey_login" class="sr-only" accesskey="L" href="/<%= "#{locale.to_s}" %>/accesskey" title="Login">:::</a>
|
||||
<label for="open-orbit-login" <%=((current_site.orbit_bar_text_color.blank? rescue true) ? nil : "style=color:#{current_site.orbit_bar_text_color};")%>>
|
||||
<i style="font-style: inherit;font-size: 0.8rem;width: 2.875em;text-align: right;vertical-align: middle;"><%= t(:login) %></i>
|
||||
<i class="icons-login" style="font-size: 1.4em;width: 1.875em;text-align: left;vertical-align: middle;"></i>
|
||||
</label>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<ul class="orbit-bar-mobile-sign-language" <%=((current_site.orbit_bar_background_color.blank? rescue true) ? nil : "style=background-color:#{current_site.orbit_bar_background_color};")%>>
|
||||
<li>
|
||||
<% if current_site.enable_language_options %>
|
||||
<% if @site_in_use_locales.count > 1 || current_site.enable_zh_cn %>
|
||||
<% zh_cn_added = 0 %>
|
||||
<% locale = session[:zh_cn] ? :zh_cn : I18n.locale %>
|
||||
<span id="language" class="mobile-button" <%=((current_site.orbit_bar_text_color.blank? rescue true) ? nil : "style=color:#{current_site.orbit_bar_text_color};")%>><i class="icons-earth orbit-bar-language-icon"></i><span class="orbit-bar-language-text">Language</span></span>
|
||||
<ul>
|
||||
<% @site_in_use_locales.each do |l| %>
|
||||
<%
|
||||
case l
|
||||
when :en
|
||||
accesskey = "e"
|
||||
when :zh_tw
|
||||
accesskey = "t"
|
||||
end
|
||||
%>
|
||||
<% if l.to_s == I18n.locale.to_s and !session['zh_cn'] %>
|
||||
<li class="<%= (l == I18n.locale and !session['zh_cn']) ? "active" : "" %>">
|
||||
<%= t((l==:zh_tw ? :zh_tw_ : :_locale ), :locale => l) %>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="<%= (l == I18n.locale and !session['zh_cn']) ? "active" : "" %>">
|
||||
<a accesskey="<%= accesskey %>" href="<%= switch_language(l) %>"><%= t((l==:zh_tw ? :zh_tw_ : :_locale ), :locale => l) %></a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if current_site.enable_zh_cn and zh_cn_added == 0 and !request.path.include?("/admin/") %>
|
||||
<% zh_cn_added = 1 %>
|
||||
<% accesskey = "s" %>
|
||||
<% if locale == :zh_cn %>
|
||||
<li class="active">
|
||||
<%= t(:zh_cn, :locale => :zh_tw) %>
|
||||
</li>
|
||||
<% else %>
|
||||
<li>
|
||||
<a accesskey="<%= accesskey %>" href="<%= switch_language(:zh_cn) %>"><%= t(:zh_cn, :locale => :zh_tw) %></a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% if !current_user.nil? %>
|
||||
<li>
|
||||
<span id="user" class="mobile-button" <%=((current_site.orbit_bar_text_color.blank? rescue true) ? nil : "style=color:#{current_site.orbit_bar_text_color};")%>><i class="icons-user"></i><span><%= current_user.member_profile.name.nil? ? current_user.user_name : current_user.member_profile.name %></span></span>
|
||||
<ul>
|
||||
<li><%= link_to content_tag(:i, nil, class: 'icons-tools') + ' ' + t("users.change_passwd"),admin_member_edit_passwd_path(current_user.member_profile.to_param), tabindex: '-1' %></li>
|
||||
<li><%= link_to content_tag(:i, nil, class: 'icons-vcard') + ' ' + t("users.user_basic_data"),admin_member_path(current_user.member_profile.to_param), tabindex: '-1' %></li>
|
||||
<% if current_user.is_admin? && params[:is_frontend_view] == "true" %>
|
||||
<li>
|
||||
<% if params[:editmode] == "on" %>
|
||||
<a tabindex="-1" href="<%= request.fullpath.split("?").first %>" style="color:red;"><i class="icons-bolt"></i>Edit Mode Off</a>
|
||||
<% else %>
|
||||
<a tabindex="-1" href="<%= request.fullpath + "#{(request.query_parameters.empty? ? "?" : "&")}editmode=on" %>"><i class="icons-bolt"></i>Edit Mode On</a>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
<li>
|
||||
<a href="/logout"><i class="icons-logout"></i><%= t(:logout) %></a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<% else %>
|
||||
<li>
|
||||
<a id="accesskey_login" class="sr-only" accesskey="L" href="/<%= "#{locale.to_s}" %>/accesskey" title="Login">:::</a>
|
||||
<label for="open-orbit-login" <%=((current_site.orbit_bar_text_color.blank? rescue true) ? nil : "style=color:#{current_site.orbit_bar_text_color};")%>>
|
||||
<i class="icons-login"></i>
|
||||
</label>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<% if(current_site.is_hidden_orbit_bar && !current_site.orbit_bar_background_color.blank? rescue false) %>
|
||||
<div class="orbitbar-line" style="background-color:<%=current_site.orbit_bar_background_color%>;height: 0.3em;position: fixed;z-index: 1000;width: 100%;top: 0;"></div>
|
||||
<% end %>
|
||||
<script type="text/javascript">
|
||||
$("#open-orbit-login").on("change",function(){
|
||||
if($(this).is(":checked")){
|
||||
$("#user_user_id").focus();
|
||||
}
|
||||
})
|
||||
$(".login-body form").on("submit",function(){
|
||||
$(this).append("<input type='hidden' name='referer_url' value='<%= request.original_url %>'/>");
|
||||
})
|
||||
<%
|
||||
for_js = @site_in_use_locales.map{|l| l.to_s}
|
||||
for_js << "zh_cn" if current_site.enable_zh_cn
|
||||
%>
|
||||
var I18n = {
|
||||
get locale(){ return "<%= (session[:locale] == 'zh_tw' ? (session[:zh_cn] ? 'zh_cn' : 'zh_tw' ) : session[:locale]) %>"},
|
||||
get validLocales(){return <%= for_js.to_json.html_safe %>},
|
||||
set locale(v){return false},
|
||||
set validLocales(v){return false}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<!-- ika modify -->
|
||||
<script type="text/javascript">
|
||||
// reset orbit-nav check
|
||||
$( "#open-orbit-nav" ).prop( "checked", false );
|
||||
|
||||
|
||||
$('.orbit-bar-mobile-sign-language .mobile-button').click(function(){
|
||||
$('.orbit-bar-mobile-sign-language .mobile-button').not($(this)).removeClass('toggled');
|
||||
$('.orbit-bar-mobile-sign-language .mobile-button').not($(this)).siblings('ul').removeClass('show');
|
||||
// $('.orbit-bar-menu').hide();
|
||||
// $('.orbit-bar-search-sign-language').hide();
|
||||
$( "#open-orbit-nav" ).prop( "checked", false );
|
||||
$('.sidebar2').removeClass('menu-toggle');
|
||||
$(this).toggleClass('toggled');
|
||||
$(this).siblings('ul').toggleClass('show');
|
||||
});
|
||||
|
||||
$('#open-orbit-nav').click(function(){
|
||||
$( "#dashboards #open-orbit-nav" ).prop( "checked", false );
|
||||
$( "#users #open-orbit-nav" ).prop( "checked", false );
|
||||
$( "#sideset #open-orbit-nav" ).prop( "checked", false );
|
||||
|
||||
$('.orbit-bar-mobile-sign-language .mobile-button').removeClass('toggled');
|
||||
$('.orbit-bar-mobile-sign-language li ul').removeClass('show');
|
||||
$('#dashboards .orbit-bar-menu').hide();
|
||||
$('#dashboards .orbit-bar-search-sign-language').hide();
|
||||
|
||||
$('body').toggleClass('noScroll');
|
||||
//show menu
|
||||
$('.sidebar2').toggleClass('menu-toggle');
|
||||
})
|
||||
|
||||
$('.sub-nav-block h4').click(function(){
|
||||
$('.sub-nav-block h4').not($(this)).siblings($('.nav-list')).slideUp();
|
||||
$(this).siblings($('.nav-list')).slideDown();
|
||||
})
|
||||
</script>
|
||||
<% if current_site.is_hidden_orbit_bar %>
|
||||
<style>
|
||||
.orbit-bar--active {
|
||||
margin-top: 2.5em !important;
|
||||
}
|
||||
.orbit-bar--active .orbit-bar-toggle-icon {
|
||||
-webkit-transform: rotate(-180deg);
|
||||
transform: rotate(-180deg);
|
||||
-webkit-transform-origin: center 0.5625em;
|
||||
transform-origin: center 0.5625em;
|
||||
}
|
||||
.has-orbit-bar .orbit-bar-inner {
|
||||
margin-top: -2.5em;
|
||||
}
|
||||
.has-orbit-bar .orbit-bar-inner {
|
||||
-webkit-transition: <%=current_site.orbit_bar_animation_time.blank? ? '0.3s' : current_site.orbit_bar_animation_time rescue '0.3s' %> all ease-in;
|
||||
transition: <%=current_site.orbit_bar_animation_time.blank? ? '0.3s' : current_site.orbit_bar_animation_time rescue '0.3s' %> all ease-in;
|
||||
}
|
||||
.orbit-bar--active .orbit-bar-inner {
|
||||
margin-top: 0;
|
||||
}
|
||||
body {
|
||||
-webkit-transition: <%=current_site.orbit_bar_animation_time.blank? ? '0.3s' : current_site.orbit_bar_animation_time rescue '0.3s' %> margin ease-in;
|
||||
transition: <%=current_site.orbit_bar_animation_time.blank? ? '0.3s' : current_site.orbit_bar_animation_time rescue '0.3s' %> margin ease-in;
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
.has-orbit-bar .orbit-bar-toggle:hover {
|
||||
background-color: <%=current_site.orbit_bar_background_color.blank? ? '#144893' : current_site.orbit_bar_background_color rescue '#144893' %>;
|
||||
opacity: 1;
|
||||
}
|
||||
.has-orbit-bar .orbit-bar-toggle {
|
||||
-webkit-transition: <%=current_site.orbit_bar_animation_time.blank? ? '0.3s' : current_site.orbit_bar_animation_time rescue '0.3s' %> all ease-in;
|
||||
transition: <%=current_site.orbit_bar_animation_time.blank? ? '0.3s' : current_site.orbit_bar_animation_time rescue '0.3s' %> all ease-in;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
cursor: pointer;
|
||||
color: <%=current_site.orbit_bar_text_color.blank? ? '#fff' : current_site.orbit_bar_text_color rescue '#fff' %>;
|
||||
padding: 0.3125em 0.625em;
|
||||
background-color: <%=current_site.orbit_bar_background_color.blank? ? '#144893' : current_site.orbit_bar_background_color rescue '#144893' %>;
|
||||
opacity: 0.5;
|
||||
}
|
||||
.orbit-bar--active .orbit-bar-toggle {
|
||||
opacity: 1;
|
||||
top: 2.5em;
|
||||
}
|
||||
</style>
|
||||
<% if !(OrbitHelper.request || request).env["REQUEST_URI"].include?('admin') %>
|
||||
<script>
|
||||
var barState = window.localStorage.getItem('barState');
|
||||
function extendBar() {
|
||||
var $bar = $('#orbit-bar');
|
||||
var activeCls = 'orbit-bar--active';
|
||||
var noAnimationCls = 'orbit-bar--no-animation';
|
||||
var openState = 'open';
|
||||
var closeState = 'close';
|
||||
var $body = $(document.body);
|
||||
function createToggle() {
|
||||
var $el = $('<div class="orbit-bar-toggle"><i class="orbit-bar-toggle-icon fa fa-chevron-down"></i></div>');
|
||||
$el.on('click', function(e) {
|
||||
e.preventDefault();
|
||||
$body.removeClass(noAnimationCls);
|
||||
if (!$body.hasClass(activeCls)) {
|
||||
$body.addClass(activeCls);
|
||||
window.localStorage.setItem('barState', openState);
|
||||
} else {
|
||||
$body.removeClass(activeCls);
|
||||
window.localStorage.setItem('barState', closeState);
|
||||
}
|
||||
$('.orbitbar-line').slideToggle();
|
||||
});
|
||||
$bar.prepend($el);
|
||||
}
|
||||
$body.addClass('has-orbit-bar');
|
||||
$bar.find('.orbit-bar-inner').show();
|
||||
// check bar state from localstorage
|
||||
if (barState) {
|
||||
if (barState === openState) {
|
||||
$body.addClass(activeCls);
|
||||
$body.addClass(noAnimationCls);
|
||||
|
||||
} else {
|
||||
$body.removeClass(activeCls);
|
||||
}
|
||||
}
|
||||
createToggle();
|
||||
};
|
||||
$(document).ready(function(){
|
||||
if($('body').attr('id') != 'sideset')
|
||||
extendBar();
|
||||
})
|
||||
</script>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<style>
|
||||
@media screen and (min-width:539px){
|
||||
<% if(!current_site.orbit_bar_submenu_background_color.blank? rescue false)%>
|
||||
.sub_orbit_bar{
|
||||
background-color:<%=current_site.orbit_bar_submenu_background_color %>!important;
|
||||
}
|
||||
.orbit-bar-menu{
|
||||
background-color:transparent!important;
|
||||
}
|
||||
<%end%>
|
||||
<% if(!current_site.orbit_bar_submenu_text_color.blank? rescue false)%>
|
||||
.sub_orbit_bar_text{
|
||||
color:<%=current_site.orbit_bar_submenu_text_color%>!important;
|
||||
}
|
||||
<%end%>
|
||||
}
|
||||
@media screen and (max-width:538px){
|
||||
<% if(!current_site.orbit_bar_background_color.blank? rescue false)%>
|
||||
.sub_orbit_bar{
|
||||
background-color:<%=current_site.orbit_bar_background_color%>!important;
|
||||
}
|
||||
.orbit-bar-menu{
|
||||
background-color:<%=current_site.orbit_bar_background_color%>!important;
|
||||
}
|
||||
<%end%>
|
||||
<% if(!current_site.orbit_bar_text_color.blank? rescue false)%>
|
||||
.sub_orbit_bar_text{
|
||||
color:<%=current_site.orbit_bar_text_color%>!important;
|
||||
}
|
||||
<%end%>
|
||||
.mobile_login_bar{
|
||||
width: 50%!important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,52 +0,0 @@
|
||||
<%= form_for @user, :html => { :class=>"form-horizontal main-forms", :id=>"user-forms"} do |f| %>
|
||||
<%= f.error_messages %>
|
||||
<div class="attributes">
|
||||
<div class="attributes-header clearfix">
|
||||
<h4><%=t(:sys_basic_id_form)%></h4>
|
||||
</div>
|
||||
<div class="attributes-body">
|
||||
|
||||
<!-- Account -->
|
||||
<div class="control-group">
|
||||
<label class="control-label muted" for="account">
|
||||
<label for="user_name" class="control-label"><%= t("users.user_id")%></label>
|
||||
</label>
|
||||
<div class="controls add-input">
|
||||
<% if current_user.is_admin? && (@user.user_name != "rulingcom" rescue false) %>
|
||||
<%= f.text_field :user_name, :class=>"input-medium", :id=>"account", :placeholder=>"#{t('users.user_id')}" %>
|
||||
<span class="help-block"><%= t("users.user_id_note")%></span>
|
||||
<% else %>
|
||||
<%= f.text_field :user_name, :class=>"input-medium", :id=>"account", :placeholder=>"#{t('users.user_id')}" %>
|
||||
<span class="help-block"><%= t("users.user_id_note")%></span>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Password -->
|
||||
<div class="control-group">
|
||||
<label class="control-label muted" for="password">
|
||||
<label for="password" class="control-label"><%= t("users.new_password")%></label>
|
||||
</label>
|
||||
<div class="controls add-input">
|
||||
<input name="foilautofill" style="display: none;" type="password" />
|
||||
<%= f.password_field :password, :class=>"input-medium", :id=>"password", :autocomplete=>"off" %>
|
||||
<span class="help-block"><%= t("users.new_password_note")%></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Confirm Password -->
|
||||
<div class="control-group">
|
||||
<label class="control-label muted" for="confirm_password">
|
||||
<label for="password_confirmation" class="control-label"><%= t("users.new_password_confirmation")%></label>
|
||||
</label>
|
||||
<div class="controls add-input">
|
||||
<%= f.password_field :password_confirmation, :class=>"input-medium", :id=>"confirm_password" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= f.hidden_field :approved, value: true if current_user.is_admin? %>
|
||||
<%= f.hidden_field :force_reset_password, value: false %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -1,553 +0,0 @@
|
||||
<head>
|
||||
<%= stylesheet_link_tag "lib/wrap-nav"%>
|
||||
<%= stylesheet_link_tag "lib/main-forms"%>
|
||||
<%= stylesheet_link_tag "lib/fileupload"%>
|
||||
<%= stylesheet_link_tag "lib/togglebox"%>
|
||||
|
||||
<%= javascript_include_tag 'lib/bootstrap-fileupload' %>
|
||||
<%= javascript_include_tag 'lib/site_set' %>
|
||||
</head>
|
||||
|
||||
|
||||
<%= form_for @site, :url => admin_site_path(@site.id), :html => {:class => "form-horizontal main-forms"} do |f| %>
|
||||
|
||||
<fieldset>
|
||||
|
||||
<!-- Input Area -->
|
||||
<div class="input-area">
|
||||
<div class="nav-name"><strong><%= t('preferences.classification') %></strong></div>
|
||||
<ul class="nav nav-pills language-nav">
|
||||
<% if current_user.user_name == "rulingcom" || current_user.beta_tester %>
|
||||
<li>
|
||||
<a href="#sidebar-nav" data-toggle="tab"><%= t('preferences.sidebar_nav') %></a>
|
||||
</li>
|
||||
<% end %>
|
||||
<li>
|
||||
<a href="#page_set" data-toggle="tab"><%= t('preferences.page_set') %></a>
|
||||
</li>
|
||||
<li class="active">
|
||||
<a href="#system-email" data-toggle="tab"><%= t('preferences.system_email') %></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#openness" data-toggle="tab"><%= t('preferences.openness') %></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#language-set" data-toggle="tab"><%= t('preferences.language') %></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#orbitBar-them" data-toggle="tab"><%= t('preferences.orbitbar_theme') %></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#google-oauth" data-toggle="tab">Google OAuth</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#social-sharer" data-toggle="tab">Social Share</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#sign-up" data-toggle="tab">Sign Up</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
|
||||
<!-- Sidebar Nav -->
|
||||
<% if current_user.user_name == "rulingcom" || current_user.beta_tester %>
|
||||
<div id="sidebar-nav" class="tab-pane fade in active">
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t("preferences.nav_enabled") %></label>
|
||||
<div class="controls">
|
||||
<input type="checkbox" class="toggle-check set-sidebar-state" data-disabled="true">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<!-- Page set -->
|
||||
<div id="page_set" class="tab-pane fade">
|
||||
<%= f.fields_for :page_sets do |page_set| %>
|
||||
<%= page_set.check_box :auto_convert_flag %> <%= t('preferences.auto_convert_flag') %>
|
||||
<% end %>
|
||||
</div>
|
||||
<!-- System Email -->
|
||||
<%= f.fields_for :site_settings, @site['site_settings'] do |f| %>
|
||||
|
||||
<div id="system-email" class="tab-pane fade in active">
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t 'mail.service_email' %></label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :service_email, :value => (@site['site_settings']['service_email'] rescue nil), :class=>"input-large", :placeholder=>"Administrator Mail" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t 'mail.reply_email' %></label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :reply_email, :value => (@site['site_settings']['reply_email'] rescue nil), :class=>"input-large", :placeholder=>"Reply Mail" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t 'mail.address' %></label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :address, :value => (@site['site_settings']['address'] rescue nil), :class=>"input-large", :placeholder=>"Email Address" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t 'mail.domain' %></label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :domain, :value => (@site['site_settings']['domain'] rescue nil), :class=>"input-large", :placeholder=>"Domain" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t 'mail.authentication' %></label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :authentication, :value => (@site['site_settings']['authentication'] rescue nil), :class=>"input-large", :placeholder =>"Authentication" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t 'mail.user_name' %></label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :user_name, :value => (@site['site_settings']['user_name'] rescue nil), :class=>"input-large", :placeholder=>"User Name" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t 'mail.password' %></label>
|
||||
<div class="controls">
|
||||
<%= f.password_field :password, :value => (@site['site_settings']['password'] rescue nil), :class=>"input-large", :placeholder=>"Password" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t 'mail.port' %></label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :port, :value => (@site['site_settings']['port'] rescue nil),:placeholder=>"Port", :class=>"input-mini" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t 'mail.tls' %></label>
|
||||
<div class="controls">
|
||||
<%= f.check_box :tls, :checked => (@site['site_settings']['tls'].eql?('1') rescue false),:class=>"toggle-check", :data=> { disabled: true } %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t 'mail.enable_starttls_auto' %></label>
|
||||
<div class="controls">
|
||||
<%= f.check_box 'enable_starttls_auto', :checked => (@site['site_settings']['enable_starttls_auto'].eql?('1') rescue false), :class=>"toggle-check", :data=> { disabled: true } %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
<!-- Openness -->
|
||||
<div id="openness" class="tab-pane fade">
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= I18n.t('site.frontend_open')%></label>
|
||||
<div class="controls">
|
||||
<%= f.check_box :frontend_open , :class=>"toggle-check", :data=> { disabled: true } %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= I18n.t('site.backend_openness_on') %></label>
|
||||
<div class="controls">
|
||||
<%= f.check_box :backend_openness_on , :class=>"toggle-check", :data=> { disabled: true } %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group hide">
|
||||
<label class="control-label muted"><%= I18n.t('site.disable_personal_desktop')%></label>
|
||||
<div class="controls">
|
||||
<%= f.check_box :desktop_closed , :class=>"toggle-check", :data=> { disabled: true } %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Language -->
|
||||
<div id="language-set" class="tab-pane fade">
|
||||
<!-- <div class="control-group">
|
||||
<label class="control-label muted">Enable User Language Detection</label>
|
||||
<div class="controls">
|
||||
<input type="checkbox" class="toggle-check" data-disabled="true">
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- Terms of Use -->
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t('preferences.lang_detection') %>
|
||||
</label>
|
||||
<div class="controls">
|
||||
<%= f.check_box :enable_language_detection, :class => "toggle-check reset_default_locale", data: {disabled: true} %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t('preferences.enable_zh_cn') %>
|
||||
</label>
|
||||
<div class="controls">
|
||||
<%= f.check_box :enable_zh_cn, :class => "toggle-check", data: {disabled: true} %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t('preferences.lang_enabled') %></label>
|
||||
<div class="controls">
|
||||
<% I18n.available_locales.each do |valid_locale| %>
|
||||
<%= check_box_tag "site[in_use_locales][#{valid_locale}]", valid_locale, @site.in_use_locales.include?(valid_locale), :class=>"toggle-check in_use_locales", :data => { :title => "#{t(valid_locale.to_s)}", disabled: true }, "data-deploy"=>"inline" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t('preferences.lang_default') %></label>
|
||||
<div class="controls">
|
||||
<% I18n.available_locales.each do |locale| %>
|
||||
<%= radio_button_tag "site[default_locale]", locale, @locale == locale ,:class=>"toggle-check", :data => { :title => "#{t(locale.to_s)}" }, "data-deploy"=>"inline", :checked => (@site.default_locale.eql?("#{locale}")) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t('preferences.redirect_index') %>
|
||||
</label>
|
||||
<div class="controls">
|
||||
<%= f.check_box :enable_redirect_index, :class => "toggle-check reset_default_locale", data: {disabled: true} %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t('preferences.enable_language_options') %>
|
||||
</label>
|
||||
<div class="controls">
|
||||
<%= f.check_box :enable_language_options, :class => "toggle-check", data: {disabled: true} %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- OrbitBar Them -->
|
||||
<div id="orbitBar-them" class="tab-pane fade">
|
||||
<div class="control-group">
|
||||
<label class="control-label muted">OrbitBar Logo <%= t('preferences.icon') %></label>
|
||||
<div class="controls">
|
||||
<!-- if this page editing please add class "fileupload-edit" -->
|
||||
<div class="fileupload fileupload-new clearfix" data-provides="fileupload">
|
||||
<div class="fileupload-new thumbnail pull-left" style="background:black;">
|
||||
<% if @site.default_image.file.present? %>
|
||||
<%= image_tag( @site.default_image, :size=>"120x120") rescue ''%>
|
||||
<% else %>
|
||||
<%= image_tag "orbit-logo.png",:class => "pull-left upload-picture"%>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="fileupload-preview fileupload-exists thumbnail pull-left"></div>
|
||||
<% if @site.default_image.file.present?%>
|
||||
<span class="btn btn-file">
|
||||
<%= f.file_field :default_image, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %><%= t('preferences.change') %>
|
||||
</span>
|
||||
<%= f.check_box :remove_default_image %>
|
||||
<%= t(:remove) %> OrbitBar Logo
|
||||
<%else%>
|
||||
<span class="btn btn-file">
|
||||
<%= f.file_field :default_image, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %><%= t('preferences.select_image') %>
|
||||
</span>
|
||||
<%end%>
|
||||
<a href="#" class="btn fileupload-exists" data-dismiss="fileupload"><%= t(:cancel) %></a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label muted">Orbit <%= t('preferences.favicon') %></label>
|
||||
<div class="controls">
|
||||
<!-- if this page editing please add class "fileupload-edit" -->
|
||||
<div class="fileupload fileupload-new clearfix" data-provides="fileupload">
|
||||
<div class="fileupload-new thumbnail pull-left">
|
||||
<% if @site.favicon.file.present? %>
|
||||
<%= image_tag( @site.favicon, :size=>"120x120") rescue ''%>
|
||||
<% else %>
|
||||
<%= image_tag "favicon.ico", :class => "pull-left upload-picture"%>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="fileupload-preview fileupload-exists thumbnail pull-left"></div>
|
||||
<% if @site.favicon.file.present?%>
|
||||
<span class="btn btn-file">
|
||||
<%= f.file_field :favicon, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %><%= t('preferences.change') %>
|
||||
</span>
|
||||
<%= f.check_box :remove_favicon %>
|
||||
<%= t(:remove) %> <%= t('preferences.favicon') %>
|
||||
<%else%>
|
||||
<span class="btn btn-file">
|
||||
<%= f.file_field :favicon, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %><%= t('preferences.select_image') %>
|
||||
</span>
|
||||
<%end%>
|
||||
|
||||
<a href="#" class="btn fileupload-exists" data-dismiss="fileupload"><%= t(:cancel) %></a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t('preferences.orbit_bar_background_color') %></label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :orbit_bar_background_color, :class=>'set_color',:type=>'color',:value=>@site.orbit_bar_background_color%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t('preferences.orbit_bar_text_color') %></label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :orbit_bar_text_color, :class=>'set_color',:type=>'color',:value=>@site.orbit_bar_text_color%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t('preferences.orbit_bar_submenu_background_color') %></label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :orbit_bar_submenu_background_color, :class=>'set_color',:type=>'color',:value=>@site.orbit_bar_submenu_background_color%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t('preferences.orbit_bar_submenu_text_color') %></label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :orbit_bar_submenu_text_color, :class=>'set_color',:type=>'color',:value=>@site.orbit_bar_submenu_text_color%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t('preferences.is_hidden_orbit_bar') %></label>
|
||||
<div class="controls">
|
||||
<%if @site.is_hidden_orbit_bar%>
|
||||
<%= f.check_box :is_hidden_orbit_bar ,:checked=>'checked'%>
|
||||
<%else%>
|
||||
<%= f.check_box :is_hidden_orbit_bar ,:checked=>false%>
|
||||
<%end%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t('preferences.orbit_bar_animation_time') %></label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :orbit_bar_animation_time ,:value=>@site.orbit_bar_animation_time %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label muted">Orbit <%= t('preferences.site_logo') %>(second image or the only one image)</label>
|
||||
<div class="controls">
|
||||
<!-- if this page editing please add class "fileupload-edit" -->
|
||||
<div class="fileupload fileupload-new clearfix" data-provides="fileupload">
|
||||
<div class="fileupload-new thumbnail pull-left">
|
||||
<% if @site.site_logo.file.present? %>
|
||||
<%= image_tag( @site.site_logo, :size=>"120x120") rescue ''%>
|
||||
<% else %>
|
||||
<%= image_tag "site-logo.png", :class => "pull-left upload-picture"%>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="fileupload-preview fileupload-exists thumbnail pull-left"></div>
|
||||
<% if @site.site_logo.file.present?%>
|
||||
<span class="btn btn-file">
|
||||
<%= f.file_field :site_logo, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %><%= t('preferences.change') %>
|
||||
</span>
|
||||
<%= f.check_box :remove_site_logo %>
|
||||
<%= t(:remove) %> <%= t('preferences.site_logo') %>
|
||||
<%else%>
|
||||
<span class="btn btn-file">
|
||||
<%= f.file_field :site_logo, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %><%= t('preferences.select_image') %>
|
||||
</span>
|
||||
<%end%>
|
||||
|
||||
<a href="#" class="btn fileupload-exists" data-dismiss="fileupload"><%= t(:cancel) %></a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label muted">Orbit <%= t('preferences.site_logo_1') %></label>
|
||||
<div class="controls">
|
||||
<!-- if this page editing please add class "fileupload-edit" -->
|
||||
<div class="fileupload fileupload-new clearfix" data-provides="fileupload">
|
||||
<div class="fileupload-new thumbnail pull-left">
|
||||
<% if @site.site_logo_1.file.present? %>
|
||||
<%= image_tag( @site.site_logo_1, :size=>"120x120") rescue ''%>
|
||||
<% else %>
|
||||
<%= image_tag "site-logo.png", :class => "pull-left upload-picture"%>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="fileupload-preview fileupload-exists thumbnail pull-left"></div>
|
||||
<% if @site.site_logo_1.file.present?%>
|
||||
<span class="btn btn-file">
|
||||
<%= f.file_field :site_logo_1, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %><%= t('preferences.change') %>
|
||||
</span>
|
||||
<%= f.check_box :remove_site_logo_1 %>
|
||||
<%= t(:remove) %> <%= t('preferences.site_logo_1') %>
|
||||
<%else%>
|
||||
<span class="btn btn-file">
|
||||
<%= f.file_field :site_logo_1, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %><%= t('preferences.select_image') %>
|
||||
</span>
|
||||
<%end%>
|
||||
|
||||
<a href="#" class="btn fileupload-exists" data-dismiss="fileupload"><%= t(:cancel) %></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group"><label class="control-label muted">home_link(for site logo)</label><div class="controls"><%= f.text_field :home_link %></div></div>
|
||||
<div class="control-group"><label class="control-label muted">home_link_1(for site logo 1)</label><div class="controls"><%= f.text_field :home_link_1 %></div></div>
|
||||
<% @site_in_use_locales.each do |locale| %>
|
||||
<%= f.fields_for :site_title do |f| %>
|
||||
<div class="control-group">
|
||||
<label class="control-label muted">Site title (for site logo) (<%= t(locale) %>)</label>
|
||||
<div class="controls">
|
||||
<%= f.text_field locale, :value => (@site.site_title[locale.to_s] rescue nil), :placeholder=>"site_title" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= f.fields_for :site_title_1 do |f| %>
|
||||
<div class="control-group">
|
||||
<label class="control-label muted">Site title 1 (for site logo 1) (<%= t(locale) %>)</label>
|
||||
<div class="controls">
|
||||
<%= f.text_field locale, :value => (@site.site_title_1[locale.to_s] rescue nil), :placeholder=>"site_title_1" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% @site_in_use_locales.each do |locale| %>
|
||||
<%= f.fields_for :mobile_orbit_bar_title_translations do |f| %>
|
||||
<div class="control-group">
|
||||
<label class="control-label muted">Orbit bar title (<%= t(locale) %>)</label>
|
||||
<div class="controls">
|
||||
<%= f.text_field locale, :value => (@site.mobile_orbit_bar_title_translations[locale.to_s] rescue nil), :placeholder=>"Orbit bar title" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="google-oauth" class="tab-pane fade">
|
||||
<div class="control-group">
|
||||
<label class="control-label muted">Enable Google OAuth</label>
|
||||
<div class="controls">
|
||||
<%= f.check_box :google_oauth_enabled %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label muted">Google client id</label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :google_client_id, :value => (@site['google_client_id'] rescue nil), :class=>"input-large google-oauth-fields", :placeholder=>"Google client id", :disabled => !@site[:google_oauth_enabled] %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label muted">Google client secret</label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :google_client_secret, :value => (@site['google_client_secret'] rescue nil), :class=>"input-large google-oauth-fields", :placeholder=>"Google client secret", :disabled => !@site[:google_oauth_enabled] %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert alert-info">Please restart the website after modifying these settings. Click on the restart button and refresh the page in sometime. <a class="btn btn-small btn-primary" id="restart_server">Restart server</a></div>
|
||||
</div>
|
||||
<div id="social-sharer" class="tab-pane fade">
|
||||
<div class="control-group">
|
||||
<label class="control-label muted">Enable Social Share</label>
|
||||
<div class="controls">
|
||||
<input type="checkbox" value="facebook" name="site[every_page_sharer][]" <%= @site.every_page_sharer.include?("facebook") ? "checked=checked" : "" %> > Facebook
|
||||
<input type="checkbox" value="twitter" name="site[every_page_sharer][]" <%= @site.every_page_sharer.include?("twitter") ? "checked=checked" : "" %> > Twitter
|
||||
<input type="checkbox" value="google" name="site[every_page_sharer][]" <%= @site.every_page_sharer.include?("google") ? "checked=checked" : "" %> >
|
||||
Google
|
||||
<input type="checkbox" value="printer" name="site[every_page_sharer][]" <%= @site.every_page_sharer.include?("printer") ? "checked=checked" : "" %> >
|
||||
Printer
|
||||
<input type="hidden" value="disable" name="site[every_page_sharer][]">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- sign up -->
|
||||
<div id="sign-up" class="tab-pane fade">
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= I18n.t('site.roles_for_sign_up')%></label>
|
||||
<div class="controls">
|
||||
<% Role.where(:disabled => false).each do |r| %>
|
||||
<input type="checkbox" value="<%= r.id.to_s %>" name="site[sign_up_roles][]" <%= @site.sign_up_roles.include?(r.id.to_s) ? "checked=checked" : "" %> > <%= r.title %><br />
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- Form Actions -->
|
||||
<div class="form-actions" style="background: none;">
|
||||
<%= f.submit t("submit"), :class => "btn btn-primary" %>
|
||||
<%= f.submit t("cancel"), :class => "btn ", :type => 'reset' %>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
<%end%>
|
||||
|
||||
<% content_for :page_specific_javascript do %>
|
||||
<%end%>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(".language-nav li a").click(function(){window.location.hash = $(this).attr("href")});
|
||||
|
||||
$(document).ready(function(){
|
||||
var language_detection = $("#site_enable_language_detection");
|
||||
var default_locale = $( "input[name='site[default_locale]']" );
|
||||
|
||||
$(language_detection).click(function(){
|
||||
if ( !$(this).parent().hasClass("disable") ){
|
||||
// Disable default language if language detection enbaled
|
||||
$.each($(default_locale),function(){
|
||||
if ( !$(this).parent().hasClass("disable") ){
|
||||
$(this).parent().toggleClass('disable');
|
||||
$(this).toggleClass('disable');
|
||||
}
|
||||
$(language_detection).val(1);
|
||||
});
|
||||
}else{
|
||||
// Enable a default language when language detection is disabled
|
||||
$(default_locale).first().click();
|
||||
}
|
||||
});
|
||||
|
||||
// Disable language detection if default language enbaled
|
||||
$.each($(default_locale),function(){
|
||||
$(this).change(function(){
|
||||
if(!$(language_detection).parent().hasClass("disable")) {
|
||||
$(language_detection).parent().toggleClass('disable');
|
||||
$(language_detection).val(0);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
var locales = <%= @site.in_use_locales.to_json.html_safe %>;
|
||||
|
||||
$(document).ready(function(){
|
||||
$( ".in_use_locales" ).each( function(){
|
||||
$( this ).parent( "div.togglebox" ).addClass( "disabled" );
|
||||
var val = $( this ).val();
|
||||
if( locales.filter(function(a){ return a == val }).length == 1){
|
||||
$( this ).parent( "div.togglebox" ).removeClass( "disabled" );
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
delete locales;
|
||||
|
||||
$(function() {
|
||||
$('a[data-toggle="tab"]').on('click', function (e) {
|
||||
var tab = $(this).attr('href');
|
||||
localStorage.setItem('lastTab', tab);
|
||||
});
|
||||
|
||||
//go to the latest tab, if it exists:
|
||||
var lastTab = localStorage.getItem('lastTab');
|
||||
if (lastTab) {
|
||||
$('a[href='+lastTab+']').click();
|
||||
}
|
||||
});
|
||||
|
||||
$("#site_google_oauth_enabled").on("click",function(){
|
||||
if($(this).is(":checked")){
|
||||
$(".google-oauth-fields").removeAttr("disabled");
|
||||
}else{
|
||||
$(".google-oauth-fields").attr("disabled","disabled");
|
||||
}
|
||||
})
|
||||
$("#restart_server").on("click",function(){
|
||||
$.ajax({
|
||||
url : "<%= admin_site_restart_server_path(@site) %>",
|
||||
type : "get"
|
||||
})
|
||||
return false;
|
||||
})
|
||||
</script>
|
||||
@@ -1,213 +0,0 @@
|
||||
class AttributeValue
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
include Mongoid::Attributes::Dynamic
|
||||
include AttributeValuesHelper
|
||||
|
||||
field :key, type: String
|
||||
|
||||
belongs_to :attribute_field
|
||||
belongs_to :member_profile
|
||||
|
||||
before_save :check_key
|
||||
before_save :data_proc
|
||||
|
||||
def add_more_counter
|
||||
index_max = self["val"].count rescue 0
|
||||
index_max == 0 ? 1 : index_max
|
||||
end
|
||||
|
||||
def value(index = nil)
|
||||
site = Site.first
|
||||
result = case self.attribute_field.markup
|
||||
when 'text_field','text_area'
|
||||
if self.attribute_field.add_more and (self.attribute_field.markup == "text_field")
|
||||
index.nil? ? self["val"] : self["val"][index]
|
||||
else
|
||||
self.attribute_field.get_data["cross_lang"] =="true" ? self["val"] : Hash[site.valid_locales.collect{|lang| [lang,self[lang.to_sym]]}]
|
||||
end
|
||||
when 'select','radio_button','address'
|
||||
self["val"]
|
||||
when 'date'
|
||||
if !self["val"].blank? and !self["val"]['(1i)'].blank?
|
||||
"#{self["val"]['(1i)']}/#{self["val"]['(2i)']}/#{self["val"]['(3i)']}"
|
||||
else
|
||||
self["val"]
|
||||
end
|
||||
when 'checkbox'
|
||||
self["val"]
|
||||
end #end of case self.attribute_field.markup
|
||||
end
|
||||
|
||||
def value=(value)
|
||||
#save everything to temp_data waiting for futher process
|
||||
self[:temp_data] = value
|
||||
end
|
||||
|
||||
def get_field_value
|
||||
if (self.attribute_field.markup.eql?("text_field") || self.attribute_field.markup.eql?("text_area"))
|
||||
value_gsub = self.attribute_field.get_data["cross_lang"] =="true" ? self.value.gsub("<br \/>\r\n","<br>") : self.value[I18n.locale].gsub("<br \/>\r\n","<br>")
|
||||
field_value = value_gsub.gsub("\r\n","<br>")
|
||||
elsif (self.attribute_field.markup.eql?("select") || self.attribute_field.markup.eql?("radio_button"))
|
||||
field_value = self.attribute_field.markup_value["#{self.value}"][I18n.locale] rescue nil
|
||||
elsif self.attribute_field.markup.eql?("address")
|
||||
field_value = rf[:address_key][I18n.locale].map{|k,v| v}.delete_if(&:blank?).join(', ')
|
||||
elsif self.attribute_field.markup.eql?("date")
|
||||
case self.attribute_field.typeC['format']
|
||||
when 'format1'
|
||||
field_value = self.value.to_date.strftime("%Y/%m/%d")
|
||||
when 'format2'
|
||||
field_value = self.value.to_date.strftime("%Y/%m/%d")
|
||||
when 'format3'
|
||||
field_value = self.value.to_date.strftime("%Y/%m")
|
||||
when 'format4'
|
||||
field_value = self.value.to_date.strftime("%Y")
|
||||
end
|
||||
elsif self.attribute_field.markup.eql?("checkbox")
|
||||
field_value = self.value.map {|v| self.attribute_field.markup_value["#{v}"][I18n.locale]}.join(', ') rescue nil
|
||||
end
|
||||
|
||||
field_value = (field_value =~ /\A#{URI::regexp(['http', 'https'])}\z/) ? "<a href='#{field_value}' target='blank'>#{field_value}</a>" : field_value
|
||||
field_value = (field_value =~ /\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i) ? "<a href='mailto:#{field_value}'>#{field_value}</a>" : field_value
|
||||
|
||||
if !field_value.blank?
|
||||
{
|
||||
"key" => self.attribute_field.key,
|
||||
"title" => self.attribute_field.title,
|
||||
"value" => field_value,
|
||||
"val" => field_value = self.value
|
||||
}
|
||||
else
|
||||
{
|
||||
"key" => self.attribute_field.key,
|
||||
"title" => self.attribute_field.title,
|
||||
"value" => " ",
|
||||
"val" => field_value = self.value
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
def get_value_by_locale(locale,add_more_index=nil)
|
||||
case self.attribute_field.markup
|
||||
when "text_field"
|
||||
case self.attribute_field.add_more
|
||||
when true
|
||||
if self.attribute_field.locale
|
||||
add_more_index.nil? ? self.value.collect{|t| t[locale.to_s]}.join(",") : self.value(add_more_index)[locale]
|
||||
else
|
||||
add_more_index.nil? ? self.value.join(",") : self.value(add_more_index)
|
||||
end
|
||||
|
||||
when false
|
||||
self.attribute_field.locale ? self[locale.to_s] : self.value
|
||||
end
|
||||
|
||||
when "select"
|
||||
markup_values = self.attribute_field.self_defined_markup_options? ? self.attribute_field.markup_value : self.attribute_field.markup_value
|
||||
markup_values[self.value][locale.to_s] rescue 'NoData'
|
||||
|
||||
when "text_area"
|
||||
self.attribute_field.locale ? self[locale.to_s] : self.value
|
||||
|
||||
when "date"
|
||||
if self.attribute_field.date_is_range?
|
||||
get_date_by_format(:from) + ' ~ ' + get_date_by_format(:to)
|
||||
# self.value["from"] + ' ~ ' + self.value["to"]
|
||||
else
|
||||
get_date_by_format
|
||||
# self.value
|
||||
end
|
||||
|
||||
when "address"
|
||||
self.value[locale.to_s]
|
||||
|
||||
when "radio_button"
|
||||
markup_values = self.attribute_field.markup_value
|
||||
markup_values[self.value][locale.to_s]
|
||||
|
||||
when "checkbox"
|
||||
markup_values = self.attribute_field.markup_value
|
||||
self.value.collect{|key| markup_values["#{key}"][I18n.locale]}.join(",")
|
||||
when "date_durnation"
|
||||
self.value
|
||||
|
||||
else
|
||||
self.attribute_field.locale ? self[locale.to_s] : self.value
|
||||
end
|
||||
end
|
||||
|
||||
def get_date(item = nil)
|
||||
case item
|
||||
when :from
|
||||
# data = self[:val]["from"]
|
||||
data = self.value["from"]
|
||||
when :to
|
||||
# data = self[:val]["to"]
|
||||
data = self.value["to"]
|
||||
when nil
|
||||
# data = self[:val]
|
||||
data = self.value
|
||||
end
|
||||
|
||||
# Date.new(data["(1i)"].to_i,data["(2i)"].to_i,data["(3i)"].to_i) rescue nil
|
||||
end
|
||||
|
||||
def self.put_field_values(member, field_value_param, field_value_id=nil,field_value_status)
|
||||
if field_value_status.eql?(true)
|
||||
@attribute_field_value = self.find(field_value_id) rescue nil
|
||||
@attribute_field_value.update(field_value_param) rescue nil
|
||||
@attribute_field_value.save rescue nil
|
||||
else
|
||||
@attribute_field_value = member.attribute_values.build(field_value_param) rescue nil
|
||||
@attribute_field_value.save
|
||||
end
|
||||
return @attribute_field_value
|
||||
end
|
||||
|
||||
|
||||
protected
|
||||
|
||||
def unset_all_lang_values
|
||||
VALID_LOCALES.each{|t| self.unset t}
|
||||
end
|
||||
|
||||
def data_proc
|
||||
unless self[:temp_data].nil?
|
||||
case self.attribute_field.markup
|
||||
when "address"
|
||||
self["val"] = self["temp_data"]
|
||||
when 'text_field','text_area'
|
||||
if self.attribute_field.add_more
|
||||
self["val"] = self["temp_data"]
|
||||
else # if not add_more
|
||||
if self.attribute_field.can_muti_lang_input?
|
||||
self[:temp_data].each do |key,val|
|
||||
self[key] = val
|
||||
end if(!self.attribute_field.get_data[:cross_lang])
|
||||
else
|
||||
self["val"] = self[:temp_data]
|
||||
end
|
||||
end # of self.attribute_field.add_more
|
||||
|
||||
when 'select','date','radio_button'
|
||||
self["val"] = self[:temp_data]
|
||||
when 'checkbox'
|
||||
self["val"] = self[:temp_data].keys
|
||||
end #end of case self.attribute_field.markup
|
||||
end # of self[:temp_data].nil?
|
||||
self.unset('temp_data')
|
||||
self.unset('temp')
|
||||
end #of data_proc
|
||||
|
||||
def check_key
|
||||
self.key = self.attribute_field.key
|
||||
end
|
||||
|
||||
def method_missing(*field)
|
||||
if field.size < 1
|
||||
self[field[0]]
|
||||
else
|
||||
self[(field[0].to_s.delete "=")] = field[1]
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,61 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
|
||||
CKEDITOR.editorConfig = function( config ) {
|
||||
config.uiColor = '#e6e6e6';
|
||||
config.defaultLanguage = "en";
|
||||
if(typeof currentLocaleForCKEDITOR != "undefined"){
|
||||
config.language = currentLocaleForCKEDITOR;
|
||||
}else{
|
||||
config.language = '<%= (I18n.locale.to_s == "zh_tw" || I18n.locale.to_s == "zh_cn" ? "zh" : I18n.locale.to_s) %>';
|
||||
}
|
||||
config.height = 400;
|
||||
config.resize_minHeight = 400;
|
||||
config.toolbarCanCollapse = true;
|
||||
config.allowedContent = true;
|
||||
config.pasteFromWordRemoveFontStyles=false;
|
||||
config.pasteFromWordRemoveStyles=false;
|
||||
config.plugins = 'dialogui,dialog,about,a11yhelp,dialogadvtab,basicstyles,blockquote,clipboard,button,panelbutton,panel,floatpanel,colorbutton,colordialog,templates,menu,contextmenu,resize,toolbar,elementspath,enterkey,entities,popup,filebrowser,find,image,fakeobjects,floatingspace,listblock,richcombo,font,format,horizontalrule,htmlwriter,iframe,wysiwygarea,indent,indentblock,indentlist,justify,menubutton,link,list,liststyle,magicline,maximize,newpage,pastetext,pastefromword,removeformat,selectall,showblocks,showborders,sourcearea,specialchar,scayt,stylescombo,tab,table,tabletools,undo,wsc,youtube,codemirror';
|
||||
|
||||
config.toolbarGroups = [
|
||||
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
|
||||
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
|
||||
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] },
|
||||
{ name: 'links' },
|
||||
{ name: 'insert' },
|
||||
{ name: 'forms' },
|
||||
{ name: 'tools' },
|
||||
{ name: 'others' },
|
||||
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
|
||||
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align' ] },
|
||||
{ name: 'styles' },
|
||||
{ name: 'colors' },
|
||||
{ name: 'about' }
|
||||
];
|
||||
|
||||
config.skin = 'moono';
|
||||
|
||||
config.filebrowserBrowseUrl = "<%= Rails.application.routes.url_helpers.admin_assets_path %>";
|
||||
config.filebrowserImageBrowseUrl = "<%= Rails.application.routes.url_helpers.admin_assets_path %>";
|
||||
|
||||
//Font Config
|
||||
config.font_names = 'Arial;Calibri;Comic Sans MS;Courier New;Georgia;Helvetica;Lucida Sans Unicode;Tahoma;Times New Roman;Trebuchet MS;Verdana;微軟正黑體;標楷體;新細明體';
|
||||
|
||||
config.fontSize_sizes = '0.5em;0.563em;0.625em;0.688em;0.750em;0.813em;0.875em;0.938em;1em;1.063em;1.125em;1.250em;1.313em;1.375em;1.438em;1.5em;1.75em;2.25em;3em;4.5em;';
|
||||
|
||||
config.enterMode = CKEDITOR.ENTER_BR;
|
||||
config.shiftEnterMode = CKEDITOR.ENTER_BR;
|
||||
config.templates_files = [ '/assets/ckeditor/orbit_templates.js' ];
|
||||
};
|
||||
|
||||
CKEDITOR.on('instanceReady',function(){
|
||||
$('.cke_button').tooltip({
|
||||
position: {
|
||||
my: "center bottom-4",
|
||||
at: "center top"
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -1,212 +0,0 @@
|
||||
class MemberProfile < ApplicationController
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
include Mongoid::Attributes::Dynamic
|
||||
include Mongoid::Tree
|
||||
include Mongoid::Tree::Ordering
|
||||
|
||||
include OrbitModel::Status
|
||||
include MemberSlug
|
||||
|
||||
field :first_name, type: String, localize: true
|
||||
field :last_name, type: String, localize: true
|
||||
field :sex
|
||||
field :sid
|
||||
field :office_tel
|
||||
field :birthday, type: Date
|
||||
field :address, type: String, localize: true
|
||||
field :personal_website
|
||||
field :fax, type: String, localize: true
|
||||
field :mobile_no, type: String, localize: true
|
||||
field :autobiography, type: String, localize: true
|
||||
field :email, type: String
|
||||
field :position, type: Integer
|
||||
field :rss2_id
|
||||
field :public_privacy, type: Array, default: []
|
||||
field :logged_in_privacy, type: Array, default: []
|
||||
field :locked_privacy, type: Array, default: []
|
||||
|
||||
VALID_EMAIL_FORMAT = /\A[^@\s]+@([^@.\s]+\.)+[^@.\s]+\z/
|
||||
validates :email, uniqueness: true, format: { with: VALID_EMAIL_FORMAT }, if: :email_present?
|
||||
validates :position, uniqueness: true
|
||||
|
||||
has_one :user
|
||||
has_and_belongs_to_many :roles
|
||||
has_and_belongs_to_many :role_statuses
|
||||
has_and_belongs_to_many :member_tags
|
||||
|
||||
has_many :member_profile_field_values
|
||||
accepts_nested_attributes_for :member_profile_field_values, allow_destroy: true
|
||||
|
||||
has_many :attribute_values
|
||||
accepts_nested_attributes_for :attribute_values, allow_destroy: true
|
||||
|
||||
has_many :personal_plugin_intros
|
||||
|
||||
scope :can_display, ->{where(is_hidden: false).order_by([:is_top,:desc],[:created_at,:desc])}
|
||||
before_save :assign_default_position, :if => :assign_default_position?
|
||||
|
||||
before_destroy :delete_personal_plugin_data
|
||||
|
||||
mount_uploader :avatar, AvatarUploader
|
||||
# paginates_per 10
|
||||
|
||||
def get_avatar
|
||||
avatar = (self.avatar.thumb.url == "thumb_person.png" ? "/assets/thumb_person.png" : self.avatar.thumb.url rescue "/assets/thumb_person.png")
|
||||
avatar
|
||||
end
|
||||
|
||||
def name
|
||||
if self.first_name != "" || self.last_name != ""
|
||||
I18n.locale.eql?(:zh_tw) ? "#{self.last_name} #{self.first_name}" : "#{self.first_name} #{self.last_name}"
|
||||
else
|
||||
@locale = I18n.locale
|
||||
@site_in_use_locales = current_site.in_use_locales
|
||||
@name = ""
|
||||
@site_in_use_locales.each_with_index do |locale,i|
|
||||
I18n.locale = locale
|
||||
@name = (I18n.locale.eql?(:zh_tw) ? "#{self.last_name} #{self.first_name}" : "#{self.first_name} #{self.last_name}")
|
||||
@name = @name.gsub(' ','').strip
|
||||
break if @name !=""
|
||||
end
|
||||
I18n.locale = @locale
|
||||
return @name
|
||||
end
|
||||
end
|
||||
|
||||
def get_privacy_type_for_field(id)
|
||||
status = nil
|
||||
if self.public_privacy.include?(id)
|
||||
status = "public"
|
||||
elsif self.logged_in_privacy.include?(id)
|
||||
status = "logged_in"
|
||||
elsif self.locked_privacy.include?(id)
|
||||
status = "locked"
|
||||
else
|
||||
status = "public"
|
||||
end
|
||||
status
|
||||
end
|
||||
|
||||
def name_translations
|
||||
{
|
||||
"en" => "#{self.first_name_translations["en"]} #{self.last_name_translations["zh_tw"]}",
|
||||
"zh_tw" => "#{self.last_name_translations["zh_tw"]} #{self.first_name_translations["zh_tw"]}"
|
||||
}
|
||||
end
|
||||
|
||||
def disable_role=(var)
|
||||
var[:id].each do |id,val|
|
||||
if (val=="true")
|
||||
self.role_ids.reject!{|t| t.to_s == id}
|
||||
elsif(val=="false")
|
||||
self.role_ids += Array(id)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def new_attribute_values=(fields,attribute_type=nil)
|
||||
fields.each do |key,field|
|
||||
if attribute_type.eql?("role")
|
||||
self.attribute_values.build(field)
|
||||
else
|
||||
self.member_profile_field_values.build(field)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def get_attribute_value(attribute_field,attribute_type=nil)
|
||||
if attribute_type.eql?("role")
|
||||
AttributeValue.find_by(attribute_field_id: attribute_field.id, member_profile_id: self.id)
|
||||
else
|
||||
MemberProfileFieldValue.find_by(member_profile_field_id: attribute_field.id, member_profile_id: self.id)
|
||||
end
|
||||
end
|
||||
|
||||
def get_attribute_values(attribute_type=nil)
|
||||
if attribute_type.eql?("role")
|
||||
@attribute_values = self.attribute_values rescue nil
|
||||
else
|
||||
@attribute_values = self.member_profile_field_values rescue nil
|
||||
end
|
||||
end
|
||||
|
||||
def get_value_from_field_id(field_id,attribute_type=nil)
|
||||
if attribute_type.eql?("role")
|
||||
values = get_attribute_values(attribute_type)
|
||||
value = values.detect {|value| value.attribute_field_id == field_id} rescue nil
|
||||
value ? value : nil
|
||||
else
|
||||
values = get_attribute_values
|
||||
value = values.detect {|value| value.member_profile_field_id == field_id} rescue nil
|
||||
value ? value : nil
|
||||
end
|
||||
end
|
||||
|
||||
def self.get_member_list_attribute_field(field_key, attribute_type=nil)
|
||||
if attribute_type.eql?("role")
|
||||
AttributeField.find_by(key: field_key)
|
||||
else
|
||||
MemberProfileField.find_by(key: field_key)
|
||||
end
|
||||
end
|
||||
|
||||
def self.get_member_list_attribute_value(member_profile_id,field_id,attribute_type=nil)
|
||||
if attribute_type.eql?("role")
|
||||
AttributeValue.find_by(member_profile_id: member_profile_id, attribute_field_id: field_id)
|
||||
else
|
||||
MemberProfileFieldValue.find_by(member_profile_id: member_profile_id, member_profile_field_id: field_id)
|
||||
end
|
||||
end
|
||||
|
||||
def self.get_role_member_data_by_sort(field_key, role_status_id)
|
||||
a = Array.new
|
||||
attribute_field_data = get_member_list_attribute_field(field_key,"role")
|
||||
self.where(role_status_ids: role_status_id).desc(:_id).collect{|t| a << [ get_member_list_attribute_value(t.id,attribute_field_data.id)['val'].to_i, t ] }
|
||||
member_data = a.sort
|
||||
member_data_tmp = member_data.collect {|v| v[1] }
|
||||
end
|
||||
|
||||
def get_attribute_data(field)
|
||||
if field["key"] == "member_tags"
|
||||
params = OrbitHelper.params
|
||||
data = self.send(field["key"]).collect{|tag| "<span class='label label-info'><a title='#{tag.title}' style='color:#fff;' href='/#{I18n.locale.to_s}#{params["url"]}/?tag=#{tag.id.to_s}'>#{tag.title}</a></span> "}.join("")
|
||||
else
|
||||
data = self.send(field["key"]) rescue ""
|
||||
end
|
||||
data = (data =~ /\A#{URI::regexp(['http', 'https'])}\z/) ? "<a href='#{data}' target='blank'>#{data}</a>" : data
|
||||
data = (data =~ /\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i) ? "<a href='mailto:#{data}' title='#{data}'>#{data}</a>" : data
|
||||
field_data = data.blank? ? {"key" => field["key"],"title" => I18n.t("users."+field["key"]), "value" => " "} : {"key" => field["key"],"title" => I18n.t("users."+field["key"]), "value" =>data}
|
||||
field_data
|
||||
end
|
||||
|
||||
def get_image_for_show
|
||||
if self.avatar.present?
|
||||
image = self.avatar.thumb.url
|
||||
else
|
||||
image = "http://placehold.it/100x100"
|
||||
end
|
||||
|
||||
image_fields = {"img_src" => image}
|
||||
end
|
||||
|
||||
def delete_personal_plugin_data
|
||||
OrbitApp::Plugin::Registration.all.each do |plugin|
|
||||
class_name = plugin.app_name.constantize
|
||||
plugin_data = class_name.where(member_profile_id: self.id)
|
||||
plugin_data.delete
|
||||
end
|
||||
end
|
||||
|
||||
def assign_default_position?
|
||||
self.position.nil? || self.parent_id_changed?
|
||||
end
|
||||
|
||||
def email_present?
|
||||
self.email.present?
|
||||
end
|
||||
|
||||
def get_role_statuses(role_id)
|
||||
RoleStatus.where(role_id: role_id).any_of(member_profile_ids: self.id)
|
||||
end
|
||||
end
|
||||
@@ -1,458 +0,0 @@
|
||||
class MembersController < ApplicationController
|
||||
helper_method :current_user
|
||||
include AttributeValuesHelper
|
||||
def index
|
||||
page_roles = OrbitHelper.page_categories
|
||||
page_role_status = OrbitHelper.page_role_status
|
||||
params = OrbitHelper.params
|
||||
page = Page.where(:page_id => params[:page_id]).first rescue nil
|
||||
fields_to_show = page.custom_array_field if !page.nil? rescue []
|
||||
fields_to_show = [
|
||||
{"key"=>"name", "type"=>"profile","sort_order"=>2,"link_to_show"=>true},
|
||||
{"key"=>"email", "type"=>"profile"},
|
||||
{"key"=>"office_tel", "type"=>"profile"}
|
||||
] if fields_to_show.blank?
|
||||
|
||||
member_sort_position = OrbitHelper.member_sort_position
|
||||
sort = nil
|
||||
if !member_sort_position
|
||||
sort_select = fields_to_show.to_enum.with_index.select{|v| v[0]['key']=='name'}
|
||||
sort = sort_select.blank? ? nil : sort_select[0][1]
|
||||
end
|
||||
if page_roles.include?("all")
|
||||
roles = Role.all.asc(:key).collect do |role|
|
||||
{ "title" => role.title, "id" => role.id }
|
||||
end
|
||||
else
|
||||
page_role_status.each do |status_id|
|
||||
page_roles << (RoleStatus.find(status_id).role.id.to_s rescue '')
|
||||
end
|
||||
roles = Role.where(:id.in => page_roles.uniq).asc(:key).collect do |role|
|
||||
{ "title" => role.title, "id" => role.id, "status" => RoleStatus.where(:role_id=>role, :_id.in=>page_role_status).asc(:key).to_a }
|
||||
end
|
||||
end
|
||||
tag = nil
|
||||
role_list = []
|
||||
roles.each do |role|
|
||||
status_list = []
|
||||
if !role['status'].blank?
|
||||
role['status'].each do |status|
|
||||
member_profiles = get_members_by_status(status, sort, fields_to_show, member_sort_position, params)
|
||||
status_list << { "status-title" => status.title, "members" => member_profiles } if !member_profiles.blank?
|
||||
end
|
||||
else
|
||||
# Members with status
|
||||
role_status = RoleStatus.order_by(:key=>"asc").where(:role_id=>role['id'])
|
||||
role_status_ids = role_status.collect{|status| status.id.to_s}
|
||||
|
||||
role_status.each do |status|
|
||||
member_profiles = get_members_by_status(status, sort, fields_to_show, member_sort_position, params)
|
||||
next if member_profiles.blank?
|
||||
status_list << { "status-title" => status.title, "members" => member_profiles }
|
||||
end
|
||||
|
||||
# Members without status
|
||||
member_profiles = []
|
||||
|
||||
if params[:tag].blank?
|
||||
MemberProfile.not_in(:role_status_ids.in=>role_status_ids).where(:role_ids.in=>[role['id']]).collect do |profile|
|
||||
if profile.user.nil? || profile.user.approved
|
||||
get_member_data_return = get_member_data(profile, fields_to_show)
|
||||
if !get_member_data_return.nil?
|
||||
member_profiles << get_member_data_return
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
tag = MemberTag.find(params[:tag]) rescue nil
|
||||
if !tag.nil?
|
||||
MemberProfile.not_in(:role_status_ids.in=>role_status_ids).where(:role_ids.in=>[role['id']], :member_tag_ids.in => [tag.id]).each do |profile|
|
||||
if profile.user.nil? || profile.user.approved
|
||||
get_member_data_return = get_member_data(profile, fields_to_show)
|
||||
if !get_member_data_return.nil?
|
||||
member_profiles << get_member_data_return
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if member_sort_position
|
||||
member_profiles = member_profiles.sort_by{|data| (data['list_order'])} rescue member_profiles
|
||||
else
|
||||
member_profiles = member_profiles.sort_by{|data| (data['profile_data'][sort]['sort_value'] rescue 0)} rescue member_profiles
|
||||
end
|
||||
status_list << { "status-title" => role['title'], "members" => member_profiles } if !member_profiles.blank?
|
||||
end
|
||||
role_list << { "role-title" => role['title'], "status-list" => status_list }
|
||||
end
|
||||
{
|
||||
"roles" => role_list,
|
||||
"extras" => {
|
||||
"widget-title"=>((params[:tag].blank? ? t(:member_) : (tag.nil? ? "Tag not found" : t(:member_) + " - Filtered by <i>#{tag.title}</i>")) rescue t(:member_))
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
def get_members_by_status(status, sort=nil, fields_to_show, member_sort_position, params)
|
||||
member_profiles = []
|
||||
mps = []
|
||||
if params[:tag].blank?
|
||||
mps = status.member_profiles.asc(:first_name)
|
||||
else
|
||||
tag = MemberTag.find(params[:tag]) rescue nil
|
||||
mps = status.member_profiles.where(:member_tag_ids.in => [tag.id]).asc(:first_name) if !tag.nil?
|
||||
end
|
||||
|
||||
mps.each do |member|
|
||||
if member.user.nil? || member.user.approved
|
||||
get_member_data_return = get_member_data(member, fields_to_show)
|
||||
if !get_member_data_return.nil?
|
||||
member_profiles << get_member_data_return
|
||||
end
|
||||
end
|
||||
end
|
||||
if member_sort_position
|
||||
return member_profiles.sort_by{|data| (data['list_order'])} rescue member_profiles
|
||||
else
|
||||
return member_profiles.sort_by{|data| (data['profile_data'][sort]['sort_value'] rescue 0)} rescue member_profiles
|
||||
end
|
||||
end
|
||||
|
||||
def get_member_data(member, fields_to_show)
|
||||
image = member.avatar.present? ? member.avatar.thumb.url : ActionController::Base.helpers.asset_path('member-pic.png')
|
||||
member_data_return = member_data(member, fields_to_show)
|
||||
if !member_data_return.blank?
|
||||
{
|
||||
'profile_data'=> member_data_return,
|
||||
'list_order' => member.position,
|
||||
'name' => member.name,
|
||||
'image'=>image,
|
||||
"link_to_show" => OrbitHelper.url_to_show(member.to_param)
|
||||
}
|
||||
else
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
def show
|
||||
params = OrbitHelper.params
|
||||
member = MemberProfile.find_by(uid: params[:uid]) rescue nil
|
||||
page = Page.where(:page_id => params[:page_id]).first rescue nil
|
||||
|
||||
profile_data = []
|
||||
fields_to_show = []
|
||||
|
||||
fields_to_show = page.custom_array_field_for_show rescue []
|
||||
|
||||
#role status
|
||||
member.roles.where(:disabled => false).asc("_id").collect do |role|
|
||||
role_status = member.role_statuses.where(role_id: role.id).map{|t|t.title.to_s}.join(',') rescue ''
|
||||
profile_data = profile_data.push({"key"=>"role_status", "title"=>"", "value"=> role_status, "title_class"=>"member-data-title-role-status", "value_class"=>"member-data-value-role-status"}) if !role_status.blank?
|
||||
if fields_to_show.blank?
|
||||
attribute_field = role.attribute_fields.first
|
||||
if !attribute_field.blank? && !attribute_field.to_show.blank?
|
||||
profile_data = profile_data + member_data(member, [{"id"=> attribute_field.id.to_s, "key"=> attribute_field.key.to_s, "type"=>"role"}])
|
||||
end
|
||||
end
|
||||
end
|
||||
if fields_to_show.blank?
|
||||
fields_to_show = [
|
||||
{"key"=>"name", "type"=>"profile"},
|
||||
{"key"=>"office_tel", "type"=>"profile"},
|
||||
{"key"=>"email", "type"=>"profile"}
|
||||
]
|
||||
|
||||
profile_data = profile_data + member_data(member, fields_to_show)
|
||||
|
||||
profile_fields_to_show = []
|
||||
|
||||
# member info
|
||||
infos = MemberInfo.order('created_at DESC')
|
||||
infos.each do |info|
|
||||
info.member_profile_fields.each do |member_profile_field|
|
||||
profile_fields_to_show << {"id"=> member_profile_field.id.to_s, "key"=> member_profile_field.key, "type"=>"custom"} if !member_profile_field.to_show.blank?
|
||||
end
|
||||
end
|
||||
profile_data = profile_data + member_data(member, profile_fields_to_show)
|
||||
|
||||
# member role
|
||||
role_fields_to_show = []
|
||||
member.roles.where(:disabled => false).asc("_id").collect do |role|
|
||||
role.attribute_fields.where(:key.ne => 'job_title').asc("_id").each do |attribute_field|
|
||||
role_fields_to_show << {"id"=> attribute_field.id.to_s,"key"=> attribute_field.key.to_s, "type"=>"role"} if !attribute_field.to_show.blank?
|
||||
end
|
||||
end
|
||||
profile_data = profile_data + member_data(member, role_fields_to_show)
|
||||
else
|
||||
profile_data = profile_data + member_data(member, fields_to_show)
|
||||
auto = profile_data.select{|pd| pd if pd["key"] == "autobiography"}
|
||||
if !auto.blank?
|
||||
auto = auto.first
|
||||
profile_data.delete(auto)
|
||||
end
|
||||
end
|
||||
|
||||
# member plugin
|
||||
# plugins = (current_site.personal_plugins_sort.blank? ? OrbitApp::Plugin::Registration.all : OrbitApp::Plugin::Registration.sort_by_array(current_site.personal_plugins_sort)) rescue nil
|
||||
if current_site.personal_plugins_sort.blank?
|
||||
plugins = OrbitApp::Plugin::Registration.all rescue nil
|
||||
else
|
||||
plugin_list = OrbitApp::Plugin::Registration.all.collect{|p| p.module_app_name}
|
||||
plugin_list = current_site.personal_plugins_sort | plugin_list
|
||||
plugins = OrbitApp::Plugin::Registration.sort_by_array(plugin_list) rescue nil
|
||||
end
|
||||
plugin_list = plugins.collect.with_index do |plugin, idx|
|
||||
|
||||
intro = PersonalPluginIntro.find_by(member_profile_id: member.id, _type: "#{plugin.app_name}Intro") rescue nil
|
||||
|
||||
if intro.nil? or intro.complete_list
|
||||
|
||||
plugin_data = plugin.app_name.constantize.where(member_profile_id: member,:is_hidden=>false) rescue nil
|
||||
# pd = plugin_data.collect do |p|
|
||||
# slug_title = ["JournalPaper","WritingConference"].include?(plugin.app_name) ? p.create_link : p.slug_title
|
||||
# {
|
||||
# "data_title" => slug_title,
|
||||
# "link_to_show" => OrbitHelper.url_to_plugin_show(p.to_param,plugin.module_app_name.underscore)
|
||||
# }
|
||||
# end
|
||||
pd = []
|
||||
has_plugin_method = plugin.app_name.constantize.respond_to?("get_plugin_datas_to_member") rescue false
|
||||
|
||||
if !has_plugin_method && (plugin.app_name == 'JournalPaper' or plugin.app_name == 'WritingConference' or plugin.app_name == 'Book')
|
||||
|
||||
pd_title = {}
|
||||
|
||||
temp_pds = plugin_data.sort_for_frontend rescue nil
|
||||
temp_pds = plugin_data.where(:is_hidden=>false).desc(:year) if temp_pds.nil? # for old sites without plugins update
|
||||
|
||||
plugin_datas = temp_pds.collect do |p|
|
||||
{
|
||||
"pd_datas" => [{ "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,plugin.module_app_name.underscore)}' title='#{p.create_link}' target='_blank'>#{p.create_link}" }]
|
||||
}
|
||||
end
|
||||
|
||||
else
|
||||
|
||||
datas = plugin.app_name.constantize.get_plugin_datas_to_member(plugin_data)
|
||||
pd_title = datas[0] rescue {}
|
||||
plugin_datas = datas[1] rescue {}
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
if !intro.blank?
|
||||
|
||||
if !intro.brief_intro.blank?
|
||||
pdi = []
|
||||
pdi << {"data_intro_title" => intro.text.html_safe}
|
||||
end
|
||||
|
||||
if intro.complete_list.blank?
|
||||
complete_display = "hide"
|
||||
|
||||
pd_title = {}
|
||||
plugin_datas = {}
|
||||
end
|
||||
|
||||
if intro.brief_intro.blank?
|
||||
brief_display = "hide"
|
||||
pdi = {}
|
||||
end
|
||||
else
|
||||
|
||||
pdi = [{"data_intro_title" => ''}] if !plugin_datas.blank?
|
||||
|
||||
end
|
||||
|
||||
|
||||
{
|
||||
"plugin_data" => pd,
|
||||
"pd_title" => pd_title,
|
||||
"plugin_datas" => plugin_datas,
|
||||
"plugin_data_intro" => pdi,
|
||||
"complete_display" => complete_display,
|
||||
"brief_display" => brief_display,
|
||||
"plugin_name" => plugin.module_app_name.underscore,
|
||||
"plugin_title" => t('module_name.'+plugin.module_app_name.underscore),
|
||||
"plugin_class" => idx==0 ? "active" : ""
|
||||
}
|
||||
|
||||
end
|
||||
plugin_list = plugin_list.reject{|plugin| plugin['plugin_datas'].blank? and plugin['plugin_data_intro'].blank?}
|
||||
|
||||
vlog_module = ModuleApp.find_by_key("vlog") rescue nil
|
||||
|
||||
if !vlog_module.nil? && !member.user.nil?
|
||||
plugin_data = VLog.where(create_user_id: member.user.id) rescue nil
|
||||
if plugin_data.count > 0
|
||||
datas = VLog.get_plugin_datas_to_member(plugin_data)
|
||||
pd_title = datas[0] rescue {}
|
||||
plugin_datas = datas[1] rescue {}
|
||||
|
||||
plugin_list << {
|
||||
"plugin_data" => [],
|
||||
"pd_title" => pd_title,
|
||||
"plugin_datas" => plugin_datas,
|
||||
"plugin_data_intro" => {},
|
||||
"complete_display" => nil,
|
||||
"brief_display" => nil,
|
||||
"plugin_name" => vlog_module.get_registration.key,
|
||||
"plugin_title" => t("vlog.vlog"),
|
||||
"plugin_class" => ""
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
if !auto.blank?
|
||||
if plugin_list.empty?
|
||||
plugin_list << {"plugin_data"=>[], "pd_title"=>[{"plugin_data_title"=>auto["title"]}], "plugin_datas"=>[{"pd_datas"=>[{"data_title"=>auto["value"]}]}], "plugin_name" => auto["key"],"plugin_class" => "active", "plugin_title" => auto["title"], "plugin_data_intro"=>[{"data_intro_title"=>""}], "complete_display"=>nil, "brief_display"=>nil}
|
||||
else
|
||||
plugin_list.first["plugin_class"] = ""
|
||||
plugin_list.unshift({"plugin_data"=>[], "pd_title"=>[{"plugin_data_title"=>auto["title"]}], "plugin_datas"=>[{"pd_datas"=>[{"data_title"=>auto["value"]}]}], "plugin_name" => auto["key"],"plugin_class" => "active", "plugin_title" => auto["title"], "plugin_data_intro"=>[{"data_intro_title"=>""}], "complete_display"=>nil, "brief_display"=>nil})
|
||||
end
|
||||
end
|
||||
|
||||
{
|
||||
"plugins" => plugin_list,
|
||||
"profile_data" => profile_data,
|
||||
"data" => {
|
||||
"image" => member.avatar.present? ? member.avatar.url : ActionController::Base.helpers.asset_path('member-pic.png'),
|
||||
"name" => member.name
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
def member_data(member, fields_to_show)
|
||||
profile_data = []
|
||||
fields_to_show.each do |field|
|
||||
privacy_approved_status = true
|
||||
if field['type'] != 'role'
|
||||
field_key = field["key"]
|
||||
else
|
||||
field_key = field["id"]
|
||||
end
|
||||
privacy_approved_status = false if member.get_privacy_type_for_field(field_key) != "public"
|
||||
if !OrbitHelper.current_user.nil?
|
||||
if(member.get_privacy_type_for_field(field_key) == "logged_in")
|
||||
privacy_approved_status = true
|
||||
elsif(member.get_privacy_type_for_field(field_key) == "locked")
|
||||
if member.user.id == OrbitHelper.current_user.id || OrbitHelper.current_user.is_admin?
|
||||
privacy_approved_status = true
|
||||
end
|
||||
end
|
||||
end
|
||||
if member.get_privacy_type_for_field(field_key) == "default"
|
||||
if field['type'] != 'role'
|
||||
privacy_approved_status = true #Todo: set not role field's default privacy_approved_status
|
||||
else
|
||||
case (AttributeField.find(field["id"]).privacy_default rescue nil)
|
||||
when 'public'
|
||||
privacy_approved_status = true
|
||||
when 'logged_in'
|
||||
privacy_approved_status = true if !OrbitHelper.current_user.nil?
|
||||
when 'locked'
|
||||
if !OrbitHelper.current_user.nil?
|
||||
privacy_approved_status = true if member.user.id == OrbitHelper.current_user.id || OrbitHelper.current_user.is_admin?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
case field['type']
|
||||
when 'profile'
|
||||
next if !privacy_approved_status
|
||||
field_data = member.get_attribute_data(field) rescue {}
|
||||
when 'custom'
|
||||
if !field['id'].blank?
|
||||
next if !privacy_approved_status
|
||||
field_data = member.member_profile_field_values.find_by(:member_profile_field_id=>field['id'],:key=>field['key']).get_field_value rescue {"value" => " "}
|
||||
else
|
||||
field_data = member.member_profile_field_values.find_by(:key=>field['key']).get_field_value rescue {"value" => " "}
|
||||
end
|
||||
when 'role'
|
||||
av = member.attribute_values.find_by(:attribute_field_id=>field['id']) rescue nil #some role's key has been changed to sort number,so it doesn't work when searching field from using its key
|
||||
field_data = {"value" => " "}
|
||||
if !av.nil?
|
||||
next if !privacy_approved_status
|
||||
r = av.attribute_field.role rescue nil
|
||||
if !r.nil?
|
||||
if member.roles.include?(r)
|
||||
field_data = av.get_field_value(member) rescue {"value" => " "}
|
||||
end
|
||||
end
|
||||
else
|
||||
avs = member.attribute_values.find_by(:key=>field['key']) rescue []
|
||||
avs.each do |av|
|
||||
if !av.nil?
|
||||
r = av.attribute_field.role rescue nil
|
||||
if !r.nil? && member.roles.include?(r)
|
||||
field_data = av.get_field_value(member) rescue {"value" => " "}
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
if avs.blank? && !field['id'].nil?
|
||||
attr_field = AttributeField.find(field['id']) rescue nil
|
||||
if !attr_field.blank? && attr_field.markup.eql?("member_relationship")
|
||||
field_data = {
|
||||
"key" => attr_field.key,
|
||||
"title" => attr_field.title,
|
||||
"value" => get_member_show(attr_field.get_member_relationship(member.id.to_s))
|
||||
}
|
||||
if field_data['value'].blank?
|
||||
field_data['value'] = ' '
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
next if field_data.blank? || field_data['value'].blank? || (OrbitHelper.params[:target_action] == "show" && field_data['value'] == " ")
|
||||
|
||||
if field['sort_order']
|
||||
field_data['sort_value'] = field_data['val'].blank? ? field_data['value'] : field_data['val']
|
||||
if !field_data['sort_value'].is_a?(Hash)
|
||||
if field_data['sort_value'].is_a?(Integer) || (field_data['sort_value'].is_i? rescue false)
|
||||
field_data['sort_value'] = field_data['sort_value'].to_i rescue field_data['sort_value']
|
||||
elsif I18n.locale == :zh_tw
|
||||
field_data['sort_value'] = field_data['sort_value'].strip.encode("Big5") rescue "簡".encode("Big5")
|
||||
end
|
||||
end
|
||||
end
|
||||
@current_field_value = field_data['value']
|
||||
if (@current_field_value.gsub(' ','').strip rescue nil) == ""
|
||||
@locale = I18n.locale
|
||||
@site_in_use_locales = current_site.in_use_locales
|
||||
@new_field_data = Hash.new
|
||||
@site_in_use_locales.each_with_index do |locale,i|
|
||||
I18n.locale = locale
|
||||
@new_field_data = member.get_attribute_data(field) rescue {}
|
||||
break if @new_field_data['value'].to_s.gsub(' ','').strip !=""
|
||||
end
|
||||
field_data['value'] = @new_field_data['value'].nil? ? " " : @new_field_data['value']
|
||||
I18n.locale = @locale
|
||||
end
|
||||
if field['link_to_show']
|
||||
if field_data['value'] == ' ' #空白欄位
|
||||
field_data['value'] = "" #若無網站連結,刪除實驗室網站字樣
|
||||
field_data['title'] = "" #無網站連結,則不顯示
|
||||
elsif field_data['value'].include? 'href='
|
||||
field_data['value'] = "<a title='#{field_data['title']}'#{field_data['value']}</a>"
|
||||
else
|
||||
field_data['value'] = "<a title='#{field_data['value']}' href='#{OrbitHelper.url_to_show(member.to_param)}'>#{field_data['value']}</a>"
|
||||
end
|
||||
#field_data['value'] = "<a title='#{field_data['value']}' href='#{OrbitHelper.url_to_show(member.to_param)}'>#{field_data['value']}</a>"
|
||||
end
|
||||
|
||||
if field['max_length']
|
||||
field_data['value'] = (field_data['value'].length > field['max_length']) ? field_data['value'][0..field['max_length']]+'...' : field_data['value']
|
||||
end
|
||||
|
||||
field_data['title_class'] = "member-data-title-"+field['key'].to_s.underscore.gsub('_','-')
|
||||
field_data['value_class'] = "member-data-value-"+field['key'].to_s.underscore.gsub('_','-')
|
||||
if !field_data['title'].blank? && !field_data['value'].blank?
|
||||
profile_data.push(field_data)
|
||||
end
|
||||
end
|
||||
return profile_data
|
||||
end
|
||||
end
|
||||
@@ -1,6 +0,0 @@
|
||||
class PageSet
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
belongs_to :site
|
||||
field :auto_convert_flag, type: Boolean, :default => false
|
||||
end
|
||||
@@ -1,737 +0,0 @@
|
||||
# pass the layout=false for not rendering the layouts and also can specify the methods to in the backend controller.
|
||||
# data-layout-content="arrayname" in layouts can be used to render data in the array
|
||||
require 'zhconv'
|
||||
require "uri"
|
||||
class PagesController < ApplicationController
|
||||
before_action :get_key
|
||||
layout :get_layout
|
||||
include PagesHelper
|
||||
before_filter :check_frontend_open, :only => [:home,:show]
|
||||
before_filter :check_authorization, :except => [:home,:show]
|
||||
before_filter :set_edit_mode
|
||||
prepend_view_path "app/templates"
|
||||
|
||||
def index
|
||||
@pages = Page.all
|
||||
# render json: @pages
|
||||
end
|
||||
|
||||
def edit_view
|
||||
@manifest = @key
|
||||
@dataApi = "edit"
|
||||
view = get_view
|
||||
if File.exists?(view)
|
||||
render view
|
||||
end
|
||||
end
|
||||
|
||||
def home
|
||||
@manifest = @key
|
||||
page = Page.root
|
||||
Thread.new do
|
||||
impressionist(page)
|
||||
end
|
||||
page.inc(view_count: 1)
|
||||
params[:is_frontend_view] = "true"
|
||||
OrbitHelper.set_params params,current_user
|
||||
OrbitHelper.set_site_locale locale
|
||||
OrbitHelper.set_request_object request
|
||||
OrbitHelper.render_meta_tags []
|
||||
render :html => render_final_page("home",page,true).html_safe
|
||||
end
|
||||
|
||||
def show
|
||||
display_type = ""
|
||||
path = request.path.split('/')
|
||||
params[:is_frontend_view] = "true"
|
||||
if path.size <= 2
|
||||
redirect_to root_path
|
||||
else
|
||||
if path.last.include? '-'
|
||||
params[:page_id] = path[-2]
|
||||
s = CGI.unescape(path[-1])
|
||||
s.encode!('UTF-8')
|
||||
params[:slug] = s
|
||||
uid = path[-1].split("-").last
|
||||
uid = uid.split("?").first
|
||||
if uid.include?(".")
|
||||
render :file => "#{Rails.root}/app/views/errors/404.html", :layout => false, :status => :not_found
|
||||
return
|
||||
end
|
||||
params[:uid] = uid
|
||||
params[:target_action] = params[:method] || "show"
|
||||
display_type = "show"
|
||||
else
|
||||
params[:page_id] = path[-1]
|
||||
params[:slug] = nil
|
||||
params[:uid] = nil
|
||||
params[:target_action] = params[:method] || "index"
|
||||
display_type = "index"
|
||||
OrbitHelper.set_page_number params[:page_no].to_i || 1
|
||||
end
|
||||
page = Page.find_by_param(params[:page_id])
|
||||
if !page.nil?
|
||||
if !page.user_can_access?(current_user)
|
||||
render :file => "#{Rails.root}/app/views/errors/403.html", :layout => false, :status => 403
|
||||
return
|
||||
end
|
||||
if !page.enabled_for_mobile && !$mobile.blank?
|
||||
render :file => "#{Rails.root}/app/views/errors/404.html", :layout => false, :status => :not_found
|
||||
return
|
||||
end
|
||||
if page.enabled_for.include? I18n.locale.to_s
|
||||
if page.page_type == "link"
|
||||
begin
|
||||
refer_url = URI.parse(page.external_url).to_s
|
||||
rescue URI::InvalidURIError
|
||||
refer_url = root_url
|
||||
end
|
||||
redirect_to refer_url
|
||||
return
|
||||
end
|
||||
module_app = page.module.downcase.pluralize
|
||||
params[:target_controller] = "#{module_app}"
|
||||
if display_type == "index"
|
||||
params[:layout_type] = params[:method] || page.layout || "index"
|
||||
end
|
||||
params[:url] = page.url
|
||||
categories = []
|
||||
if page.module == "member"
|
||||
if page.categories.first == "all"
|
||||
categories = ["all"]
|
||||
else
|
||||
page.categories.each do |c|
|
||||
category = Role.find(c) rescue nil
|
||||
if !category.nil? && !category.disabled
|
||||
categories << c
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
page.categories.each do |c|
|
||||
category = Category.find(c) rescue nil
|
||||
if !category.nil? && !category.disable
|
||||
categories << c
|
||||
end
|
||||
end
|
||||
categories = ["all"] if categories.blank?
|
||||
end
|
||||
@manifest = @key
|
||||
OrbitHelper.set_params params,current_user
|
||||
OrbitHelper.set_request_object request
|
||||
OrbitHelper.set_site_locale locale
|
||||
OrbitHelper.set_this_module_app module_app.singularize
|
||||
OrbitHelper.set_page_categories categories || ["all"]
|
||||
OrbitHelper.set_page_tags page.tags || []
|
||||
OrbitHelper.set_page_role_status page.role_status || []
|
||||
OrbitHelper.set_member_sort_position page.member_sort_position
|
||||
OrbitHelper.set_page_data_count page.data_count
|
||||
if params[:layout].kind_of?(String)
|
||||
layout = to_bool(params[:layout])
|
||||
else
|
||||
layout = true
|
||||
end
|
||||
|
||||
Thread.new do
|
||||
impressionist(page)
|
||||
end
|
||||
page.inc(view_count: 1)
|
||||
render :html => render_final_page("#{module_app}/#{params[:target_action]}",page,layout).html_safe
|
||||
else
|
||||
if Site.first.enable_redirect_index
|
||||
redirect_to root_url
|
||||
else
|
||||
render :file => "#{Rails.root}/app/views/errors/411.html", :layout => false, :status => :not_found
|
||||
end
|
||||
end
|
||||
else
|
||||
render :file => "#{Rails.root}/app/views/errors/404.html", :layout => false, :status => :not_found
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def update_child_pages_url(page)
|
||||
page.child_page.each do |cp|
|
||||
if !cp.child_page.blank?
|
||||
update_child_pages_url(cp)
|
||||
else
|
||||
cp.url = page.url + "/#{cp.page_id}"
|
||||
cp.save
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def update_item_position
|
||||
@page = Page.find(params[:id])
|
||||
new_parent_page = Page.find(params[:parent_id])
|
||||
old_parent_page_id = @page.parent_page_id
|
||||
@page.parent_page_id = new_parent_page.id
|
||||
if new_parent_page.id != old_parent_page_id
|
||||
url = (new_parent_page.url == "/" ? "" : new_parent_page.url)
|
||||
@page.url = url + "/#{@page.page_id}"
|
||||
if !@page.child_page.blank?
|
||||
update_child_pages_url(@page)
|
||||
end
|
||||
end
|
||||
@page.save
|
||||
params["children_ids"].each_with_index do |child,i|
|
||||
page = Page.find(child)
|
||||
page.number = i
|
||||
page.save
|
||||
end
|
||||
|
||||
if new_parent_page.id != old_parent_page_id
|
||||
old_parent_page = Page.find(old_parent_page_id)
|
||||
|
||||
# old_parent_page.child_page.each_with_index do |page,i|
|
||||
# page.number = i
|
||||
# page.save
|
||||
# end
|
||||
params["parent_children_ids"] = params["parent_children_ids"] || []
|
||||
params["parent_children_ids"].each_with_index do |child, i|
|
||||
page = Page.find(child)
|
||||
page.number = i
|
||||
page.save
|
||||
end
|
||||
end
|
||||
render :json => {"success"=>true}.to_json
|
||||
end
|
||||
|
||||
def preview
|
||||
render render_final_page
|
||||
end
|
||||
|
||||
def destroy
|
||||
page = Page.find(params[:id])
|
||||
# @parent_pages = page.parent_pages_without_root
|
||||
@pageid = page.id.to_s
|
||||
page.destroy
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
def import_widgets
|
||||
page = Page.find(params[:id]) rescue nil
|
||||
page.page_parts.destroy_all
|
||||
if !page.nil?
|
||||
page.parent_page.page_parts.each do |pp|
|
||||
new_pp = pp.clone
|
||||
new_pp.page_id = page.id
|
||||
pp.sub_parts.each do |sp|
|
||||
new_sp = sp.clone
|
||||
new_pp.sub_parts << new_sp
|
||||
end
|
||||
new_pp.save
|
||||
page.page_parts << new_pp
|
||||
end
|
||||
page.save
|
||||
end
|
||||
render :json => {"success" => true}.to_json
|
||||
end
|
||||
|
||||
def get_member_attributes
|
||||
@page_id = params[:page_id]
|
||||
@type = params[:type]
|
||||
@selected_attribs = []
|
||||
if @type == "index"
|
||||
@selected_attribs = Page.find(@page_id).custom_array_field
|
||||
@selected_attribs = [
|
||||
{"key"=>"name", "type"=>"profile","sort_order"=>2,"link_to_show"=>true, "human_readable" => I18n.t("users.name")},
|
||||
{"key"=>"email", "type"=>"profile", "human_readable" => I18n.t("users.email")},
|
||||
{"key"=>"office_tel", "type"=>"profile", "human_readable" => I18n.t("users.office_tel")}
|
||||
] if @selected_attribs.blank?
|
||||
elsif @type == "show"
|
||||
@selected_attribs = Page.find(@page_id).custom_array_field_for_show
|
||||
if @selected_attribs.blank?
|
||||
@selected_attribs = [
|
||||
{"key"=>"name", "type"=>"profile","sort_order"=>2,"link_to_show"=>true, "human_readable" => I18n.t("users.name")},
|
||||
{"key"=>"email", "type"=>"profile", "human_readable" => I18n.t("users.email")},
|
||||
{"key"=>"office_tel", "type"=>"profile", "human_readable" => I18n.t("users.office_tel")}
|
||||
]
|
||||
infos = MemberInfo.order('created_at DESC')
|
||||
infos.each do |info|
|
||||
info.member_profile_fields.each do |member_profile_field|
|
||||
@selected_attribs << {"id"=> member_profile_field.id.to_s, "key"=> member_profile_field.key, "type"=>"custom"} if !member_profile_field.to_show.blank?
|
||||
end
|
||||
end
|
||||
Role.where(:disabled => false).each do |role|
|
||||
role.attribute_fields.each do |attribute_field|
|
||||
@selected_attribs << {"id"=> attribute_field.id.to_s, "key"=> attribute_field.key, "type"=>"role", "role_key" => role.key}# if !attribute_field.to_show.blank?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
personal_attribs = [
|
||||
{"key" => "first_name", "human_readable" => I18n.t("users.first_name")},
|
||||
{"key" => "last_name", "human_readable" => I18n.t("users.last_name")},
|
||||
{"key" => "name", "human_readable" => I18n.t("users.name")},
|
||||
{"key" => "sex", "human_readable" => I18n.t("users.sex")},
|
||||
{"key" => "office_tel", "human_readable" => I18n.t("users.office_tel")},
|
||||
{"key" => "mobile_no", "human_readable" => I18n.t("users.mobile_no")},
|
||||
{"key" => "fax", "human_readable" => I18n.t("users.fax")},
|
||||
{"key" => "member_tags", "human_readable" => I18n.t("users.member_tags")},
|
||||
{"key" => "birthday", "human_readable" => I18n.t("users.birthday")},
|
||||
{"key" => "address", "human_readable" => I18n.t("users.address")},
|
||||
{"key" => "personal_website", "human_readable" => I18n.t("users.personal_website")},
|
||||
{"key" => "autobiography", "human_readable" => I18n.t("users.autobiography")},
|
||||
{"key" => "email", "human_readable" => I18n.t("users.email")}
|
||||
]
|
||||
|
||||
custom_attribs = MemberProfileField.all.asc(:created_at).collect do |mpf|
|
||||
{"key" => mpf.key, "human_readable" => mpf.title, "id" => mpf.id.to_s}
|
||||
end
|
||||
|
||||
role_attribs = []
|
||||
ra = AttributeField.all.asc(:created_at).group_by(&:role)
|
||||
keys = ra.keys
|
||||
keys.each do |r|
|
||||
next if r.nil?
|
||||
t = {"role" => r.title, "role_key" => r.key, "attributes" => []}
|
||||
ra[r].each do |af|
|
||||
t["attributes"] << {"key" => af.key, "human_readable" => af.title, "id" => af.id.to_s}
|
||||
end
|
||||
role_attribs << t
|
||||
end
|
||||
|
||||
@attribs = {
|
||||
"profile" => personal_attribs,
|
||||
"custom" => custom_attribs,
|
||||
"role" => role_attribs,
|
||||
"types" =>[
|
||||
{"key" => "profile", "human_readable" => "Profile"},
|
||||
{"key" => "custom", "human_readable" => "Custom"},
|
||||
{"key" => "role", "human_readable" => "Role"}
|
||||
]
|
||||
}
|
||||
render :partial => "member_frontend_field"
|
||||
end
|
||||
|
||||
def save_member_frontend_fields
|
||||
fields = params["fields"]
|
||||
array = []
|
||||
fields.each do |field|
|
||||
array << field.last
|
||||
end
|
||||
page = Page.find(params[:page_id])
|
||||
if params[:type] == "index"
|
||||
page.custom_array_field = array
|
||||
elsif params[:type] == "show"
|
||||
page.custom_array_field_for_show = array
|
||||
end
|
||||
page.save
|
||||
render :json => {"success" => true}.to_json
|
||||
end
|
||||
|
||||
def get_categories
|
||||
module_app = ModuleApp.find_by_key(params[:module]);
|
||||
if module_app.key.eql?("member")
|
||||
roles = Role.order_by(:_id=>'ASC').all.collect do |role|
|
||||
{
|
||||
"title" => role.title,
|
||||
"id" => role.id.to_s,
|
||||
"status" => RoleStatus.where(:role=>role).collect do |status|
|
||||
{
|
||||
"title" => status.title,
|
||||
"id" => status.id.to_s
|
||||
}
|
||||
end
|
||||
}
|
||||
end
|
||||
else
|
||||
if !module_app.key.eql?("page_content")
|
||||
categories = module_app.categories.enabled.collect do |cat|
|
||||
{
|
||||
"title" => cat.title,
|
||||
"id" => cat.id.to_s
|
||||
}
|
||||
end
|
||||
tags = module_app.tags.collect do |t|
|
||||
{
|
||||
"name" => t.name,
|
||||
"id" => t.id.to_s
|
||||
}
|
||||
end
|
||||
else
|
||||
categories = []
|
||||
tags = []
|
||||
end
|
||||
end
|
||||
|
||||
roles = roles.nil? ? [] : roles
|
||||
categories = categories.nil? ? [] : categories
|
||||
tags = tags.nil? ? [] : tags
|
||||
|
||||
if module_app.data_count.nil?
|
||||
render :json => {"categories" => categories, "tags" => tags,"roles" => roles,"layouts" => (get_layouts module_app.key),"data_count" => {"present"=>false}, "locale" => I18n.locale.to_s}.to_json
|
||||
else
|
||||
render :json => {"categories" => categories, "tags" => tags,"roles" => roles,"layouts" => (get_layouts module_app.key),"data_count" => {"present"=>true,"start"=>module_app.data_count.begin, "end" => module_app.data_count.end}, "locale" => I18n.locale.to_s}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def new
|
||||
@page = Page.new(
|
||||
:enabled_for_mobile=>true,
|
||||
:menu_enabled_for=>["en", "zh_tw"],
|
||||
:enabled_for=>["en", "zh_tw"],
|
||||
:enabled_for_sitemap=>["en", "zh_tw"]
|
||||
)
|
||||
@pages = Page.where(:page_id.ne => "" , :page_id.exists => true)
|
||||
@modules = ModuleApp.all.frontend_enabled.order_by(:key=>'asc')
|
||||
@al = [[t("access_level_none"),"none"], [t("access_level_users"),"users"]]
|
||||
Role.all.each do |role|
|
||||
@al << [role.title, role.id]
|
||||
end
|
||||
end
|
||||
|
||||
def edit
|
||||
@page = Page.find(params[:id])
|
||||
if params[:type] == "page"
|
||||
@pages = Page.where(:page_id.ne => "" , :page_id.exists => true)
|
||||
@modules = ModuleApp.all.frontend_enabled
|
||||
@module_app = ModuleApp.find_by_key(@page.module) rescue nil
|
||||
@categories = @module_app.categories.enabled rescue []
|
||||
if @module_app.key.eql?("page_content")
|
||||
@categories = []
|
||||
end
|
||||
@tags = @module_app.tags rescue []
|
||||
if @module_app.key.eql?("member")
|
||||
@roles = Role.order_by(:_id=>'ASC').all.collect do |role|
|
||||
{
|
||||
"title" => role.title,
|
||||
"id" => role.id.to_s,
|
||||
"status" => RoleStatus.where(:role=>role)
|
||||
}
|
||||
end
|
||||
else
|
||||
@roles = []
|
||||
end
|
||||
@layout_types = get_layouts @module_app.key
|
||||
end
|
||||
@al = [[t("access_level_none"),"none"], [t("access_level_users"),"users"]]
|
||||
Role.all.each do |role|
|
||||
@al << [role.title, role.id]
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
@page = Page.find(params[:id])
|
||||
@page.update_attributes(page_update_params)
|
||||
@page.save
|
||||
# @parent_pages = @page.parent_pages_without_root
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def create
|
||||
params['page']['page_id'] = params['page']['page_id'].gsub('-','_')
|
||||
@page = Page.new(page_params)
|
||||
@page.save!
|
||||
# @parent_pages = @page.parent_pages_without_root
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def get_layouts(module_app)
|
||||
layout_types = []
|
||||
f = File.join("#{Rails.root}/app/templates/#{@key}/modules/#{module_app}/info.json")
|
||||
if File.exists?f
|
||||
info = File.read(f)
|
||||
hash = JSON.parse(info) rescue {}
|
||||
frontends = hash["frontend"] || []
|
||||
frontends.each do |frontend|
|
||||
frontend["thumbnail"] = "/assets/#{module_app}/thumbs/#{frontend["thumbnail"]}"
|
||||
layout_types << frontend
|
||||
end
|
||||
end
|
||||
if layout_types.empty?
|
||||
Dir.glob("#{Rails.root}/app/templates/#{@key}/modules/#{module_app}/*").each do |w|
|
||||
next if File.ftype(w).eql?("directory")
|
||||
w = File.basename(w, ".*")
|
||||
w = File.basename(w, ".*")
|
||||
if w[0,1] != "_" && w[0,1] != "s" && w != "info"
|
||||
layout_types << w
|
||||
end
|
||||
end
|
||||
end
|
||||
layout_types
|
||||
end
|
||||
|
||||
def render_final_page(original_view=get_view,page,layout)
|
||||
final_html_for_render = ""
|
||||
OrbitHelper.set_css_to_render_to_empty
|
||||
if layout
|
||||
parts = $mobile.blank? ? (page.page_parts rescue []) : (page.mobile_page_parts rescue [])
|
||||
|
||||
@part_partials = {}
|
||||
parts.each do |part|
|
||||
subparts = part.sub_parts.asc(:created_at)
|
||||
partials = []
|
||||
subparts.each do |subpart|
|
||||
if subpart.kind == "module_widget"
|
||||
|
||||
OrbitHelper.set_current_widget subpart
|
||||
OrbitHelper.set_widget_data_count subpart.data_count
|
||||
OrbitHelper.set_widget_module_app subpart.module
|
||||
OrbitHelper.set_widget_item_url subpart
|
||||
OrbitHelper.render_meta_tags []
|
||||
OrbitHelper.set_widget_title subpart.title
|
||||
OrbitHelper.set_widget_categories subpart.categories || ["all"]
|
||||
OrbitHelper.set_widget_tags subpart.tags || ["all"]
|
||||
custom_value = subpart.custom_string_field || subpart.custom_array_field rescue nil
|
||||
if !custom_value.nil?
|
||||
OrbitHelper.set_widget_custom_value custom_value
|
||||
end
|
||||
if @editmode
|
||||
partials << "<div class='editmode-ps' title='#{subpart.module}'> " + render_widget_for_frontend(subpart.module,subpart.widget_method,subpart.widget_type,subpart.id.to_s) + "<a href='/page_parts/edit_sub_part?page_id=#{page.id.to_s}&part_id=#{part.id.to_s}&sub_part_id=#{subpart.id.to_s}#{(!$mobile.blank? ? '&mobile_view=1' : '')}'> </a></div>"
|
||||
else
|
||||
# widget_html = Rails.cache.fetch("subpart_#{subpart.module}_#{subpart.id.to_s}_"+I18n.locale.to_s,{ race_condition_ttl: 2, expires_in: 5.minutes}) do
|
||||
# render_widget_for_frontend(subpart.module,subpart.widget_method,subpart.widget_type,subpart.id.to_s)
|
||||
# end
|
||||
widget_html = render_widget_for_frontend(subpart.module,subpart.widget_method,subpart.widget_type,subpart.id.to_s)
|
||||
partials << widget_html
|
||||
end
|
||||
elsif subpart.kind == "text"
|
||||
if @editmode
|
||||
partials << "<div class='editmode-ps' title='text'> " + subpart.content + "<a href='/page_parts/edit_sub_part?page_id=#{part.page_id.to_s}&part_id=#{part.id.to_s}&sub_part_id=#{subpart.id.to_s}#{(!$mobile.blank? ? '&mobile_view=1' : '')}'> </a></div>"
|
||||
else
|
||||
# change from px to em start
|
||||
if subpart.content.include? "px"
|
||||
@arrofindex = Array.new
|
||||
@indexOfpx = subpart.content.index('px')
|
||||
@arrofindex.push @indexOfpx
|
||||
while @indexOfpx.nil? == false
|
||||
@indexOfpx = subpart.content.index('px',@indexOfpx+1)
|
||||
break if @indexOfpx.nil? == true
|
||||
@arrofindex.push @indexOfpx
|
||||
end
|
||||
@arrofchangeString = Array.new
|
||||
@arrofnewString = Array.new
|
||||
@arrofindex.each do |indexPX|
|
||||
for i in (0...indexPX).to_a.reverse
|
||||
next if subpart.content[i] == " "
|
||||
@isnum = Float(subpart.content[i]) rescue nil
|
||||
break if @isnum.nil? == true || subpart.content[i] == ":"
|
||||
end
|
||||
if i != indexPX - 1
|
||||
@arrofchangeString.push subpart.content[(i+1)..(indexPX+1)]
|
||||
@arrofnewString.push ((subpart.content[(i+1)...(indexPX)].to_i / 16.0).to_s + "em")
|
||||
end
|
||||
end
|
||||
@arrofchangeString.each_with_index do |changeString,i|
|
||||
subpart.content = subpart.content.sub(changeString,@arrofnewString[i])
|
||||
end
|
||||
end
|
||||
# change from px to em end
|
||||
partials << subpart.content
|
||||
end
|
||||
end
|
||||
end
|
||||
@part_partials["data-pp='#{part.part_id}'"] = partials
|
||||
end
|
||||
|
||||
@file = nil
|
||||
@layout_html = nil
|
||||
if original_view == "home"
|
||||
@file = File.join("#{@key}", "/home/index.html.erb")
|
||||
else
|
||||
@file = File.join("#{@key}", "/home/page.html.erb")
|
||||
end
|
||||
@layout_html = render_to_string(@file , :formats => :html)
|
||||
doc = Nokogiri::HTML(@layout_html, nil, "UTF-8")
|
||||
head = doc.css("head")
|
||||
@part_partials.each do |key, partial|
|
||||
html_string = ""
|
||||
partial.each do |p|
|
||||
if !p.nil?
|
||||
html_string = html_string + p
|
||||
end
|
||||
end
|
||||
pp = doc.css("*[#{key}]")
|
||||
if !pp.blank?
|
||||
pp = pp[0]
|
||||
pp.inner_html = html_string
|
||||
end
|
||||
end
|
||||
|
||||
if @editmode
|
||||
pps = doc.css("*[data-pp]")
|
||||
pps.each do |pp|
|
||||
number = pp.attributes["data-pp"].value
|
||||
if pp.inner_html.strip == ""
|
||||
pp.inner_html = "<a href='/page_parts/new?part=#{number}&page_id=#{page.id.to_s}#{(!$mobile.blank? ? '&mobile_view=1' : '')}'> </a>"
|
||||
else
|
||||
inner_html = pp.inner_html
|
||||
pp.inner_html = inner_html + "<a href='/page_parts/#{number}/edit?page_id=#{page.id.to_s}#{(!$mobile.blank? ? '&mobile_view=1' : '')}'> </a>"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if original_view != "home"
|
||||
viewarea = doc.css("*[data-content='true']")[0]
|
||||
viewarea.inner_html = render_to_string(original_view) rescue "<div></div>"
|
||||
# change from px to em start
|
||||
if viewarea.inner_html.include? "px"
|
||||
@arrofindex = Array.new
|
||||
@indexOfpx = viewarea.inner_html.index('px')
|
||||
@arrofindex.push @indexOfpx
|
||||
while @indexOfpx.nil? == false
|
||||
@indexOfpx = viewarea.inner_html.index('px',@indexOfpx+1)
|
||||
break if @indexOfpx.nil? == true
|
||||
@arrofindex.push @indexOfpx
|
||||
end
|
||||
@arrofchangeString = Array.new
|
||||
@arrofnewString = Array.new
|
||||
@arrofindex.each do |indexPX|
|
||||
for i in (0...indexPX).to_a.reverse
|
||||
next if viewarea.inner_html[i] == " "
|
||||
@isnum = Float(viewarea.inner_html[i]) rescue nil
|
||||
break if @isnum.nil? == true || viewarea.inner_html[i] == ":"
|
||||
end
|
||||
if i != indexPX - 1
|
||||
@arrofchangeString.push viewarea.inner_html[(i+1)..(indexPX+1)]
|
||||
@arrofnewString.push ((viewarea.inner_html[(i+1)...(indexPX)].to_i / 16.0).to_s + "em")
|
||||
end
|
||||
end
|
||||
@arrofchangeString.each_with_index do |changeString,i|
|
||||
viewarea.inner_html = viewarea.inner_html.sub(changeString,@arrofnewString[i])
|
||||
end
|
||||
end
|
||||
# change from px to em end
|
||||
head[0].inner_html = OrbitHelper.meta_tags_html + head.inner_html
|
||||
end
|
||||
head[0].inner_html = head.inner_html + OrbitHelper.get_css_to_render_in_head
|
||||
link = doc.css("link")[0]
|
||||
link.attributes["href"].value = current_site.favicon.url.nil? ? "/assets/favicon.ico" : current_site.favicon.url
|
||||
final_html_for_render = doc.to_html
|
||||
|
||||
else
|
||||
final_html_for_render = render_to_string(original_view) rescue "<div></div>"
|
||||
end
|
||||
final_html_for_render = change_to_language(final_html_for_render)
|
||||
if @editmode
|
||||
session[:mobile] = $temp_mobile
|
||||
end
|
||||
format_date(final_html_for_render,(original_view == "home" ? "home" : page.module)) rescue final_html_for_render
|
||||
end
|
||||
|
||||
def format_date(html,module_key)
|
||||
doc = Nokogiri::HTML(html, nil, "UTF-8")
|
||||
doc.css("body").first.set_attribute("data-module",module_key) rescue nil
|
||||
dates = doc.css("*[date-format]")
|
||||
if dates.blank?
|
||||
return doc.to_html
|
||||
else
|
||||
dates.each do |d|
|
||||
format = d.attributes["date-format"].value
|
||||
date = DateTime.parse(d.inner_text)
|
||||
d.inner_html = d.inner_html.gsub(d.inner_text.strip, " " + date.strftime(format))
|
||||
end
|
||||
return doc.to_html
|
||||
end
|
||||
end
|
||||
|
||||
def get_widget_path(widget)
|
||||
file = File.join('../templates', "#{@key}", "modules/#{widget}")
|
||||
end
|
||||
|
||||
def get_view
|
||||
page = Page.find(params[:id]) rescue Page.root
|
||||
if page == Page.root
|
||||
@view = File.join(Rails.root, 'app', 'templates', "#{@key}", "home/index.html.erb")
|
||||
else
|
||||
module_name = page.module.downcase.singularize
|
||||
@view = File.join(Rails.root, 'app', 'templates', "#{@key}", "modules/#{module_name}/index.html.erb")
|
||||
end
|
||||
end
|
||||
|
||||
def page_params
|
||||
page = Page.find(params[:page][:parent_page])
|
||||
page.url = page.url == "/" ? "" : page.url
|
||||
@url = page.url + "/#{params[:page][:page_id]}"
|
||||
valid_locales = current_site.valid_locales rescue []
|
||||
p = params.require(:page).permit(:number, :page_type, :page_id, :module, :access_level, :layout, :parent_page, :data_count, :enabled_for_mobile, :member_sort_position, enabled_for_sitemap: [], enabled_for: [], menu_enabled_for: [], categories: [], tags: [], role_status: [], name_translations: valid_locales ,external_url_translations: valid_locales)
|
||||
p["url"] = @url
|
||||
if p["external_url_translations"]
|
||||
current_site.in_use_locales.each do |loc|
|
||||
p["external_url_translations"][loc.to_s] = p["external_url_translations"][loc.to_s].sub("http://" + request.host_with_port,"") if p["external_url_translations"][loc.to_s].present?
|
||||
end
|
||||
end
|
||||
p
|
||||
end
|
||||
|
||||
def page_update_params
|
||||
valid_locales = current_site.valid_locales rescue []
|
||||
p = params.require(:page).permit(:number, :page_type, :page_id, :module, :access_level, :layout, :parent_page, :data_count, :custom_string_field, :enabled_for_mobile, :member_sort_position, enabled_for_sitemap: [], enabled_for: [],menu_enabled_for: [], categories: [], tags: [], role_status: [], name_translations: valid_locales, external_url_translations: valid_locales)
|
||||
p["role_status"] = p["role_status"] || []
|
||||
p["categories"] = p["categories"] || []
|
||||
p["tags"] = p["tags"] || []
|
||||
p["enabled_for"] = p["enabled_for"] || []
|
||||
p["menu_enabled_for"] = p["menu_enabled_for"] || []
|
||||
p["enabled_for_sitemap"] = p["enabled_for_sitemap"] || []
|
||||
p["enabled_for_mobile"] = p["enabled_for_mobile"] || 0
|
||||
if p["external_url_translations"]
|
||||
current_site.in_use_locales.each do |loc|
|
||||
p["external_url_translations"][loc.to_s] = p["external_url_translations"][loc.to_s].sub("http://" + request.host_with_port,"") if p["external_url_translations"][loc.to_s].present?
|
||||
end
|
||||
end
|
||||
p
|
||||
end
|
||||
|
||||
def get_layout
|
||||
if request[:action] == "edit_view"
|
||||
page = Page.find(params[:id])
|
||||
if page.page_id == "" || page.page_id == nil
|
||||
false
|
||||
else
|
||||
File.join("../../templates", "#{@key}", "/home/page.html.erb")
|
||||
end
|
||||
# elsif request[:action] == "show" || request[:action] == "moduleShow"
|
||||
# File.join("../../templates", "themes", "#{@key}", '/home/page.html.erb')
|
||||
else
|
||||
false
|
||||
end
|
||||
end
|
||||
def to_bool(str)
|
||||
return true if str == "true"
|
||||
return false if str == "false"
|
||||
end
|
||||
|
||||
def check_frontend_open
|
||||
if !current_site.frontend_open && current_user.blank?
|
||||
redirect_to '/admin/dashboards'
|
||||
end
|
||||
end
|
||||
|
||||
def check_authorization
|
||||
if current_user.blank? or !current_user.is_admin?
|
||||
redirect_to '/admin/dashboards'
|
||||
end
|
||||
end
|
||||
|
||||
def set_edit_mode
|
||||
@dataApi = "frontend"
|
||||
@editmode = false
|
||||
if !current_user.nil? and current_user.is_admin?
|
||||
if params[:editmode] == "on"
|
||||
@editmode = true
|
||||
@dataApi = "edit"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def change_to_language(final_html)
|
||||
if session[:zh_cn]
|
||||
final_html = ZhConv.convert("zh-cn", final_html,false)
|
||||
final_html.gsub!('/zh_tw/','/zh_cn/')
|
||||
final_html.sub!('<a accesskey="t" href="'+request.path+'">繁体中文</a>','<a accesskey="t" href="'+(request.path.sub('/zh_cn/','/zh_tw/'))+'">繁体中文</a>')
|
||||
end
|
||||
final_html
|
||||
end
|
||||
|
||||
end
|
||||
@@ -1,129 +0,0 @@
|
||||
class Site
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
include Slug
|
||||
|
||||
DEBUG = false
|
||||
has_many :page_sets, :autosave => true, :dependent => :destroy
|
||||
accepts_nested_attributes_for :page_sets, :allow_destroy => true
|
||||
field :update_flag, type: Boolean, default: true
|
||||
field :title, as: :slug_title, type: String, localize: true
|
||||
field :school, type: String
|
||||
field :department, type: String
|
||||
field :address, type: String
|
||||
field :footer, localize: true
|
||||
field :social_share, type: String
|
||||
field :sub_menu, localize: true
|
||||
field :site_type
|
||||
field :site_map_link, type: String, :default => "/sitemap"
|
||||
field :terms_of_use_link, type: String
|
||||
field :google_analytics, type: String
|
||||
field :in_use_locales, :type => Array
|
||||
field :valid_locales, :type => Array
|
||||
field :site_active, :type => Boolean
|
||||
field :frontend_open, :type => Boolean, :default => true
|
||||
field :backend_openness_on, :type => Boolean, :default => false
|
||||
field :mobile_api_openness_on, :type => Boolean, :default => false
|
||||
field :desktop_closed, :type => Boolean, :default => false
|
||||
field :enable_language_detection, :type => Boolean, :default => false
|
||||
field :enable_redirect_index, :type => Boolean, :default => true
|
||||
field :enable_zh_cn, :type => Boolean, :default => true
|
||||
field :enable_language_options, :type => Boolean, :default => true
|
||||
field :default_locale, :default => "zh_tw"
|
||||
field :mobile_on, :type => Boolean, :default => false
|
||||
field :announcement_category, :type => Array, :default=>[]
|
||||
field :mobile_bar_color, :type => Array, :default=>[]
|
||||
field :phone_number, :type => Array,:default=>[]
|
||||
field :title_always_on, :type => Boolean, :default => false
|
||||
field :display_title_in_frontend, :type => Boolean, :default => true
|
||||
field :sitemap_menu_in_header, :type => Boolean, :default => false
|
||||
field :enable_terms_of_use, :type => Boolean, :default => false
|
||||
field :search,:type => Hash
|
||||
field :site_settings
|
||||
field :template, type: String
|
||||
field :store_token
|
||||
field :enable_last_update, type: Boolean, :default => false
|
||||
field :personal_plugins_sort, type: Array, :default => []
|
||||
field :sign_up_roles, type: Array, :default => []
|
||||
field :required_sign_up_attributes , :type => Hash , :default => {}
|
||||
field :mobile_orbit_bar_title, localize: true
|
||||
field :google_oauth_enabled, :type => Boolean, :default => false
|
||||
field :google_client_id
|
||||
field :google_client_secret
|
||||
|
||||
field :gmail_oauth2_enabled, :type => Boolean, :default => false
|
||||
field :gmail_login_flag, :type => Boolean, :default => false
|
||||
field :gmail_client_id
|
||||
field :gmail_client_secret
|
||||
field :gmail_access_token
|
||||
field :gmail_refresh_token
|
||||
field :gmail
|
||||
|
||||
field :meta_tags
|
||||
field :every_page_sharer, type: Array, :default => ["facebook","line","twitter","google","printer"]
|
||||
|
||||
field :sync_enabled, type: Boolean, :default => false
|
||||
field :sync_rake_task
|
||||
|
||||
field :month_traffic_cache
|
||||
field :home_link, :type => String, :default=>"/"
|
||||
field :home_link_1, :type => String, :default=>"/"
|
||||
field :site_title, :type => Hash, :default=>{:zh_tw=>"主頁",:en=>"home_page"}
|
||||
field :site_title_1, :type => Hash, :default=>{:zh_tw=>"主頁",:en=>"home_page"}
|
||||
field :orbitbar_language_login_btn_mobile_configuration , type: String, :default => ""
|
||||
field :is_hidden_orbit_bar , type: Boolean, :default => false
|
||||
field :orbit_bar_background_color , type: String, :default => ""
|
||||
field :orbit_bar_background_hover_color
|
||||
field :orbit_bar_text_color , type: String, :default => "#ffffff"
|
||||
field :orbit_bar_text_hover_color
|
||||
field :orbit_bar_submenu_background_color , type: String, :default => ""
|
||||
field :orbit_bar_submenu_text_color , type: String, :default => "#ffffff"
|
||||
field :orbit_bar_animation_time , type: String, :default => "0.3s"
|
||||
field :login_text , type: String, :default => "", localize: true
|
||||
|
||||
mount_uploader :default_image, ImageUploader
|
||||
mount_uploader :site_logo, ImageUploader
|
||||
mount_uploader :site_logo_1, ImageUploader
|
||||
mount_uploader :favicon, ImageUploader
|
||||
mount_uploader :mobile_icon, ImageUploader
|
||||
after_initialize do |record|
|
||||
if !record.new_record?
|
||||
if record.is_hidden_orbit_bar.nil?
|
||||
record.is_hidden_orbit_bar = false
|
||||
record.save
|
||||
end
|
||||
if record.orbit_bar_background_color.nil?
|
||||
record.orbit_bar_background_color = ""
|
||||
record.save
|
||||
end
|
||||
if record.orbit_bar_text_color.nil?
|
||||
record.orbit_bar_text_color = ""
|
||||
record.save
|
||||
end
|
||||
if record.orbit_bar_submenu_background_color.nil?
|
||||
record.orbit_bar_submenu_background_color = ""
|
||||
record.save
|
||||
end
|
||||
if record.orbit_bar_submenu_text_color.nil?
|
||||
record.orbit_bar_submenu_text_color = ""
|
||||
record.save
|
||||
end
|
||||
if record.orbit_bar_animation_time.nil?
|
||||
record.orbit_bar_animation_time = "0.3s"
|
||||
record.save
|
||||
end
|
||||
end
|
||||
if record.orbit_bar_background_color == '#000000' && record.orbit_bar_text_color == '#000000'
|
||||
record.update(:orbit_bar_text_color => '#ffffff')
|
||||
end
|
||||
if record.orbit_bar_submenu_background_color == '#000000' && record.orbit_bar_submenu_text_color == '#000000'
|
||||
record.update(:orbit_bar_submenu_text_color => '#ffffff')
|
||||
end
|
||||
end
|
||||
def register_site(url,university,department,email,country)
|
||||
api_key = STORE_CONFIG[:store_settings]["api_key"]
|
||||
self.generate_site_token
|
||||
store = Store.new(self.id.to_s,self.site_token,api_key)
|
||||
store.post_client(self.id.to_s,self.site_token,self.title,url,university,department,email,country)
|
||||
end
|
||||
end
|
||||