forked from saurabh/orbit4-5
Compare commits
130 Commits
nccu-backu
...
master
| Author | SHA1 | Date |
|---|---|---|
|
|
592c8c63fe | |
|
|
2ccabb64f3 | |
|
|
9ec5e21500 | |
|
|
f9dd55eea2 | |
|
|
afe1ffd437 | |
|
|
898059c6d2 | |
|
|
8b8dd22e88 | |
|
|
bead39d5b4 | |
|
|
93d66b5866 | |
|
|
59a198005d | |
|
|
f7c377d092 | |
|
|
1951c581a2 | |
|
|
b2056a2ad5 | |
|
|
251133748d | |
|
|
5acfed083a | |
|
|
afde19052e | |
|
|
e168b01f9b | |
|
|
dd3b4f0384 | |
|
|
4068d8488a | |
|
|
94f1de8de9 | |
|
|
3dc625e34f | |
|
|
ed24126648 | |
|
|
cfda81a546 | |
|
|
e594d345cc | |
|
|
25eb95672a | |
|
|
76c2048a29 | |
|
|
b729e32258 | |
|
|
2508d70883 | |
|
|
5977370c98 | |
|
|
a3033c548b | |
|
|
822a6932cd | |
|
|
1f25dbdfec | |
|
|
98ec676197 | |
|
|
e8b727af01 | |
|
|
2fc15eab29 | |
|
|
d26a5bedb7 | |
|
|
8099a79918 | |
|
|
c406951876 | |
|
|
a440076916 | |
|
|
8dac8273f7 | |
|
|
017be3eb3d | |
|
|
3772e350ba | |
|
|
451176b068 | |
|
|
694f839217 | |
|
|
a160c6b020 | |
|
|
bd7e29773f | |
|
|
6ff99124fd | |
|
|
7180b94bd6 | |
|
|
7654fc7f23 | |
|
|
4638b4bca9 | |
|
|
f17f847dbd | |
|
|
d386174c97 | |
|
|
927b08edeb | |
|
|
83656d2362 | |
|
|
5935a91795 | |
|
|
ae785defc2 | |
|
|
804030751f | |
|
|
70bbe6ac5a | |
|
|
b5d2d7736c | |
|
|
a20d446283 | |
|
|
083b6ace78 | |
|
|
057f689526 | |
|
|
0380972e5b | |
|
|
c39ca8c360 | |
|
|
37c28fd03e | |
|
|
997a3afd93 | |
|
|
cf7e15d4bb | |
|
|
db88b1e553 | |
|
|
573030b119 | |
|
|
b1be711fd5 | |
|
|
25c612ac9e | |
|
|
54eb8ee766 | |
|
|
a481be0694 | |
|
|
ec4f54fcc4 | |
|
|
5aac9b297d | |
|
|
1cfd6b80f9 | |
|
|
7e46bde3bc | |
|
|
1fadefa510 | |
|
|
15fec35e3f | |
|
|
60bb2cac1e | |
|
|
be61b4488e | |
|
|
73147223f8 | |
|
|
35eaf325f2 | |
|
|
90eba5141e | |
|
|
6d06790159 | |
|
|
27222ab6cd | |
|
|
8b2281ca17 | |
|
|
3262359911 | |
|
|
4b770b7fd1 | |
|
|
b290d3653f | |
|
|
e1c8d61195 | |
|
|
f9ed19def0 | |
|
|
f52919e4b6 | |
|
|
2432a587d5 | |
|
|
fb8c8d4526 | |
|
|
20350c4e14 | |
|
|
52c78856be | |
|
|
338824a509 | |
|
|
c4be6c5f63 | |
|
|
f71b5d6bbb | |
|
|
16dae228b1 | |
|
|
9be667d405 | |
|
|
e045025bc6 | |
|
|
7aa187497a | |
|
|
dfd7865bd5 | |
|
|
e881d02bee | |
|
|
b53a7508f5 | |
|
|
8e7319b3c3 | |
|
|
2942ab8563 | |
|
|
ed3308abbb | |
|
|
5773d49218 | |
|
|
3e1032f801 | |
|
|
eb21f6535c | |
|
|
5f90be20a2 | |
|
|
d64dc336a5 | |
|
|
aef48fe890 | |
|
|
f3e9679e54 | |
|
|
17213fb41f | |
|
|
8c0d94c00a | |
|
|
9862722252 | |
|
|
1aa5739380 | |
|
|
0c62c4b994 | |
|
|
e1247e6083 | |
|
|
e616c4b947 | |
|
|
1b4e975548 | |
|
|
35e203c476 | |
|
|
4fd0e2d315 | |
|
|
3532ec67a9 | |
|
|
9be7e13774 | |
|
|
328277394d |
|
|
@ -20,6 +20,7 @@
|
|||
app/views/frontend
|
||||
/public/uploads/*
|
||||
public/assets/*
|
||||
public/site_feeds/*
|
||||
public/import_status.yml
|
||||
public/announcement_link_widget_en.json
|
||||
public/announcement_link_widget_zh_tw.json
|
||||
|
|
|
|||
17
Gemfile
17
Gemfile
|
|
@ -1,5 +1,8 @@
|
|||
source 'https://rubygems.org'
|
||||
|
||||
#social gems
|
||||
gem "omniauth-google-oauth2", "~> 0.2.1"
|
||||
|
||||
#rails gem
|
||||
gem 'rails', '~> 4.1.0'
|
||||
gem 'sanitize'
|
||||
|
|
@ -28,7 +31,8 @@ gem 'nokogiri'
|
|||
gem 'httparty'
|
||||
|
||||
#database
|
||||
gem 'mongoid', github: "mongoid/mongoid"
|
||||
# gem 'mongoid', github: "mongoid/mongoid"
|
||||
gem 'mongoid', '~> 4.0.2'
|
||||
|
||||
#file uploading and carrierwave
|
||||
gem "mini_magick", "3.5.0"
|
||||
|
|
@ -81,8 +85,11 @@ end
|
|||
#ask
|
||||
gem 'gotcha'
|
||||
|
||||
#desktop
|
||||
gem 'angularjs-rails', '~> 1.2.20'
|
||||
gem 'angular-ui-bootstrap-rails', '~> 0.11.0'
|
||||
gem 'jquery_mousewheel_rails', '~> 3.1.11.3'
|
||||
#caching observers
|
||||
gem 'mongoid-observers'
|
||||
|
||||
#desktop
|
||||
# gem 'angularjs-rails', '~> 1.2.20'
|
||||
# gem 'angular-ui-bootstrap-rails', '~> 0.11.0'
|
||||
# gem 'jquery_mousewheel_rails', '~> 3.1.11.3'
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 928 B |
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 110 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
|
|
@ -138,7 +138,7 @@ var StoreManager = function(section){
|
|||
"url" : "/admin/store/check_credentials"
|
||||
}).done(function(status){
|
||||
if(status.success == true){
|
||||
resendEmail();
|
||||
authorizeAllModules();
|
||||
}else if(status.success == false){
|
||||
waitForStoreResponseCount++;
|
||||
if(waitForStoreResponseCount > 5){
|
||||
|
|
@ -152,6 +152,22 @@ var StoreManager = function(section){
|
|||
}).fail(showError);
|
||||
}
|
||||
|
||||
var authorizeAllModules = function(){
|
||||
loadingAreaStatus.text("Authorizing default modules.");
|
||||
$.ajax({
|
||||
"type" : "post",
|
||||
"dataType" : "json",
|
||||
"url" : "/admin/store/authorize_default_modules"
|
||||
}).done(function(status){
|
||||
if(status.success == true){
|
||||
resendEmail();
|
||||
}else if(status.success == false){
|
||||
loadingArea.find("img").hide();
|
||||
loadingAreaStatus.text(data.message);
|
||||
}
|
||||
}).fail(showError);
|
||||
}
|
||||
|
||||
var resendEmail = function(){
|
||||
loadingArea.find("img").show();
|
||||
loadingAreaStatus.text("Sending verification email.");
|
||||
|
|
|
|||
|
|
@ -10,7 +10,3 @@
|
|||
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
||||
// about supported directives.
|
||||
//
|
||||
//= require jquery
|
||||
//= require jquery_ujs
|
||||
//= require turbolinks
|
||||
//= require_tree .
|
||||
|
|
|
|||
|
|
@ -291,6 +291,7 @@ if($.support.touch) {
|
|||
$el.find('a').removeAttr('href');
|
||||
};
|
||||
$el.on(mouseenterEvent, function(e) {
|
||||
$sidebar.addClass('on')
|
||||
$block.siblings().removeClass('show').end().eq($(this).index()).addClass('show');
|
||||
$arrow.stop(true, false).animate({
|
||||
top: ($(this).position().top+$(this).height()/2)-$arrowHeightFormat+$('.scroller').position().top,
|
||||
|
|
@ -346,6 +347,7 @@ if($.support.touch) {
|
|||
$el.eq($blockIndex).hasClass('active') ? '':$el.eq($blockIndex).children('span').addClass('hover');
|
||||
},
|
||||
mouseleave: function() {
|
||||
$sidebar.removeClass('on');
|
||||
$block.removeClass('show');
|
||||
if(!$sidebarState || !$el.hasClass('active')) {
|
||||
$blockList.css({'width': 0});
|
||||
|
|
|
|||
|
|
@ -5,11 +5,14 @@
|
|||
|
||||
CKEDITOR.editorConfig = function( config ) {
|
||||
config.uiColor = '#e6e6e6';
|
||||
config.language = 'zh';
|
||||
config.defaultLanguage = "en";
|
||||
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';
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,139 @@
|
|||
(function() {
|
||||
"use strict";
|
||||
|
||||
// Commonly use variables
|
||||
var doc = document;
|
||||
|
||||
var group = {
|
||||
// Detect and change the top position of the cycle navs
|
||||
cycleFix: function() {
|
||||
if (doc.querySelectorAll(".group-show-post-banner-image").length >= 1) {
|
||||
var imgs = doc.querySelectorAll(".group-show-post-banner-image"),
|
||||
cycleNav = doc.querySelectorAll(".cycle-nav"),
|
||||
len = cycleNav.length,
|
||||
i = -1;
|
||||
|
||||
|
||||
// Hide the navs when there's noly one slide
|
||||
if (imgs.length <= 1) {
|
||||
for (i = 0; i < len; i++) {
|
||||
cycleNav[i].classList.add("hide");
|
||||
}
|
||||
}
|
||||
|
||||
} else if (doc.querySelectorAll(".group-show-post-banner-image").length === 0 && doc.querySelector(".group-show-post-image-wrap")) {
|
||||
doc.querySelector(".group-show-post-image-wrap").classList.add("hide");
|
||||
}
|
||||
},
|
||||
// Create scroll effect (with css)
|
||||
scrollEffect: function(el) {
|
||||
var wrap = doc.querySelector(el),
|
||||
scrollClass = "scroll";
|
||||
|
||||
// Use pageYOffset to get the Y positoin and add scroll on it, the animation
|
||||
// is done by css transition
|
||||
if (el) {
|
||||
window.addEventListener("scroll", function() {
|
||||
if (window.pageYOffset > 0) {
|
||||
wrap.classList.add(scrollClass);
|
||||
} else {
|
||||
wrap.classList.remove(scrollClass);
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
},
|
||||
// Equal height for card
|
||||
equalHeight: function(el) {
|
||||
var bigbrother = -1,
|
||||
$el = $(el);
|
||||
|
||||
$el.each(function() {
|
||||
bigbrother = bigbrother > $(this).height() ? bigbrother : $(this).height();
|
||||
});
|
||||
|
||||
$el.each(function() {
|
||||
$(this).height(bigbrother);
|
||||
});
|
||||
},
|
||||
// We want to place a dropdown in group-post-item, but link cannot be nested, hance this fix
|
||||
makePostClick: function() {
|
||||
var postLink = doc.querySelectorAll('.group-post-link');
|
||||
|
||||
if (postLink) {
|
||||
Array.prototype.forEach.call(postLink, function(item) {
|
||||
item.parentNode.classList.add('clickable');
|
||||
item.parentNode.addEventListener('click', function(e) {
|
||||
window.location.href = item.href;
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
// Bootstrap dropdown is too much of a hassle, using this instead
|
||||
makeDropdown: function(container, toggle, dropdown, kls) {
|
||||
var $container = $(container),
|
||||
$toggle = $container.find(toggle),
|
||||
$dropdown = $container.find(dropdown),
|
||||
klass = 'open';
|
||||
|
||||
$container.on('click', '.toggle', function(e) {
|
||||
if ($(this).hasClass(klass)) {
|
||||
$(toggle).removeClass(klass);
|
||||
$(dropdown).removeClass(klass);
|
||||
} else {
|
||||
$(toggle).removeClass(klass);
|
||||
$(dropdown).removeClass(klass);
|
||||
$(this)
|
||||
.addClass(klass)
|
||||
.next(dropdown)
|
||||
.addClass(klass)
|
||||
}
|
||||
return false;
|
||||
|
||||
});
|
||||
|
||||
$(document.body).on('click', function() {
|
||||
$(toggle).removeClass(klass)
|
||||
$(dropdown).removeClass(klass);
|
||||
});
|
||||
},
|
||||
|
||||
// Third-party plugin settings
|
||||
plugins: function() {
|
||||
// WOWjs
|
||||
if (typeof window.WOW !== 'undefined') {
|
||||
new WOW().init();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// When DOM is completely loaded, execute these functions
|
||||
document.addEventListener("DOMContentLoaded", function(event) {
|
||||
|
||||
if (doc.querySelector('.group-post')) {
|
||||
group.scrollEffect('.group-post');
|
||||
group.makeDropdown('.group-post', '.group-post-dropdown-toggle', '.group-post-dropdown');
|
||||
}
|
||||
|
||||
if (doc.querySelector('.group-card')) {
|
||||
group.makeDropdown('.group-public', '.group-card-dropdown-toggle', '.group-card-dropdown');
|
||||
}
|
||||
|
||||
if (doc.querySelector('.group-index')) {
|
||||
group.makeDropdown('.group-index', '.group-card-dropdown-toggle', '.group-card-dropdown');
|
||||
}
|
||||
|
||||
if (doc.querySelector('.group-show-post')) {
|
||||
group.makeDropdown('.group-show-post', '.group-show-post-dropdown-toggle', '.group-show-post-dropdown');
|
||||
}
|
||||
|
||||
if (doc.querySelector('.group-member')) {
|
||||
group.scrollEffect('.group-member');
|
||||
}
|
||||
|
||||
group.cycleFix();
|
||||
group.equalHeight('.group-card-inner');
|
||||
group.equalHeight('.group-admin-edit-image-item');
|
||||
group.plugins();
|
||||
});
|
||||
|
||||
})();
|
||||
|
|
@ -0,0 +1,388 @@
|
|||
/*
|
||||
* The MIT License
|
||||
* Copyright (c) 2012 Matias Meno <m@tias.me>
|
||||
*/
|
||||
@-webkit-keyframes passing-through {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateY(40px);
|
||||
-moz-transform: translateY(40px);
|
||||
-ms-transform: translateY(40px);
|
||||
-o-transform: translateY(40px);
|
||||
transform: translateY(40px); }
|
||||
30%, 70% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateY(0px);
|
||||
-moz-transform: translateY(0px);
|
||||
-ms-transform: translateY(0px);
|
||||
-o-transform: translateY(0px);
|
||||
transform: translateY(0px); }
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateY(-40px);
|
||||
-moz-transform: translateY(-40px);
|
||||
-ms-transform: translateY(-40px);
|
||||
-o-transform: translateY(-40px);
|
||||
transform: translateY(-40px); } }
|
||||
@-moz-keyframes passing-through {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateY(40px);
|
||||
-moz-transform: translateY(40px);
|
||||
-ms-transform: translateY(40px);
|
||||
-o-transform: translateY(40px);
|
||||
transform: translateY(40px); }
|
||||
30%, 70% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateY(0px);
|
||||
-moz-transform: translateY(0px);
|
||||
-ms-transform: translateY(0px);
|
||||
-o-transform: translateY(0px);
|
||||
transform: translateY(0px); }
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateY(-40px);
|
||||
-moz-transform: translateY(-40px);
|
||||
-ms-transform: translateY(-40px);
|
||||
-o-transform: translateY(-40px);
|
||||
transform: translateY(-40px); } }
|
||||
@keyframes passing-through {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateY(40px);
|
||||
-moz-transform: translateY(40px);
|
||||
-ms-transform: translateY(40px);
|
||||
-o-transform: translateY(40px);
|
||||
transform: translateY(40px); }
|
||||
30%, 70% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateY(0px);
|
||||
-moz-transform: translateY(0px);
|
||||
-ms-transform: translateY(0px);
|
||||
-o-transform: translateY(0px);
|
||||
transform: translateY(0px); }
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateY(-40px);
|
||||
-moz-transform: translateY(-40px);
|
||||
-ms-transform: translateY(-40px);
|
||||
-o-transform: translateY(-40px);
|
||||
transform: translateY(-40px); } }
|
||||
@-webkit-keyframes slide-in {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateY(40px);
|
||||
-moz-transform: translateY(40px);
|
||||
-ms-transform: translateY(40px);
|
||||
-o-transform: translateY(40px);
|
||||
transform: translateY(40px); }
|
||||
30% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateY(0px);
|
||||
-moz-transform: translateY(0px);
|
||||
-ms-transform: translateY(0px);
|
||||
-o-transform: translateY(0px);
|
||||
transform: translateY(0px); } }
|
||||
@-moz-keyframes slide-in {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateY(40px);
|
||||
-moz-transform: translateY(40px);
|
||||
-ms-transform: translateY(40px);
|
||||
-o-transform: translateY(40px);
|
||||
transform: translateY(40px); }
|
||||
30% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateY(0px);
|
||||
-moz-transform: translateY(0px);
|
||||
-ms-transform: translateY(0px);
|
||||
-o-transform: translateY(0px);
|
||||
transform: translateY(0px); } }
|
||||
@keyframes slide-in {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateY(40px);
|
||||
-moz-transform: translateY(40px);
|
||||
-ms-transform: translateY(40px);
|
||||
-o-transform: translateY(40px);
|
||||
transform: translateY(40px); }
|
||||
30% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateY(0px);
|
||||
-moz-transform: translateY(0px);
|
||||
-ms-transform: translateY(0px);
|
||||
-o-transform: translateY(0px);
|
||||
transform: translateY(0px); } }
|
||||
@-webkit-keyframes pulse {
|
||||
0% {
|
||||
-webkit-transform: scale(1);
|
||||
-moz-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
-o-transform: scale(1);
|
||||
transform: scale(1); }
|
||||
10% {
|
||||
-webkit-transform: scale(1.1);
|
||||
-moz-transform: scale(1.1);
|
||||
-ms-transform: scale(1.1);
|
||||
-o-transform: scale(1.1);
|
||||
transform: scale(1.1); }
|
||||
20% {
|
||||
-webkit-transform: scale(1);
|
||||
-moz-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
-o-transform: scale(1);
|
||||
transform: scale(1); } }
|
||||
@-moz-keyframes pulse {
|
||||
0% {
|
||||
-webkit-transform: scale(1);
|
||||
-moz-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
-o-transform: scale(1);
|
||||
transform: scale(1); }
|
||||
10% {
|
||||
-webkit-transform: scale(1.1);
|
||||
-moz-transform: scale(1.1);
|
||||
-ms-transform: scale(1.1);
|
||||
-o-transform: scale(1.1);
|
||||
transform: scale(1.1); }
|
||||
20% {
|
||||
-webkit-transform: scale(1);
|
||||
-moz-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
-o-transform: scale(1);
|
||||
transform: scale(1); } }
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
-webkit-transform: scale(1);
|
||||
-moz-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
-o-transform: scale(1);
|
||||
transform: scale(1); }
|
||||
10% {
|
||||
-webkit-transform: scale(1.1);
|
||||
-moz-transform: scale(1.1);
|
||||
-ms-transform: scale(1.1);
|
||||
-o-transform: scale(1.1);
|
||||
transform: scale(1.1); }
|
||||
20% {
|
||||
-webkit-transform: scale(1);
|
||||
-moz-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
-o-transform: scale(1);
|
||||
transform: scale(1); } }
|
||||
.dropzone, .dropzone * {
|
||||
box-sizing: border-box; }
|
||||
|
||||
.dropzone {
|
||||
min-height: 150px;
|
||||
border: 2px solid rgba(0, 0, 0, 0.3);
|
||||
background: white;
|
||||
padding: 20px 20px; }
|
||||
.dropzone.dz-clickable {
|
||||
cursor: pointer; }
|
||||
.dropzone.dz-clickable * {
|
||||
cursor: default; }
|
||||
.dropzone.dz-clickable .dz-message, .dropzone.dz-clickable .dz-message * {
|
||||
cursor: pointer; }
|
||||
.dropzone.dz-started .dz-message {
|
||||
display: none; }
|
||||
.dropzone.dz-drag-hover {
|
||||
border-style: solid; }
|
||||
.dropzone.dz-drag-hover .dz-message {
|
||||
opacity: 0.5; }
|
||||
.dropzone .dz-message {
|
||||
text-align: center;
|
||||
margin: 2em 0; }
|
||||
.dropzone .dz-preview {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin: 16px;
|
||||
min-height: 100px; }
|
||||
.dropzone .dz-preview:hover {
|
||||
z-index: 1000; }
|
||||
.dropzone .dz-preview:hover .dz-details {
|
||||
opacity: 1; }
|
||||
.dropzone .dz-preview.dz-file-preview .dz-image {
|
||||
border-radius: 20px;
|
||||
background: #999;
|
||||
background: linear-gradient(to bottom, #eee, #ddd); }
|
||||
.dropzone .dz-preview.dz-file-preview .dz-details {
|
||||
opacity: 1; }
|
||||
.dropzone .dz-preview.dz-image-preview {
|
||||
background: white; }
|
||||
.dropzone .dz-preview.dz-image-preview .dz-details {
|
||||
-webkit-transition: opacity 0.2s linear;
|
||||
-moz-transition: opacity 0.2s linear;
|
||||
-ms-transition: opacity 0.2s linear;
|
||||
-o-transition: opacity 0.2s linear;
|
||||
transition: opacity 0.2s linear; }
|
||||
.dropzone .dz-preview .dz-remove {
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
border: none; }
|
||||
.dropzone .dz-preview .dz-remove:hover {
|
||||
text-decoration: underline; }
|
||||
.dropzone .dz-preview:hover .dz-details {
|
||||
opacity: 1; }
|
||||
.dropzone .dz-preview .dz-details {
|
||||
z-index: 20;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
opacity: 0;
|
||||
font-size: 13px;
|
||||
min-width: 100%;
|
||||
max-width: 100%;
|
||||
padding: 2em 1em;
|
||||
text-align: center;
|
||||
color: rgba(0, 0, 0, 0.9);
|
||||
line-height: 150%; }
|
||||
.dropzone .dz-preview .dz-details .dz-size {
|
||||
margin-bottom: 1em;
|
||||
font-size: 16px; }
|
||||
.dropzone .dz-preview .dz-details .dz-filename {
|
||||
white-space: nowrap; }
|
||||
.dropzone .dz-preview .dz-details .dz-filename:hover span {
|
||||
border: 1px solid rgba(200, 200, 200, 0.8);
|
||||
background-color: rgba(255, 255, 255, 0.8); }
|
||||
.dropzone .dz-preview .dz-details .dz-filename:not(:hover) {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis; }
|
||||
.dropzone .dz-preview .dz-details .dz-filename:not(:hover) span {
|
||||
border: 1px solid transparent; }
|
||||
.dropzone .dz-preview .dz-details .dz-filename span, .dropzone .dz-preview .dz-details .dz-size span {
|
||||
background-color: rgba(255, 255, 255, 0.4);
|
||||
padding: 0 0.4em;
|
||||
border-radius: 3px; }
|
||||
.dropzone .dz-preview:hover .dz-image img {
|
||||
-webkit-transform: scale(1.05, 1.05);
|
||||
-moz-transform: scale(1.05, 1.05);
|
||||
-ms-transform: scale(1.05, 1.05);
|
||||
-o-transform: scale(1.05, 1.05);
|
||||
transform: scale(1.05, 1.05);
|
||||
-webkit-filter: blur(8px);
|
||||
filter: blur(8px); }
|
||||
.dropzone .dz-preview .dz-image {
|
||||
border-radius: 20px;
|
||||
overflow: hidden;
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
position: relative;
|
||||
display: block;
|
||||
z-index: 10; }
|
||||
.dropzone .dz-preview .dz-image img {
|
||||
display: block; }
|
||||
.dropzone .dz-preview.dz-success .dz-success-mark {
|
||||
-webkit-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
|
||||
-moz-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
|
||||
-ms-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
|
||||
-o-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
|
||||
animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); }
|
||||
.dropzone .dz-preview.dz-error .dz-error-mark {
|
||||
opacity: 1;
|
||||
-webkit-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
|
||||
-moz-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
|
||||
-ms-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
|
||||
-o-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);
|
||||
animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); }
|
||||
.dropzone .dz-preview .dz-success-mark, .dropzone .dz-preview .dz-error-mark {
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
z-index: 500;
|
||||
position: absolute;
|
||||
display: block;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-left: -27px;
|
||||
margin-top: -27px; }
|
||||
.dropzone .dz-preview .dz-success-mark svg, .dropzone .dz-preview .dz-error-mark svg {
|
||||
display: block;
|
||||
width: 54px;
|
||||
height: 54px; }
|
||||
.dropzone .dz-preview.dz-processing .dz-progress {
|
||||
opacity: 1;
|
||||
-webkit-transition: all 0.2s linear;
|
||||
-moz-transition: all 0.2s linear;
|
||||
-ms-transition: all 0.2s linear;
|
||||
-o-transition: all 0.2s linear;
|
||||
transition: all 0.2s linear; }
|
||||
.dropzone .dz-preview.dz-complete .dz-progress {
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.4s ease-in;
|
||||
-moz-transition: opacity 0.4s ease-in;
|
||||
-ms-transition: opacity 0.4s ease-in;
|
||||
-o-transition: opacity 0.4s ease-in;
|
||||
transition: opacity 0.4s ease-in; }
|
||||
.dropzone .dz-preview:not(.dz-processing) .dz-progress {
|
||||
-webkit-animation: pulse 6s ease infinite;
|
||||
-moz-animation: pulse 6s ease infinite;
|
||||
-ms-animation: pulse 6s ease infinite;
|
||||
-o-animation: pulse 6s ease infinite;
|
||||
animation: pulse 6s ease infinite; }
|
||||
.dropzone .dz-preview .dz-progress {
|
||||
opacity: 1;
|
||||
z-index: 1000;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
height: 16px;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin-top: -8px;
|
||||
width: 80px;
|
||||
margin-left: -40px;
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
-webkit-transform: scale(1);
|
||||
border-radius: 8px;
|
||||
overflow: hidden; }
|
||||
.dropzone .dz-preview .dz-progress .dz-upload {
|
||||
background: #333;
|
||||
background: linear-gradient(to bottom, #666, #444);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 0;
|
||||
-webkit-transition: width 300ms ease-in-out;
|
||||
-moz-transition: width 300ms ease-in-out;
|
||||
-ms-transition: width 300ms ease-in-out;
|
||||
-o-transition: width 300ms ease-in-out;
|
||||
transition: width 300ms ease-in-out; }
|
||||
.dropzone .dz-preview.dz-error .dz-error-message {
|
||||
display: block; }
|
||||
.dropzone .dz-preview.dz-error:hover .dz-error-message {
|
||||
opacity: 1;
|
||||
pointer-events: auto; }
|
||||
.dropzone .dz-preview .dz-error-message {
|
||||
pointer-events: none;
|
||||
z-index: 1000;
|
||||
position: absolute;
|
||||
display: block;
|
||||
display: none;
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.3s ease;
|
||||
-moz-transition: opacity 0.3s ease;
|
||||
-ms-transition: opacity 0.3s ease;
|
||||
-o-transition: opacity 0.3s ease;
|
||||
transition: opacity 0.3s ease;
|
||||
border-radius: 8px;
|
||||
font-size: 13px;
|
||||
top: 130px;
|
||||
left: -10px;
|
||||
width: 140px;
|
||||
background: #be2626;
|
||||
background: linear-gradient(to bottom, #be2626, #a92222);
|
||||
padding: 0.5em 1.2em;
|
||||
color: white; }
|
||||
.dropzone .dz-preview .dz-error-message:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -6px;
|
||||
left: 64px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 6px solid transparent;
|
||||
border-right: 6px solid transparent;
|
||||
border-bottom: 6px solid #be2626; }
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -318,7 +318,7 @@
|
|||
if( e.type == "keyup" && e.keyCode != 27) return;
|
||||
|
||||
// Make sure it's visible, and we're not modal
|
||||
if( $pageslide.is( ':visible' ) && !$pageslide.data( 'modal' ) ) {
|
||||
if( $pageslide.is( ':visible' ) && !$pageslide.data( 'modal' ) && !$("#modify_fields_to_show").is(":visible")) {
|
||||
$.pageslide.close();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20141007 */
|
||||
!function(a){"use strict";function b(){try{this.playVideo()}catch(a){}}function c(){try{this.pauseVideo()}catch(a){}}var d='<div class=cycle-youtube><iframe width="640" height="360" frameborder="0" allowfullscreen="" data-yt-api-binded="0" src="{{url}}"></iframe></div>';a.extend(a.fn.cycle.defaults,{youtubeAllowFullScreen:!0,youtubeAutostart:!1,youtubeAutostop:!0}),a(document).on("cycle-bootstrap",function(e,f){f.youtube&&(f.hideNonActive=!1,f.container.find(f.slides).each(function(b){if(void 0!==a(this).attr("href")){var c,e=a(this),g=e.attr("href"),h=f.youtubeAllowFullScreen?"true":"false";g+=(/\?/.test(g)?"&":"?")+"enablejsapi=1",f.youtubeAutostart&&f.startingSlide===b&&(g+="&autoplay=1"),c=f.API.tmpl(d,{url:g,allowFullScreen:h}),e.replaceWith(c)}}),f.slides=f.slides.replace(/(\b>?a\b)/,"div.cycle-youtube"),f.youtubeAutostart&&f.container.on("cycle-initialized cycle-after",function(c,d){var e="cycle-initialized"==c.type?d.currSlide:d.nextSlide;a(d.slides[e]).find("object,embed").each(b)}),f.youtubeAutostop&&f.container.on("cycle-before",function(b,d){a(d.slides[d.currSlide]).find("object,embed").each(c)}))})}(jQuery);
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
//= require basic
|
||||
//= require jquery-ui/sortable
|
||||
//= require lib/jquery.ui.touch-punch.min.js
|
||||
//= require lib/jquery.mjs.nestedSortable.js
|
||||
//= require lib/jquery.mjs.nestedSortable.js
|
||||
|
|
|
|||
|
|
@ -31,11 +31,25 @@ var FormValidator = function(form){
|
|||
email : function(value){
|
||||
var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
||||
return re.test(value);
|
||||
},
|
||||
url : function(value){
|
||||
if(value == "#"){
|
||||
return true;
|
||||
}
|
||||
var reg = new RegExp(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/);
|
||||
return reg.test(value);
|
||||
},
|
||||
urlwithip : function(value){
|
||||
if(value == "#"){
|
||||
return true;
|
||||
}
|
||||
var reg = new RegExp(/^https?\:\/\/[^\/\s]+(\/.*)?$/);
|
||||
return reg.test(value);
|
||||
}
|
||||
}
|
||||
|
||||
this.initialize = function(){
|
||||
fv.elements = form.find("*[data-fv-validation]");
|
||||
fv.elements = fv.form.find("*[data-fv-validation]");
|
||||
_number_of_validators_++;
|
||||
_putFieldsValidatorAndMessage();
|
||||
_attachSubmitHandler();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,258 @@
|
|||
.panel{
|
||||
position: relative;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
border: 1px solid #DFDFDF;
|
||||
background: #FFF;
|
||||
box-shadow: 0px 0px 10px #CCC;
|
||||
.installed-templates-search,
|
||||
.templates-store-search {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 5px;
|
||||
@media screen and (max-width: 479px) {
|
||||
.search {
|
||||
width: 130px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.break{
|
||||
border-left: 1px solid #FCFCFC;
|
||||
border-right: 1px solid #DDD;
|
||||
padding: 10px 0;
|
||||
margin: 0 15px;
|
||||
}
|
||||
.panel-heading{
|
||||
font-size: 16px;
|
||||
color: #666;
|
||||
padding: 10px 20px;
|
||||
height: 20px;
|
||||
|
||||
background-color: #fafafa;
|
||||
background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2));
|
||||
background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2);
|
||||
background-image: -o-linear-gradient(top, #ffffff, #f2f2f2);
|
||||
background-image: linear-gradient(to bottom, #ffffff, #f2f2f2);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);
|
||||
*zoom: 1;
|
||||
border-bottom: 1px solid #DDD;
|
||||
& > ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
display: inline-block;
|
||||
border-right: 1px solid #FCFCFC;
|
||||
margin-top: -10px;
|
||||
padding-top: 10px;
|
||||
padding-right: 15px;
|
||||
padding-bottom: 10px;
|
||||
& + li {
|
||||
border-left: 1px solid #DDD;
|
||||
margin-left: -3px;
|
||||
padding-left: 15px;
|
||||
}
|
||||
&:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
&.active {
|
||||
a {
|
||||
color: #0088cc;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 767px) {
|
||||
.translation_missing {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
a {
|
||||
color: #666;
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.table{
|
||||
margin: 0;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
.toggle-control {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.table td{
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.table td img{
|
||||
background: #666;
|
||||
border: 3px solid #AAA;
|
||||
padding: 2px;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0px 0px 10px #000 inset;
|
||||
}
|
||||
|
||||
.pannel-body {
|
||||
padding: 15px 0;
|
||||
.pannel-body-inner {
|
||||
min-height: 400px;
|
||||
max-height: 600px;
|
||||
padding: 0 15px;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
.store-item-list {
|
||||
&:after {
|
||||
content: '';
|
||||
clear: both;
|
||||
display: table;
|
||||
}
|
||||
.store-item {
|
||||
float: left;
|
||||
padding: 5px;
|
||||
box-sizing: border-box;
|
||||
border-style: solid;
|
||||
border-color: #ededed;
|
||||
border-width: 0;
|
||||
border-top-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-right-width: 1px;
|
||||
@media screen and (min-width: 996px) {
|
||||
width: 25%;
|
||||
&:nth-child(n+5) {
|
||||
border-top-width: 0;
|
||||
}
|
||||
&:nth-child(4n+1) {
|
||||
border-left-width: 1px;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 768px) and (max-width: 995px) {
|
||||
width: 33%;
|
||||
&:nth-child(n+4) {
|
||||
border-top-width: 0;
|
||||
}
|
||||
&:nth-child(3n+1) {
|
||||
border-left-width: 1px;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 480px) and (max-width: 767px) {
|
||||
width: 50%;
|
||||
&:nth-child(n+3) {
|
||||
border-top-width: 0;
|
||||
}
|
||||
&:nth-child(2n+1) {
|
||||
border-left-width: 1px;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 479px) {
|
||||
width: 100%;
|
||||
border-left-width: 1px;
|
||||
& + .store-item {
|
||||
border-top-width: 0;
|
||||
}
|
||||
}
|
||||
&:after {
|
||||
content: '';
|
||||
clear: both;
|
||||
display: table;
|
||||
}
|
||||
}
|
||||
.app-pic {
|
||||
float: left;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
margin-right: 10px;
|
||||
overflow: hidden;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.app-name,
|
||||
.app-author,
|
||||
.app-category {
|
||||
width: calc(100% - 90px);
|
||||
margin-top: 0;
|
||||
margin-bottom: 3px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.app-name {
|
||||
a {
|
||||
color: #333;
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
.app-category {
|
||||
color: #C3C3C3;
|
||||
}
|
||||
}
|
||||
|
||||
.pannel-footer{
|
||||
background: #f2f2f2; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #f2f2f2 0%, #ffffff 76%, #ededed 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f2f2f2), color-stop(76%,#ffffff), color-stop(100%,#ededed)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #f2f2f2 0%,#ffffff 76%,#ededed 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #f2f2f2 0%,#ffffff 76%,#ededed 100%); /* Opera 11.10+ */
|
||||
background: -ms-linear-gradient(top, #f2f2f2 0%,#ffffff 76%,#ededed 100%); /* IE10+ */
|
||||
background: linear-gradient(to bottom, #f2f2f2 0%,#ffffff 76%,#ededed 100%); /* W3C */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f2f2f2', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */
|
||||
|
||||
border: 1px solid #EEE;
|
||||
border-top: 1px solid #CCC;
|
||||
padding: 10px;
|
||||
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
#apply_change_btn{
|
||||
display: none;
|
||||
}
|
||||
|
||||
#alert_wrap{
|
||||
display: none;
|
||||
position: absolute;
|
||||
width: 93%;
|
||||
top: 30%;
|
||||
z-index: 1045;
|
||||
}
|
||||
|
||||
.alert{
|
||||
width: 400px;
|
||||
text-align: center;
|
||||
z-index: 1050;
|
||||
margin: 0 auto;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
#delete_confirm_wrap{
|
||||
display: none;
|
||||
position: absolute;
|
||||
width: 93%;
|
||||
top: 30%;
|
||||
z-index: 1045;
|
||||
}
|
||||
|
||||
#delete_confirm_wrap .alert{
|
||||
width: 260px;
|
||||
text-align: left;
|
||||
padding: 20px;
|
||||
font-size: 14px;
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
.modal-backdrop{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.icons-faq:before{ content: "\e086"; }
|
||||
.icons-ask:before { content: "\e062"; }
|
||||
.icons-survey:before { content: "\e070"; }
|
||||
|
|
@ -14,3 +14,8 @@
|
|||
*= require lib/filter
|
||||
*= require lib/pageslide
|
||||
*/
|
||||
|
||||
/* Hide ckeditor text, it's breaking the layout but we need to keep them for future use */
|
||||
.ui-helper-hidden-accessible {
|
||||
display: none;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ input:focus::-webkit-input-placeholder {
|
|||
color: transparent;
|
||||
}
|
||||
body {
|
||||
background-color: #F3F3F3;
|
||||
background-color: #f3f3f3;
|
||||
font-family: 'Chivo';
|
||||
}
|
||||
body.modalBlur > nav,
|
||||
|
|
@ -319,6 +319,18 @@ legend {
|
|||
background-color: rgba(0, 136, 204, .6);
|
||||
}
|
||||
|
||||
/* sidebar on */
|
||||
#sidebar.on ~ #main-wrap .fc-border-separate {
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
#sidebar.on ~ #main-wrap .fc-view-month .fc-day-header {
|
||||
width: auto !important;
|
||||
}
|
||||
|
||||
#sidebar.on ~ #main-wrap .fc-view-agendaWeek .fc-widget-header.fc-last {
|
||||
width: 15px !important;
|
||||
}
|
||||
|
||||
/* Main Wrap */
|
||||
#main-wrap {
|
||||
|
|
@ -779,6 +791,15 @@ legend {
|
|||
display: block;
|
||||
}
|
||||
|
||||
.simple-date-picker input:first-child {
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
.simple-date-picker select {
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
|
||||
/* IE go die */
|
||||
:root #sidebar .sub-nav-block:before {
|
||||
display: block\9;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
left: -10px;
|
||||
right: -10px;
|
||||
height: 40px;
|
||||
z-index: 1041;
|
||||
z-index: 1040;
|
||||
position: fixed;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
background-repeat: no-repeat;
|
||||
background-image: url('<%= asset_path 'orbit-logo.svg' %>');
|
||||
|
||||
/* For Suck IE */
|
||||
/* For IE */
|
||||
background-image: url('<%= asset_path 'orbit-logo.png' %>');
|
||||
}
|
||||
#orbit-bar.navbar .nav > li > a {
|
||||
|
|
@ -318,6 +318,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
#orbit-bar .orbit-bar-search-sign-language #search input[type="search"] {
|
||||
width: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 430px) {
|
||||
#orbit-bar #search{
|
||||
display: none;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,65 @@
|
|||
@charset "utf-8";
|
||||
@import url(http://fonts.googleapis.com/css?family=Ubuntu:400,400italic);
|
||||
body {
|
||||
font-family: "Ubuntu", sans-serif;
|
||||
font-size: 100%;
|
||||
padding: 8rem 0 0 0;
|
||||
background: url(/assets/google-message-background.jpg) center center fixed;
|
||||
background-size: cover;
|
||||
}
|
||||
.message-wrap {
|
||||
width: 80%;
|
||||
max-width: 366px;
|
||||
margin: auto;
|
||||
padding: 2rem;
|
||||
text-align: center;
|
||||
border: 2px solid rgba(255, 255, 255, .1);
|
||||
border-radius: 4px;
|
||||
background: rgba(255, 255, 255, .1);
|
||||
}
|
||||
.message-image-wrap {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 100px;
|
||||
}
|
||||
.message-image {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin: 3rem 0 1.875rem 0;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.message-body .message-icon {
|
||||
font-size: 1.2rem;
|
||||
line-height: 50px;
|
||||
position: absolute;
|
||||
right: -1.625rem;
|
||||
bottom: 1rem;
|
||||
display: block;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
color: #fff;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.message-heading {
|
||||
font-size: 1.75rem;
|
||||
font-weight: normal;
|
||||
margin-bottom: .5rem;
|
||||
text-transform: uppercase;
|
||||
color: #fff;
|
||||
}
|
||||
.message-paragraph {
|
||||
font-size: .9rem;
|
||||
font-style: italic;
|
||||
margin-bottom: 1rem;
|
||||
color: rgba(255, 255, 255, .8);
|
||||
}
|
||||
.success-skin {
|
||||
background: #37be1c;
|
||||
}
|
||||
.fail-skin {
|
||||
background: #cc1c1c;
|
||||
}
|
||||
.info-skin {
|
||||
background: #1cadcc;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
@charset "utf-8";
|
||||
@import "group-variables";
|
||||
|
||||
// Group category page
|
||||
.group-category {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.group-category-tab {
|
||||
.group-category-tab-nav {
|
||||
font-size: 0.8125rem;
|
||||
padding: 10px 12px;
|
||||
}
|
||||
|
||||
.active {
|
||||
.group-category-tab-nav {
|
||||
background-color: $blue;
|
||||
|
||||
&:hover {
|
||||
background-color: lighten($blue, 5%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.group-category-item {
|
||||
float: left;
|
||||
margin: 0 0.625rem 1rem 0;
|
||||
background-color: $green;
|
||||
|
||||
&:hover {
|
||||
background-color: lighten($green, 5%);
|
||||
}
|
||||
|
||||
.group-category-tag-icon {
|
||||
font-size: 1rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
a {
|
||||
font-size: 0.8125rem;
|
||||
font-family: $sub-font;
|
||||
color: $white;
|
||||
}
|
||||
}
|
||||
|
||||
.group-category-request {
|
||||
.group-category-item {
|
||||
background-color: darken($dark-gray, 25%);
|
||||
}
|
||||
}
|
||||
|
||||
.group-category-tab-content {
|
||||
border-top: 1px solid #ddd;
|
||||
padding: 16px 0;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.group-category-controls {
|
||||
margin-left: 8px;
|
||||
a {
|
||||
padding: 2px 0.4rem;
|
||||
color: $white;
|
||||
display: inline-block;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.group-category-approve {
|
||||
background-color: $green;
|
||||
}
|
||||
|
||||
.group-category-reject {
|
||||
background-color: $red;
|
||||
}
|
||||
}
|
||||
|
||||
.group-category-approve-tootip {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.card-ownership {
|
||||
border-top: 6px solid darken($gray, 7%);
|
||||
|
||||
&:before {
|
||||
border-top-left-radius: $general;
|
||||
content: "";
|
||||
height: 6px;
|
||||
width: 80%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: -6px;
|
||||
}
|
||||
}
|
||||
|
||||
.card-owner {
|
||||
&:before {
|
||||
background-color: lighten($blue, 10%);
|
||||
}
|
||||
}
|
||||
|
||||
.card-public {
|
||||
&:before {
|
||||
background-color: lighten($green, 10%);
|
||||
}
|
||||
}
|
||||
|
||||
.card-member {
|
||||
&:before {
|
||||
background-color: lighten($red, 20%);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,306 @@
|
|||
@charset "utf-8";
|
||||
@import "group-variables";
|
||||
|
||||
|
||||
// Genernal classes and modules
|
||||
.screen-reader {
|
||||
position: absolute;
|
||||
top: -9999px;
|
||||
left: -9999px;
|
||||
}
|
||||
|
||||
.img-reponsive {
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
margin: auto;
|
||||
max-width: $boundary;
|
||||
}
|
||||
|
||||
.radius {
|
||||
border-radius: $general;
|
||||
}
|
||||
|
||||
// Buttons
|
||||
.button {
|
||||
padding: 8px .75rem;
|
||||
color: $black;
|
||||
border: none;
|
||||
border-radius: 15rem;
|
||||
background: $gray;
|
||||
}
|
||||
|
||||
.button-default {
|
||||
color: $blue;
|
||||
background-color: transparent;
|
||||
border: 2px solid $blue;
|
||||
transition: $fast all;
|
||||
|
||||
&:hover {
|
||||
color: $white;
|
||||
background-color: $blue;
|
||||
}
|
||||
|
||||
&.gray {
|
||||
color: $dark-gray;
|
||||
border: 2px solid $dark-gray;
|
||||
&:hover {
|
||||
color: $white;
|
||||
background-color: $dark-gray;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.button-activated {
|
||||
color: #fff;
|
||||
background-color: $green;
|
||||
}
|
||||
|
||||
.button-primary {
|
||||
color: $white;
|
||||
background-color: $blue;
|
||||
transition: $fast all;
|
||||
|
||||
&:hover {
|
||||
color: $white;
|
||||
background-color: darken($blue, 15%);
|
||||
}
|
||||
}
|
||||
|
||||
.button-small {
|
||||
padding: 4px 0.625rem;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.button-large {
|
||||
padding: 14px 1.3rem;
|
||||
}
|
||||
|
||||
// Button group
|
||||
.button-group {
|
||||
display: inline-block;
|
||||
list-style: none;
|
||||
|
||||
> .button-group-common {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
> .button:first-child {
|
||||
border-radius: 15rem 0 0 15rem;
|
||||
margin-right: -4px;
|
||||
}
|
||||
|
||||
> .button:last-child {
|
||||
border-radius: 0 15rem 15rem 0;
|
||||
}
|
||||
|
||||
li {
|
||||
color: $blue;
|
||||
background-color: rgba($white, 0.2);
|
||||
|
||||
&:hover {
|
||||
a {
|
||||
color: $white;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
> .active {
|
||||
color: $white;
|
||||
background-color: $blue;
|
||||
|
||||
a {
|
||||
color: $white;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Tool Tip
|
||||
.tool-tip-parent {
|
||||
position: relative;
|
||||
|
||||
&:hover {
|
||||
.tool-tip {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tool-tip {
|
||||
padding: 10px 0.75rem;
|
||||
border-radius: .2rem;
|
||||
color: $white;
|
||||
background: rgba($black, 0.85);
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 100%;
|
||||
z-index: 150;
|
||||
display: none;
|
||||
|
||||
&:after {
|
||||
border: 5px solid transparent;
|
||||
border-top-color: rgba($black, 0.85);
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
bottom: -10px;
|
||||
}
|
||||
|
||||
&.right {
|
||||
left: auto;
|
||||
right: 0;
|
||||
|
||||
&:after {
|
||||
left: auto;
|
||||
right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
&.bottom {
|
||||
top: 100%;
|
||||
bottom: auto;
|
||||
|
||||
&:after {
|
||||
top: -10px;
|
||||
bottom: auto;
|
||||
border-top-color: transparent;
|
||||
border-bottom-color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
}
|
||||
|
||||
&.nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.action {
|
||||
position: relative;
|
||||
|
||||
.toggle {
|
||||
border: none;
|
||||
border-left: 1px solid darken($gray, 6%);
|
||||
border-bottom: 1px solid darken($gray, 6%);
|
||||
background: none;
|
||||
padding: 2px 8px;
|
||||
transition: $fast all;
|
||||
|
||||
&:hover, &.open {
|
||||
border-color: $blue;
|
||||
background: $blue;
|
||||
|
||||
.caret {
|
||||
border-top-color: $white;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:hover, &.open {
|
||||
border-radius: $general;
|
||||
background: $blue;
|
||||
|
||||
.caret {
|
||||
border-top-color: $white;
|
||||
}
|
||||
}
|
||||
|
||||
.caret {
|
||||
border-top-color: darken($gray, 30%);
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.action-dropdown {
|
||||
display: none;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 102%;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: $white;
|
||||
border: 1px solid darken($gray, 6%);
|
||||
border-radius: $general;
|
||||
box-shadow: 0 1px 3px 0 rgba($black, 0.2);
|
||||
|
||||
a {
|
||||
display: block;
|
||||
padding: 3px 12px;
|
||||
white-space: nowrap;
|
||||
|
||||
&:hover {
|
||||
color: $white;
|
||||
background-color: $blue;
|
||||
}
|
||||
}
|
||||
|
||||
&.open {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.card {
|
||||
border-radius: $general;
|
||||
background: $white;
|
||||
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2);
|
||||
transition: $normal box-shadow;
|
||||
|
||||
&:hover {
|
||||
box-shadow: 0 1px 25px 0 rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
}
|
||||
|
||||
// responsive grid
|
||||
.square {
|
||||
float: left;
|
||||
position: relative;
|
||||
width: 20%;
|
||||
padding-bottom: 20%;
|
||||
margin: 1%;
|
||||
background-color: $white;
|
||||
overflow: hidden;
|
||||
.content {
|
||||
position: absolute;
|
||||
height: 90%;
|
||||
width: 90%;
|
||||
padding: 5%;
|
||||
.rs {
|
||||
width: auto;
|
||||
height: auto;
|
||||
max-height: 90%;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
.table {
|
||||
display: table;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.table-cell {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// avatar
|
||||
.admin-avatar {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
max-width: none;
|
||||
border-radius: $round;
|
||||
}
|
||||
|
||||
// breadcrumb
|
||||
.breadcrumb {
|
||||
padding-left: 0;
|
||||
margin: 0;
|
||||
background: none;
|
||||
|
||||
> li {
|
||||
text-shadow: none;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,227 @@
|
|||
@charset "utf-8";
|
||||
@import "group-variables";
|
||||
|
||||
// Group index and public
|
||||
#main-wrap .wrap-inner {
|
||||
padding: 80px 20px 20px;
|
||||
}
|
||||
|
||||
.group-public,
|
||||
.group-index {
|
||||
margin: auto;
|
||||
max-width: 1500px;
|
||||
}
|
||||
|
||||
.group-card {
|
||||
list-style: none;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.group-card-action {
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
top: 6px;
|
||||
z-index: 200;
|
||||
|
||||
.group-card-dropdown-toggle {
|
||||
border: 1px solid darken($gray, 6%);
|
||||
border-radius: $general;
|
||||
|
||||
&:hover {
|
||||
border-radius: $general;
|
||||
}
|
||||
}
|
||||
.group-card-dropdown {}
|
||||
}
|
||||
|
||||
.group-card-inner {
|
||||
padding: 2.6rem 0.8rem;
|
||||
position: relative;
|
||||
min-height: 280px;
|
||||
|
||||
hr {
|
||||
margin: 8px 0 10px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.group-avatar {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
overflow: hidden;
|
||||
background: $dark-gray;
|
||||
z-index: 100;
|
||||
|
||||
&:hover .action {
|
||||
z-index: 600;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 500;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.action {
|
||||
opacity: 0;
|
||||
background: rgba($blue, 0.9);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.edit {
|
||||
color: $white;
|
||||
font-size: 25px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 45%;
|
||||
transform: translate(-50%, -50%);
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.trash {
|
||||
color: $red;
|
||||
font-size: 25px;
|
||||
position: absolute;
|
||||
top: 49%;
|
||||
left: 60%;
|
||||
transform: translate(-50%, -50%);
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.group-info {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.group-mail {
|
||||
color: $dark-gray;
|
||||
font-family: $sub-font;
|
||||
}
|
||||
|
||||
.group-roles {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: $sub-font;
|
||||
|
||||
.label {
|
||||
font-family: $main-font;
|
||||
text-transform: capitalize;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.label.private {
|
||||
background-color: $red;
|
||||
}
|
||||
|
||||
.label.public {
|
||||
background-color: #74c25d;
|
||||
}
|
||||
}
|
||||
|
||||
.group-privacy {
|
||||
color: $dark-gray;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.group-description {
|
||||
overflow: hidden;
|
||||
max-height: 150px;
|
||||
}
|
||||
|
||||
.group-name {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
// 370px
|
||||
@media screen and (min-width: 23.125rem) {
|
||||
.group-index {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.group-card {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
// 600px
|
||||
@media screen and (min-width: 37.5rem) {
|
||||
.group-index {
|
||||
margin-top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.group-card {
|
||||
float: left;
|
||||
padding: 0 0.5rem;
|
||||
width: 50%;
|
||||
|
||||
&:nth-child(2n+1) {
|
||||
clear: both;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 900px
|
||||
@media screen and (min-width: 56.25rem) {
|
||||
.group-card {
|
||||
width: 33.3%;
|
||||
|
||||
&:nth-child(2n+1) {
|
||||
clear: none;
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
|
||||
&:nth-child(3n+1) {
|
||||
clear: both;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 1080px
|
||||
@media screen and (min-width: 67.5rem) {
|
||||
.group-card {
|
||||
width: 25%;
|
||||
|
||||
&:nth-child(3n+1) {
|
||||
clear: none;
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
|
||||
&:nth-child(4n+1) {
|
||||
clear: both;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 1400px
|
||||
@media screen and (min-width: 87.5rem) {
|
||||
.group-card {
|
||||
width: 20%;
|
||||
|
||||
&:nth-child(4n+1) {
|
||||
clear: none;
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
|
||||
&:nth-child(5n+1) {
|
||||
clear: both;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,154 @@
|
|||
@import "group-variables";
|
||||
|
||||
// Group page
|
||||
#main-wrap {
|
||||
padding-top: 0;
|
||||
.wrap-inner {
|
||||
// padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.group-member-banner-wrap {
|
||||
height: 280px;
|
||||
overflow: hidden;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
transition: $fast all;
|
||||
z-index: 500;
|
||||
background: lighten($black, 25%);
|
||||
}
|
||||
|
||||
.group-member-bar {
|
||||
padding: 0 2rem 0 6rem;
|
||||
background: rgba(25, 27, 29, 0.95);
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.group-member-page-title {
|
||||
margin-bottom: 12px;
|
||||
padding: 6px 0;
|
||||
color: $white;
|
||||
font-family: $main-font;
|
||||
font-weight: normal;
|
||||
max-width: 100%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
.group-member-dropdown {
|
||||
margin: 12px 0;
|
||||
> button {
|
||||
padding: 8px 0.75rem;
|
||||
}
|
||||
.badge {
|
||||
margin-left: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.group-member-section {
|
||||
overflow: hidden;
|
||||
padding: 220px 2rem 30px;
|
||||
}
|
||||
|
||||
.group-member-list {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.group-member-item {
|
||||
list-style: none;
|
||||
padding: 16px 1rem;
|
||||
margin: 8px 0 12px 0;
|
||||
}
|
||||
|
||||
.group-member-photo-wrap {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
|
||||
.group-member-meta-wrap {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.group-member-name {
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
.group-member-photo {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
border-radius: $round;
|
||||
}
|
||||
|
||||
// scroll view
|
||||
|
||||
.group-member.scroll {
|
||||
padding-top: 2rem;
|
||||
padding-bottom: 9rem;
|
||||
|
||||
.group-member-page-title {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
font-size: 1.625rem;
|
||||
line-height: 50px;
|
||||
}
|
||||
|
||||
.group-member-banner-wrap {
|
||||
height: 120px;
|
||||
}
|
||||
|
||||
.group-member-page-title {
|
||||
margin-bottom: 0;
|
||||
font-size: 1.625rem;
|
||||
line-height: 50px;
|
||||
}
|
||||
.group-member-section {
|
||||
padding-top: 60px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 620
|
||||
@media screen and (min-width: 38.75rem) {
|
||||
.group-member-item {
|
||||
float: left;
|
||||
margin-right: 1rem;
|
||||
width: 45%;
|
||||
}
|
||||
}
|
||||
|
||||
// 980px
|
||||
|
||||
@media screen and (min-width: 61.25rem) {
|
||||
.group-member-content-wrap {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.group-member-item {
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.group-member-page-title {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
line-height: 70px;
|
||||
transition: .6s all;
|
||||
}
|
||||
}
|
||||
|
||||
// 1400px
|
||||
@media screen and (min-width: 87.5rem) {
|
||||
.group-member-item {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,394 @@
|
|||
@charset "utf-8";
|
||||
@import "group-variables";
|
||||
|
||||
// Group page
|
||||
#main-wrap {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.group-post-banner-wrap {
|
||||
height: 280px;
|
||||
overflow: hidden;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
transition: $fast all;
|
||||
z-index: 500;
|
||||
background: lighten($black, 25%);
|
||||
}
|
||||
|
||||
.group-post-banner-image-wrap {
|
||||
background-color: $black;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.group-post-view-switch {
|
||||
position: absolute;
|
||||
top: 4rem;
|
||||
right: 2rem;
|
||||
}
|
||||
|
||||
.group-post-banner-image {
|
||||
width: auto;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.group-post-bar {
|
||||
padding: 0 2rem 0 6rem;
|
||||
text-align: center;
|
||||
background: rgba(25, 27, 29, 0.95);
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.group-post-view-switch-in-bar {
|
||||
display: none;
|
||||
|
||||
.button {
|
||||
padding: 3px .75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.group-post-page-title {
|
||||
margin-bottom: 12px;
|
||||
padding: 6px 0;
|
||||
color: $white;
|
||||
font-family: $main-font;
|
||||
font-weight: normal;
|
||||
max-width: 100%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.group-post-section {
|
||||
overflow: hidden;
|
||||
padding: 300px 2rem 30px;
|
||||
}
|
||||
|
||||
.breadcrumb {
|
||||
li {
|
||||
overflow: hidden;
|
||||
max-width: 150px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.gorup-page-info-wrap {
|
||||
font-size: .9rem;
|
||||
padding: 6px 1rem;
|
||||
display: block;
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.group-post-description-wrap {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.gorup-page-info-wrap {
|
||||
margin-bottom: 10px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.group-post-status-wrap {
|
||||
font-size: .75rem;
|
||||
float: right;
|
||||
padding: 2px 0.5rem;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.group-post-status-wrap.close-eye {
|
||||
margin-left: 5px;
|
||||
background: $red;
|
||||
}
|
||||
|
||||
.group-post-description-wrap {
|
||||
margin-bottom: 15px;
|
||||
padding: 16px 1.2rem 16px;
|
||||
border-radius: .2rem;
|
||||
box-shadow: inset 0 0 8px $dark-gray;
|
||||
}
|
||||
|
||||
.group-post-description {
|
||||
clear: both;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
.group-post-member-count,
|
||||
.group-post-no-member {
|
||||
background: $blue;
|
||||
color: $white;
|
||||
padding: 6px 0.625rem;
|
||||
border-radius: $general;
|
||||
&:hover {
|
||||
background: darken($blue, 10%);
|
||||
color: $white;
|
||||
}
|
||||
}
|
||||
|
||||
.group-post-item {
|
||||
position: relative;
|
||||
clear: both;
|
||||
margin-bottom: 40px;
|
||||
padding: 28px 1.5rem;
|
||||
text-align: center;
|
||||
|
||||
&.clickable {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
.group-post-title {
|
||||
color: $blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.group-post-actions {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.group-post-dropdown-toggle {
|
||||
&:hover, &.open {
|
||||
.caret {
|
||||
}
|
||||
}
|
||||
|
||||
.caret {
|
||||
}
|
||||
}
|
||||
|
||||
.group-post-dropdown {
|
||||
a {
|
||||
&:hover {
|
||||
}
|
||||
}
|
||||
|
||||
&.open {
|
||||
}
|
||||
}
|
||||
|
||||
.group-post-action-hint {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.group-post-image-wrap {
|
||||
display: inline-block;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.group-post-image {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
margin-top: 12px;
|
||||
border: 2px solid $gray;
|
||||
border-radius: $general;
|
||||
}
|
||||
|
||||
.group-post-content {
|
||||
margin-bottom: .5rem;
|
||||
color: $dark-gray;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.group-post-title {
|
||||
font-size: 1.5rem;
|
||||
font-weight: normal;
|
||||
line-height: 1;
|
||||
margin-bottom: 12px;
|
||||
color: $light-black;
|
||||
font-family: $paragraph-font;
|
||||
}
|
||||
|
||||
.group-post-sub-wrap {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.group-post-meta-wrap {
|
||||
color: $dark-gray;
|
||||
}
|
||||
|
||||
.group-post-author,
|
||||
.group-post-sub-wrap {
|
||||
margin-right: .5rem;
|
||||
}
|
||||
|
||||
.group-post-seen-by {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.group-post-seen-by-lead {
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
// scroll view
|
||||
|
||||
.group-post.scroll {
|
||||
padding-top: 7rem;
|
||||
padding-bottom: 6rem;
|
||||
|
||||
.group-post-banner-wrap {
|
||||
height: 120px;
|
||||
}
|
||||
|
||||
.group-post-page-title {
|
||||
margin-bottom: 0;
|
||||
font-size: 1.625rem;
|
||||
line-height: 50px;
|
||||
}
|
||||
|
||||
.group-post-new-post,
|
||||
.group-post-join {
|
||||
margin-top: 12px;
|
||||
padding: 6px 10px;
|
||||
}
|
||||
|
||||
.group-post-new-post {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.group-post-view-switch {
|
||||
position: static;
|
||||
display: inline-block;
|
||||
margin: 6px .5rem 0 0;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.group-post-view-switch-in-bar {
|
||||
display: inline-block;
|
||||
margin-top: 12px;
|
||||
|
||||
.button {
|
||||
padding: 4px .75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.group-post-section {
|
||||
padding-top: 60px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: 2px 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.group-post li a {
|
||||
text-decoration: none;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.group-post-switch-btn {
|
||||
color: $blue;
|
||||
|
||||
&:hover {
|
||||
color: $white;
|
||||
}
|
||||
}
|
||||
|
||||
// 400px
|
||||
@media screen and (min-width: 25rem) {
|
||||
.group-post-new-post,
|
||||
.group-post-join {
|
||||
margin: 0 0.625rem 16px;
|
||||
float: none;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.group-post-view-switch-in-bar {
|
||||
float: none;
|
||||
margin: 0;
|
||||
|
||||
.button {
|
||||
padding: 6px .75rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 600px
|
||||
|
||||
@media screen and (min-width: 37.5rem) {
|
||||
.group-post-item {
|
||||
margin-bottom: 35px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.group-post-image-wrap {
|
||||
float: left;
|
||||
width: 12%;
|
||||
min-width: 100px;
|
||||
margin-right: 4%;
|
||||
max-height: 140px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.group-post-content-wrap {
|
||||
float: left;
|
||||
width: 70%;
|
||||
font-family: $paragraph-font;
|
||||
}
|
||||
}
|
||||
|
||||
/* 760px */
|
||||
|
||||
@media screen and (min-width: 47.5rem) {
|
||||
.group-post-content-wrap {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.group-post-bar {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.group-post-page-title {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
line-height: 70px;
|
||||
transition: .6s all;
|
||||
max-width: 80%;
|
||||
}
|
||||
|
||||
.group-post-new-post,
|
||||
.group-post-join {
|
||||
float: right;
|
||||
margin: 18px 0 0 0;
|
||||
}
|
||||
|
||||
.group-post-view-switch-in-bar {
|
||||
margin: 18px 8px 0 0;
|
||||
float: right;
|
||||
|
||||
li {
|
||||
padding: 8px .75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.group-post-view-switch {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
// 900px
|
||||
@media screen and (min-width: 56.25rem) {
|
||||
.group-post-content-wrap {
|
||||
width: 80%;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
@charset "utf-8";
|
||||
@import "group-variables";
|
||||
|
||||
// General style
|
||||
body {
|
||||
background: $gray;
|
||||
font-family: $main-font;
|
||||
}
|
||||
|
||||
.group-show-post-respond-comment,
|
||||
ul, li, div, img {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6, label, legend {
|
||||
font-family: $main-font;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
a {
|
||||
color: $blue;
|
||||
text-decoration: none;
|
||||
&:hover {
|
||||
color: lighten($blue, 5%);
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
a, button {
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,308 @@
|
|||
@charset "utf-8";
|
||||
@import "group-variables";
|
||||
|
||||
// Group show post
|
||||
.group-show-post {
|
||||
padding: 0 2rem 30px;
|
||||
}
|
||||
|
||||
.group-show-post-meta {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.group-show-post-title {
|
||||
font-family: $main-font;
|
||||
float: left;
|
||||
width: 90%;
|
||||
font-weight: normal;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.group-show-post-avatar-wrap {
|
||||
float: right;
|
||||
padding: 0 0.375rem 0 0;
|
||||
}
|
||||
|
||||
.group-show-post-avatar-username-toggle {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.group-show-post-avatar {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.group-show-post-username {
|
||||
display: none;
|
||||
top: 100%;
|
||||
padding-bottom: 30px;
|
||||
right: 0;
|
||||
left: auto;
|
||||
white-space: nowrap;
|
||||
font-size: 0.75rem;
|
||||
&:after {
|
||||
border-top-color: transparent;
|
||||
border-bottom-color: rgba(0, 0, 0, 0.85);
|
||||
top: -10px;
|
||||
left: auto;
|
||||
right: 20px;
|
||||
bottom: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.group-show-post-postdate {
|
||||
display: inline-block;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.group-show-post-image-wrap {
|
||||
position: relative;
|
||||
background: $black;
|
||||
overflow: hidden;
|
||||
&:hover {
|
||||
.cycle-nav {
|
||||
opacity: 1;
|
||||
}
|
||||
.group-show-post-cycle-prev {
|
||||
left: 2rem;
|
||||
}
|
||||
.group-show-post-cycle-next {
|
||||
right: 2rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.group-show-post-image-list {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.cycle-nav {
|
||||
font-size: 1.2rem;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -1.25rem;
|
||||
line-height: 1.5rem;
|
||||
color: $white;
|
||||
z-index: 500;
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
cursor: pointer;
|
||||
-webkit-transition: $fast all;
|
||||
transition: $fast all;
|
||||
text-align: center;
|
||||
background-color: rgba($black, 0.8);
|
||||
border-radius: 50%;
|
||||
opacity: 0;
|
||||
&:hover {
|
||||
background-color: $blue;
|
||||
}
|
||||
.group-show-post-cycle-nav-icon {
|
||||
line-height: 2.6rem;
|
||||
}
|
||||
}
|
||||
|
||||
.group-show-post-cycle-prev {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.group-show-post-cycle-next {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.group-show-post-content {
|
||||
font-family: $main-font;
|
||||
font-size: .8125rem;
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.group-show-post-attachment-wrap {
|
||||
float: left;
|
||||
width: 80%;
|
||||
margin: 10px 0 25px;
|
||||
.group-show-post-attachment-file-format {
|
||||
margin-right: 8px;
|
||||
vertical-align: middle;
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.group-show-post-seen-by {
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
.group-show-post-seen-by-names {
|
||||
display: block;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
.group-show-post-seen-by-name {
|
||||
display: block;
|
||||
color: #fff;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.group-show-post-seen-by-lead {
|
||||
margin-right: 4px;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.group-show-post-seen-by-names {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.group-show-post-seen-by-count {
|
||||
border-radius: 50%;
|
||||
background: $gray;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
// Comment section
|
||||
.comments {
|
||||
clear: both;
|
||||
.group-show-post-respond-comment {
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
padding: 0 1rem;
|
||||
box-shadow: none;
|
||||
width: 100%;
|
||||
}
|
||||
.group-show-post-avatar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.group-show-post-actions {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.group-no-permission {
|
||||
padding-left: 2rem;
|
||||
background: $red;
|
||||
color: $white;
|
||||
padding: 10px 0.75rem;
|
||||
border-radius: $general;
|
||||
i {
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
.group-show-post-respond-wrap {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.group-show-post-respond-submit {
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.group-show-post-comment-list {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
.group-show-post-comment {
|
||||
position: relative;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
border-bottom: 2px solid $gray;
|
||||
&:hover {
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
.group-show-post-comment-wrap {
|
||||
overflow: hidden;
|
||||
padding: 16px 1.25rem;
|
||||
}
|
||||
|
||||
.group-show-post-no-comment {
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
|
||||
.group-show-post-comment-avatar {
|
||||
float: left;
|
||||
width: 60px;
|
||||
margin-right: 1rem;
|
||||
img {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.group-show-post-comment-author {
|
||||
font-size: .9375rem;
|
||||
float: left;
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
|
||||
.group-show-post-comment-time {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.group-show-post-comment-content {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.group-show-post-comment-body {
|
||||
float: left;
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
// 260px
|
||||
@media screen and (min-width: 16.25rem) {
|
||||
.group-show-post-attachments {
|
||||
a {
|
||||
display: inline-block;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
.group-show-post-attachments-file-name {
|
||||
display: inline-block;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
width: 80px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
// 370px
|
||||
@media screen and (min-width: 23.125rem) {
|
||||
.group-show-post-comment-body {
|
||||
width: 70%;
|
||||
}
|
||||
}
|
||||
|
||||
// 800px
|
||||
@media screen and (min-width: 50rem) {
|
||||
.group-show-post-comment-body {
|
||||
width: 85%;
|
||||
}
|
||||
.comments {
|
||||
.group-show-post-avatar {
|
||||
float: left;
|
||||
width: 10%;
|
||||
max-width: 60px;
|
||||
min-width: 60px;
|
||||
display: block;
|
||||
}
|
||||
.group-show-post-respond-comment {
|
||||
float: left;
|
||||
width: 89%;
|
||||
margin-left: 1%;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 960px
|
||||
@media screen and (min-width: 60rem) {
|
||||
.group-show-post-comment-body {
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
@charset "utf-8";
|
||||
|
||||
// Google fonts
|
||||
@import url(http://fonts.googleapis.com/css?family=Maven+Pro);
|
||||
|
||||
@import url(http://fonts.googleapis.com/css?family=Roboto);
|
||||
|
||||
// Font stacks
|
||||
$main-font: "Maven Pro", "微軟正黑體" sans-serif;
|
||||
$sub-font: "Roboto", "微軟正黑體", sans-serif;
|
||||
$paragraph-font: "Roboto", "微軟正黑體", sans-serif;
|
||||
|
||||
// Colors
|
||||
$gray: #f3f3f3;
|
||||
$dark-gray: #aaaaaa;
|
||||
$light-gray: #cdcdcd;
|
||||
$white: white;
|
||||
$light-black: #353535;
|
||||
$black: black;
|
||||
$green: #74c25d;
|
||||
$blue: #4171d5;
|
||||
$red: #dd5933;
|
||||
$blue-green: #00acee;
|
||||
$group-page-bar-color: #171717;
|
||||
|
||||
// Transition units
|
||||
$fast: 0.3s;
|
||||
$normal: 0.6s;
|
||||
$slow: 1s;
|
||||
|
||||
// Border radius units
|
||||
$general: 0.25rem;
|
||||
$round: 50%;
|
||||
|
||||
// Commonly use units
|
||||
$boundary: 1150px;
|
||||
|
|
@ -0,0 +1,270 @@
|
|||
@charset "utf-8";
|
||||
|
||||
@import "group-variables";
|
||||
@import "group-classes";
|
||||
@import "group-reset";
|
||||
|
||||
// General style
|
||||
body {
|
||||
background: $gray;
|
||||
font-family: $main-font;
|
||||
}
|
||||
|
||||
// dropzone
|
||||
|
||||
.dropzone-pool {
|
||||
border: 2px dashed $blue;
|
||||
margin-bottom: 16px;
|
||||
font-family: $paragraph-font;
|
||||
font-size: 0.9375rem;
|
||||
color: $dark-gray;
|
||||
margin-right: 1rem;
|
||||
border-radius: $general;
|
||||
}
|
||||
|
||||
// Override and resolve the conflict with main-form.css for that I need RWD support for this page
|
||||
.main-forms fieldset .input-area .controls textarea {
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
// Override Bootstrap modal
|
||||
.modal.fade {
|
||||
top: -65%;
|
||||
}
|
||||
|
||||
// Override select2 styles, I need this evil power
|
||||
#main-wrap {
|
||||
.select2-container-multi {
|
||||
margin-right: 0.9375rem;
|
||||
min-width: 200px;
|
||||
|
||||
.select2-choices {
|
||||
padding: 0;
|
||||
border-radius: $general;
|
||||
|
||||
.select2-search-field {
|
||||
input {
|
||||
padding: 10px 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.select2-search-choice {
|
||||
padding: 10px 1.75rem 10px 0.7rem;
|
||||
border-color: lighten($light-gray, 5%);
|
||||
background: $white;
|
||||
|
||||
> div {
|
||||
&:before {
|
||||
content: "\F007";
|
||||
font-family: FontAwesome;
|
||||
display: inline-block;
|
||||
font-size: 0.9375rem;
|
||||
color: $blue;
|
||||
margin: 0 0.5rem 0 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.select2-search-choice-close {
|
||||
right: 15px;
|
||||
left: auto;
|
||||
|
||||
&:before {
|
||||
content: "\f057";
|
||||
font-family: FontAwesome;
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
left: 6px;
|
||||
top: 6px;
|
||||
font-size: 0.9375rem;
|
||||
color: $dark-gray;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
&:before {
|
||||
color: $red;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.select2-result-label {
|
||||
> span {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.wrap-inner {
|
||||
.upload-status-notice {
|
||||
position: fixed;
|
||||
right: 1rem;
|
||||
top: 4rem;
|
||||
color: $white;
|
||||
padding: 16px 1.375rem;
|
||||
background-color: $blue;
|
||||
border-radius: $general;
|
||||
font-size: 0.8125rem;
|
||||
box-shadow: 0px 0px 16px 3px rgba(0, 0, 0, 0.2);
|
||||
-webkit-animation-duration: .3s;
|
||||
animation-duration: .3s;
|
||||
z-index: 3000;
|
||||
}
|
||||
}
|
||||
|
||||
.fileupload {
|
||||
.thumbnail {
|
||||
max-width: 60%;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.img-avatar {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
// members page
|
||||
.existing-phone-avatar {
|
||||
vertical-align: top;
|
||||
margin: 0 0.5rem 0.5rem 0;
|
||||
}
|
||||
|
||||
.existing-member-count {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
padding: 8px 0.45rem;
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
.group-edit-button {
|
||||
box-sizing: border-box;
|
||||
vertical-align: top;
|
||||
line-height: 40px;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
.group-edit-avatar {
|
||||
width: 60;
|
||||
}
|
||||
|
||||
.group-member-edit-table {
|
||||
width: 100%;
|
||||
|
||||
tr {
|
||||
border-bottom: 1px solid $gray;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 8px 0.75rem;
|
||||
|
||||
&:first-child {
|
||||
width: 60px;
|
||||
}
|
||||
}
|
||||
|
||||
.make-admin-checkbox {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-right: 0.3125rem;
|
||||
}
|
||||
|
||||
.group-member-permission {
|
||||
display: inline-block;
|
||||
vertical-align: text-top;
|
||||
}
|
||||
}
|
||||
|
||||
.group-admin-edit-image-wrap {
|
||||
margin: 0 24px 1rem 0;
|
||||
}
|
||||
|
||||
.group-admin-edit-image-item {
|
||||
margin: 0 10px 16px 0;
|
||||
padding: 16px 0.5rem;
|
||||
}
|
||||
|
||||
.group-admin-edit-image-container {
|
||||
max-width: 100px;
|
||||
margin: 0 1rem 16px 0;
|
||||
}
|
||||
|
||||
.group-admin-edit-checkbox-wrap {
|
||||
color: $white;
|
||||
font-size: 0.8125rem;
|
||||
background: $blue;
|
||||
padding: 2px 0.625rem;
|
||||
border-radius: $general;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.group-admin-edit-image-checkbox {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.group-admin-edit-image-label {
|
||||
display: inline-block;
|
||||
vertical-align: text-top;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.group-admin-edit-image-item-inner {
|
||||
padding: 16px 0.625rem;
|
||||
background: $white;
|
||||
border-radius: $general;
|
||||
}
|
||||
|
||||
.group-admin-edit-file-wrap {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.group-admin-edit-file-item {
|
||||
padding: 10px 16px;
|
||||
float: left;
|
||||
margin: 0 8px 0.5rem 0;
|
||||
font-size: 0.8125rem;
|
||||
|
||||
.group-admin-edit-file-checkbox {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.group-admin-edit-filename {
|
||||
margin-right: 0.3125rem;
|
||||
}
|
||||
|
||||
.group-admin-edit-file-delete {
|
||||
padding-bottom: 4px;
|
||||
border-bottom: 1px dotted $red;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 700px) {
|
||||
.group-admin-edit-image-item {
|
||||
float: left;
|
||||
width: 45%;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 960px) {
|
||||
.group-admin-edit-image-item {
|
||||
width: 30%;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1150px) {
|
||||
.group-admin-edit-image-item {
|
||||
width: 20%;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
@charset "utf-8";
|
||||
|
||||
@import "group-variables";
|
||||
@import "group-classes";
|
||||
@import "group-reset";
|
||||
@import "group-index";
|
||||
@import "group-post";
|
||||
@import "group-show-post";
|
||||
@import "group-category";
|
||||
@import "group-members";
|
||||
|
||||
|
||||
.topnav {
|
||||
display: none;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -346,12 +346,14 @@
|
|||
position: relative;
|
||||
border-bottom: 5px solid #b1b1b1;
|
||||
height: 8px;
|
||||
text-align: center;
|
||||
}
|
||||
#profile #member-roles .roles h4 span {
|
||||
position: absolute;
|
||||
/*position: absolute;*/
|
||||
background-color: #F3F3F3;
|
||||
padding: 0 5px;
|
||||
left: 50%;
|
||||
/*left: 50%;*/
|
||||
margin: auto !important;
|
||||
}
|
||||
#profile #member-roles .roles dl {
|
||||
background-color: #ffffff;
|
||||
|
|
@ -365,12 +367,22 @@
|
|||
font-size: 1.2em;
|
||||
margin-top: 20px;
|
||||
}
|
||||
#profile #member-roles .roles dt:first-child {
|
||||
#profile #member-roles .roles #google_connection {
|
||||
margin-top: 0px;
|
||||
position: relative;
|
||||
}
|
||||
#profile #member-roles .wait_text {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
}
|
||||
#profile #member-roles .roles dd {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
#profile #module-navbar {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,20 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default;
|
|||
}
|
||||
}
|
||||
|
||||
.login-btn {
|
||||
display: inline-block;
|
||||
padding: 6px 18px;
|
||||
margin-bottom: 0;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
color: #fff;
|
||||
outline: none;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.orbitMenuLink {
|
||||
cursor: pointer;
|
||||
width: 50px;
|
||||
|
|
@ -27,7 +41,7 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default;
|
|||
color: #FFF;
|
||||
font-family: 'Chivo';
|
||||
i {
|
||||
display: block;
|
||||
display: inline-block;
|
||||
width: 50px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
|
|
@ -37,6 +51,13 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default;
|
|||
text-align: center;
|
||||
}
|
||||
}
|
||||
.orbit-bar-language-icon {
|
||||
width: 30px;
|
||||
}
|
||||
.orbit-bar-language-text {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
}
|
||||
#orbit-bar {
|
||||
position: fixed;
|
||||
|
|
@ -45,7 +66,7 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default;
|
|||
left: 0;
|
||||
font-family: 'Chivo';
|
||||
font-size: 16px;
|
||||
z-index: 1060;
|
||||
z-index: 1040;
|
||||
-webkit-box-sizing: initial;
|
||||
-moz-box-sizing: initial;
|
||||
box-sizing: initial;
|
||||
|
|
@ -76,6 +97,7 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default;
|
|||
&:checked {
|
||||
&~.cover {
|
||||
display: block;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
&~.login-window {
|
||||
display: block;
|
||||
|
|
@ -95,29 +117,25 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default;
|
|||
.login-window {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 3em;
|
||||
top: 5em;
|
||||
left: 50%;
|
||||
width: 500px;
|
||||
width: 400px;
|
||||
z-index: 10;
|
||||
background-color: #fff;
|
||||
margin-left: -250px;
|
||||
margin-left: -200px;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
|
||||
.login-header {
|
||||
padding: 10px 15px;
|
||||
border-bottom: 1px solid lighten($orbit-bar-bgc, 60%);
|
||||
padding: 20px 40px 0 40px;
|
||||
.close {
|
||||
float: right;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
line-height: 20px;
|
||||
cursor: pointer;
|
||||
color: lighten($orbit-bar-bgc, 60%);
|
||||
&:hover {
|
||||
color: lighten($orbit-bar-bgc, 40%);
|
||||
}
|
||||
}
|
||||
h3 {
|
||||
font-family: Chivo, "微軟正黑體", "Helvetica Neue", Helvetica, sans-serif;
|
||||
color: $orbit-bar-bgc-lighter;
|
||||
margin: 0;
|
||||
}
|
||||
|
|
@ -131,68 +149,79 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default;
|
|||
}
|
||||
.prepend {
|
||||
margin-bottom: 15px;
|
||||
text-align: left;
|
||||
.add {
|
||||
color: #8D8D8D;
|
||||
border-radius: 4px 0 0 4px;
|
||||
margin-right: -5px;
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
height: 20px;
|
||||
min-width: 16px;
|
||||
padding: 4px 5px;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
text-shadow: 0 1px 0 #ffffff;
|
||||
background-color: #eeeeee;
|
||||
padding: 8px 5px;
|
||||
font-size: 13px;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
background-color: #eee;
|
||||
border: 1px solid #ccc;
|
||||
white-space: nowrap;
|
||||
vertical-align: top;
|
||||
height: auto;
|
||||
}
|
||||
.input {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 270px;
|
||||
height: 20px;
|
||||
vertical-align: top;
|
||||
font-size: 13px;
|
||||
padding: 8px 6px;
|
||||
width: 260px;
|
||||
border-radius: 0 4px 4px 0;
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #cccccc;
|
||||
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
|
||||
margin-left: 0;
|
||||
padding: 4px 6px;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
color: #555555;
|
||||
white-space: nowrap;
|
||||
height: auto;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
}
|
||||
.login-submit-wrap {
|
||||
overflow: hidden;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.submit {
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
button {
|
||||
display: inline-block;
|
||||
padding: 4px 12px;
|
||||
margin-bottom: 0;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
color: #FFF;
|
||||
outline: none;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
background-color: #006dcc;
|
||||
border: 1px solid #bbbbbb;
|
||||
border-color: #e6e6e6 #e6e6e6 #bfbfbf;
|
||||
border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);
|
||||
border-radius: 4px;
|
||||
box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);
|
||||
&:hover {
|
||||
background-color: #0044cc;
|
||||
background-color: #0044cc;
|
||||
}
|
||||
&:active {
|
||||
box-shadow: inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);
|
||||
}
|
||||
}
|
||||
}
|
||||
.google-login {
|
||||
float: left;
|
||||
a {
|
||||
position: relative;
|
||||
padding-left: 36px;
|
||||
background-color: #df4a32;
|
||||
border: 1px solid #bbbbbb;
|
||||
border-color: #e6e6e6 #e6e6e6 #bfbfbf;
|
||||
border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);
|
||||
box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);
|
||||
color: #fff;
|
||||
&:hover {
|
||||
color: #fff;
|
||||
background-color: #d92b0e;
|
||||
}
|
||||
}
|
||||
.fa-google-plus {
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
top: 9px;
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
.login-sign-up-btn {
|
||||
clear: both;
|
||||
text-align: left;
|
||||
font-size: 13px;
|
||||
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
|
||||
}
|
||||
}
|
||||
}
|
||||
.orbit-bar-inner {
|
||||
|
|
@ -282,24 +311,25 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default;
|
|||
}
|
||||
li {
|
||||
min-width: 100px;
|
||||
padding: 0 0.8em;
|
||||
padding: 0;
|
||||
&.divider {
|
||||
height: 1px;
|
||||
margin: 0.3em 0;
|
||||
background-color: lighten($orbit-bar-bgc, 60%);
|
||||
}
|
||||
&:hover, &.active {
|
||||
color: #fff;
|
||||
background-color: #0095CF;
|
||||
a {
|
||||
color: #FFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
a {
|
||||
a, .active {
|
||||
color: $orbit-bar-bgc-lighter;
|
||||
font-size: 0.8em;
|
||||
display: block;
|
||||
padding: 0.5em 0;
|
||||
padding: 0.5em 1.2em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
|
@ -317,10 +347,6 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default;
|
|||
width: auto;
|
||||
height: 85%;
|
||||
}
|
||||
// background-position: center;
|
||||
// background-repeat: no-repeat;
|
||||
// background-image: url('<%= asset_path 'orbit-logo.svg' %>');
|
||||
// background-image: url('<%= asset_path 'orbit-logo.png' %>')\9;
|
||||
& + ul {
|
||||
left: 0;
|
||||
}
|
||||
|
|
@ -381,6 +407,9 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default;
|
|||
}
|
||||
}
|
||||
}
|
||||
#language {
|
||||
padding-left: 0;
|
||||
}
|
||||
label {
|
||||
padding: 0;
|
||||
margin-bottom: 0;
|
||||
|
|
@ -388,7 +417,7 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default;
|
|||
}
|
||||
}
|
||||
|
||||
@media (max-width: 479px) {
|
||||
@media (max-width: 540px) {
|
||||
#orbit-bar {
|
||||
.login-window {
|
||||
width: 90%;
|
||||
|
|
@ -449,6 +478,8 @@ $orbit-bar-bgc-lighter: lighten($orbit-bar-bgc, 20%) !default;
|
|||
}
|
||||
.orbit-bar-title {
|
||||
display: block;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
}
|
||||
ul.orbit-bar-search-sign-language {
|
||||
display: none;
|
||||
|
|
|
|||
|
|
@ -6,4 +6,56 @@
|
|||
*/
|
||||
.ui-helper-hidden-accessible{
|
||||
display: none;
|
||||
}
|
||||
|
||||
#form_for_attribs {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.current-roles {
|
||||
list-style: none;
|
||||
margin: 0 0 20px 0;
|
||||
padding: 0;
|
||||
}
|
||||
.current-roles > li {
|
||||
padding: 8px 10px;
|
||||
margin-bottom: 8px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #eee;
|
||||
background: #fff;
|
||||
-webkit-box-shadow: 0 0 2px 0 rgba(0,0,0,.2);
|
||||
box-shadow: 0 0 2px 0 rgba(0,0,0,.2);
|
||||
cursor: move;
|
||||
}
|
||||
.role-value {
|
||||
display: inline-block;
|
||||
margin-right: 8px;
|
||||
}
|
||||
.remove-role {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
padding-left: 16px;
|
||||
border-left: 2px solid #e6e6e6;
|
||||
}
|
||||
.remove-role > i {
|
||||
font-size: 1.125rem;
|
||||
}
|
||||
.remove-role:hover {
|
||||
color: #ff4444;
|
||||
}
|
||||
.attr.control-label {
|
||||
text-align: left;
|
||||
width: 120px;
|
||||
}
|
||||
.attr.controls {
|
||||
margin-left: 100px;
|
||||
}
|
||||
|
||||
.link-to-show {
|
||||
float: right;
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
.preloader-wrap {
|
||||
text-align: center;
|
||||
}
|
||||
|
|
@ -0,0 +1,359 @@
|
|||
class Admin::GroupsController < OrbitGroupController
|
||||
include Admin::GroupsHelper
|
||||
def index
|
||||
@groups = current_user.groups
|
||||
end
|
||||
|
||||
def public_groups
|
||||
@groups = Group.open
|
||||
end
|
||||
|
||||
def categories
|
||||
old_categories = GroupCategory.where(:is_accepted.ne => false)
|
||||
if old_categories.count > 0
|
||||
old_categories.each do |oc|
|
||||
oc.is_accepted = true
|
||||
oc.save
|
||||
end
|
||||
end
|
||||
@admin_categories = GroupCategory.by_admin
|
||||
@requested_categories = GroupCategory.is_requested
|
||||
end
|
||||
|
||||
def newpost
|
||||
render_401 and return if !user_can_write?
|
||||
@no_breadcrumb = true
|
||||
@grouppost = GroupPost.new
|
||||
end
|
||||
|
||||
def createpost
|
||||
gp = GroupPost.new(post_params)
|
||||
gp.group = @group
|
||||
gp.save
|
||||
redirect_to admin_group_path(@group)
|
||||
end
|
||||
|
||||
def updatepost
|
||||
@post = GroupPost.find(params[:id])
|
||||
group = @post.group
|
||||
@post.update_attributes(post_update_params)
|
||||
@post.save
|
||||
redirect_to admin_group_path(group)
|
||||
end
|
||||
|
||||
def deletepost
|
||||
gp = GroupPost.find(params[:id])
|
||||
gp.destroy
|
||||
render :json => {"success" => true}.to_json
|
||||
end
|
||||
|
||||
def showpost
|
||||
render_401 and return if !user_can_read?
|
||||
if (current_user.id.to_s != @post.author.to_s) && (!@post.read_by.include?(current_user.id.to_s))
|
||||
@post.read_by << current_user.id.to_s
|
||||
@post.save
|
||||
end
|
||||
@read_by_names = @post.read_by.collect{|rb|
|
||||
user = User.find(rb) rescue nil
|
||||
author = (user.member_profile.name == nil ? user.user_name : user.member_profile.name rescue "") if !user.nil?
|
||||
author
|
||||
}
|
||||
end
|
||||
|
||||
def editpost
|
||||
render_401 and return if @post.author != current_user.id
|
||||
@no_breadcrumb = true
|
||||
@grouppost = @post
|
||||
end
|
||||
|
||||
def show
|
||||
@no_breadcrumb = true
|
||||
@no_filter = true
|
||||
if !user_can_read?
|
||||
render_401 and return
|
||||
end
|
||||
end
|
||||
|
||||
def members
|
||||
render_401 and return if !user_can_read?
|
||||
@group_members = []
|
||||
@group.users.each do |user|
|
||||
mp = user.member_profile rescue nil
|
||||
if !mp.nil?
|
||||
avatar = (mp.avatar.thumb.url == "thumb_person.png" ? "/assets/thumb_person.png" : mp.avatar.thumb.url rescue "/assets/thumb_person.png")
|
||||
@group_members << {
|
||||
"id" => user.id.to_s,
|
||||
"user_name" => (user.user_name rescue ""),
|
||||
"avatar" => avatar,
|
||||
"name" => (mp.name_translations rescue {"en" => "","zh_tw" => ""}),
|
||||
"admin" => @group.admins.include?(user.id.to_s)
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def create_category
|
||||
gc = GroupCategory.new(category_params)
|
||||
gc.save
|
||||
if !current_user.is_admin?
|
||||
@requested_categories = GroupCategory.is_requested
|
||||
render :partial => "group_requested_categories"
|
||||
else
|
||||
@admin_categories = GroupCategory.by_admin
|
||||
render :partial => "group_categories"
|
||||
end
|
||||
end
|
||||
|
||||
def update_category
|
||||
gc = GroupCategory.find(params[:category_id])
|
||||
gc.update_attributes(category_params)
|
||||
gc.save
|
||||
@admin_categories = GroupCategory.by_admin
|
||||
render :partial => "group_categories"
|
||||
end
|
||||
|
||||
def upload_photo
|
||||
photo = GroupPostImage.new(post_image_params)
|
||||
photo.save
|
||||
render :json => {"success" => true,"id" => photo.id.to_s}.to_json
|
||||
end
|
||||
|
||||
|
||||
def upload_file
|
||||
file = GroupPostFile.new(post_file_params)
|
||||
file.save
|
||||
render :json => {"success" => true,"id" => file.id.to_s}.to_json
|
||||
end
|
||||
|
||||
def download_file
|
||||
file_id = params[:id]
|
||||
file = GroupPostFile.find(file_id) rescue nil
|
||||
if !file.nil?
|
||||
redirect_to file.file.url and return
|
||||
end
|
||||
render :nothing => true
|
||||
end
|
||||
|
||||
def create
|
||||
group = Group.new(group_params)
|
||||
group.save
|
||||
redirect_to admin_groups_path
|
||||
end
|
||||
|
||||
def update
|
||||
@group = Group.find(params[:id])
|
||||
@group.update_attributes(group_update_params)
|
||||
@group.save
|
||||
redirect_to admin_groups_path
|
||||
end
|
||||
|
||||
def destroy
|
||||
group = Group.find(params[:id])
|
||||
group.destroy
|
||||
render :json => {"success" => true}.to_json
|
||||
end
|
||||
|
||||
def new
|
||||
@group = Group.new
|
||||
@no_breadcrumb = true
|
||||
@categories = GroupCategory.by_admin.collect{|gc| [gc.title,gc.id]}
|
||||
@members = []
|
||||
MemberProfile.all.each do |mp|
|
||||
user = mp.user rescue nil
|
||||
if !user.nil? && user.id.to_s != current_user.id.to_s && user.user_name != "rulingcom"
|
||||
avatar = (mp.avatar.thumb.url == "thumb_person.png" ? "/assets/thumb_person.png" : mp.avatar.thumb.url rescue "/assets/thumb_person.png")
|
||||
@members << {
|
||||
"id" => user.id.to_s,
|
||||
"user_name" => (user.user_name rescue ""),
|
||||
"avatar" => avatar,
|
||||
"name" => (mp.name_translations rescue {"en" => "","zh_tw" => ""})
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def edit
|
||||
render_401 and return if !is_user_group_admin?
|
||||
@no_breadcrumb = true
|
||||
@members = []
|
||||
MemberProfile.all.each do |mp|
|
||||
user = mp.user rescue nil
|
||||
if !user.nil? && user.id.to_s != current_user.id.to_s && user.user_name != "rulingcom" && !@group.users.include?(user)
|
||||
avatar = (mp.avatar.thumb.url == "thumb_person.png" ? "/assets/thumb_person.png" : mp.avatar.thumb.url rescue "/assets/thumb_person.png")
|
||||
@members << {
|
||||
"id" => user.id.to_s,
|
||||
"user_name" => (user.user_name rescue ""),
|
||||
"avatar" => avatar,
|
||||
"name" => (mp.name_translations rescue {"en" => "","zh_tw" => ""})
|
||||
}
|
||||
end
|
||||
end
|
||||
@existing_members = []
|
||||
@group.users.each do |user|
|
||||
mp = user.member_profile rescue nil
|
||||
if !mp.nil?
|
||||
avatar = (mp.avatar.thumb.url == "thumb_person.png" ? "/assets/thumb_person.png" : mp.avatar.thumb.url rescue "/assets/thumb_person.png")
|
||||
@existing_members << {
|
||||
"id" => user.id.to_s,
|
||||
"user_name" => (user.user_name rescue ""),
|
||||
"avatar" => avatar,
|
||||
"name" => (mp.name_translations rescue {"en" => "","zh_tw" => ""}),
|
||||
"admin" => @group.admins.include?(user.id.to_s)
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def get_existing_member_template
|
||||
g = params[:group_id]
|
||||
group = Group.find(g)
|
||||
@existing_members = []
|
||||
group.users.each do |user|
|
||||
mp = user.member_profile rescue nil
|
||||
if !mp.nil?
|
||||
avatar = (mp.avatar.thumb.url == "thumb_person.png" ? "/assets/thumb_person.png" : mp.avatar.thumb.url rescue "/assets/thumb_person.png")
|
||||
@existing_members << {
|
||||
"id" => user.id.to_s,
|
||||
"user_name" => (user.user_name rescue ""),
|
||||
"avatar" => avatar,
|
||||
"name" => (mp.name_translations rescue {"en" => "","zh_tw" => ""}),
|
||||
"admin" => group.admins.include?(user.id.to_s)
|
||||
}
|
||||
end
|
||||
end
|
||||
render :partial => "group_existing_member"
|
||||
end
|
||||
|
||||
def remove_user
|
||||
group = Group.find(params[:group_id])
|
||||
user_id = params[:user_id]
|
||||
user = User.find(user_id)
|
||||
group.users.delete(user)
|
||||
group.admins.delete(user.id.to_s) if group.admins.include?(user.id.to_s)
|
||||
group.save
|
||||
render :json => {"success" => true}.to_json
|
||||
end
|
||||
|
||||
def toggle_admin
|
||||
group = Group.find(params[:group_id])
|
||||
user_id = params[:user_id]
|
||||
user = User.find(user_id)
|
||||
if params[:admin] == "true"
|
||||
group.admins << user.id.to_s
|
||||
else
|
||||
group.admins.delete(user.id.to_s)
|
||||
end
|
||||
group.save
|
||||
render :json => {"success" => true}.to_json
|
||||
end
|
||||
|
||||
def new_comment
|
||||
gpc = GroupPostComment.new(comment_params)
|
||||
gpc.save
|
||||
render :partial => "post_comment", :collection => [gpc]
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def category_params
|
||||
p = params.require(:category).permit!
|
||||
if p[:is_accepted].nil?
|
||||
p[:is_accepted] = true
|
||||
else
|
||||
p[:is_accepted] = false
|
||||
end
|
||||
p
|
||||
end
|
||||
|
||||
def comment_params
|
||||
params.require(:group_post_comment).permit!
|
||||
end
|
||||
|
||||
def post_params
|
||||
p = params.require(:group_post).permit!
|
||||
p["author"] = current_user.id
|
||||
images = []
|
||||
p[:group_post_images].each do |id|
|
||||
gpi = GroupPostImage.find(id) rescue nil
|
||||
if !gpi.nil?
|
||||
images << gpi
|
||||
end
|
||||
end if !p[:group_post_images].nil?
|
||||
files = []
|
||||
p[:group_post_files].each do |id|
|
||||
gpf = GroupPostFile.find(id) rescue nil
|
||||
if !gpf.nil?
|
||||
files << gpf
|
||||
end
|
||||
end if !p[:group_post_files].nil?
|
||||
p[:group_post_images] = images
|
||||
p[:group_post_files] = files
|
||||
p
|
||||
end
|
||||
|
||||
def post_update_params
|
||||
p = params.require(:group_post).permit!
|
||||
p["author"] = current_user.id
|
||||
params[:images_to_destroy].each do |img|
|
||||
gpi = GroupPostImage.find(img) rescue nil
|
||||
gpi.destroy if !gpi.nil?
|
||||
end if !params[:images_to_destroy].nil?
|
||||
|
||||
images = @post.group_post_images
|
||||
|
||||
p[:group_post_images].each do |id|
|
||||
gpi = GroupPostImage.find(id) rescue nil
|
||||
if !gpi.nil?
|
||||
images << gpi
|
||||
end
|
||||
end if !p[:group_post_images].nil?
|
||||
|
||||
params[:files_to_destroy].each do |fil|
|
||||
gpf = GroupPostFile.find(fil) rescue nil
|
||||
gpf.destroy if !gpf.nil?
|
||||
end if !params[:files_to_destroy].nil?
|
||||
|
||||
files = @post.group_post_files
|
||||
|
||||
p[:group_post_files].each do |id|
|
||||
gpf = GroupPostFile.find(id) rescue nil
|
||||
if !gpf.nil?
|
||||
files << gpf
|
||||
end
|
||||
end if !p[:group_post_files].nil?
|
||||
|
||||
p[:group_post_images] = images
|
||||
p[:group_post_files] = files
|
||||
p
|
||||
end
|
||||
|
||||
def post_image_params
|
||||
params.require(:group_post_image).permit!
|
||||
end
|
||||
|
||||
def post_file_params
|
||||
params.require(:group_post_file).permit!
|
||||
end
|
||||
|
||||
def group_params
|
||||
p = params.require(:group).permit!
|
||||
p["user_ids"] = [] if p["user_ids"].nil?
|
||||
p["user_ids"] << current_user.id.to_s
|
||||
p["admins"] = []
|
||||
p["admins"] << current_user.id.to_s
|
||||
p
|
||||
end
|
||||
|
||||
def group_update_params
|
||||
p = params.require(:group).permit!
|
||||
p["user_ids"] = [] if p["user_ids"].nil?
|
||||
p["user_ids"].concat(@group.users.collect{|u| u.id.to_s})
|
||||
p
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -10,7 +10,9 @@ class Admin::MembersController < OrbitMemberController
|
|||
def index
|
||||
@roles = Role.excludes(disabled: true)
|
||||
page_num = params[:page] || 1
|
||||
|
||||
param_temp = request.fullpath.split("?")
|
||||
@edit_params = (param_temp.count > 1 ? "?" + param_temp.last : "") rescue ""
|
||||
|
||||
@filter = params[:filter]
|
||||
@mq = params[:mq]
|
||||
@new_filter = params[:new_filter]
|
||||
|
|
@ -78,7 +80,7 @@ class Admin::MembersController < OrbitMemberController
|
|||
end
|
||||
|
||||
def show
|
||||
@custom_fields = @member.member_profile_field_values rescue nil
|
||||
@custom_fields = @member.member_profile_field_values rescue []
|
||||
@plugins = OrbitApp::Plugin::Registration.all rescue nil
|
||||
@ppname = Array.new
|
||||
@plugins.each do |aa|
|
||||
|
|
@ -449,6 +451,8 @@ class Admin::MembersController < OrbitMemberController
|
|||
end
|
||||
|
||||
def edit
|
||||
param_temp = request.fullpath.split("?")
|
||||
@edit_params = (param_temp.count > 1 ? "?" + param_temp.last : "") rescue ""
|
||||
if has_access?
|
||||
@form_index = 0
|
||||
get_info_and_roles
|
||||
|
|
@ -464,12 +468,15 @@ class Admin::MembersController < OrbitMemberController
|
|||
|
||||
def create
|
||||
@member = MemberProfile.new(member_profile_params)
|
||||
if user_params["user_name"] != ""
|
||||
@user = User.new(user_params) rescue nil
|
||||
@user.member_profile = @member
|
||||
@user.save
|
||||
end
|
||||
if @member.save
|
||||
if user_params["user_name"] != ""
|
||||
@user = User.new(user_params) rescue nil
|
||||
@user.member_profile = @member
|
||||
if !@user.save
|
||||
@member.destroy
|
||||
render 'new' and return
|
||||
end
|
||||
end
|
||||
if !params[:member_profile_field_values].nil?
|
||||
params[:member_profile_field_values].each_with_index do |m,i|
|
||||
@custom_field_value = @member.member_profile_field_values.build(value: m.second["value"], member_profile_field_id: m.second["member_profile_field_id"])
|
||||
|
|
@ -491,6 +498,8 @@ class Admin::MembersController < OrbitMemberController
|
|||
end
|
||||
|
||||
def update
|
||||
param_temp = request.fullpath.split("?")
|
||||
@edit_params = (param_temp.count > 1 ? "?" + param_temp.last : "") rescue ""
|
||||
respond_to do |format|
|
||||
if @member.user.present?
|
||||
@user = @member.user
|
||||
|
|
@ -529,7 +538,7 @@ class Admin::MembersController < OrbitMemberController
|
|||
end
|
||||
|
||||
|
||||
format.html { redirect_to admin_members_path, notice: 'Successfully Updated the User' }
|
||||
format.html { redirect_to admin_members_path() + @edit_params, notice: 'Successfully Updated the User' }
|
||||
format.json { head :no_content }
|
||||
else
|
||||
format.html { render action: 'edit' }
|
||||
|
|
@ -585,6 +594,7 @@ class Admin::MembersController < OrbitMemberController
|
|||
end
|
||||
|
||||
def edit_privilege
|
||||
@edit_params = "?" + request.fullpath.split("?").last rescue ""
|
||||
if current_user.is_admin?
|
||||
@user = @member.user
|
||||
@workgroup = Workgroup.find_by(key: 'admin')
|
||||
|
|
@ -703,7 +713,7 @@ class Admin::MembersController < OrbitMemberController
|
|||
protected
|
||||
|
||||
def get_info_and_roles
|
||||
@roles = Role.excludes(disabled: true)
|
||||
@roles = Role.excludes(disabled: true).asc(:key)
|
||||
@infos = MemberProfileField.excludes(disabled: true)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
class Admin::ModuleStoreController < OrbitAdminController
|
||||
layout "structure"
|
||||
|
||||
include Admin::ModuleStoreHelper
|
||||
def index
|
||||
@extensions = []
|
||||
@downloaded_extensions = []
|
||||
# if current_site.site_token?
|
||||
# if current_site.store_confirmation
|
||||
# @extensions = get_extensions
|
||||
|
|
@ -24,6 +23,11 @@ class Admin::ModuleStoreController < OrbitAdminController
|
|||
@extension = get_extension(params[:id]) rescue nil
|
||||
end
|
||||
|
||||
def modules_to_update
|
||||
@built_in_extensions = get_built_in_extensions
|
||||
render :partial => "modules_to_update"
|
||||
end
|
||||
|
||||
def download
|
||||
#get extension related values
|
||||
extension = get_extension(params[:id]) rescue nil
|
||||
|
|
@ -95,11 +99,28 @@ class Admin::ModuleStoreController < OrbitAdminController
|
|||
end
|
||||
|
||||
def restart
|
||||
Bundler.with_clean_env { `cd #{Rails.root} && bundle install` }
|
||||
Bundler.with_clean_env { `cd #{Rails.root} && BUNDLE_GEMFILE=built_in_extensions.rb bundle update && bundle` }
|
||||
Bundler.with_clean_env { `cd #{Rails.root} && BUNDLE_GEMFILE=downloaded_extensions.rb bundle update && bundle` }
|
||||
@built_in_extensions = get_built_in_extensions
|
||||
render :partial => "modules_to_update"
|
||||
%x(kill -s USR2 `cat tmp/pids/unicorn.pid`)
|
||||
sleep 5
|
||||
end
|
||||
|
||||
def update_module
|
||||
key = params["key"]
|
||||
type = params["type"]
|
||||
# if type == "built_in"
|
||||
# Bundler.with_clean_env { `cd #{Rails.root} && BUNDLE_GEMFILE=built_in_extensions.rb bundle update #{key}` }
|
||||
# elsif type == "downloaded"
|
||||
# Bundler.with_clean_env { `cd #{Rails.root} && BUNDLE_GEMFILE=downloaded_extensions.rb bundle update #{key}` }
|
||||
# end
|
||||
Bundler.with_clean_env { `cd #{Rails.root} && bundle update #{key}` }
|
||||
render :nothing => true
|
||||
%x(kill -s USR2 `cat tmp/pids/unicorn.pid`)
|
||||
sleep 5
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def get_extensions
|
||||
|
|
@ -133,21 +154,7 @@ class Admin::ModuleStoreController < OrbitAdminController
|
|||
store_session.get_extension(id)
|
||||
end
|
||||
|
||||
def get_downloaded_extension
|
||||
downloaded_extensions = []
|
||||
|
||||
extensions = File.new("#{Rails.root}/downloaded_extensions.rb", "r")
|
||||
|
||||
while (extension = extensions.gets)
|
||||
status = !extension.start_with?("# ")
|
||||
extension = extension.split(',')
|
||||
|
||||
downloaded_extensions << {'name' => extension[0].split(/[\'\"]/)[1], 'repo' => extension[1].split(/[\'\"]/)[1], 'tag' => extension[2].split(/[\'\"]/)[1], 'status' => status}
|
||||
end
|
||||
extensions.close
|
||||
downloaded_extensions.to_json
|
||||
end
|
||||
|
||||
|
||||
def toggle_item(module_key, active)
|
||||
if !module_key.nil?
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ class Admin::RoleStatusesController < OrbitMemberController
|
|||
|
||||
def index
|
||||
@role = Role.find(params[:role_id]) rescue nil
|
||||
@role_statuses = RoleStatus.where(role_id: @role.id) if @role
|
||||
@role_statuses = RoleStatus.where(role_id: @role.id).asc(:key) if @role
|
||||
|
||||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
|
|
@ -42,8 +42,11 @@ class Admin::RoleStatusesController < OrbitMemberController
|
|||
end
|
||||
|
||||
def toggle
|
||||
@role_status.disable = @role_status.disable ? false : true
|
||||
@role_status.save!
|
||||
role_status = RoleStatus.find(params[:role_status_id]) rescue nil
|
||||
if !role_status.nil?
|
||||
role_status.disable = role_status.disable ? false : true
|
||||
role_status.save!
|
||||
end
|
||||
render action: :index
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ class Admin::RolesController < OrbitMemberController
|
|||
helper Admin::AttributeValuesViewHelper
|
||||
|
||||
def index
|
||||
@roles = Role.all.asc("_id").entries
|
||||
@roles = Role.all.asc(:key).entries
|
||||
end
|
||||
|
||||
def show
|
||||
|
|
|
|||
|
|
@ -106,9 +106,6 @@ class Admin::SitesController < OrbitAdminController
|
|||
else
|
||||
result = "success"
|
||||
# Bundler.with_clean_env { `cd #{Rails.root} && bundle update` }
|
||||
Bundler.with_clean_env { `cd #{Rails.root} && BUNDLE_GEMFILE=built_in_extensions.rb bundle update && bundle` }
|
||||
Bundler.with_clean_env { `cd #{Rails.root} && BUNDLE_GEMFILE=downloaded_extensions.rb bundle update && bundle` }
|
||||
|
||||
end
|
||||
|
||||
render :text => result
|
||||
|
|
|
|||
|
|
@ -35,6 +35,35 @@ class Admin::StoreController < OrbitAdminController
|
|||
response = http.request(request)
|
||||
data = JSON.parse(response.body)
|
||||
render :json => data.to_json
|
||||
%x(kill -s USR2 `cat tmp/pids/unicorn.pid`)
|
||||
sleep 5
|
||||
end
|
||||
|
||||
def authorize_default_modules
|
||||
modules = ModuleApp.all
|
||||
ids = modules.collect{|ma| ma.key}
|
||||
store_token = Site.first.store_token rescue nil
|
||||
if !store_token.nil?
|
||||
module_apps = ModuleApp.all
|
||||
params_to_send = {'store_token' => store_token, "apps" => ids}
|
||||
uri = URI.parse(OrbitStore::URL)
|
||||
http = Net::HTTP.new(uri.host,uri.port)
|
||||
request = Net::HTTP::Post.new("/store/register_old_sites_modules")
|
||||
request.body = params_to_send.to_query
|
||||
response = http.request(request) rescue nil
|
||||
if response.nil?
|
||||
render :json => {"success" => false, "message" => "Could not connect to the store."}.to_json
|
||||
else
|
||||
data = JSON.parse(response.body)
|
||||
if data["success"]
|
||||
render :json => {"success" => true}.to_json
|
||||
elsif !data["success"]
|
||||
render :json => {"success" => false, "message" => data["message"]}.to_json
|
||||
end
|
||||
end
|
||||
else
|
||||
render :json => {"success" => false, "message" => "Cannot register modules, site is not registered with store."}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def check_permissions
|
||||
|
|
|
|||
|
|
@ -2,12 +2,14 @@ class MembersController < ApplicationController
|
|||
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"=>"discipline", "type"=>"role", "max_length"=>12},
|
||||
{"key"=>"email", "type"=>"profile"},
|
||||
{"key"=>"office_tel", "type"=>"profile"}
|
||||
]
|
||||
] if fields_to_show.blank?
|
||||
|
||||
if OrbitHelper.member_sort_position
|
||||
sort = "data['list_order']"
|
||||
|
|
@ -28,29 +30,26 @@ class MembersController < ApplicationController
|
|||
page_role_status.each do |status_id|
|
||||
page_roles << RoleStatus.find(status_id).role.id.to_s
|
||||
end
|
||||
|
||||
roles = Role.find(page_roles.uniq).collect do |role|
|
||||
{ "title" => role.title, "id" => role.id, "status" => RoleStatus.where(:role_id=>role, :_id.in=>page_role_status).to_a }
|
||||
{ "title" => role.title, "id" => role.id, "status" => RoleStatus.where(:role_id=>role, :_id.in=>page_role_status).asc(:key).to_a }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
role_list = []
|
||||
roles.each do |role|
|
||||
attribute_field = AttributeField.where(:key => 'job_title', :role_id => role['id']).first
|
||||
role_fields_to_show = [{"id"=> attribute_field.id.to_s, "key"=>"job_title", "type"=>"role","sort_order"=>1}] + fields_to_show if !attribute_field.blank?
|
||||
status_list = []
|
||||
if !role['status'].blank?
|
||||
role['status'].each do |status|
|
||||
member_profiles = get_members_by_status(status, sort, role_fields_to_show)
|
||||
member_profiles = get_members_by_status(status, sort, fields_to_show)
|
||||
status_list << { "status-title" => status.title, "members" => member_profiles } if !member_profiles.blank?
|
||||
end
|
||||
else
|
||||
# Members with status
|
||||
role_status = RoleStatus.order_by(:id=>"asc").where(:role_id=>role['id'])
|
||||
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, role_fields_to_show)
|
||||
member_profiles = get_members_by_status(status, sort, fields_to_show)
|
||||
next if member_profiles.blank?
|
||||
status_list << { "status-title" => status.title, "members" => member_profiles }
|
||||
end
|
||||
|
|
@ -158,7 +157,7 @@ class MembersController < ApplicationController
|
|||
|
||||
plugin_datas = plugin_data.where(:is_hidden=>false).desc(:year).collect do |p|
|
||||
{
|
||||
"pd_datas" => [{ "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,plugin.module_app_name.underscore)}'>#{p.create_link}" }]
|
||||
"pd_datas" => [{ "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,plugin.module_app_name.underscore)}' target='_blank'>#{p.create_link}" }]
|
||||
}
|
||||
end
|
||||
|
||||
|
|
@ -237,9 +236,37 @@ class MembersController < ApplicationController
|
|||
end
|
||||
when 'role'
|
||||
if !field['id'].blank?
|
||||
field_data = member.attribute_values.find_by(:attribute_field_id=>field['id'],:key=>field['key']).get_field_value rescue {}
|
||||
av = member.attribute_values.find_by(:attribute_field_id=>field['id'],:key=>field['key']) rescue nil
|
||||
if !av.nil?
|
||||
r = av.attribute_field.role rescue nil
|
||||
if !r.nil?
|
||||
if member.roles.include?(r)
|
||||
field_data = av.get_field_value rescue {}
|
||||
else
|
||||
field_data = {}
|
||||
end
|
||||
else
|
||||
field_data = {}
|
||||
end
|
||||
else
|
||||
field_data = {}
|
||||
end
|
||||
else
|
||||
field_data = member.attribute_values.find_by(:key=>field['key']).get_field_value rescue {}
|
||||
av = member.attribute_values.find_by(:key=>field['key']) rescue nil
|
||||
if !av.nil?
|
||||
r = av.attribute_field.role rescue nil
|
||||
if !r.nil?
|
||||
if member.roles.include?(r)
|
||||
field_data = av.get_field_value rescue {}
|
||||
else
|
||||
field_data = {}
|
||||
end
|
||||
else
|
||||
field_data = {}
|
||||
end
|
||||
else
|
||||
field_data = {}
|
||||
end
|
||||
end
|
||||
end
|
||||
next if field_data.blank? or field_data['value'].blank?
|
||||
|
|
|
|||
|
|
@ -0,0 +1,43 @@
|
|||
class OrbitGroupController < ApplicationController
|
||||
layout "member"
|
||||
before_action :authenticate_user, :get_group, :set_access_rights
|
||||
|
||||
def get_group
|
||||
case params[:action]
|
||||
when "show","edit"
|
||||
uid = params[:id].split("-").last
|
||||
@group = Group.find_by(:uid => uid)
|
||||
when "newpost", "createpost", "members"
|
||||
uid = params[:group_id].split("-").last
|
||||
@group = Group.find_by(:uid => uid)
|
||||
when "showpost", "editpost"
|
||||
uid = params[:id].split("-").last
|
||||
@post = GroupPost.find_by(:uid => uid)
|
||||
@group = @post.group
|
||||
end
|
||||
end
|
||||
|
||||
def set_access_rights
|
||||
@access_right_level = "none"
|
||||
read_or_write = @group.permission rescue "read"
|
||||
case params[:action]
|
||||
when "show", "showpost", "newpost", "edit", "members", "editpost"
|
||||
is_member = @group.users.include?(current_user)
|
||||
if @group.admins.include?(current_user.id.to_s)
|
||||
@access_right_level = "admin"
|
||||
elsif is_member
|
||||
if read_or_write == "write"
|
||||
@access_right_level = "write"
|
||||
elsif read_or_write == "read"
|
||||
@access_right_level = "read"
|
||||
end
|
||||
elsif !is_member && @group.privacy == "open"
|
||||
@access_right_level = "read"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def render_401
|
||||
render "public/401"
|
||||
end
|
||||
end
|
||||
|
|
@ -15,8 +15,10 @@ class OrbitMemberController < ApplicationController
|
|||
visited_user = MemberProfile.find(params[:member_profile_id]).user.id if visited_user.nil? rescue nil
|
||||
if (current_user.id == visited_user rescue false)
|
||||
@user_has_privileges = true
|
||||
else
|
||||
@user_has_privileges = false
|
||||
elsif visited_user == nil && (params[:action] == "create" || params[:action] == "update")
|
||||
@user_has_privileges = true
|
||||
else
|
||||
@user_has_privileges = false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ class PagePartsController < ApplicationController
|
|||
@part.sub_parts.build
|
||||
@part_number = params[:part]
|
||||
@page_id = params[:page_id]
|
||||
page = Page.find(@page_id)
|
||||
@child_page_count = (page.root? ? 0 : page.child_page.count) rescue 0
|
||||
@modules = ModuleApp.widget_enabled
|
||||
@modules = @modules.concat(OrbitWidget.all)
|
||||
@no_orbit_bar = @no_side_bar = true
|
||||
|
|
@ -19,6 +21,8 @@ class PagePartsController < ApplicationController
|
|||
@part = parts.where(:part_id => params[:id]).first
|
||||
@part.sub_parts.build
|
||||
@page_id = params[:page_id]
|
||||
page = Page.find(@page_id)
|
||||
@child_page_count = (page.root? ? 0 : page.child_page.count) rescue 0
|
||||
@part_number = params[:id]
|
||||
@select_number = @part.sub_parts.count
|
||||
@modules = ModuleApp.widget_enabled
|
||||
|
|
@ -31,7 +35,8 @@ class PagePartsController < ApplicationController
|
|||
def edit_sub_part
|
||||
@part = part_model.find(params[:part_id])
|
||||
@subpart = SubPart.find(params[:sub_part_id])
|
||||
@select_number = @part.sub_parts.index(@subpart)
|
||||
@select_number = @part.sub_parts.index{|sp| sp.id.to_s == @subpart.id.to_s}
|
||||
@child_page_count = 0
|
||||
@kind = @subpart.kind
|
||||
@modules = ModuleApp.widget_enabled
|
||||
@modules = @modules.concat(OrbitWidget.all)
|
||||
|
|
@ -138,6 +143,7 @@ class PagePartsController < ApplicationController
|
|||
def create
|
||||
@part = part_model.new(part_params)
|
||||
@part.save!
|
||||
apply_to_sub_pages(part_params,nil,nil) if !params[:apply_to_subpage].nil? && !@part.page_id.nil?
|
||||
render :json => {"success"=>true}.to_json
|
||||
|
||||
end
|
||||
|
|
@ -145,11 +151,36 @@ class PagePartsController < ApplicationController
|
|||
def update
|
||||
@part = part_model.find(params[:part_id])
|
||||
@part.update_attributes(part_params)
|
||||
apply_to_sub_pages(part_params,params[:part_id],params[:page_id]) if !params[:apply_to_subpage].nil? && !@part.page_id.nil?
|
||||
render :json => {"success"=>true}.to_json
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def apply_to_sub_pages(part_params,part_id=nil,page_id=nil)
|
||||
page_id = part_params[:page_id] if page_id.nil?
|
||||
page = Page.find(page_id) rescue nil
|
||||
if !page.nil?
|
||||
child_pages = page.child_page
|
||||
child_pages.each do |cp|
|
||||
temp = part_params
|
||||
if part_id.nil?
|
||||
partid = part_params[:part_id]
|
||||
else
|
||||
partid = part_model.find(part_id).part_id
|
||||
end
|
||||
page_part = cp.page_parts.where(:part_id => partid).first rescue nil
|
||||
if page_part.nil?
|
||||
temp[:page_id] = cp.id.to_s
|
||||
part = part_model.new(temp)
|
||||
part.save!
|
||||
else
|
||||
page_part.update_attributes(temp)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def get_widget_files(module_name)
|
||||
temp = []
|
||||
f = File.join("#{Rails.root}/app/templates/#{@key}/modules/#{module_name.downcase}/info.json")
|
||||
|
|
|
|||
|
|
@ -27,15 +27,22 @@ class PagesController < ApplicationController
|
|||
def home
|
||||
@manifest = @key
|
||||
page = Page.first
|
||||
impressionist(page)
|
||||
Thread.new do
|
||||
impressionist(page)
|
||||
page.inc(view_count: 1)
|
||||
end
|
||||
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
|
||||
|
|
@ -97,6 +104,7 @@ class PagesController < ApplicationController
|
|||
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"]
|
||||
|
|
@ -110,10 +118,17 @@ class PagesController < ApplicationController
|
|||
layout = true
|
||||
end
|
||||
|
||||
impressionist(page)
|
||||
Thread.new do
|
||||
impressionist(page)
|
||||
page.inc(view_count: 1)
|
||||
end
|
||||
render :html => render_final_page("#{module_app}/#{params[:target_action]}",page,layout).html_safe
|
||||
else
|
||||
render :file => "#{Rails.root}/public/404.html", :layout => false, :status => :not_found
|
||||
if Site.first.enable_redirect_index
|
||||
redirect_to root_url
|
||||
else
|
||||
render :file => "#{Rails.root}/public/411.html", :layout => false, :status => :not_found
|
||||
end
|
||||
end
|
||||
else
|
||||
render :file => "#{Rails.root}/public/404.html", :layout => false, :status => :not_found
|
||||
|
|
@ -121,6 +136,17 @@ class PagesController < ApplicationController
|
|||
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])
|
||||
|
|
@ -129,6 +155,9 @@ class PagesController < ApplicationController
|
|||
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|
|
||||
|
|
@ -167,6 +196,60 @@ class PagesController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def get_member_attributes
|
||||
@page_id = params[:page_id]
|
||||
@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?
|
||||
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" => "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}
|
||||
end
|
||||
|
||||
role_attribs = AttributeField.all.asc(:created_at).collect do |af|
|
||||
{"key" => af.key, "human_readable" => af.title}
|
||||
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])
|
||||
page.custom_array_field = array
|
||||
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")
|
||||
|
|
@ -301,11 +384,11 @@ class PagesController < ApplicationController
|
|||
|
||||
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 = []
|
||||
|
|
@ -316,6 +399,7 @@ class PagesController < ApplicationController
|
|||
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 || []
|
||||
|
|
@ -326,7 +410,11 @@ class PagesController < ApplicationController
|
|||
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
|
||||
partials << render_widget_for_frontend(subpart.module,subpart.widget_method,subpart.widget_type,subpart.id.to_s)
|
||||
# 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
|
||||
|
|
@ -348,7 +436,7 @@ class PagesController < ApplicationController
|
|||
end
|
||||
@layout_html = render_to_string(@file)
|
||||
doc = Nokogiri::HTML(@layout_html, nil, "UTF-8")
|
||||
|
||||
head = doc.css("head")
|
||||
@part_partials.each do |key, partial|
|
||||
html_string = ""
|
||||
partial.each do |p|
|
||||
|
|
@ -379,7 +467,9 @@ class PagesController < ApplicationController
|
|||
if original_view != "home"
|
||||
viewarea = doc.css("*[data-content='true']")[0]
|
||||
viewarea.inner_html = render_to_string(original_view) rescue "<div></div>"
|
||||
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
|
||||
|
|
@ -501,7 +591,7 @@ class PagesController < ApplicationController
|
|||
|
||||
def change_to_language(final_html)
|
||||
if session[:zh_cn]
|
||||
final_html = ZhConv.convert("zh-cn", final_html)
|
||||
final_html = ZhConv.convert("zh-cn", final_html,false)
|
||||
final_html.gsub!('/zh_tw/','/zh_cn/')
|
||||
final_html.sub!('<a href="'+request.path+'">繁体中文</a>','<a href="'+(request.path.sub('/zh_cn/','/zh_tw/'))+'">繁体中文</a>')
|
||||
end
|
||||
|
|
|
|||
|
|
@ -28,6 +28,79 @@ class SessionsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def google_result
|
||||
@code = params[:code]
|
||||
if @code.nil?
|
||||
redirect_to root_url
|
||||
end
|
||||
end
|
||||
|
||||
def google_callback
|
||||
error = params[:error] rescue nil
|
||||
if error == "access_denied"
|
||||
redirect_to auth_failure_path and return
|
||||
end
|
||||
auth = env["omniauth.auth"]
|
||||
user = Google.find_by("google_uid" => auth.uid).user rescue nil
|
||||
if user.nil? && current_user.nil?
|
||||
user_connected = false
|
||||
else
|
||||
user_connected = true
|
||||
if user.nil? && !current_user.nil?
|
||||
connection_successful = connect_account(auth)
|
||||
else
|
||||
if login_user(user,auth)
|
||||
if params[:referer_url]
|
||||
redirect_to URI.parse(params[:referer_url]).path and return
|
||||
else
|
||||
redirect_to admin_dashboards_path and return
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if user_connected && connection_successful
|
||||
code = 1
|
||||
elsif user_connected && !connection_successful
|
||||
code = 2
|
||||
else !user_connected && !connection_successful
|
||||
code = 3
|
||||
end
|
||||
redirect_to auth_google_result_path(:code => code)
|
||||
end
|
||||
|
||||
def google_remove
|
||||
current_user.google.destroy rescue ""
|
||||
redirect_to admin_member_path(current_user.member_profile.to_param) and return
|
||||
end
|
||||
|
||||
def google_faliure
|
||||
@code = 2
|
||||
render "google_result"
|
||||
end
|
||||
|
||||
def connect_account(auth)
|
||||
if !current_user.nil?
|
||||
google = Google.new
|
||||
google.google_uid = auth.uid
|
||||
google.token = auth.credentials.token
|
||||
google.connected = true
|
||||
google.save
|
||||
current_user.google = google
|
||||
current_user.save
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
def login_user(user,auth)
|
||||
if user.google.token != auth.credentials.token
|
||||
user.google.token = auth.credentials.token
|
||||
user.google.save
|
||||
end
|
||||
session[:user_id] = user.id
|
||||
end
|
||||
|
||||
def destroy
|
||||
log_user_action
|
||||
session[:user_id] = nil
|
||||
|
|
|
|||
|
|
@ -50,6 +50,24 @@ class StoreApiController < ApplicationController
|
|||
render :layout => "back_end"
|
||||
end
|
||||
|
||||
|
||||
# this is for feed module.
|
||||
def get_channel_lists
|
||||
apps = ModuleApp.where(:feeds_url.ne => nil)
|
||||
channels = []
|
||||
if apps.count > 0
|
||||
apps.each do |app|
|
||||
channel = {}
|
||||
channel["title"] = app.title
|
||||
channel["key"] = app.key
|
||||
channel["url"] = app.feeds_url
|
||||
channel["app_icon"] = app.get_registration.get_side_bar.get_icon_class
|
||||
channels << channel
|
||||
end
|
||||
end
|
||||
render :json => {"channels" => channels}.to_json
|
||||
end
|
||||
|
||||
private
|
||||
def bundle_install
|
||||
Bundler.with_clean_env { `cd #{Rails.root} && BUNDLE_GEMFILE=downloaded_extensions.rb bundle update && bundle` }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
module Admin::AttributeValuesViewHelper
|
||||
OPT = [
|
||||
["YYYY / MM / DD hh : mm","format1"],
|
||||
["YYYY / MM / DD","format2"],
|
||||
["YYYY / MM","format3"],
|
||||
["YYYY","format4"]
|
||||
|
|
|
|||
|
|
@ -0,0 +1,35 @@
|
|||
module Admin::GroupsHelper
|
||||
def remote_file_exists?(url)
|
||||
url = URI.parse(url)
|
||||
Net::HTTP.start(url.host, url.port) do |http|
|
||||
return http.head(url.request_uri)['Content-Type'].start_with? 'image'
|
||||
end
|
||||
end
|
||||
|
||||
def parse_for_images(content)
|
||||
urls = URI.extract(content)
|
||||
images = []
|
||||
urls.each do |url|
|
||||
images << url if !url.nil? && remote_file_exists?(url)
|
||||
end if !urls.empty?
|
||||
|
||||
image_content = "<br />"
|
||||
images.each do |img|
|
||||
content = content.sub(img,"")
|
||||
image_content = image_content + "<img src='#{img}' style='width:auto;' /><br />"
|
||||
end if !images.empty?
|
||||
return [content, image_content]
|
||||
end
|
||||
|
||||
def is_user_group_admin?
|
||||
return (@access_right_level == "admin" ? true : false)
|
||||
end
|
||||
|
||||
def user_can_write?
|
||||
return (@access_right_level == "admin" || @access_right_level == "write" ? true : false)
|
||||
end
|
||||
|
||||
def user_can_read?
|
||||
return (@access_right_level == "admin" || @access_right_level == "write" || @access_right_level == "read" ? true : false)
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
module Admin::ModuleStoreHelper
|
||||
|
||||
def get_built_in_extensions
|
||||
built_in_extensions = []
|
||||
extensions_to_update = get_extensions_to_update
|
||||
@extensions_to_update_count = extensions_to_update.count
|
||||
built_in_extensions = get_extension_from_file("built_in",extensions_to_update)
|
||||
built_in_extensions.concat(get_extension_from_file("downloaded",extensions_to_update))
|
||||
return built_in_extensions
|
||||
end
|
||||
|
||||
def get_extension_from_file(type,extensions_to_update)
|
||||
temp = []
|
||||
extensions = File.new("#{Rails.root}/#{type}_extensions.rb", "r")
|
||||
while (extension = extensions.gets)
|
||||
is_extension = extension.start_with?("gem")
|
||||
extension = extension.split(',')
|
||||
if is_extension
|
||||
key = extension[0].split(/[\'\"]/)[1]
|
||||
ma = ModuleApp.find_by_key(key) rescue nil
|
||||
if !ma.nil?
|
||||
update_available = extensions_to_update.include?(key) ? true : false
|
||||
temp << {'key' => key, 'name' => ma.title, 'repo' => extension[1].split(/[\'\"]/)[1], 'tag' => (extension[2].split(/[\'\"]/)[1] rescue ""), "update_available" => update_available, "type" => type}
|
||||
end
|
||||
end
|
||||
end
|
||||
return temp
|
||||
end
|
||||
|
||||
def get_extensions_to_update
|
||||
# if !File.exists?("#{Rails.root}/built_in_extensions.rb.lock") || !File.exists?("#{Rails.root}/downloaded_extensions.rb.lock")
|
||||
# update_extension_file("built_in")
|
||||
# update_extension_file("downloaded")
|
||||
# return []
|
||||
# else
|
||||
# update_extensions = get_update_info_for_extensions("built_in")
|
||||
# update_extensions.concat(get_update_info_for_extensions("downloaded"))
|
||||
# return update_extensions
|
||||
# end
|
||||
update_extensions = get_update_info_for_extensions("built_in")
|
||||
return update_extensions
|
||||
end
|
||||
|
||||
def update_extension_file(type)
|
||||
Bundler.with_clean_env { `cd #{Rails.root} && BUNDLE_GEMFILE=#{type}_extensions.rb bundle update && bundle` }
|
||||
end
|
||||
|
||||
def get_update_info_for_extensions(type)
|
||||
buffer = Bundler.with_clean_env { `cd #{Rails.root} && bundle outdated` }
|
||||
buffer = buffer.split("\n")
|
||||
if buffer.last == "Bundle up to date!"
|
||||
return []
|
||||
elsif buffer.first.start_with?("The git source")
|
||||
update_extension_file(type)
|
||||
return []
|
||||
else
|
||||
output = []
|
||||
buffer.each do |b|
|
||||
if b.start_with?(" * ")
|
||||
temp = b.split(" ")
|
||||
output << temp[1] if !temp[1].nil?
|
||||
end
|
||||
end
|
||||
return output
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
@ -20,12 +20,16 @@ module ApplicationHelper
|
|||
header_file = File.join('../templates', "#{@key}", "/home/header.html.erb")
|
||||
header_file_html = render :file => header_file
|
||||
header = Nokogiri::HTML(header_file_html, nil, "UTF-8")
|
||||
site_logo = header.css("img[src='{{logo_url}}']")[0]
|
||||
site_logo.remove if site.site_logo.url.nil?
|
||||
sub_menu_html = site.sub_menu
|
||||
html = header.to_s
|
||||
html = html.gsub("{{site_name}}",(site.title rescue ""))
|
||||
html = html.gsub("%7B%7Blogo_url%7D%7D",(site.site_logo.url.nil? ? "/assets/site-logo.png" : site.site_logo.url))
|
||||
t = site.title rescue ""
|
||||
html = html.gsub("{{site_name}}",(site.display_title_in_frontend ? t : ""))
|
||||
html = html.gsub("%7B%7Blogo_url%7D%7D",(site.site_logo.url.nil? ? "/assets/default-site-logo.png" : site.site_logo.url))
|
||||
if site.sitemap_menu_in_header
|
||||
sub_menu_html = sub_menu_html + "<a href='/#{I18n.locale.to_s}#{site.site_map_link}'>Sitemap</a>"
|
||||
sitemap = Page.find_by_key(:sitemap).name rescue "Sitemap"
|
||||
sub_menu_html = sub_menu_html + "<a href='/#{I18n.locale.to_s}#{site.site_map_link}'>#{sitemap}</a>"
|
||||
end
|
||||
sub_menu_html = sub_menu_html.nil? ? "" : sub_menu_html
|
||||
html = html.gsub("{{header-data}}",sub_menu_html)
|
||||
|
|
@ -65,6 +69,7 @@ module ApplicationHelper
|
|||
site_footer = site_footer.nil? ? "" : site_footer
|
||||
html = html.gsub("{{footer-data}}",site_footer)
|
||||
counter = Page.root.view_count.to_s rescue ""
|
||||
counter = t(:visitors_count) + " : " + counter
|
||||
html = html.gsub("{{site-counter}}",counter)
|
||||
html.html_safe
|
||||
end
|
||||
|
|
@ -76,94 +81,98 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def render_menu
|
||||
# json_file = File.read(File.join(Rails.root, 'public', "menu.json"))
|
||||
# @items = JSON.parse(json_file)
|
||||
if $mobile.blank?
|
||||
@pages = Page.root.sorted_published_child_pages
|
||||
else
|
||||
@pages = Page.root.sorted_published_child_pages_for_mobile
|
||||
end
|
||||
# menu_html = Rails.cache.fetch(['main_menu',request.original_fullpath, I18n.locale], race_condition_ttl: 2.seconds) do
|
||||
# json_file = File.read(File.join(Rails.root, 'public', "menu.json"))
|
||||
# @items = JSON.parse(json_file)
|
||||
if $mobile.blank?
|
||||
@pages = Page.root.sorted_published_child_pages
|
||||
else
|
||||
@pages = Page.root.sorted_published_child_pages_for_mobile
|
||||
end
|
||||
|
||||
def create_json(pages)
|
||||
item = {}
|
||||
pages.each do |page|
|
||||
if page.child_page.size > 0
|
||||
if page.page_type == "page"
|
||||
if $mobile.blank?
|
||||
item["#{page.name}"] = {"url"=> "/#{locale.to_s}" + page.url, "children"=>create_json(page.sorted_published_child_pages), "target" => "_self"}
|
||||
else
|
||||
item["#{page.name}"] = {"url"=> "/#{locale.to_s}" + page.url, "children"=>create_json(page.sorted_published_child_pages_for_mobile), "target" => "_self"}
|
||||
def create_json(pages)
|
||||
item = {}
|
||||
pages.each do |page|
|
||||
if page.child_page.size > 0
|
||||
if page.page_type == "page"
|
||||
if $mobile.blank?
|
||||
item["#{page.name}"] = {"url"=> "/#{locale.to_s}" + page.url, "children"=>create_json(page.sorted_published_child_pages), "target" => "_self"}
|
||||
else
|
||||
item["#{page.name}"] = {"url"=> "/#{locale.to_s}" + page.url, "children"=>create_json(page.sorted_published_child_pages_for_mobile), "target" => "_self"}
|
||||
end
|
||||
elsif page.page_type == "link"
|
||||
target = get_target(page.external_url)
|
||||
if $mobile.blank?
|
||||
item["#{page.name}"] = {"url"=> page.external_url, "children"=>create_json(page.sorted_published_child_pages), "target" => target}
|
||||
else
|
||||
item["#{page.name}"] = {"url"=> page.external_url, "children"=>create_json(page.sorted_published_child_pages_for_mobile), "target" => target}
|
||||
end
|
||||
end
|
||||
elsif page.page_type == "link"
|
||||
target = get_target(page.external_url)
|
||||
if $mobile.blank?
|
||||
item["#{page.name}"] = {"url"=> page.external_url, "children"=>create_json(page.sorted_published_child_pages), "target" => target}
|
||||
else
|
||||
item["#{page.name}"] = {"url"=> page.external_url, "children"=>create_json(page.sorted_published_child_pages_for_mobile), "target" => target}
|
||||
else
|
||||
if page.page_type == "page"
|
||||
item["#{page.name}"] = {"url"=> "/#{locale.to_s}" + page.url, "target" => "_self"}
|
||||
elsif page.page_type == "link"
|
||||
item["#{page.name}"] = {"url"=> page.external_url, "target" => get_target(page.external_url)}
|
||||
end
|
||||
end
|
||||
else
|
||||
if page.page_type == "page"
|
||||
item["#{page.name}"] = {"url"=> "/#{locale.to_s}" + page.url, "target" => "_self"}
|
||||
elsif page.page_type == "link"
|
||||
item["#{page.name}"] = {"url"=> page.external_url, "target" => get_target(page.external_url)}
|
||||
end
|
||||
item
|
||||
end
|
||||
@items = create_json(@pages)
|
||||
menu_file = File.open(File.join(Rails.root, 'app', 'templates', "#{@key}", "/home/menu.html.erb"))
|
||||
doc = Nokogiri::HTML(menu_file, nil, "UTF-8")
|
||||
menu_file.close
|
||||
|
||||
temp = []
|
||||
@menus = []
|
||||
@menus_items = []
|
||||
|
||||
temp << doc.css("*[data-menu-level='0']")
|
||||
temp << doc.css("*[data-menu-level='1']")
|
||||
temp << doc.css("*[data-menu-level='2']")
|
||||
|
||||
|
||||
temp[0] = temp[0].to_s.gsub(temp[1].to_s,"{{level}}")
|
||||
temp[1] = temp[1].to_s.gsub(temp[2].to_s,"{{level}}")
|
||||
temp[2] = temp[2].to_s
|
||||
|
||||
|
||||
temp.each_with_index do |menu,i|
|
||||
t = Nokogiri::HTML(menu, nil, "UTF-8")
|
||||
a = t.css("*[data-menu-link='true']")
|
||||
a[0]["href"] = "href_here"
|
||||
a[0]["target"] = "target_here"
|
||||
li = t.css("*[data-menu-level='#{i}'] > *")
|
||||
@menus_items << li.to_html
|
||||
ul = t.css("*[data-menu-level='#{i}']")
|
||||
ul[0].inner_html = "{{here}}"
|
||||
@menus << ul[0].to_html
|
||||
end
|
||||
|
||||
def create_menu(items,level)
|
||||
html = ""
|
||||
items.each do |key,item|
|
||||
li = @menus_items[level].gsub("href_here",(item["url"] || ""))
|
||||
li = li.gsub("{{link_name}}",(key || ""))
|
||||
li = li.gsub("target_here",(item["target"] || ""))
|
||||
li = request.original_fullpath == item['url'] ? li.gsub("{{active}}","active") : li.gsub("{{active}}","")
|
||||
|
||||
if item["children"] && !item["children"].empty?
|
||||
li = li.gsub("{{level}}",create_menu(item["children"],level + 1))
|
||||
else
|
||||
li = li.gsub("{{level}}","")
|
||||
end
|
||||
html = html + li
|
||||
end
|
||||
html = @menus[level].gsub("{{here}}",html)
|
||||
html = html.gsub("{{class_level}}",level.to_s)
|
||||
html
|
||||
end
|
||||
item
|
||||
end
|
||||
@items = create_json(@pages)
|
||||
menu_file = File.open(File.join(Rails.root, 'app', 'templates', "#{@key}", "/home/menu.html.erb"))
|
||||
doc = Nokogiri::HTML(menu_file, nil, "UTF-8")
|
||||
menu_file.close
|
||||
h = create_menu(@items,0)
|
||||
h.html_safe
|
||||
# end
|
||||
|
||||
temp = []
|
||||
@menus = []
|
||||
@menus_items = []
|
||||
|
||||
temp << doc.css("*[data-menu-level='0']")
|
||||
temp << doc.css("*[data-menu-level='1']")
|
||||
temp << doc.css("*[data-menu-level='2']")
|
||||
|
||||
|
||||
temp[0] = temp[0].to_s.gsub(temp[1].to_s,"{{level}}")
|
||||
temp[1] = temp[1].to_s.gsub(temp[2].to_s,"{{level}}")
|
||||
temp[2] = temp[2].to_s
|
||||
|
||||
|
||||
temp.each_with_index do |menu,i|
|
||||
t = Nokogiri::HTML(menu, nil, "UTF-8")
|
||||
a = t.css("*[data-menu-link='true']")
|
||||
a[0]["href"] = "href_here"
|
||||
a[0]["target"] = "target_here"
|
||||
li = t.css("*[data-menu-level='#{i}'] > *")
|
||||
@menus_items << li.to_html
|
||||
ul = t.css("*[data-menu-level='#{i}']")
|
||||
ul[0].inner_html = "{{here}}"
|
||||
@menus << ul[0].to_html
|
||||
end
|
||||
|
||||
def create_menu(items,level)
|
||||
html = ""
|
||||
items.each do |key,item|
|
||||
li = @menus_items[level].gsub("href_here",(item["url"] || ""))
|
||||
li = li.gsub("{{link_name}}",(key || ""))
|
||||
li = li.gsub("target_here",(item["target"] || ""))
|
||||
li = request.original_fullpath == item['url'] ? li.gsub("{{active}}","active") : li.gsub("{{active}}","")
|
||||
|
||||
if item["children"] && !item["children"].empty?
|
||||
li = li.gsub("{{level}}",create_menu(item["children"],level + 1))
|
||||
else
|
||||
li = li.gsub("{{level}}","")
|
||||
end
|
||||
html = html + li
|
||||
end
|
||||
html = @menus[level].gsub("{{here}}",html)
|
||||
html = html.gsub("{{class_level}}",level.to_s)
|
||||
html
|
||||
end
|
||||
h = create_menu(@items,0)
|
||||
h.html_safe
|
||||
# menu_html
|
||||
end
|
||||
|
||||
def render_view
|
||||
|
|
@ -225,7 +234,11 @@ module ApplicationHelper
|
|||
doc = Nokogiri::HTML(file, nil, "UTF-8")
|
||||
file.close
|
||||
controller = "#{params[:target_controller].capitalize}_controller".classify.constantize.new
|
||||
data = controller.send("#{params[:target_action]}") rescue nil
|
||||
begin
|
||||
data = controller.send("#{params[:target_action]}")# rescue nil
|
||||
rescue Exception => e
|
||||
write_debug_file(e,params[:target_controller],params[:target_action]) if Site::DEBUG
|
||||
end
|
||||
if !data.nil?
|
||||
wrap_elements = doc.css("*[data-list][data-level='0']")
|
||||
htmls = parsing_repeats_again(wrap_elements,data,1)
|
||||
|
|
@ -257,7 +270,11 @@ module ApplicationHelper
|
|||
doc = Nokogiri::HTML(file, nil, "UTF-8")
|
||||
file.close
|
||||
controller = "#{params[:target_controller].capitalize}_controller".classify.constantize.new
|
||||
data = controller.send("#{params[:target_action]}") rescue nil
|
||||
begin
|
||||
data = controller.send("#{params[:target_action]}")# rescue nil
|
||||
rescue Exception => e
|
||||
write_debug_file(e,params[:target_controller],params[:target_action]) if Site::DEBUG
|
||||
end
|
||||
if data.nil?
|
||||
return "<div class='well'> No content to show. </div>".html_safe
|
||||
end
|
||||
|
|
@ -269,17 +286,18 @@ module ApplicationHelper
|
|||
doc.to_html.html_safe
|
||||
else
|
||||
unless data['impressionist'].blank?
|
||||
impression = data['impressionist'].impressions.create
|
||||
impression.user_id = request.session['user_id']
|
||||
impression.controller_name = params[:target_controller]
|
||||
impression.action_name = params[:target_action]
|
||||
impression.ip_address = request.remote_ip
|
||||
impression.session_hash = request.session.id
|
||||
impression.request_hash = @impressionist_hash
|
||||
impression.referrer = request.referrer
|
||||
impression.save
|
||||
data['impressionist'].view_count = data['impressionist'].impressions.count
|
||||
data['impressionist'].save
|
||||
Thread.new do
|
||||
impression = data['impressionist'].impressions.create
|
||||
impression.user_id = request.session['user_id']
|
||||
impression.controller_name = params[:target_controller]
|
||||
impression.action_name = params[:target_action]
|
||||
impression.ip_address = request.remote_ip
|
||||
impression.session_hash = request.session.id
|
||||
impression.request_hash = @impressionist_hash
|
||||
impression.referrer = request.referrer
|
||||
impression.save
|
||||
data['impressionist'].inc(view_count: 1)
|
||||
end
|
||||
end
|
||||
wrap_elements = doc.css("*[data-list][data-level='0']")
|
||||
if wrap_elements.count == 0
|
||||
|
|
@ -338,12 +356,12 @@ module ApplicationHelper
|
|||
((controller.controller_name.eql?(controller_name) || request.fullpath.eql?(controller_name)) && controller.action_name.eql?(action_name)) ? 'active' : nil
|
||||
end
|
||||
|
||||
def link_back(custom_class=nil)
|
||||
def link_back(custom_class=nil, params="")
|
||||
case custom_class
|
||||
when nil
|
||||
link_to t('back'), get_go_back, :class => 'nav'
|
||||
link_to t('back'), get_go_back + params, :class => 'nav'
|
||||
else
|
||||
link_to t('back'), get_go_back, :class => custom_class
|
||||
link_to t('back'), get_go_back + params, :class => custom_class
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -491,4 +509,48 @@ module ApplicationHelper
|
|||
target
|
||||
end
|
||||
|
||||
def write_debug_file(e,controller_name,action_name)
|
||||
url_dir_name = request.fullpath.split("?")[0]
|
||||
url_dir_name = URI.decode(url_dir_name)
|
||||
url_dir_name = (url_dir_name == "/" ? "home" : url_dir_name.sub("/","").gsub("/","_").gsub("-","_").gsub(" ","_"))
|
||||
directory_name = "tmp/debug/#{url_dir_name}"
|
||||
FileUtils.mkdir_p(directory_name) unless File.exists?(directory_name)
|
||||
fn = "#{directory_name}/#{controller_name}_#{action_name}.html"
|
||||
error_trace_spans = ""
|
||||
e.backtrace.each do |bt|
|
||||
error_trace_spans = error_trace_spans + "<span>#{bt}</span><br />"
|
||||
end
|
||||
con = "#{controller_name.capitalize}_controller".classify.constantize
|
||||
File.open(fn, "w"){ |file|
|
||||
file.puts "<html>
|
||||
<head>
|
||||
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'>
|
||||
<meta charset=UTF-8'>
|
||||
<title>Debug result</title>
|
||||
</head>
|
||||
<body>
|
||||
<h3>Error Message</h3>
|
||||
<div class='error-message'>
|
||||
<h2><i>#{e.message}</i></h2>
|
||||
</div>
|
||||
<h3>Request Details</h3>
|
||||
<div class='request-details'>
|
||||
<span>Url : <b>#{URI.decode(request.url)}</b></span><br />
|
||||
<span>Controller : <b>#{con.to_s}</b> </span><br />
|
||||
<span>Action : <b>#{action_name.capitalize}</b> </span>
|
||||
</div>
|
||||
<h3>Error Trace</h3>
|
||||
<div class='error-trace'>
|
||||
#{error_trace_spans}
|
||||
</div>
|
||||
<h3>Params</h3>
|
||||
<div class='params'>
|
||||
#{OrbitHelper.params}
|
||||
</div>
|
||||
</body>
|
||||
</html>"
|
||||
|
||||
}
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ module AttributeFieldsHelper
|
|||
@new_attribute = @attribute_value.nil?
|
||||
@attribute_value = @attribute_value || (attribute_type.eql?("role") ? @member.attribute_values.build(attribute_field_id: id) : @member.member_profile_field_values.build(member_profile_field: id))
|
||||
@prefiled_value = @attribute_value.value rescue nil
|
||||
return instance_eval("render_#{markup}") rescue ""
|
||||
return instance_eval("render_#{markup}") #rescue ""
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -101,14 +101,17 @@ module AttributeFieldsHelper
|
|||
# @prefiled_value = @attribute_value.get_date
|
||||
|
||||
case self.typeC['format']
|
||||
when 'format1'
|
||||
tmp = datetime_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y/%m/%d %H:%M")), 'yyyy/MM/dd hh:mm', true)
|
||||
when 'format2'
|
||||
tmp = datetime_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y/%m/%d")), 'yyyy/MM/dd')
|
||||
# when 'format1'
|
||||
# tmp = datetime_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y/%m/%d %H:%M")), 'yyyy/MM/dd hh:mm', true)
|
||||
when 'format1','format2'
|
||||
# tmp = datetime_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y/%m/%d")), 'yyyy/MM/dd')
|
||||
tmp = very_simple_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y/%m/%d")), self.typeC['format'])
|
||||
when 'format3'
|
||||
tmp = datetime_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y/%m")), 'yyyy/MM')
|
||||
# tmp = datetime_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y/%m")), 'yyyy/MM')
|
||||
tmp = very_simple_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y/%m")), self.typeC['format'])
|
||||
when 'format4'
|
||||
tmp = datetime_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y")), 'yyyy')
|
||||
# tmp = datetime_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y")), 'yyyy')
|
||||
tmp = very_simple_picker(get_field_name_base, (@prefiled_value ? @prefiled_value : d.strftime("%Y")), self.typeC['format'])
|
||||
end
|
||||
|
||||
control_group_wrapper{tmp}
|
||||
|
|
@ -117,6 +120,28 @@ module AttributeFieldsHelper
|
|||
end
|
||||
end
|
||||
|
||||
def very_simple_picker(object_name, value, format)
|
||||
id = object_name.gsub("[","_").gsub("]","")
|
||||
values = value.split("/") rescue []
|
||||
html = "<div class='simple-date-picker'>"
|
||||
if format == "format1" || format == "format2"
|
||||
html = html + "<input type='text' class='span1' #{(!values.blank? ? "value='#{values[2]}'" : "")} placeholder='Date' onkeypress='return (event.charCode >= 48 && event.charCode <= 57) || event.keyCode == 8 || event.keyCode == 46 || (event.keyCode >= 37 && event.keyCode <= 40) || event.keyCode == 9' onkeyup='this.value=(this.value.length <= 2 ? (parseInt(this.value) > 0 && parseInt(this.value) < 32 ? this.value : this.value.substring(0,this.value.length-1)) : this.value.substring(0,this.value.length-1))' onblur='var el = document.getElementById(\"#{id}\");var k = el.value.split(\"/\");if(this.value){k[2]=this.value; el.value = k.join(\"/\")};'>"
|
||||
end
|
||||
if format == "format1" || format == "format2" || format == "format3"
|
||||
html = html + "<select class='span2' onchange='var el = document.getElementById(\"#{id}\");var k = el.value.split(\"/\");if(this.value){k[1]=this.value; el.value = k.join(\"/\")};'>"
|
||||
["January","February","March","April","May","June","July","August","September","October","November","December"].each_with_index do |mon,index|
|
||||
mon_value = "#{(index < 9 ? "0" : "")}#{(index + 1).to_s}"
|
||||
html = html + "<option value='#{(index < 9 ? "0" : "")}#{(index + 1).to_s}' #{values[1] == mon_value ? 'selected="selected"' : ""}>#{mon}</option>"
|
||||
end
|
||||
html = html + "</select>"
|
||||
end
|
||||
html = html + "<input type='text' class='span1' #{(!values.blank? ? "value='#{values[0]}'" : "")} placeholder='Year' onkeypress='return (event.charCode >= 48 && event.charCode <= 57) || event.keyCode == 8 || event.keyCode == 46 || (event.keyCode >= 37 && event.keyCode <= 40) event.keyCode == 9' onkeyup='this.value=(this.value.length == 4 ? (parseInt(this.value) > 1900 && parseInt(this.value) < 3000 ? this.value : this.value.substring(0,this.value.length-1)) : (this.value.length > 4 ? this.value.substring(0,this.value.length-1) : this.value))' onblur='var el = document.getElementById(\"#{id}\");var k = el.value.split(\"/\");if(this.value){k[0]=this.value; el.value = k.join(\"/\")};'>"
|
||||
html = html + hidden_field_tag(object_name, (value || "1901/01/01"))
|
||||
html = html + "</div>"
|
||||
|
||||
html.html_safe
|
||||
end
|
||||
|
||||
def datetime_picker(object_name, value, format, time=false)
|
||||
content_tag :div, :class => "input-append datetimepick", "data-date-format"=>format, "data-picktime"=>"#{time}" do
|
||||
concat text_field_tag(object_name, value, :placeholder=>format)
|
||||
|
|
@ -150,7 +175,7 @@ module AttributeFieldsHelper
|
|||
|
||||
def render_text_area
|
||||
control_group_wrapper do |key,value|
|
||||
value = can_muti_lang_input? ? @prefiled_value[key] : @prefiled_value
|
||||
value = can_muti_lang_input? ? @prefiled_value[key] : @prefiled_value rescue nil
|
||||
key = can_muti_lang_input? ? "[#{key}]" : ""
|
||||
place_holder= @panel_setting["placeholder"][I18n.locale.to_s] rescue ''
|
||||
text_area_tag(get_field_name_base + key, value,@markup_options.merge(:placeholder=>place_holder))
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ module AttributeValuesHelper
|
|||
end
|
||||
|
||||
def show_minguo_calendar(from_to=nil)
|
||||
get_minguo
|
||||
# get_minguo
|
||||
|
||||
case from_to
|
||||
when :to
|
||||
|
|
@ -96,12 +96,14 @@ module AttributeValuesHelper
|
|||
def get_date_by_format(from_to = nil)
|
||||
case I18n.locale
|
||||
when :zh_tw
|
||||
case
|
||||
when self.member_profile_field["typeC"]["calendar"] == "west_calendar"
|
||||
show_west_calender(from_to)
|
||||
when self.member_profile_field["typeC"]["calendar"] == "tw_calendar"
|
||||
show_minguo_calendar(from_to)
|
||||
end #case self.member_profile_field["typeC"]["calendar"]
|
||||
# case
|
||||
# when self.member_profile_field["typeC"]["calendar"] == "west_calendar"
|
||||
# show_west_calender(from_to)
|
||||
# when self.member_profile_field["typeC"]["calendar"] == "tw_calendar"
|
||||
# show_minguo_calendar(from_to)
|
||||
# end #case self.member_profile_field["typeC"]["calendar"]
|
||||
show_west_calender(from_to)
|
||||
|
||||
when :en
|
||||
show_west_calender(from_to)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ module OrbitBackendHelper
|
|||
options[:icon_date] ||= 'icons-calendar'
|
||||
options[:icon_clear] ||= 'icons-cross-3'
|
||||
options[:input_class] ||= 'input-large'
|
||||
options[:new_record] = true if options[:new_record].nil?
|
||||
options[:value] ||= options[:object].send(method) if options[:object] && options[:object][method]
|
||||
case options[:picker_type]
|
||||
when 'date'
|
||||
|
|
@ -40,6 +41,10 @@ module OrbitBackendHelper
|
|||
concat hidden_field(object_name, method, :value => options[:value])
|
||||
concat separated_picker(object_name, method, options)
|
||||
end
|
||||
when 'simple'
|
||||
content_tag :div, :id => options[:id], :class => options[:class] do
|
||||
simple_picker(object_name, method, options)
|
||||
end
|
||||
else
|
||||
content_tag :div, :id => options[:id], :class => options[:class] do
|
||||
default_picker(object_name, method, options)
|
||||
|
|
@ -50,7 +55,8 @@ module OrbitBackendHelper
|
|||
def default_picker(object_name, method, options)
|
||||
custom = {}
|
||||
custom[:format] = options[:format] || 'yyyy/MM/dd hh:mm'
|
||||
custom[:value] = format_value(options[:value], custom[:format]) if options[:value]
|
||||
custom[:value] = format_value(options[:value], custom[:format]) if options[:value] && !options[:new_record]
|
||||
custom[:value] = "" if options[:new_record]
|
||||
custom[:picker_class] = 'default_picker'
|
||||
custom[:label] = options[:label] || I18n.t('datetime_picker.default.label')
|
||||
custom[:placeholder] = options[:placeholder] || I18n.t('datetime_picker.default.placeholder')
|
||||
|
|
@ -95,28 +101,34 @@ module OrbitBackendHelper
|
|||
render :partial => '/admin/tags/tag_form', :locals => {:f=> f, :module_app=>module_app, :tags=>module_app.tags }
|
||||
end
|
||||
|
||||
def render_filter(fields, search_dom_id=nil)
|
||||
render :partial => "shared/filter", :locals =>{:fields => fields, :search_dom_id=>search_dom_id}
|
||||
def render_filter(fields, search_dom_id=nil, quick_new=false)
|
||||
render :partial => "shared/filter", :locals =>{:fields => fields, :search_dom_id=>search_dom_id, :quick_new=>quick_new}
|
||||
end
|
||||
|
||||
def display_visitors(options={})
|
||||
Impression.where(options).distinct(:request_hash).count
|
||||
Impression.where(options).count
|
||||
end
|
||||
|
||||
def display_visitors_today
|
||||
display_visitors(created_at: {'$gte' => Time.now.beginning_of_day, '$lte' => Time.now})
|
||||
display_visitors(created_at: {'$gte' => Time.now.beginning_of_day})
|
||||
end
|
||||
|
||||
def display_visitors_this_week
|
||||
display_visitors(created_at: {'$gte' => Time.now-7.days, '$lte' => Time.now})
|
||||
display_visitors(created_at: {'$gte' => Time.now.beginning_of_week})
|
||||
end
|
||||
|
||||
def display_visitors_this_month
|
||||
display_visitors(created_at: {'$gte' => Time.now-30.days, '$lte' => Time.now})
|
||||
visitors_this_month = Rails.cache.fetch("visitors_this_month", expires_in: 1.day) do
|
||||
display_visitors(created_at: {'$gte' => Time.now.beginning_of_month})
|
||||
end
|
||||
visitors_this_month
|
||||
end
|
||||
|
||||
def display_visitors_this_year
|
||||
display_visitors(created_at: {'$gte' => Time.now-365.days, '$lte' => Time.now})
|
||||
visitors_this_year = Rails.cache.fetch("visitors_this_year", expires_in: 1.day) do
|
||||
display_visitors(created_at: {'$gte' => Time.now.beginning_of_year})
|
||||
end
|
||||
visitors_this_year
|
||||
end
|
||||
|
||||
def get_month_traffic
|
||||
|
|
@ -229,4 +241,4 @@ module Orbit::FormBuilder
|
|||
def datetime_picker(method, options = {})
|
||||
@template.datetime_picker(@object_name, method, objectify_options(options))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -32,6 +32,19 @@ module OrbitFormHelper
|
|||
end
|
||||
end
|
||||
|
||||
def simple_picker(object_name, method, options)
|
||||
html = "<div class='simple-date-picker'>
|
||||
<input type='text' class='span1' #{(options[:value] ? "value='#{options[:value].day}'" : "")} placeholder='Date' onkeypress='return (event.charCode >= 48 && event.charCode <= 57) || event.keyCode == 8 || event.keyCode == 46 || (event.keyCode >= 37 && event.keyCode <= 40) || event.keyCode == 9' onkeyup='this.value=(this.value.length <= 2 ? (parseInt(this.value) > 0 && parseInt(this.value) < 32 ? this.value : this.value.substring(0,this.value.length-1)) : this.value.substring(0,this.value.length-1))' onblur='var el = document.getElementById(\"#{object_name.to_s}_#{method.to_s}\");var k = el.value.split(\"-\");if(this.value){k[2]=this.value; el.value = k.join(\"-\")};'>
|
||||
<select class='span2' onchange='var el = document.getElementById(\"#{object_name.to_s}_#{method.to_s}\");var k = el.value.split(\"-\");if(this.value){k[1]=this.value; el.value = k.join(\"-\")};'>"
|
||||
["January","February","March","April","May","June","July","August","September","October","November","December"].each_with_index do |mon,index|
|
||||
html = html + "<option value='#{(index < 9 ? "0" : "")}#{(index + 1).to_s}' #{(options[:value] && options[:value].month == (index + 1) ? "selected='selected'" : "")}>#{mon}</option>"
|
||||
end
|
||||
html = html + "</select><input type='text' class='span1' #{(options[:value] ? "value='#{options[:value].year}'" : "")} placeholder='Year' onkeypress='return (event.charCode >= 48 && event.charCode <= 57) || event.keyCode == 8 || event.keyCode == 46 || (event.keyCode >= 37 && event.keyCode <= 40) event.keyCode == 9' onkeyup='this.value=(this.value.length == 4 ? (parseInt(this.value) > 1900 && parseInt(this.value) < 3000 ? this.value : this.value.substring(0,this.value.length-1)) : (this.value.length > 4 ? this.value.substring(0,this.value.length-1) : this.value))' onblur='var el = document.getElementById(\"#{object_name.to_s}_#{method.to_s}\");var k = el.value.split(\"-\");if(this.value){k[0]=this.value; el.value = k.join(\"-\")};'>"
|
||||
html = html + hidden_field(object_name, method, :value => options[:value] || "1901-01-01")
|
||||
html = html + "</div>"
|
||||
html.html_safe
|
||||
end
|
||||
|
||||
def date_picker(object_name, method, options)
|
||||
custom = {}
|
||||
custom[:format] = options[:format] || 'yyyy/MM'
|
||||
|
|
@ -103,6 +116,6 @@ module Orbit::FormBuilder
|
|||
# ActionPack's metaprogramming would have done this for us, if FormHelper#labeled_input
|
||||
# had been defined at load. Instead we define it ourselves here.
|
||||
def datetime_picker(method, options = {})
|
||||
@template.datetime_picker(@object_name, method, objectify_options(options))
|
||||
# @template.datetime_picker(@object_name, method, objectify_options(options))
|
||||
end
|
||||
end
|
||||
|
|
@ -136,7 +136,7 @@ module OrbitHelper
|
|||
end
|
||||
|
||||
def self.set_widget_tags(tags)
|
||||
@widget_tags = tags;
|
||||
@widget_tags = tags
|
||||
end
|
||||
|
||||
def self.widget_tags
|
||||
|
|
@ -267,6 +267,14 @@ module OrbitHelper
|
|||
"#{request.host_with_port}/#{locale}#{url}"
|
||||
end
|
||||
|
||||
def self.set_request_object(request)
|
||||
@site_request_object = request
|
||||
end
|
||||
|
||||
def self.request
|
||||
@site_request_object
|
||||
end
|
||||
|
||||
def self.set_site_locale(locale)
|
||||
@site_locale = locale
|
||||
end
|
||||
|
|
@ -339,6 +347,113 @@ module OrbitHelper
|
|||
!$mobile.blank?
|
||||
end
|
||||
|
||||
def self.set_css_to_render_to_empty
|
||||
@css_to_render_in_head = []
|
||||
end
|
||||
|
||||
def self.render_css_in_head(css=[])
|
||||
@css_to_render_in_head.concat(css)
|
||||
end
|
||||
|
||||
def self.get_css_to_render_in_head
|
||||
css_html = ""
|
||||
@css_to_render_in_head.each do |css|
|
||||
css_html = css_html + "<link rel='stylesheet' media='screen' href='/assets/#{css}'>\n"
|
||||
end
|
||||
return css_html
|
||||
end
|
||||
|
||||
def self.render_meta_tags(metas=[])
|
||||
@page_meta_tags = metas
|
||||
end
|
||||
|
||||
def self.meta_tags_html
|
||||
html = ""
|
||||
if !@page_meta_tags.nil?
|
||||
@page_meta_tags.each do |meta|
|
||||
html = html + "<meta "
|
||||
meta.keys.each do |attrib|
|
||||
html = html + "#{attrib}='#{self.strip_html_tags(meta[attrib])}' "
|
||||
end
|
||||
html = html + ">"
|
||||
end
|
||||
end
|
||||
html
|
||||
end
|
||||
|
||||
def self.strip_html_tags(string)
|
||||
ActionView::Base.full_sanitizer.sanitize(string)
|
||||
end
|
||||
|
||||
# get feeds for the module
|
||||
|
||||
def self.get_feed_for_module(type)
|
||||
if ModuleApp.where(:key => "feed").count == 0
|
||||
return []
|
||||
end
|
||||
categories = []
|
||||
ma = nil
|
||||
if type == "index"
|
||||
categories = @categories if !@categories.nil?
|
||||
ma = @module_app
|
||||
elsif type == "widget"
|
||||
categories = @widget_categories if !@widget_categories.nil?
|
||||
ma = @widget_module_app
|
||||
end
|
||||
if categories.first == "all"
|
||||
feeds = SiteFeed.where(:channel_key => ma.key).enabled
|
||||
else
|
||||
feeds = SiteFeed.where(:channel_key => ma.key, :merge_with_category.in => categories).enabled
|
||||
end
|
||||
data = []
|
||||
if feeds.count > 0
|
||||
temp_ids = []
|
||||
feeds.each do |feed|
|
||||
file = File.join(Rails.root,"public","site_feeds",feed.id.to_s,feed.feed_uid.to_s + ".json")
|
||||
if File.exists?(file)
|
||||
d = File.read(file)
|
||||
d = JSON.parse(d)
|
||||
cat = Category.find(feed.merge_with_category).title
|
||||
final_d = []
|
||||
d[ma.key.pluralize].each{|a|
|
||||
a["category"] = cat
|
||||
if !temp_ids.include?(a["id"])
|
||||
temp_ids << a["id"]
|
||||
a["params"] = a["params"] + "_" + feed.id.to_s + "h"
|
||||
final_d << a
|
||||
end
|
||||
}
|
||||
data.concat(final_d)
|
||||
end
|
||||
end
|
||||
end
|
||||
data
|
||||
end
|
||||
|
||||
def self.is_object_from_feed?(uid)
|
||||
return uid.ends_with?("h")
|
||||
end
|
||||
|
||||
def self.get_from_feed(uidwithid)
|
||||
temp = uidwithid.split("_")
|
||||
feed_id = temp[1][0...-1]
|
||||
uid = temp[0]
|
||||
object = nil
|
||||
feed = SiteFeed.find(feed_id) rescue nil
|
||||
if !feed.nil?
|
||||
file = File.join(Rails.root,"public","site_feeds",feed.id.to_s,feed.feed_uid.to_s + ".json")
|
||||
if File.exists?(file)
|
||||
d = File.read(file)
|
||||
d = JSON.parse(d)
|
||||
objects = d[@module_app.key.pluralize]
|
||||
object = objects.select{|obj| obj["id"] == uid}.first
|
||||
cat = Category.find(feed.merge_with_category)
|
||||
object = {} if cat.disable
|
||||
end
|
||||
end
|
||||
object
|
||||
end
|
||||
|
||||
# ===============================================================
|
||||
# Breadcrumbs
|
||||
# ===============================================================
|
||||
|
|
|
|||
|
|
@ -71,7 +71,11 @@ module PagesHelper
|
|||
wrap_elements = doc.css("*[data-repeat]")
|
||||
controller = "#{controller_name.capitalize.pluralize}_controller".classify.constantize.new
|
||||
OrbitHelper.set_current_widget_module controller_name
|
||||
data = controller.send("#{widget_method}") rescue nil
|
||||
begin
|
||||
data = controller.send("#{widget_method}") #rescue nil
|
||||
rescue Exception => e
|
||||
write_widget_debug_file(e,controller_name,widget_method,subpart_id)
|
||||
end
|
||||
if !data.nil?
|
||||
wrap_elements = doc.css("*[data-list][data-level='0']")
|
||||
htmls = widget_parsing_repeats_again(wrap_elements,data,1)
|
||||
|
|
@ -91,5 +95,50 @@ module PagesHelper
|
|||
end
|
||||
end
|
||||
|
||||
def write_widget_debug_file(e,controller_name,action_name,sub_part)
|
||||
url_dir_name = request.fullpath.split("?")[0]
|
||||
url_dir_name = URI.decode(url_dir_name)
|
||||
url_dir_name = (url_dir_name == "/" ? "home" : url_dir_name.sub("/","").gsub("/","_").gsub("-","_").gsub(" ","_"))
|
||||
directory_name = "tmp/debug/#{url_dir_name}"
|
||||
FileUtils.mkdir_p(directory_name) unless File.exists?(directory_name)
|
||||
fn = "#{directory_name}/#{controller_name}_#{action_name}_#{(sub_part if !sub_part.nil?)}.html"
|
||||
error_trace_spans = ""
|
||||
e.backtrace.each do |bt|
|
||||
error_trace_spans = error_trace_spans + "<span>#{bt}</span><br />"
|
||||
end
|
||||
con = "#{controller_name.capitalize.pluralize}_controller".classify.constantize
|
||||
File.open(fn, "w"){ |file|
|
||||
file.puts "<html>
|
||||
<head>
|
||||
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'>
|
||||
<meta charset=UTF-8'>
|
||||
<title>Debug result</title>
|
||||
</head>
|
||||
<body>
|
||||
<h3>Error Message</h3>
|
||||
<div class='error-message'>
|
||||
<h2><i>#{e.message}</i></h2>
|
||||
</div>
|
||||
<h3>Request Details</h3>
|
||||
<div class='request-details'>
|
||||
<span>Url : <b>#{URI.decode(request.url)}</b></span><br />
|
||||
<span>Controller : <b>#{con.to_s}</b></span><br />
|
||||
<span>Action : <b>#{action_name.capitalize}</b></span><br />
|
||||
<span>SubPart Id : <b>#{sub_part}</b></span>
|
||||
</div>
|
||||
<h3>Error Trace</h3>
|
||||
<div class='error-trace'>
|
||||
#{error_trace_spans}
|
||||
</div>
|
||||
<h3>Params</h3>
|
||||
<div class='params'>
|
||||
#{OrbitHelper.params}
|
||||
</div>
|
||||
</body>
|
||||
</html>"
|
||||
|
||||
}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class AttributeValue
|
|||
|
||||
def get_field_value
|
||||
if (self.attribute_field.markup.eql?("text_field") || self.attribute_field.markup.eql?("text_area"))
|
||||
field_value = self.value[I18n.locale]
|
||||
field_value = self.value[I18n.locale].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")
|
||||
|
|
@ -80,7 +80,7 @@ class AttributeValue
|
|||
{
|
||||
"key" => self.attribute_field.key,
|
||||
"title" => self.attribute_field.title,
|
||||
"value" => "",
|
||||
"value" => " ",
|
||||
"val" => field_value = self.value
|
||||
}
|
||||
end
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
class Google
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
|
||||
field :token
|
||||
field :google_uid
|
||||
field :connected, type: Boolean
|
||||
|
||||
belongs_to :user
|
||||
end
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
class Group
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
include Slug
|
||||
|
||||
field :title, as: :slug_title, type: String, localize: true
|
||||
field :description, localize: true
|
||||
field :admins, type: Array, default: []
|
||||
field :privacy, default: "closed"
|
||||
field :permission, default: "write"
|
||||
field :archive, type: Boolean, default: false
|
||||
mount_uploader :image, ImageUploader
|
||||
|
||||
belongs_to :group_category
|
||||
has_and_belongs_to_many :users
|
||||
has_many :group_posts, :dependent => :destroy
|
||||
|
||||
scope :closed, ->{ where(privacy: "closed") }
|
||||
scope :open, ->{ where(privacy: "open") }
|
||||
scope :archived, ->{ where(archive: true) }
|
||||
scope :not_archived, ->{ where(archive: false) }
|
||||
|
||||
def privacy_name
|
||||
return self.privacy == "closed" ? "private" : "public"
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
class GroupCategory
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
|
||||
field :title, localize: true
|
||||
field :is_accepted, type: Boolean, :default => true
|
||||
|
||||
has_many :groups
|
||||
|
||||
scope :is_requested, ->{ where(is_accepted: false) }
|
||||
scope :by_admin, ->{ where(is_accepted: true) }
|
||||
end
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
class GroupPost
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
include Slug
|
||||
|
||||
field :title, as: :slug_title, type: String
|
||||
field :content
|
||||
field :read_by, type: Array, default: []
|
||||
field :author, type: BSON::ObjectId
|
||||
|
||||
belongs_to :group
|
||||
has_many :group_post_images, :autosave => true, :dependent => :destroy
|
||||
has_many :group_post_files, :autosave => true, :dependent => :destroy
|
||||
has_many :group_post_comments, :autosave => true, :dependent => :destroy
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
class GroupPostComment
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
|
||||
field :comment
|
||||
|
||||
belongs_to :user
|
||||
belongs_to :group_post
|
||||
end
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
class GroupPostFile
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
|
||||
mount_uploader :file, AssetUploader
|
||||
|
||||
belongs_to :group_post
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
class GroupPostImage
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
|
||||
mount_uploader :image, ImageUploader
|
||||
|
||||
belongs_to :group_post
|
||||
|
||||
end
|
||||
|
|
@ -13,7 +13,7 @@ class MemberProfile
|
|||
field :sex
|
||||
field :sid
|
||||
field :office_tel
|
||||
field :birthday, type: DateTime
|
||||
field :birthday, type: Date
|
||||
field :address, type: String, localize: true
|
||||
field :personal_website
|
||||
field :autobiography, type: String, localize: true
|
||||
|
|
@ -47,11 +47,18 @@ class MemberProfile
|
|||
|
||||
|
||||
def name
|
||||
if self.first_name || self.last_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}"
|
||||
end
|
||||
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")
|
||||
|
|
@ -128,7 +135,7 @@ class MemberProfile
|
|||
data = self.send(field["key"]) rescue ""
|
||||
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}'>#{data}</a>" : data
|
||||
field_data = data.blank? ? {} : {"key" => field["key"],"title" => I18n.t("users."+field["key"]), "value" =>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
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class MemberProfileFieldValue
|
|||
index.nil? ? self["val"] : self["val"][index]
|
||||
# self.member_profile_field.get_data[:cross_lang] ? Hash[VALID_LOCALES.collect{|lang| [lang,self[lang.to_sym]]}] : self["val"] #if !self.member_profile_field.get_data[:cross_lang]
|
||||
else
|
||||
self.member_profile_field.get_data["cross_lang"] =="true" ? self["val"] : Hash[site.valid_locales.collect{|lang| [lang,self[lang.to_sym]]}]
|
||||
self.member_profile_field.get_data["cross_lang"] =="true" ? self["val"].gsub("\r\n","<br>") : Hash[site.valid_locales.collect{|lang| [lang,self[lang.to_sym].gsub("\r\n","<br>")]}]
|
||||
end
|
||||
when 'select','radio_button','address'
|
||||
self["val"]
|
||||
|
|
@ -151,7 +151,7 @@ class MemberProfileFieldValue
|
|||
{
|
||||
"key" => self.member_profile_field.key,
|
||||
"title" => self.member_profile_field.title,
|
||||
"value" => (field_value.blank? ? "" : field_value),
|
||||
"value" => (field_value.blank? ? " " : field_value),
|
||||
"val" => field_value = self.value
|
||||
}
|
||||
end
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ class ModuleApp
|
|||
field :desktop_enabled, type: Boolean, default: false
|
||||
field :widget_settings
|
||||
field :store_permission_granted, type: Boolean, default: false
|
||||
field :cache_models, type: Array, default: []
|
||||
field :feeds_url
|
||||
|
||||
has_many :categories, dependent: :destroy, :autosave => true
|
||||
has_and_belongs_to_many :tags, dependent: :destroy, :autosave => true
|
||||
|
|
@ -34,6 +36,8 @@ class ModuleApp
|
|||
self[:widget_methods] = reg.get_widget_methods
|
||||
self[:widget_settings] = reg.get_widget_settings
|
||||
self[:desktop_enabled] = reg.is_desktop_enabled
|
||||
self[:cache_models] = reg.get_models_to_cache
|
||||
self[:feeds_url] = reg.get_feeds_url
|
||||
end
|
||||
|
||||
def sub_managers
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
class OrbitObserver < Mongoid::Observer
|
||||
models_to_cache = OrbitApp.get_models_for_caching
|
||||
observe models_to_cache.keys
|
||||
|
||||
def after_save(document)
|
||||
clear_cache(document)
|
||||
end
|
||||
|
||||
def after_destroy(document)
|
||||
clear_cache(document)
|
||||
end
|
||||
|
||||
def clear_cache(document)
|
||||
model_module_hash = OrbitApp.get_model_hash_for_caching
|
||||
case document.class.to_s
|
||||
when 'Tag'
|
||||
document.module_app.each do |module_app|
|
||||
Rails.cache.delete_matched( /#{ module_app.key }/ )
|
||||
end
|
||||
when 'Category'
|
||||
Rails.cache.delete_matched( /#{ document.module_app.key }/ )
|
||||
else
|
||||
Rails.cache.delete_matched( /#{model_module_hash[document.class.name.underscore.to_sym]}/ )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -22,6 +22,8 @@ class Page
|
|||
field :member_sort_position, type: Boolean, :default => false
|
||||
field :enabled_for_sitemap, type: Array, :default => []
|
||||
field :rss2_id, type: String
|
||||
field :custom_string_field, type: String
|
||||
field :custom_array_field, type: Array, :default => []
|
||||
|
||||
has_many :page_parts, :autosave => true, :dependent => :destroy
|
||||
has_many :mobile_page_parts, :autosave => true, :dependent => :destroy
|
||||
|
|
@ -31,6 +33,15 @@ class Page
|
|||
belongs_to :parent_page, :class_name => 'Page', :inverse_of => :child_page
|
||||
|
||||
before_create :assign_page_number
|
||||
|
||||
# after_save :clear_cache
|
||||
# after_destroy :clear_cache
|
||||
|
||||
def clear_cache
|
||||
I18n.available_locales.each do |locale|
|
||||
Rails.cache.delete_matched( /main_menu/ )
|
||||
end
|
||||
end
|
||||
|
||||
def assign_page_number
|
||||
parent_page = self.parent_page
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class Role
|
|||
has_and_belongs_to_many :member_profiles
|
||||
has_many :authorizations
|
||||
|
||||
has_many :attribute_fields
|
||||
has_many :attribute_fields, dependent: :destroy
|
||||
accepts_nested_attributes_for :attribute_fields
|
||||
|
||||
has_many :role_statuses, dependent: :destroy
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ class Site
|
|||
include Mongoid::Timestamps
|
||||
include Slug
|
||||
|
||||
DEBUG = false
|
||||
|
||||
field :title, as: :slug_title, type: String, localize: true
|
||||
field :school, type: String
|
||||
field :department, type: String
|
||||
|
|
@ -21,19 +23,26 @@ class Site
|
|||
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 => false
|
||||
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 :google_oauth_enabled, :type => Boolean, :default => false
|
||||
field :google_client_id
|
||||
field :google_client_secret
|
||||
|
||||
field :month_traffic_cache
|
||||
|
||||
|
|
|
|||
|
|
@ -10,10 +10,17 @@ class SubPart
|
|||
field :content, localize: true
|
||||
field :data_count, type: Integer, default: 10
|
||||
field :categories, type: Array, :default => []
|
||||
field :tags, type: Array, :default => []
|
||||
field :tags, type: Array, :default => []
|
||||
field :custom_string_field, type: String
|
||||
field :custom_array_field, type: Array, :default => []
|
||||
|
||||
belongs_to :page_part
|
||||
belongs_to :mobile_page_part
|
||||
|
||||
# after_save :clear_cache
|
||||
# after_destroy :clear_cache
|
||||
|
||||
def clear_cache
|
||||
Rails.cache.delete_matched( /#{self.id.to_s}/ )
|
||||
end
|
||||
end
|
||||
|
|
@ -12,7 +12,7 @@ class User
|
|||
has_many :assets
|
||||
has_many :user_actions, :dependent => :destroy
|
||||
|
||||
index({ confirmation_token: 1}, { unique: true })
|
||||
# index({ confirmation_token: 1}, { unique: true })
|
||||
scope :unapproved, ->{ where(approved: false) }
|
||||
|
||||
has_secure_password
|
||||
|
|
@ -20,8 +20,11 @@ class User
|
|||
belongs_to :workgroup
|
||||
has_many :authorizations
|
||||
belongs_to :member_profile
|
||||
has_and_belongs_to_many :groups
|
||||
has_many :group_post_comments
|
||||
has_one :facebook, :autosave => true, :dependent => :destroy
|
||||
has_one :desktop, :dependent => :destroy
|
||||
has_one :google, :autosave => true, :dependent => :destroy
|
||||
# has_one :desktop, :dependent => :destroy
|
||||
|
||||
|
||||
validates :user_name, uniqueness: true
|
||||
|
|
|
|||
|
|
@ -1,67 +0,0 @@
|
|||
//
|
||||
// Alerts
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
// Base styles
|
||||
// -------------------------
|
||||
|
||||
.alert {
|
||||
padding: $alert-padding;
|
||||
margin-bottom: $line-height-computed;
|
||||
border: 1px solid transparent;
|
||||
border-radius: $alert-border-radius;
|
||||
|
||||
// Headings for larger alerts
|
||||
h4 {
|
||||
margin-top: 0;
|
||||
// Specified for the h4 to prevent conflicts of changing $headings-color
|
||||
color: inherit;
|
||||
}
|
||||
// Provide class for links that match alerts
|
||||
.alert-link {
|
||||
font-weight: $alert-link-font-weight;
|
||||
}
|
||||
|
||||
// Improve alignment and spacing of inner content
|
||||
> p,
|
||||
> ul {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
> p + p {
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
// Dismissable alerts
|
||||
//
|
||||
// Expand the right padding and account for the close button's positioning.
|
||||
|
||||
.alert-dismissable {
|
||||
padding-right: ($alert-padding + 20);
|
||||
|
||||
// Adjust close link position
|
||||
.close {
|
||||
position: relative;
|
||||
top: -2px;
|
||||
right: -21px;
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
// Alternate styles
|
||||
//
|
||||
// Generate contextual modifier classes for colorizing the alert.
|
||||
|
||||
.alert-success {
|
||||
@include alert-variant($alert-success-bg, $alert-success-border, $alert-success-text);
|
||||
}
|
||||
.alert-info {
|
||||
@include alert-variant($alert-info-bg, $alert-info-border, $alert-info-text);
|
||||
}
|
||||
.alert-warning {
|
||||
@include alert-variant($alert-warning-bg, $alert-warning-border, $alert-warning-text);
|
||||
}
|
||||
.alert-danger {
|
||||
@include alert-variant($alert-danger-bg, $alert-danger-border, $alert-danger-text);
|
||||
}
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
//
|
||||
// Badges
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
// Base classes
|
||||
.badge {
|
||||
display: inline-block;
|
||||
min-width: 10px;
|
||||
padding: 3px 7px;
|
||||
font-size: $font-size-small;
|
||||
font-weight: $badge-font-weight;
|
||||
color: $badge-color;
|
||||
line-height: $badge-line-height;
|
||||
vertical-align: baseline;
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
background-color: $badge-bg;
|
||||
border-radius: $badge-border-radius;
|
||||
|
||||
// Empty badges collapse automatically (not available in IE8)
|
||||
&:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
// Quick fix for badges in buttons
|
||||
.btn & {
|
||||
position: relative;
|
||||
top: -1px;
|
||||
}
|
||||
.btn-xs & {
|
||||
top: 0;
|
||||
padding: 1px 5px;
|
||||
}
|
||||
}
|
||||
|
||||
// Hover state, but only for links
|
||||
a.badge {
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $badge-link-hover-color;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
// Account for counters in navs
|
||||
a.list-group-item.active > .badge,
|
||||
.nav-pills > .active > a > .badge {
|
||||
color: $badge-active-color;
|
||||
background-color: $badge-active-bg;
|
||||
}
|
||||
.nav-pills > li > a > .badge {
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
//
|
||||
// Breadcrumbs
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
.breadcrumb {
|
||||
padding: $breadcrumb-padding-vertical $breadcrumb-padding-horizontal;
|
||||
margin-bottom: $line-height-computed;
|
||||
list-style: none;
|
||||
background-color: $breadcrumb-bg;
|
||||
border-radius: $border-radius-base;
|
||||
|
||||
> li {
|
||||
display: inline-block;
|
||||
|
||||
+ li:before {
|
||||
content: "#{$breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space
|
||||
padding: 0 5px;
|
||||
color: $breadcrumb-color;
|
||||
}
|
||||
}
|
||||
|
||||
> .active {
|
||||
color: $breadcrumb-active-color;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,226 +0,0 @@
|
|||
//
|
||||
// Button groups
|
||||
// --------------------------------------------------
|
||||
|
||||
// Make the div behave like a button
|
||||
.btn-group,
|
||||
.btn-group-vertical {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: middle; // match .btn alignment given font-size hack above
|
||||
> .btn {
|
||||
position: relative;
|
||||
float: left;
|
||||
// Bring the "active" button to the front
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active,
|
||||
&.active {
|
||||
z-index: 2;
|
||||
}
|
||||
&:focus {
|
||||
// Remove focus outline when dropdown JS adds it after closing the menu
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Prevent double borders when buttons are next to each other
|
||||
.btn-group {
|
||||
.btn + .btn,
|
||||
.btn + .btn-group,
|
||||
.btn-group + .btn,
|
||||
.btn-group + .btn-group {
|
||||
margin-left: -1px;
|
||||
}
|
||||
}
|
||||
|
||||
// Optional: Group multiple button groups together for a toolbar
|
||||
.btn-toolbar {
|
||||
margin-left: -5px; // Offset the first child's margin
|
||||
@include clearfix();
|
||||
|
||||
.btn-group,
|
||||
.input-group {
|
||||
float: left;
|
||||
}
|
||||
> .btn,
|
||||
> .btn-group,
|
||||
> .input-group {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
|
||||
.btn-group > .btn:first-child {
|
||||
margin-left: 0;
|
||||
&:not(:last-child):not(.dropdown-toggle) {
|
||||
@include border-right-radius(0);
|
||||
}
|
||||
}
|
||||
// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
|
||||
.btn-group > .btn:last-child:not(:first-child),
|
||||
.btn-group > .dropdown-toggle:not(:first-child) {
|
||||
@include border-left-radius(0);
|
||||
}
|
||||
|
||||
// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)
|
||||
.btn-group > .btn-group {
|
||||
float: left;
|
||||
}
|
||||
.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
|
||||
border-radius: 0;
|
||||
}
|
||||
.btn-group > .btn-group:first-child {
|
||||
> .btn:last-child,
|
||||
> .dropdown-toggle {
|
||||
@include border-right-radius(0);
|
||||
}
|
||||
}
|
||||
.btn-group > .btn-group:last-child > .btn:first-child {
|
||||
@include border-left-radius(0);
|
||||
}
|
||||
|
||||
// On active and open, don't show outline
|
||||
.btn-group .dropdown-toggle:active,
|
||||
.btn-group.open .dropdown-toggle {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
|
||||
// Sizing
|
||||
//
|
||||
// Remix the default button sizing classes into new ones for easier manipulation.
|
||||
|
||||
.btn-group-xs > .btn { @extend .btn-xs; }
|
||||
.btn-group-sm > .btn { @extend .btn-sm; }
|
||||
.btn-group-lg > .btn { @extend .btn-lg; }
|
||||
|
||||
|
||||
// Split button dropdowns
|
||||
// ----------------------
|
||||
|
||||
// Give the line between buttons some depth
|
||||
.btn-group > .btn + .dropdown-toggle {
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
.btn-group > .btn-lg + .dropdown-toggle {
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
// The clickable button for toggling the menu
|
||||
// Remove the gradient and set the same inset shadow as the :active state
|
||||
.btn-group.open .dropdown-toggle {
|
||||
@include box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
|
||||
|
||||
// Show no shadow for `.btn-link` since it has no other button styles.
|
||||
&.btn-link {
|
||||
@include box-shadow(none);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Reposition the caret
|
||||
.btn .caret {
|
||||
margin-left: 0;
|
||||
}
|
||||
// Carets in other button sizes
|
||||
.btn-lg .caret {
|
||||
border-width: $caret-width-large $caret-width-large 0;
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
// Upside down carets for .dropup
|
||||
.dropup .btn-lg .caret {
|
||||
border-width: 0 $caret-width-large $caret-width-large;
|
||||
}
|
||||
|
||||
|
||||
// Vertical button groups
|
||||
// ----------------------
|
||||
|
||||
.btn-group-vertical {
|
||||
> .btn,
|
||||
> .btn-group,
|
||||
> .btn-group > .btn {
|
||||
display: block;
|
||||
float: none;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
// Clear floats so dropdown menus can be properly placed
|
||||
> .btn-group {
|
||||
@include clearfix();
|
||||
> .btn {
|
||||
float: none;
|
||||
}
|
||||
}
|
||||
|
||||
> .btn + .btn,
|
||||
> .btn + .btn-group,
|
||||
> .btn-group + .btn,
|
||||
> .btn-group + .btn-group {
|
||||
margin-top: -1px;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-group-vertical > .btn {
|
||||
&:not(:first-child):not(:last-child) {
|
||||
border-radius: 0;
|
||||
}
|
||||
&:first-child:not(:last-child) {
|
||||
border-top-right-radius: $border-radius-base;
|
||||
@include border-bottom-radius(0);
|
||||
}
|
||||
&:last-child:not(:first-child) {
|
||||
border-bottom-left-radius: $border-radius-base;
|
||||
@include border-top-radius(0);
|
||||
}
|
||||
}
|
||||
.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
|
||||
border-radius: 0;
|
||||
}
|
||||
.btn-group-vertical > .btn-group:first-child:not(:last-child) {
|
||||
> .btn:last-child,
|
||||
> .dropdown-toggle {
|
||||
@include border-bottom-radius(0);
|
||||
}
|
||||
}
|
||||
.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
|
||||
@include border-top-radius(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Justified button groups
|
||||
// ----------------------
|
||||
|
||||
.btn-group-justified {
|
||||
display: table;
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
border-collapse: separate;
|
||||
> .btn,
|
||||
> .btn-group {
|
||||
float: none;
|
||||
display: table-cell;
|
||||
width: 1%;
|
||||
}
|
||||
> .btn-group .btn {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Checkbox and radio options
|
||||
[data-toggle="buttons"] > .btn > input[type="radio"],
|
||||
[data-toggle="buttons"] > .btn > input[type="checkbox"] {
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -1,159 +0,0 @@
|
|||
//
|
||||
// Buttons
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
// Base styles
|
||||
// --------------------------------------------------
|
||||
|
||||
.btn {
|
||||
display: inline-block;
|
||||
margin-bottom: 0; // For input.btn
|
||||
font-weight: $btn-font-weight;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
|
||||
border: 1px solid transparent;
|
||||
white-space: nowrap;
|
||||
@include button-size($padding-base-vertical, $padding-base-horizontal, $font-size-base, $line-height-base, $border-radius-base);
|
||||
@include user-select(none);
|
||||
|
||||
&,
|
||||
&:active,
|
||||
&.active {
|
||||
&:focus {
|
||||
@include tab-focus();
|
||||
}
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $btn-default-color;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.active {
|
||||
outline: 0;
|
||||
background-image: none;
|
||||
@include box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
|
||||
}
|
||||
|
||||
&.disabled,
|
||||
&[disabled],
|
||||
fieldset[disabled] & {
|
||||
cursor: not-allowed;
|
||||
pointer-events: none; // Future-proof disabling of clicks
|
||||
@include opacity(.65);
|
||||
@include box-shadow(none);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Alternate buttons
|
||||
// --------------------------------------------------
|
||||
|
||||
.btn-default {
|
||||
@include button-variant($btn-default-color, $btn-default-bg, $btn-default-border);
|
||||
}
|
||||
.btn-primary {
|
||||
@include button-variant($btn-primary-color, $btn-primary-bg, $btn-primary-border);
|
||||
}
|
||||
// Success appears as green
|
||||
.btn-success {
|
||||
@include button-variant($btn-success-color, $btn-success-bg, $btn-success-border);
|
||||
}
|
||||
// Info appears as blue-green
|
||||
.btn-info {
|
||||
@include button-variant($btn-info-color, $btn-info-bg, $btn-info-border);
|
||||
}
|
||||
// Warning appears as orange
|
||||
.btn-warning {
|
||||
@include button-variant($btn-warning-color, $btn-warning-bg, $btn-warning-border);
|
||||
}
|
||||
// Danger and error appear as red
|
||||
.btn-danger {
|
||||
@include button-variant($btn-danger-color, $btn-danger-bg, $btn-danger-border);
|
||||
}
|
||||
|
||||
|
||||
// Link buttons
|
||||
// -------------------------
|
||||
|
||||
// Make a button look and behave like a link
|
||||
.btn-link {
|
||||
color: $link-color;
|
||||
font-weight: normal;
|
||||
cursor: pointer;
|
||||
border-radius: 0;
|
||||
|
||||
&,
|
||||
&:active,
|
||||
&[disabled],
|
||||
fieldset[disabled] & {
|
||||
background-color: transparent;
|
||||
@include box-shadow(none);
|
||||
}
|
||||
&,
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
border-color: transparent;
|
||||
}
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $link-hover-color;
|
||||
text-decoration: underline;
|
||||
background-color: transparent;
|
||||
}
|
||||
&[disabled],
|
||||
fieldset[disabled] & {
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $btn-link-disabled-color;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Button Sizes
|
||||
// --------------------------------------------------
|
||||
|
||||
.btn-lg {
|
||||
// line-height: ensure even-numbered height of button next to large input
|
||||
@include button-size($padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $border-radius-large);
|
||||
}
|
||||
.btn-sm {
|
||||
// line-height: ensure proper height of button next to small input
|
||||
@include button-size($padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $border-radius-small);
|
||||
}
|
||||
.btn-xs {
|
||||
@include button-size($padding-xs-vertical, $padding-xs-horizontal, $font-size-small, $line-height-small, $border-radius-small);
|
||||
}
|
||||
|
||||
|
||||
// Block button
|
||||
// --------------------------------------------------
|
||||
|
||||
.btn-block {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
// Vertically space out multiple block buttons
|
||||
.btn-block + .btn-block {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
// Specificity overrides
|
||||
input[type="submit"],
|
||||
input[type="reset"],
|
||||
input[type="button"] {
|
||||
&.btn-block {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,232 +0,0 @@
|
|||
//
|
||||
// Carousel
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
// Wrapper for the slide container and indicators
|
||||
.carousel {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.carousel-inner {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
|
||||
> .item {
|
||||
display: none;
|
||||
position: relative;
|
||||
@include transition(.6s ease-in-out left);
|
||||
|
||||
// Account for jankitude on images
|
||||
> img,
|
||||
> a > img {
|
||||
@include img-responsive();
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
|
||||
> .active,
|
||||
> .next,
|
||||
> .prev { display: block; }
|
||||
|
||||
> .active {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
> .next,
|
||||
> .prev {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
> .next {
|
||||
left: 100%;
|
||||
}
|
||||
> .prev {
|
||||
left: -100%;
|
||||
}
|
||||
> .next.left,
|
||||
> .prev.right {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
> .active.left {
|
||||
left: -100%;
|
||||
}
|
||||
> .active.right {
|
||||
left: 100%;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Left/right controls for nav
|
||||
// ---------------------------
|
||||
|
||||
.carousel-control {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: $carousel-control-width;
|
||||
@include opacity($carousel-control-opacity);
|
||||
font-size: $carousel-control-font-size;
|
||||
color: $carousel-control-color;
|
||||
text-align: center;
|
||||
text-shadow: $carousel-text-shadow;
|
||||
// We can't have this transition here because WebKit cancels the carousel
|
||||
// animation if you trip this while in the middle of another animation.
|
||||
|
||||
// Set gradients for backgrounds
|
||||
&.left {
|
||||
@include gradient-horizontal($start-color: rgba(0,0,0,.5), $end-color: rgba(0,0,0,.0001));
|
||||
}
|
||||
&.right {
|
||||
left: auto;
|
||||
right: 0;
|
||||
@include gradient-horizontal($start-color: rgba(0,0,0,.0001), $end-color: rgba(0,0,0,.5));
|
||||
}
|
||||
|
||||
// Hover/focus state
|
||||
&:hover,
|
||||
&:focus {
|
||||
outline: none;
|
||||
color: $carousel-control-color;
|
||||
text-decoration: none;
|
||||
@include opacity(.9);
|
||||
}
|
||||
|
||||
// Toggles
|
||||
.icon-prev,
|
||||
.icon-next,
|
||||
.glyphicon-chevron-left,
|
||||
.glyphicon-chevron-right {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
z-index: 5;
|
||||
display: inline-block;
|
||||
}
|
||||
.icon-prev,
|
||||
.glyphicon-chevron-left {
|
||||
left: 50%;
|
||||
}
|
||||
.icon-next,
|
||||
.glyphicon-chevron-right {
|
||||
right: 50%;
|
||||
}
|
||||
.icon-prev,
|
||||
.icon-next {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-top: -10px;
|
||||
margin-left: -10px;
|
||||
font-family: serif;
|
||||
}
|
||||
|
||||
.icon-prev {
|
||||
&:before {
|
||||
content: '\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)
|
||||
}
|
||||
}
|
||||
.icon-next {
|
||||
&:before {
|
||||
content: '\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Optional indicator pips
|
||||
//
|
||||
// Add an unordered list with the following class and add a list item for each
|
||||
// slide your carousel holds.
|
||||
|
||||
.carousel-indicators {
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
left: 50%;
|
||||
z-index: 15;
|
||||
width: 60%;
|
||||
margin-left: -30%;
|
||||
padding-left: 0;
|
||||
list-style: none;
|
||||
text-align: center;
|
||||
|
||||
li {
|
||||
display: inline-block;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
margin: 1px;
|
||||
text-indent: -999px;
|
||||
border: 1px solid $carousel-indicator-border-color;
|
||||
border-radius: 10px;
|
||||
cursor: pointer;
|
||||
|
||||
// IE8-9 hack for event handling
|
||||
//
|
||||
// Internet Explorer 8-9 does not support clicks on elements without a set
|
||||
// `background-color`. We cannot use `filter` since that's not viewed as a
|
||||
// background color by the browser. Thus, a hack is needed.
|
||||
//
|
||||
// For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we
|
||||
// set alpha transparency for the best results possible.
|
||||
background-color: #000 \9; // IE8
|
||||
background-color: rgba(0,0,0,0); // IE9
|
||||
}
|
||||
.active {
|
||||
margin: 0;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background-color: $carousel-indicator-active-bg;
|
||||
}
|
||||
}
|
||||
|
||||
// Optional captions
|
||||
// -----------------------------
|
||||
// Hidden by default for smaller viewports
|
||||
.carousel-caption {
|
||||
position: absolute;
|
||||
left: 15%;
|
||||
right: 15%;
|
||||
bottom: 20px;
|
||||
z-index: 10;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
color: $carousel-caption-color;
|
||||
text-align: center;
|
||||
text-shadow: $carousel-text-shadow;
|
||||
& .btn {
|
||||
text-shadow: none; // No shadow for button elements in carousel-caption
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Scale up controls for tablets and up
|
||||
@media screen and (min-width: $screen-sm-min) {
|
||||
|
||||
// Scale up the controls a smidge
|
||||
.carousel-control {
|
||||
.glyphicon-chevron-left,
|
||||
.glyphicon-chevron-right,
|
||||
.icon-prev,
|
||||
.icon-next {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
margin-top: -15px;
|
||||
margin-left: -15px;
|
||||
font-size: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
// Show and left align the captions
|
||||
.carousel-caption {
|
||||
left: 20%;
|
||||
right: 20%;
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
|
||||
// Move up the indicators
|
||||
.carousel-indicators {
|
||||
bottom: 20px;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
//
|
||||
// Close icons
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
.close {
|
||||
float: right;
|
||||
font-size: ($font-size-base * 1.5);
|
||||
font-weight: $close-font-weight;
|
||||
line-height: 1;
|
||||
color: $close-color;
|
||||
text-shadow: $close-text-shadow;
|
||||
@include opacity(.2);
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $close-color;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
@include opacity(.5);
|
||||
}
|
||||
|
||||
// [converter] extracted button& to button.close
|
||||
}
|
||||
|
||||
// Additional properties for button version
|
||||
// iOS requires the button element instead of an anchor tag.
|
||||
// If you want the anchor version, it requires `href="#"`.
|
||||
button.close {
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
//
|
||||
// Code (inline and block)
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
// Inline and block code styles
|
||||
code,
|
||||
kbd,
|
||||
pre,
|
||||
samp {
|
||||
font-family: $font-family-monospace;
|
||||
}
|
||||
|
||||
// Inline code
|
||||
code {
|
||||
padding: 2px 4px;
|
||||
font-size: 90%;
|
||||
color: $code-color;
|
||||
background-color: $code-bg;
|
||||
white-space: nowrap;
|
||||
border-radius: $border-radius-base;
|
||||
}
|
||||
|
||||
// User input typically entered via keyboard
|
||||
kbd {
|
||||
padding: 2px 4px;
|
||||
font-size: 90%;
|
||||
color: $kbd-color;
|
||||
background-color: $kbd-bg;
|
||||
border-radius: $border-radius-small;
|
||||
box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
|
||||
}
|
||||
|
||||
// Blocks of code
|
||||
pre {
|
||||
display: block;
|
||||
padding: (($line-height-computed - 1) / 2);
|
||||
margin: 0 0 ($line-height-computed / 2);
|
||||
font-size: ($font-size-base - 1); // 14px to 13px
|
||||
line-height: $line-height-base;
|
||||
word-break: break-all;
|
||||
word-wrap: break-word;
|
||||
color: $pre-color;
|
||||
background-color: $pre-bg;
|
||||
border: 1px solid $pre-border-color;
|
||||
border-radius: $border-radius-base;
|
||||
|
||||
// Account for some code outputs that place code tags in pre tags
|
||||
code {
|
||||
padding: 0;
|
||||
font-size: inherit;
|
||||
color: inherit;
|
||||
white-space: pre-wrap;
|
||||
background-color: transparent;
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Enable scrollable blocks of code
|
||||
.pre-scrollable {
|
||||
max-height: $pre-scrollable-max-height;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
//
|
||||
// Component animations
|
||||
// --------------------------------------------------
|
||||
|
||||
// Heads up!
|
||||
//
|
||||
// We don't use the `.opacity()` mixin here since it causes a bug with text
|
||||
// fields in IE7-8. Source: https://github.com/twitter/bootstrap/pull/3552.
|
||||
|
||||
.fade {
|
||||
opacity: 0;
|
||||
@include transition(opacity .15s linear);
|
||||
&.in {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.collapse {
|
||||
display: none;
|
||||
&.in {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
.collapsing {
|
||||
position: relative;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
@include transition(height .35s ease);
|
||||
}
|
||||
|
|
@ -1,213 +0,0 @@
|
|||
//
|
||||
// Dropdown menus
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
// Dropdown arrow/caret
|
||||
.caret {
|
||||
display: inline-block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
margin-left: 2px;
|
||||
vertical-align: middle;
|
||||
border-top: $caret-width-base solid;
|
||||
border-right: $caret-width-base solid transparent;
|
||||
border-left: $caret-width-base solid transparent;
|
||||
}
|
||||
|
||||
// The dropdown wrapper (div)
|
||||
.dropdown {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
// Prevent the focus on the dropdown toggle when closing dropdowns
|
||||
.dropdown-toggle:focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
// The dropdown menu (ul)
|
||||
.dropdown-menu {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
z-index: $zindex-dropdown;
|
||||
display: none; // none by default, but block on "open" of the menu
|
||||
float: left;
|
||||
min-width: 160px;
|
||||
padding: 5px 0;
|
||||
margin: 2px 0 0; // override default ul
|
||||
list-style: none;
|
||||
font-size: $font-size-base;
|
||||
background-color: $dropdown-bg;
|
||||
border: 1px solid $dropdown-fallback-border; // IE8 fallback
|
||||
border: 1px solid $dropdown-border;
|
||||
border-radius: $border-radius-base;
|
||||
@include box-shadow(0 6px 12px rgba(0,0,0,.175));
|
||||
background-clip: padding-box;
|
||||
|
||||
// Aligns the dropdown menu to right
|
||||
//
|
||||
// Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`
|
||||
&.pull-right {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
|
||||
// Dividers (basically an hr) within the dropdown
|
||||
.divider {
|
||||
@include nav-divider($dropdown-divider-bg);
|
||||
}
|
||||
|
||||
// Links within the dropdown menu
|
||||
> li > a {
|
||||
display: block;
|
||||
padding: 3px 20px;
|
||||
clear: both;
|
||||
font-weight: normal;
|
||||
line-height: $line-height-base;
|
||||
color: $dropdown-link-color;
|
||||
white-space: nowrap; // prevent links from randomly breaking onto new lines
|
||||
}
|
||||
}
|
||||
|
||||
// Hover/Focus state
|
||||
.dropdown-menu > li > a {
|
||||
&:hover,
|
||||
&:focus {
|
||||
text-decoration: none;
|
||||
color: $dropdown-link-hover-color;
|
||||
background-color: $dropdown-link-hover-bg;
|
||||
}
|
||||
}
|
||||
|
||||
// Active state
|
||||
.dropdown-menu > .active > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $dropdown-link-active-color;
|
||||
text-decoration: none;
|
||||
outline: 0;
|
||||
background-color: $dropdown-link-active-bg;
|
||||
}
|
||||
}
|
||||
|
||||
// Disabled state
|
||||
//
|
||||
// Gray out text and ensure the hover/focus state remains gray
|
||||
|
||||
.dropdown-menu > .disabled > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $dropdown-link-disabled-color;
|
||||
}
|
||||
}
|
||||
// Nuke hover/focus effects
|
||||
.dropdown-menu > .disabled > a {
|
||||
&:hover,
|
||||
&:focus {
|
||||
text-decoration: none;
|
||||
background-color: transparent;
|
||||
background-image: none; // Remove CSS gradient
|
||||
@include reset-filter();
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
// Open state for the dropdown
|
||||
.open {
|
||||
// Show the menu
|
||||
> .dropdown-menu {
|
||||
display: block;
|
||||
}
|
||||
|
||||
// Remove the outline when :focus is triggered
|
||||
> a {
|
||||
outline: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Menu positioning
|
||||
//
|
||||
// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown
|
||||
// menu with the parent.
|
||||
.dropdown-menu-right {
|
||||
left: auto; // Reset the default from `.dropdown-menu`
|
||||
right: 0;
|
||||
}
|
||||
// With v3, we enabled auto-flipping if you have a dropdown within a right
|
||||
// aligned nav component. To enable the undoing of that, we provide an override
|
||||
// to restore the default dropdown menu alignment.
|
||||
//
|
||||
// This is only for left-aligning a dropdown menu within a `.navbar-right` or
|
||||
// `.pull-right` nav component.
|
||||
.dropdown-menu-left {
|
||||
left: 0;
|
||||
right: auto;
|
||||
}
|
||||
|
||||
// Dropdown section headers
|
||||
.dropdown-header {
|
||||
display: block;
|
||||
padding: 3px 20px;
|
||||
font-size: $font-size-small;
|
||||
line-height: $line-height-base;
|
||||
color: $dropdown-header-color;
|
||||
}
|
||||
|
||||
// Backdrop to catch body clicks on mobile, etc.
|
||||
.dropdown-backdrop {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
top: 0;
|
||||
z-index: ($zindex-dropdown - 10);
|
||||
}
|
||||
|
||||
// Right aligned dropdowns
|
||||
.pull-right > .dropdown-menu {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
|
||||
// Allow for dropdowns to go bottom up (aka, dropup-menu)
|
||||
//
|
||||
// Just add .dropup after the standard .dropdown class and you're set, bro.
|
||||
// TODO: abstract this so that the navbar fixed styles are not placed here?
|
||||
|
||||
.dropup,
|
||||
.navbar-fixed-bottom .dropdown {
|
||||
// Reverse the caret
|
||||
.caret {
|
||||
border-top: 0;
|
||||
border-bottom: $caret-width-base solid;
|
||||
content: "";
|
||||
}
|
||||
// Different positioning for bottom up menu
|
||||
.dropdown-menu {
|
||||
top: auto;
|
||||
bottom: 100%;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Component alignment
|
||||
//
|
||||
// Reiterate per navbar.less and the modified component alignment there.
|
||||
|
||||
@media (min-width: $grid-float-breakpoint) {
|
||||
.navbar-right {
|
||||
.dropdown-menu {
|
||||
right: 0; left: auto;
|
||||
}
|
||||
// Necessary for overrides of the default right aligned menu.
|
||||
// Will remove come v4 in all likelihood.
|
||||
.dropdown-menu-left {
|
||||
left: 0; right: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,436 +0,0 @@
|
|||
//
|
||||
// Forms
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
// Normalize non-controls
|
||||
//
|
||||
// Restyle and baseline non-control form elements.
|
||||
|
||||
fieldset {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
// Chrome and Firefox set a `min-width: -webkit-min-content;` on fieldsets,
|
||||
// so we reset that to ensure it behaves more like a standard block element.
|
||||
// See https://github.com/twbs/bootstrap/issues/12359.
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
legend {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: $line-height-computed;
|
||||
font-size: ($font-size-base * 1.5);
|
||||
line-height: inherit;
|
||||
color: $legend-color;
|
||||
border: 0;
|
||||
border-bottom: 1px solid $legend-border-color;
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
margin-bottom: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
// Normalize form controls
|
||||
//
|
||||
// While most of our form styles require extra classes, some basic normalization
|
||||
// is required to ensure optimum display with or without those classes to better
|
||||
// address browser inconsistencies.
|
||||
|
||||
// Override content-box in Normalize (* isn't specific enough)
|
||||
input[type="search"] {
|
||||
@include box-sizing(border-box);
|
||||
}
|
||||
|
||||
// Position radios and checkboxes better
|
||||
input[type="radio"],
|
||||
input[type="checkbox"] {
|
||||
margin: 4px 0 0;
|
||||
margin-top: 1px \9; /* IE8-9 */
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
// Set the height of file controls to match text inputs
|
||||
input[type="file"] {
|
||||
display: block;
|
||||
}
|
||||
|
||||
// Make range inputs behave like textual form controls
|
||||
input[type="range"] {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
// Make multiple select elements height not fixed
|
||||
select[multiple],
|
||||
select[size] {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
// Focus for file, radio, and checkbox
|
||||
input[type="file"]:focus,
|
||||
input[type="radio"]:focus,
|
||||
input[type="checkbox"]:focus {
|
||||
@include tab-focus();
|
||||
}
|
||||
|
||||
// Adjust output element
|
||||
output {
|
||||
display: block;
|
||||
padding-top: ($padding-base-vertical + 1);
|
||||
font-size: $font-size-base;
|
||||
line-height: $line-height-base;
|
||||
color: $input-color;
|
||||
}
|
||||
|
||||
|
||||
// Common form controls
|
||||
//
|
||||
// Shared size and type resets for form controls. Apply `.form-control` to any
|
||||
// of the following form controls:
|
||||
//
|
||||
// select
|
||||
// textarea
|
||||
// input[type="text"]
|
||||
// input[type="password"]
|
||||
// input[type="datetime"]
|
||||
// input[type="datetime-local"]
|
||||
// input[type="date"]
|
||||
// input[type="month"]
|
||||
// input[type="time"]
|
||||
// input[type="week"]
|
||||
// input[type="number"]
|
||||
// input[type="email"]
|
||||
// input[type="url"]
|
||||
// input[type="search"]
|
||||
// input[type="tel"]
|
||||
// input[type="color"]
|
||||
|
||||
.form-control {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: $input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
|
||||
padding: $padding-base-vertical $padding-base-horizontal;
|
||||
font-size: $font-size-base;
|
||||
line-height: $line-height-base;
|
||||
color: $input-color;
|
||||
background-color: $input-bg;
|
||||
background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
|
||||
border: 1px solid $input-border;
|
||||
border-radius: $input-border-radius;
|
||||
@include box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
|
||||
@include transition(border-color ease-in-out .15s, box-shadow ease-in-out .15s);
|
||||
|
||||
// Customize the `:focus` state to imitate native WebKit styles.
|
||||
@include form-control-focus();
|
||||
|
||||
// Placeholder
|
||||
@include placeholder();
|
||||
|
||||
// Disabled and read-only inputs
|
||||
//
|
||||
// HTML5 says that controls under a fieldset > legend:first-child won't be
|
||||
// disabled if the fieldset is disabled. Due to implementation difficulty, we
|
||||
// don't honor that edge case; we style them as disabled anyway.
|
||||
&[disabled],
|
||||
&[readonly],
|
||||
fieldset[disabled] & {
|
||||
cursor: not-allowed;
|
||||
background-color: $input-bg-disabled;
|
||||
opacity: 1; // iOS fix for unreadable disabled content
|
||||
}
|
||||
|
||||
// [converter] extracted textarea& to textarea.form-control
|
||||
}
|
||||
|
||||
// Reset height for `textarea`s
|
||||
textarea.form-control {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
|
||||
// Search inputs in iOS
|
||||
//
|
||||
// This overrides the extra rounded corners on search inputs in iOS so that our
|
||||
// `.form-control` class can properly style them. Note that this cannot simply
|
||||
// be added to `.form-control` as it's not specific enough. For details, see
|
||||
// https://github.com/twbs/bootstrap/issues/11586.
|
||||
|
||||
input[type="search"] {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
|
||||
// Special styles for iOS date input
|
||||
//
|
||||
// In Mobile Safari, date inputs require a pixel line-height that matches the
|
||||
// given height of the input.
|
||||
|
||||
input[type="date"] {
|
||||
line-height: $input-height-base;
|
||||
}
|
||||
|
||||
|
||||
// Form groups
|
||||
//
|
||||
// Designed to help with the organization and spacing of vertical forms. For
|
||||
// horizontal forms, use the predefined grid classes.
|
||||
|
||||
.form-group {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
|
||||
// Checkboxes and radios
|
||||
//
|
||||
// Indent the labels to position radios/checkboxes as hanging controls.
|
||||
|
||||
.radio,
|
||||
.checkbox {
|
||||
display: block;
|
||||
min-height: $line-height-computed; // clear the floating input if there is no label text
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
padding-left: 20px;
|
||||
label {
|
||||
display: inline;
|
||||
font-weight: normal;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.radio input[type="radio"],
|
||||
.radio-inline input[type="radio"],
|
||||
.checkbox input[type="checkbox"],
|
||||
.checkbox-inline input[type="checkbox"] {
|
||||
float: left;
|
||||
margin-left: -20px;
|
||||
}
|
||||
.radio + .radio,
|
||||
.checkbox + .checkbox {
|
||||
margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing
|
||||
}
|
||||
|
||||
// Radios and checkboxes on same line
|
||||
.radio-inline,
|
||||
.checkbox-inline {
|
||||
display: inline-block;
|
||||
padding-left: 20px;
|
||||
margin-bottom: 0;
|
||||
vertical-align: middle;
|
||||
font-weight: normal;
|
||||
cursor: pointer;
|
||||
}
|
||||
.radio-inline + .radio-inline,
|
||||
.checkbox-inline + .checkbox-inline {
|
||||
margin-top: 0;
|
||||
margin-left: 10px; // space out consecutive inline controls
|
||||
}
|
||||
|
||||
// Apply same disabled cursor tweak as for inputs
|
||||
//
|
||||
// Note: Neither radios nor checkboxes can be readonly.
|
||||
input[type="radio"],
|
||||
input[type="checkbox"],
|
||||
.radio,
|
||||
.radio-inline,
|
||||
.checkbox,
|
||||
.checkbox-inline {
|
||||
&[disabled],
|
||||
fieldset[disabled] & {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Form control sizing
|
||||
//
|
||||
// Build on `.form-control` with modifier classes to decrease or increase the
|
||||
// height and font-size of form controls.
|
||||
|
||||
@include input-size('.input-sm', $input-height-small, $padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $border-radius-small);
|
||||
|
||||
@include input-size('.input-lg', $input-height-large, $padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $border-radius-large);
|
||||
|
||||
|
||||
// Form control feedback states
|
||||
//
|
||||
// Apply contextual and semantic states to individual form controls.
|
||||
|
||||
.has-feedback {
|
||||
// Enable absolute positioning
|
||||
position: relative;
|
||||
|
||||
// Ensure icons don't overlap text
|
||||
.form-control {
|
||||
padding-right: ($input-height-base * 1.25);
|
||||
}
|
||||
|
||||
// Feedback icon (requires .glyphicon classes)
|
||||
.form-control-feedback {
|
||||
position: absolute;
|
||||
top: ($line-height-computed + 5); // Height of the `label` and its margin
|
||||
right: 0;
|
||||
display: block;
|
||||
width: $input-height-base;
|
||||
height: $input-height-base;
|
||||
line-height: $input-height-base;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
// Feedback states
|
||||
.has-success {
|
||||
@include form-control-validation($state-success-text, $state-success-text, $state-success-bg);
|
||||
}
|
||||
.has-warning {
|
||||
@include form-control-validation($state-warning-text, $state-warning-text, $state-warning-bg);
|
||||
}
|
||||
.has-error {
|
||||
@include form-control-validation($state-danger-text, $state-danger-text, $state-danger-bg);
|
||||
}
|
||||
|
||||
|
||||
// Static form control text
|
||||
//
|
||||
// Apply class to a `p` element to make any string of text align with labels in
|
||||
// a horizontal form layout.
|
||||
|
||||
.form-control-static {
|
||||
margin-bottom: 0; // Remove default margin from `p`
|
||||
}
|
||||
|
||||
|
||||
// Help text
|
||||
//
|
||||
// Apply to any element you wish to create light text for placement immediately
|
||||
// below a form control. Use for general help, formatting, or instructional text.
|
||||
|
||||
.help-block {
|
||||
display: block; // account for any element using help-block
|
||||
margin-top: 5px;
|
||||
margin-bottom: 10px;
|
||||
color: lighten($text-color, 25%); // lighten the text some for contrast
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Inline forms
|
||||
//
|
||||
// Make forms appear inline(-block) by adding the `.form-inline` class. Inline
|
||||
// forms begin stacked on extra small (mobile) devices and then go inline when
|
||||
// viewports reach <768px.
|
||||
//
|
||||
// Requires wrapping inputs and labels with `.form-group` for proper display of
|
||||
// default HTML form controls and our custom form controls (e.g., input groups).
|
||||
//
|
||||
// Heads up! This is mixin-ed into `.navbar-form` in navbars.less.
|
||||
|
||||
.form-inline {
|
||||
|
||||
// Kick in the inline
|
||||
@media (min-width: $screen-sm-min) {
|
||||
// Inline-block all the things for "inline"
|
||||
.form-group {
|
||||
display: inline-block;
|
||||
margin-bottom: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
// In navbar-form, allow folks to *not* use `.form-group`
|
||||
.form-control {
|
||||
display: inline-block;
|
||||
width: auto; // Prevent labels from stacking above inputs in `.form-group`
|
||||
vertical-align: middle;
|
||||
}
|
||||
// Input groups need that 100% width though
|
||||
.input-group > .form-control {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.control-label {
|
||||
margin-bottom: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
// Remove default margin on radios/checkboxes that were used for stacking, and
|
||||
// then undo the floating of radios and checkboxes to match (which also avoids
|
||||
// a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969).
|
||||
.radio,
|
||||
.checkbox {
|
||||
display: inline-block;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
padding-left: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.radio input[type="radio"],
|
||||
.checkbox input[type="checkbox"] {
|
||||
float: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
// Validation states
|
||||
//
|
||||
// Reposition the icon because it's now within a grid column and columns have
|
||||
// `position: relative;` on them. Also accounts for the grid gutter padding.
|
||||
.has-feedback .form-control-feedback {
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Horizontal forms
|
||||
//
|
||||
// Horizontal forms are built on grid classes and allow you to create forms with
|
||||
// labels on the left and inputs on the right.
|
||||
|
||||
.form-horizontal {
|
||||
|
||||
// Consistent vertical alignment of labels, radios, and checkboxes
|
||||
.control-label,
|
||||
.radio,
|
||||
.checkbox,
|
||||
.radio-inline,
|
||||
.checkbox-inline {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
padding-top: ($padding-base-vertical + 1); // Default padding plus a border
|
||||
}
|
||||
// Account for padding we're adding to ensure the alignment and of help text
|
||||
// and other content below items
|
||||
.radio,
|
||||
.checkbox {
|
||||
min-height: ($line-height-computed + ($padding-base-vertical + 1));
|
||||
}
|
||||
|
||||
// Make form groups behave like rows
|
||||
.form-group {
|
||||
@include make-row();
|
||||
}
|
||||
|
||||
.form-control-static {
|
||||
padding-top: ($padding-base-vertical + 1);
|
||||
}
|
||||
|
||||
// Only right align form labels here when the columns stop stacking
|
||||
@media (min-width: $screen-sm-min) {
|
||||
.control-label {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
// Validation states
|
||||
//
|
||||
// Reposition the icon because it's now within a grid column and columns have
|
||||
// `position: relative;` on them. Also accounts for the grid gutter padding.
|
||||
.has-feedback .form-control-feedback {
|
||||
top: 0;
|
||||
right: ($grid-gutter-width / 2);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,233 +0,0 @@
|
|||
//
|
||||
// Glyphicons for Bootstrap
|
||||
//
|
||||
// Since icons are fonts, they can be placed anywhere text is placed and are
|
||||
// thus automatically sized to match the surrounding child. To use, create an
|
||||
// inline element with the appropriate classes, like so:
|
||||
//
|
||||
// <a href="#"><span class="glyphicon glyphicon-star"></span> Star</a>
|
||||
|
||||
// Import the fonts
|
||||
@font-face {
|
||||
font-family: 'Glyphicons Halflings';
|
||||
src: url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.eot'), '#{$icon-font-path}#{$icon-font-name}.eot'));
|
||||
src: url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.eot?#iefix'), '#{$icon-font-path}#{$icon-font-name}.eot?#iefix')) format('embedded-opentype'),
|
||||
url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.woff'), '#{$icon-font-path}#{$icon-font-name}.woff')) format('woff'),
|
||||
url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.ttf'), '#{$icon-font-path}#{$icon-font-name}.ttf')) format('truetype'),
|
||||
url(if($bootstrap-sass-asset-helper, twbs-font-path('#{$icon-font-path}#{$icon-font-name}.svg##{$icon-font-svg-id}'), '#{$icon-font-path}#{$icon-font-name}.svg##{$icon-font-svg-id}')) format('svg');
|
||||
}
|
||||
|
||||
// Catchall baseclass
|
||||
.glyphicon {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
display: inline-block;
|
||||
font-family: 'Glyphicons Halflings';
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
line-height: 1;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
// Individual icons
|
||||
.glyphicon-asterisk { &:before { content: "\2a"; } }
|
||||
.glyphicon-plus { &:before { content: "\2b"; } }
|
||||
.glyphicon-euro { &:before { content: "\20ac"; } }
|
||||
.glyphicon-minus { &:before { content: "\2212"; } }
|
||||
.glyphicon-cloud { &:before { content: "\2601"; } }
|
||||
.glyphicon-envelope { &:before { content: "\2709"; } }
|
||||
.glyphicon-pencil { &:before { content: "\270f"; } }
|
||||
.glyphicon-glass { &:before { content: "\e001"; } }
|
||||
.glyphicon-music { &:before { content: "\e002"; } }
|
||||
.glyphicon-search { &:before { content: "\e003"; } }
|
||||
.glyphicon-heart { &:before { content: "\e005"; } }
|
||||
.glyphicon-star { &:before { content: "\e006"; } }
|
||||
.glyphicon-star-empty { &:before { content: "\e007"; } }
|
||||
.glyphicon-user { &:before { content: "\e008"; } }
|
||||
.glyphicon-film { &:before { content: "\e009"; } }
|
||||
.glyphicon-th-large { &:before { content: "\e010"; } }
|
||||
.glyphicon-th { &:before { content: "\e011"; } }
|
||||
.glyphicon-th-list { &:before { content: "\e012"; } }
|
||||
.glyphicon-ok { &:before { content: "\e013"; } }
|
||||
.glyphicon-remove { &:before { content: "\e014"; } }
|
||||
.glyphicon-zoom-in { &:before { content: "\e015"; } }
|
||||
.glyphicon-zoom-out { &:before { content: "\e016"; } }
|
||||
.glyphicon-off { &:before { content: "\e017"; } }
|
||||
.glyphicon-signal { &:before { content: "\e018"; } }
|
||||
.glyphicon-cog { &:before { content: "\e019"; } }
|
||||
.glyphicon-trash { &:before { content: "\e020"; } }
|
||||
.glyphicon-home { &:before { content: "\e021"; } }
|
||||
.glyphicon-file { &:before { content: "\e022"; } }
|
||||
.glyphicon-time { &:before { content: "\e023"; } }
|
||||
.glyphicon-road { &:before { content: "\e024"; } }
|
||||
.glyphicon-download-alt { &:before { content: "\e025"; } }
|
||||
.glyphicon-download { &:before { content: "\e026"; } }
|
||||
.glyphicon-upload { &:before { content: "\e027"; } }
|
||||
.glyphicon-inbox { &:before { content: "\e028"; } }
|
||||
.glyphicon-play-circle { &:before { content: "\e029"; } }
|
||||
.glyphicon-repeat { &:before { content: "\e030"; } }
|
||||
.glyphicon-refresh { &:before { content: "\e031"; } }
|
||||
.glyphicon-list-alt { &:before { content: "\e032"; } }
|
||||
.glyphicon-lock { &:before { content: "\e033"; } }
|
||||
.glyphicon-flag { &:before { content: "\e034"; } }
|
||||
.glyphicon-headphones { &:before { content: "\e035"; } }
|
||||
.glyphicon-volume-off { &:before { content: "\e036"; } }
|
||||
.glyphicon-volume-down { &:before { content: "\e037"; } }
|
||||
.glyphicon-volume-up { &:before { content: "\e038"; } }
|
||||
.glyphicon-qrcode { &:before { content: "\e039"; } }
|
||||
.glyphicon-barcode { &:before { content: "\e040"; } }
|
||||
.glyphicon-tag { &:before { content: "\e041"; } }
|
||||
.glyphicon-tags { &:before { content: "\e042"; } }
|
||||
.glyphicon-book { &:before { content: "\e043"; } }
|
||||
.glyphicon-bookmark { &:before { content: "\e044"; } }
|
||||
.glyphicon-print { &:before { content: "\e045"; } }
|
||||
.glyphicon-camera { &:before { content: "\e046"; } }
|
||||
.glyphicon-font { &:before { content: "\e047"; } }
|
||||
.glyphicon-bold { &:before { content: "\e048"; } }
|
||||
.glyphicon-italic { &:before { content: "\e049"; } }
|
||||
.glyphicon-text-height { &:before { content: "\e050"; } }
|
||||
.glyphicon-text-width { &:before { content: "\e051"; } }
|
||||
.glyphicon-align-left { &:before { content: "\e052"; } }
|
||||
.glyphicon-align-center { &:before { content: "\e053"; } }
|
||||
.glyphicon-align-right { &:before { content: "\e054"; } }
|
||||
.glyphicon-align-justify { &:before { content: "\e055"; } }
|
||||
.glyphicon-list { &:before { content: "\e056"; } }
|
||||
.glyphicon-indent-left { &:before { content: "\e057"; } }
|
||||
.glyphicon-indent-right { &:before { content: "\e058"; } }
|
||||
.glyphicon-facetime-video { &:before { content: "\e059"; } }
|
||||
.glyphicon-picture { &:before { content: "\e060"; } }
|
||||
.glyphicon-map-marker { &:before { content: "\e062"; } }
|
||||
.glyphicon-adjust { &:before { content: "\e063"; } }
|
||||
.glyphicon-tint { &:before { content: "\e064"; } }
|
||||
.glyphicon-edit { &:before { content: "\e065"; } }
|
||||
.glyphicon-share { &:before { content: "\e066"; } }
|
||||
.glyphicon-check { &:before { content: "\e067"; } }
|
||||
.glyphicon-move { &:before { content: "\e068"; } }
|
||||
.glyphicon-step-backward { &:before { content: "\e069"; } }
|
||||
.glyphicon-fast-backward { &:before { content: "\e070"; } }
|
||||
.glyphicon-backward { &:before { content: "\e071"; } }
|
||||
.glyphicon-play { &:before { content: "\e072"; } }
|
||||
.glyphicon-pause { &:before { content: "\e073"; } }
|
||||
.glyphicon-stop { &:before { content: "\e074"; } }
|
||||
.glyphicon-forward { &:before { content: "\e075"; } }
|
||||
.glyphicon-fast-forward { &:before { content: "\e076"; } }
|
||||
.glyphicon-step-forward { &:before { content: "\e077"; } }
|
||||
.glyphicon-eject { &:before { content: "\e078"; } }
|
||||
.glyphicon-chevron-left { &:before { content: "\e079"; } }
|
||||
.glyphicon-chevron-right { &:before { content: "\e080"; } }
|
||||
.glyphicon-plus-sign { &:before { content: "\e081"; } }
|
||||
.glyphicon-minus-sign { &:before { content: "\e082"; } }
|
||||
.glyphicon-remove-sign { &:before { content: "\e083"; } }
|
||||
.glyphicon-ok-sign { &:before { content: "\e084"; } }
|
||||
.glyphicon-question-sign { &:before { content: "\e085"; } }
|
||||
.glyphicon-info-sign { &:before { content: "\e086"; } }
|
||||
.glyphicon-screenshot { &:before { content: "\e087"; } }
|
||||
.glyphicon-remove-circle { &:before { content: "\e088"; } }
|
||||
.glyphicon-ok-circle { &:before { content: "\e089"; } }
|
||||
.glyphicon-ban-circle { &:before { content: "\e090"; } }
|
||||
.glyphicon-arrow-left { &:before { content: "\e091"; } }
|
||||
.glyphicon-arrow-right { &:before { content: "\e092"; } }
|
||||
.glyphicon-arrow-up { &:before { content: "\e093"; } }
|
||||
.glyphicon-arrow-down { &:before { content: "\e094"; } }
|
||||
.glyphicon-share-alt { &:before { content: "\e095"; } }
|
||||
.glyphicon-resize-full { &:before { content: "\e096"; } }
|
||||
.glyphicon-resize-small { &:before { content: "\e097"; } }
|
||||
.glyphicon-exclamation-sign { &:before { content: "\e101"; } }
|
||||
.glyphicon-gift { &:before { content: "\e102"; } }
|
||||
.glyphicon-leaf { &:before { content: "\e103"; } }
|
||||
.glyphicon-fire { &:before { content: "\e104"; } }
|
||||
.glyphicon-eye-open { &:before { content: "\e105"; } }
|
||||
.glyphicon-eye-close { &:before { content: "\e106"; } }
|
||||
.glyphicon-warning-sign { &:before { content: "\e107"; } }
|
||||
.glyphicon-plane { &:before { content: "\e108"; } }
|
||||
.glyphicon-calendar { &:before { content: "\e109"; } }
|
||||
.glyphicon-random { &:before { content: "\e110"; } }
|
||||
.glyphicon-comment { &:before { content: "\e111"; } }
|
||||
.glyphicon-magnet { &:before { content: "\e112"; } }
|
||||
.glyphicon-chevron-up { &:before { content: "\e113"; } }
|
||||
.glyphicon-chevron-down { &:before { content: "\e114"; } }
|
||||
.glyphicon-retweet { &:before { content: "\e115"; } }
|
||||
.glyphicon-shopping-cart { &:before { content: "\e116"; } }
|
||||
.glyphicon-folder-close { &:before { content: "\e117"; } }
|
||||
.glyphicon-folder-open { &:before { content: "\e118"; } }
|
||||
.glyphicon-resize-vertical { &:before { content: "\e119"; } }
|
||||
.glyphicon-resize-horizontal { &:before { content: "\e120"; } }
|
||||
.glyphicon-hdd { &:before { content: "\e121"; } }
|
||||
.glyphicon-bullhorn { &:before { content: "\e122"; } }
|
||||
.glyphicon-bell { &:before { content: "\e123"; } }
|
||||
.glyphicon-certificate { &:before { content: "\e124"; } }
|
||||
.glyphicon-thumbs-up { &:before { content: "\e125"; } }
|
||||
.glyphicon-thumbs-down { &:before { content: "\e126"; } }
|
||||
.glyphicon-hand-right { &:before { content: "\e127"; } }
|
||||
.glyphicon-hand-left { &:before { content: "\e128"; } }
|
||||
.glyphicon-hand-up { &:before { content: "\e129"; } }
|
||||
.glyphicon-hand-down { &:before { content: "\e130"; } }
|
||||
.glyphicon-circle-arrow-right { &:before { content: "\e131"; } }
|
||||
.glyphicon-circle-arrow-left { &:before { content: "\e132"; } }
|
||||
.glyphicon-circle-arrow-up { &:before { content: "\e133"; } }
|
||||
.glyphicon-circle-arrow-down { &:before { content: "\e134"; } }
|
||||
.glyphicon-globe { &:before { content: "\e135"; } }
|
||||
.glyphicon-wrench { &:before { content: "\e136"; } }
|
||||
.glyphicon-tasks { &:before { content: "\e137"; } }
|
||||
.glyphicon-filter { &:before { content: "\e138"; } }
|
||||
.glyphicon-briefcase { &:before { content: "\e139"; } }
|
||||
.glyphicon-fullscreen { &:before { content: "\e140"; } }
|
||||
.glyphicon-dashboard { &:before { content: "\e141"; } }
|
||||
.glyphicon-paperclip { &:before { content: "\e142"; } }
|
||||
.glyphicon-heart-empty { &:before { content: "\e143"; } }
|
||||
.glyphicon-link { &:before { content: "\e144"; } }
|
||||
.glyphicon-phone { &:before { content: "\e145"; } }
|
||||
.glyphicon-pushpin { &:before { content: "\e146"; } }
|
||||
.glyphicon-usd { &:before { content: "\e148"; } }
|
||||
.glyphicon-gbp { &:before { content: "\e149"; } }
|
||||
.glyphicon-sort { &:before { content: "\e150"; } }
|
||||
.glyphicon-sort-by-alphabet { &:before { content: "\e151"; } }
|
||||
.glyphicon-sort-by-alphabet-alt { &:before { content: "\e152"; } }
|
||||
.glyphicon-sort-by-order { &:before { content: "\e153"; } }
|
||||
.glyphicon-sort-by-order-alt { &:before { content: "\e154"; } }
|
||||
.glyphicon-sort-by-attributes { &:before { content: "\e155"; } }
|
||||
.glyphicon-sort-by-attributes-alt { &:before { content: "\e156"; } }
|
||||
.glyphicon-unchecked { &:before { content: "\e157"; } }
|
||||
.glyphicon-expand { &:before { content: "\e158"; } }
|
||||
.glyphicon-collapse-down { &:before { content: "\e159"; } }
|
||||
.glyphicon-collapse-up { &:before { content: "\e160"; } }
|
||||
.glyphicon-log-in { &:before { content: "\e161"; } }
|
||||
.glyphicon-flash { &:before { content: "\e162"; } }
|
||||
.glyphicon-log-out { &:before { content: "\e163"; } }
|
||||
.glyphicon-new-window { &:before { content: "\e164"; } }
|
||||
.glyphicon-record { &:before { content: "\e165"; } }
|
||||
.glyphicon-save { &:before { content: "\e166"; } }
|
||||
.glyphicon-open { &:before { content: "\e167"; } }
|
||||
.glyphicon-saved { &:before { content: "\e168"; } }
|
||||
.glyphicon-import { &:before { content: "\e169"; } }
|
||||
.glyphicon-export { &:before { content: "\e170"; } }
|
||||
.glyphicon-send { &:before { content: "\e171"; } }
|
||||
.glyphicon-floppy-disk { &:before { content: "\e172"; } }
|
||||
.glyphicon-floppy-saved { &:before { content: "\e173"; } }
|
||||
.glyphicon-floppy-remove { &:before { content: "\e174"; } }
|
||||
.glyphicon-floppy-save { &:before { content: "\e175"; } }
|
||||
.glyphicon-floppy-open { &:before { content: "\e176"; } }
|
||||
.glyphicon-credit-card { &:before { content: "\e177"; } }
|
||||
.glyphicon-transfer { &:before { content: "\e178"; } }
|
||||
.glyphicon-cutlery { &:before { content: "\e179"; } }
|
||||
.glyphicon-header { &:before { content: "\e180"; } }
|
||||
.glyphicon-compressed { &:before { content: "\e181"; } }
|
||||
.glyphicon-earphone { &:before { content: "\e182"; } }
|
||||
.glyphicon-phone-alt { &:before { content: "\e183"; } }
|
||||
.glyphicon-tower { &:before { content: "\e184"; } }
|
||||
.glyphicon-stats { &:before { content: "\e185"; } }
|
||||
.glyphicon-sd-video { &:before { content: "\e186"; } }
|
||||
.glyphicon-hd-video { &:before { content: "\e187"; } }
|
||||
.glyphicon-subtitles { &:before { content: "\e188"; } }
|
||||
.glyphicon-sound-stereo { &:before { content: "\e189"; } }
|
||||
.glyphicon-sound-dolby { &:before { content: "\e190"; } }
|
||||
.glyphicon-sound-5-1 { &:before { content: "\e191"; } }
|
||||
.glyphicon-sound-6-1 { &:before { content: "\e192"; } }
|
||||
.glyphicon-sound-7-1 { &:before { content: "\e193"; } }
|
||||
.glyphicon-copyright-mark { &:before { content: "\e194"; } }
|
||||
.glyphicon-registration-mark { &:before { content: "\e195"; } }
|
||||
.glyphicon-cloud-download { &:before { content: "\e197"; } }
|
||||
.glyphicon-cloud-upload { &:before { content: "\e198"; } }
|
||||
.glyphicon-tree-conifer { &:before { content: "\e199"; } }
|
||||
.glyphicon-tree-deciduous { &:before { content: "\e200"; } }
|
||||
|
|
@ -1,84 +0,0 @@
|
|||
//
|
||||
// Grid system
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
// Container widths
|
||||
//
|
||||
// Set the container width, and override it for fixed navbars in media queries.
|
||||
|
||||
.container {
|
||||
@include container-fixed();
|
||||
|
||||
@media (min-width: $screen-sm-min) {
|
||||
width: $container-sm;
|
||||
}
|
||||
@media (min-width: $screen-md-min) {
|
||||
width: $container-md;
|
||||
}
|
||||
@media (min-width: $screen-lg-min) {
|
||||
width: $container-lg;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Fluid container
|
||||
//
|
||||
// Utilizes the mixin meant for fixed width containers, but without any defined
|
||||
// width for fluid, full width layouts.
|
||||
|
||||
.container-fluid {
|
||||
@include container-fixed();
|
||||
}
|
||||
|
||||
|
||||
// Row
|
||||
//
|
||||
// Rows contain and clear the floats of your columns.
|
||||
|
||||
.row {
|
||||
@include make-row();
|
||||
}
|
||||
|
||||
|
||||
// Columns
|
||||
//
|
||||
// Common styles for small and large grid columns
|
||||
|
||||
@include make-grid-columns();
|
||||
|
||||
|
||||
// Extra small grid
|
||||
//
|
||||
// Columns, offsets, pushes, and pulls for extra small devices like
|
||||
// smartphones.
|
||||
|
||||
@include make-grid(xs);
|
||||
|
||||
|
||||
// Small grid
|
||||
//
|
||||
// Columns, offsets, pushes, and pulls for the small device range, from phones
|
||||
// to tablets.
|
||||
|
||||
@media (min-width: $screen-sm-min) {
|
||||
@include make-grid(sm);
|
||||
}
|
||||
|
||||
|
||||
// Medium grid
|
||||
//
|
||||
// Columns, offsets, pushes, and pulls for the desktop device range.
|
||||
|
||||
@media (min-width: $screen-md-min) {
|
||||
@include make-grid(md);
|
||||
}
|
||||
|
||||
|
||||
// Large grid
|
||||
//
|
||||
// Columns, offsets, pushes, and pulls for the large desktop device range.
|
||||
|
||||
@media (min-width: $screen-lg-min) {
|
||||
@include make-grid(lg);
|
||||
}
|
||||
|
|
@ -1,162 +0,0 @@
|
|||
//
|
||||
// Input groups
|
||||
// --------------------------------------------------
|
||||
|
||||
// Base styles
|
||||
// -------------------------
|
||||
.input-group {
|
||||
position: relative; // For dropdowns
|
||||
display: table;
|
||||
border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table
|
||||
|
||||
// Undo padding and float of grid classes
|
||||
&[class*="col-"] {
|
||||
float: none;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.form-control {
|
||||
// Ensure that the input is always above the *appended* addon button for
|
||||
// proper border colors.
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
|
||||
// IE9 fubars the placeholder attribute in text inputs and the arrows on
|
||||
// select elements in input groups. To fix it, we float the input. Details:
|
||||
// https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855
|
||||
float: left;
|
||||
|
||||
width: 100%;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Sizing options
|
||||
//
|
||||
// Remix the default form control sizing classes into new ones for easier
|
||||
// manipulation.
|
||||
|
||||
.input-group-lg > .form-control,
|
||||
.input-group-lg > .input-group-addon,
|
||||
.input-group-lg > .input-group-btn > .btn { @extend .input-lg; }
|
||||
.input-group-sm > .form-control,
|
||||
.input-group-sm > .input-group-addon,
|
||||
.input-group-sm > .input-group-btn > .btn { @extend .input-sm; }
|
||||
|
||||
|
||||
// Display as table-cell
|
||||
// -------------------------
|
||||
.input-group-addon,
|
||||
.input-group-btn,
|
||||
.input-group .form-control {
|
||||
display: table-cell;
|
||||
|
||||
&:not(:first-child):not(:last-child) {
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
// Addon and addon wrapper for buttons
|
||||
.input-group-addon,
|
||||
.input-group-btn {
|
||||
width: 1%;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle; // Match the inputs
|
||||
}
|
||||
|
||||
// Text input groups
|
||||
// -------------------------
|
||||
.input-group-addon {
|
||||
padding: $padding-base-vertical $padding-base-horizontal;
|
||||
font-size: $font-size-base;
|
||||
font-weight: normal;
|
||||
line-height: 1;
|
||||
color: $input-color;
|
||||
text-align: center;
|
||||
background-color: $input-group-addon-bg;
|
||||
border: 1px solid $input-group-addon-border-color;
|
||||
border-radius: $border-radius-base;
|
||||
|
||||
// Sizing
|
||||
&.input-sm {
|
||||
padding: $padding-small-vertical $padding-small-horizontal;
|
||||
font-size: $font-size-small;
|
||||
border-radius: $border-radius-small;
|
||||
}
|
||||
&.input-lg {
|
||||
padding: $padding-large-vertical $padding-large-horizontal;
|
||||
font-size: $font-size-large;
|
||||
border-radius: $border-radius-large;
|
||||
}
|
||||
|
||||
// Nuke default margins from checkboxes and radios to vertically center within.
|
||||
input[type="radio"],
|
||||
input[type="checkbox"] {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Reset rounded corners
|
||||
.input-group .form-control:first-child,
|
||||
.input-group-addon:first-child,
|
||||
.input-group-btn:first-child > .btn,
|
||||
.input-group-btn:first-child > .btn-group > .btn,
|
||||
.input-group-btn:first-child > .dropdown-toggle,
|
||||
.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
|
||||
.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
|
||||
@include border-right-radius(0);
|
||||
}
|
||||
.input-group-addon:first-child {
|
||||
border-right: 0;
|
||||
}
|
||||
.input-group .form-control:last-child,
|
||||
.input-group-addon:last-child,
|
||||
.input-group-btn:last-child > .btn,
|
||||
.input-group-btn:last-child > .btn-group > .btn,
|
||||
.input-group-btn:last-child > .dropdown-toggle,
|
||||
.input-group-btn:first-child > .btn:not(:first-child),
|
||||
.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
|
||||
@include border-left-radius(0);
|
||||
}
|
||||
.input-group-addon:last-child {
|
||||
border-left: 0;
|
||||
}
|
||||
|
||||
// Button input groups
|
||||
// -------------------------
|
||||
.input-group-btn {
|
||||
position: relative;
|
||||
// Jankily prevent input button groups from wrapping with `white-space` and
|
||||
// `font-size` in combination with `inline-block` on buttons.
|
||||
font-size: 0;
|
||||
white-space: nowrap;
|
||||
|
||||
// Negative margin for spacing, position for bringing hovered/focused/actived
|
||||
// element above the siblings.
|
||||
> .btn {
|
||||
position: relative;
|
||||
+ .btn {
|
||||
margin-left: -1px;
|
||||
}
|
||||
// Bring the "active" button to the front
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
|
||||
// Negative margin to only have a 1px border between the two
|
||||
&:first-child {
|
||||
> .btn,
|
||||
> .btn-group {
|
||||
margin-right: -1px;
|
||||
}
|
||||
}
|
||||
&:last-child {
|
||||
> .btn,
|
||||
> .btn-group {
|
||||
margin-left: -1px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
//
|
||||
// Jumbotron
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
.jumbotron {
|
||||
padding: $jumbotron-padding;
|
||||
margin-bottom: $jumbotron-padding;
|
||||
color: $jumbotron-color;
|
||||
background-color: $jumbotron-bg;
|
||||
|
||||
h1,
|
||||
.h1 {
|
||||
color: $jumbotron-heading-color;
|
||||
}
|
||||
p {
|
||||
margin-bottom: ($jumbotron-padding / 2);
|
||||
font-size: $jumbotron-font-size;
|
||||
font-weight: 200;
|
||||
}
|
||||
|
||||
.container & {
|
||||
border-radius: $border-radius-large; // Only round corners at higher resolutions if contained in a container
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
@media screen and (min-width: $screen-sm-min) {
|
||||
padding-top: ($jumbotron-padding * 1.6);
|
||||
padding-bottom: ($jumbotron-padding * 1.6);
|
||||
|
||||
.container & {
|
||||
padding-left: ($jumbotron-padding * 2);
|
||||
padding-right: ($jumbotron-padding * 2);
|
||||
}
|
||||
|
||||
h1,
|
||||
.h1 {
|
||||
font-size: ($font-size-base * 4.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
//
|
||||
// Labels
|
||||
// --------------------------------------------------
|
||||
|
||||
.label {
|
||||
display: inline;
|
||||
padding: .2em .6em .3em;
|
||||
font-size: 75%;
|
||||
font-weight: bold;
|
||||
line-height: 1;
|
||||
color: $label-color;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
vertical-align: baseline;
|
||||
border-radius: .25em;
|
||||
|
||||
// Add hover effects, but only for links
|
||||
&[href] {
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $label-link-hover-color;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
// Empty labels collapse automatically (not available in IE8)
|
||||
&:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
// Quick fix for labels in buttons
|
||||
.btn & {
|
||||
position: relative;
|
||||
top: -1px;
|
||||
}
|
||||
}
|
||||
|
||||
// Colors
|
||||
// Contextual variations (linked labels get darker on :hover)
|
||||
|
||||
.label-default {
|
||||
@include label-variant($label-default-bg);
|
||||
}
|
||||
|
||||
.label-primary {
|
||||
@include label-variant($label-primary-bg);
|
||||
}
|
||||
|
||||
.label-success {
|
||||
@include label-variant($label-success-bg);
|
||||
}
|
||||
|
||||
.label-info {
|
||||
@include label-variant($label-info-bg);
|
||||
}
|
||||
|
||||
.label-warning {
|
||||
@include label-variant($label-warning-bg);
|
||||
}
|
||||
|
||||
.label-danger {
|
||||
@include label-variant($label-danger-bg);
|
||||
}
|
||||
|
|
@ -1,110 +0,0 @@
|
|||
//
|
||||
// List groups
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
// Base class
|
||||
//
|
||||
// Easily usable on <ul>, <ol>, or <div>.
|
||||
|
||||
.list-group {
|
||||
// No need to set list-style: none; since .list-group-item is block level
|
||||
margin-bottom: 20px;
|
||||
padding-left: 0; // reset padding because ul and ol
|
||||
}
|
||||
|
||||
|
||||
// Individual list items
|
||||
//
|
||||
// Use on `li`s or `div`s within the `.list-group` parent.
|
||||
|
||||
.list-group-item {
|
||||
position: relative;
|
||||
display: block;
|
||||
padding: 10px 15px;
|
||||
// Place the border on the list items and negative margin up for better styling
|
||||
margin-bottom: -1px;
|
||||
background-color: $list-group-bg;
|
||||
border: 1px solid $list-group-border;
|
||||
|
||||
// Round the first and last items
|
||||
&:first-child {
|
||||
@include border-top-radius($list-group-border-radius);
|
||||
}
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
@include border-bottom-radius($list-group-border-radius);
|
||||
}
|
||||
|
||||
// Align badges within list items
|
||||
> .badge {
|
||||
float: right;
|
||||
}
|
||||
> .badge + .badge {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Linked list items
|
||||
//
|
||||
// Use anchor elements instead of `li`s or `div`s to create linked list items.
|
||||
// Includes an extra `.active` modifier class for showing selected items.
|
||||
|
||||
a.list-group-item {
|
||||
color: $list-group-link-color;
|
||||
|
||||
.list-group-item-heading {
|
||||
color: $list-group-link-heading-color;
|
||||
}
|
||||
|
||||
// Hover state
|
||||
&:hover,
|
||||
&:focus {
|
||||
text-decoration: none;
|
||||
background-color: $list-group-hover-bg;
|
||||
}
|
||||
|
||||
// Active class on item itself, not parent
|
||||
&.active,
|
||||
&.active:hover,
|
||||
&.active:focus {
|
||||
z-index: 2; // Place active items above their siblings for proper border styling
|
||||
color: $list-group-active-color;
|
||||
background-color: $list-group-active-bg;
|
||||
border-color: $list-group-active-border;
|
||||
|
||||
// Force color to inherit for custom content
|
||||
.list-group-item-heading {
|
||||
color: inherit;
|
||||
}
|
||||
.list-group-item-text {
|
||||
color: $list-group-active-text-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Contextual variants
|
||||
//
|
||||
// Add modifier classes to change text and background color on individual items.
|
||||
// Organizationally, this must come after the `:hover` states.
|
||||
|
||||
@include list-group-item-variant(success, $state-success-bg, $state-success-text);
|
||||
@include list-group-item-variant(info, $state-info-bg, $state-info-text);
|
||||
@include list-group-item-variant(warning, $state-warning-bg, $state-warning-text);
|
||||
@include list-group-item-variant(danger, $state-danger-bg, $state-danger-text);
|
||||
|
||||
|
||||
// Custom content options
|
||||
//
|
||||
// Extra classes for creating well-formatted content within `.list-group-item`s.
|
||||
|
||||
.list-group-item-heading {
|
||||
margin-top: 0;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.list-group-item-text {
|
||||
margin-bottom: 0;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
// Media objects
|
||||
// Source: http://stubbornella.org/content/?p=497
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
// Common styles
|
||||
// -------------------------
|
||||
|
||||
// Clear the floats
|
||||
.media,
|
||||
.media-body {
|
||||
overflow: hidden;
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
// Proper spacing between instances of .media
|
||||
.media,
|
||||
.media .media {
|
||||
margin-top: 15px;
|
||||
}
|
||||
.media:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
// For images and videos, set to block
|
||||
.media-object {
|
||||
display: block;
|
||||
}
|
||||
|
||||
// Reset margins on headings for tighter default spacing
|
||||
.media-heading {
|
||||
margin: 0 0 5px;
|
||||
}
|
||||
|
||||
|
||||
// Media image alignment
|
||||
// -------------------------
|
||||
|
||||
.media {
|
||||
> .pull-left {
|
||||
margin-right: 10px;
|
||||
}
|
||||
> .pull-right {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Media list variation
|
||||
// -------------------------
|
||||
|
||||
// Undo default ul/ol styles
|
||||
.media-list {
|
||||
padding-left: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
|
@ -1,139 +0,0 @@
|
|||
//
|
||||
// Modals
|
||||
// --------------------------------------------------
|
||||
|
||||
// .modal-open - body class for killing the scroll
|
||||
// .modal - container to scroll within
|
||||
// .modal-dialog - positioning shell for the actual modal
|
||||
// .modal-content - actual modal w/ bg and corners and shit
|
||||
|
||||
// Kill the scroll on the body
|
||||
.modal-open {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
// Container that the modal scrolls within
|
||||
.modal {
|
||||
display: none;
|
||||
overflow: auto;
|
||||
overflow-y: scroll;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: $zindex-modal;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
|
||||
// Prevent Chrome on Windows from adding a focus outline. For details, see
|
||||
// https://github.com/twbs/bootstrap/pull/10951.
|
||||
outline: 0;
|
||||
|
||||
// When fading in the modal, animate it to slide down
|
||||
&.fade .modal-dialog {
|
||||
@include translate(0, -25%);
|
||||
@include transition-transform(0.3s ease-out);
|
||||
}
|
||||
&.in .modal-dialog { @include translate(0, 0)}
|
||||
}
|
||||
|
||||
// Shell div to position the modal with bottom padding
|
||||
.modal-dialog {
|
||||
position: relative;
|
||||
width: auto;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
// Actual modal
|
||||
.modal-content {
|
||||
position: relative;
|
||||
background-color: $modal-content-bg;
|
||||
border: 1px solid $modal-content-fallback-border-color; //old browsers fallback (ie8 etc)
|
||||
border: 1px solid $modal-content-border-color;
|
||||
border-radius: $border-radius-large;
|
||||
@include box-shadow(0 3px 9px rgba(0,0,0,.5));
|
||||
background-clip: padding-box;
|
||||
// Remove focus outline from opened modal
|
||||
outline: none;
|
||||
}
|
||||
|
||||
// Modal background
|
||||
.modal-backdrop {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: $zindex-modal-background;
|
||||
background-color: $modal-backdrop-bg;
|
||||
// Fade for backdrop
|
||||
&.fade { @include opacity(0); }
|
||||
&.in { @include opacity($modal-backdrop-opacity); }
|
||||
}
|
||||
|
||||
// Modal header
|
||||
// Top section of the modal w/ title and dismiss
|
||||
.modal-header {
|
||||
padding: $modal-title-padding;
|
||||
border-bottom: 1px solid $modal-header-border-color;
|
||||
min-height: ($modal-title-padding + $modal-title-line-height);
|
||||
}
|
||||
// Close icon
|
||||
.modal-header .close {
|
||||
margin-top: -2px;
|
||||
}
|
||||
|
||||
// Title text within header
|
||||
.modal-title {
|
||||
margin: 0;
|
||||
line-height: $modal-title-line-height;
|
||||
}
|
||||
|
||||
// Modal body
|
||||
// Where all modal content resides (sibling of .modal-header and .modal-footer)
|
||||
.modal-body {
|
||||
position: relative;
|
||||
padding: $modal-inner-padding;
|
||||
}
|
||||
|
||||
// Footer (for actions)
|
||||
.modal-footer {
|
||||
margin-top: 15px;
|
||||
padding: ($modal-inner-padding - 1) $modal-inner-padding $modal-inner-padding;
|
||||
text-align: right; // right align buttons
|
||||
border-top: 1px solid $modal-footer-border-color;
|
||||
@include clearfix(); // clear it in case folks use .pull-* classes on buttons
|
||||
|
||||
// Properly space out buttons
|
||||
.btn + .btn {
|
||||
margin-left: 5px;
|
||||
margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
|
||||
}
|
||||
// but override that for button groups
|
||||
.btn-group .btn + .btn {
|
||||
margin-left: -1px;
|
||||
}
|
||||
// and override it for block buttons as well
|
||||
.btn-block + .btn-block {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Scale up the modal
|
||||
@media (min-width: $screen-sm-min) {
|
||||
// Automatically set modal's width for larger viewports
|
||||
.modal-dialog {
|
||||
width: $modal-md;
|
||||
margin: 30px auto;
|
||||
}
|
||||
.modal-content {
|
||||
@include box-shadow(0 5px 15px rgba(0,0,0,.5));
|
||||
}
|
||||
|
||||
// Modal sizes
|
||||
.modal-sm { width: $modal-sm; }
|
||||
}
|
||||
|
||||
@media (min-width: $screen-md-min) {
|
||||
.modal-lg { width: $modal-lg; }
|
||||
}
|
||||
|
|
@ -1,620 +0,0 @@
|
|||
//
|
||||
// Navbars
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
// Wrapper and base class
|
||||
//
|
||||
// Provide a static navbar from which we expand to create full-width, fixed, and
|
||||
// other navbar variations.
|
||||
|
||||
.navbar {
|
||||
position: relative;
|
||||
min-height: $navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)
|
||||
margin-bottom: $navbar-margin-bottom;
|
||||
border: 1px solid transparent;
|
||||
|
||||
// Prevent floats from breaking the navbar
|
||||
@include clearfix();
|
||||
|
||||
@media (min-width: $grid-float-breakpoint) {
|
||||
border-radius: $navbar-border-radius;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Navbar heading
|
||||
//
|
||||
// Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy
|
||||
// styling of responsive aspects.
|
||||
|
||||
.navbar-header {
|
||||
@include clearfix();
|
||||
|
||||
@media (min-width: $grid-float-breakpoint) {
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Navbar collapse (body)
|
||||
//
|
||||
// Group your navbar content into this for easy collapsing and expanding across
|
||||
// various device sizes. By default, this content is collapsed when <768px, but
|
||||
// will expand past that for a horizontal display.
|
||||
//
|
||||
// To start (on mobile devices) the navbar links, forms, and buttons are stacked
|
||||
// vertically and include a `max-height` to overflow in case you have too much
|
||||
// content for the user's viewport.
|
||||
|
||||
.navbar-collapse {
|
||||
max-height: $navbar-collapse-max-height;
|
||||
overflow-x: visible;
|
||||
padding-right: $navbar-padding-horizontal;
|
||||
padding-left: $navbar-padding-horizontal;
|
||||
border-top: 1px solid transparent;
|
||||
box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
|
||||
@include clearfix();
|
||||
-webkit-overflow-scrolling: touch;
|
||||
|
||||
&.in {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
@media (min-width: $grid-float-breakpoint) {
|
||||
width: auto;
|
||||
border-top: 0;
|
||||
box-shadow: none;
|
||||
|
||||
&.collapse {
|
||||
display: block !important;
|
||||
height: auto !important;
|
||||
padding-bottom: 0; // Override default setting
|
||||
overflow: visible !important;
|
||||
}
|
||||
|
||||
&.in {
|
||||
overflow-y: visible;
|
||||
}
|
||||
|
||||
// Undo the collapse side padding for navbars with containers to ensure
|
||||
// alignment of right-aligned contents.
|
||||
.navbar-fixed-top &,
|
||||
.navbar-static-top &,
|
||||
.navbar-fixed-bottom & {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Both navbar header and collapse
|
||||
//
|
||||
// When a container is present, change the behavior of the header and collapse.
|
||||
|
||||
.container,
|
||||
.container-fluid {
|
||||
> .navbar-header,
|
||||
> .navbar-collapse {
|
||||
margin-right: -$navbar-padding-horizontal;
|
||||
margin-left: -$navbar-padding-horizontal;
|
||||
|
||||
@media (min-width: $grid-float-breakpoint) {
|
||||
margin-right: 0;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Navbar alignment options
|
||||
//
|
||||
// Display the navbar across the entirety of the page or fixed it to the top or
|
||||
// bottom of the page.
|
||||
|
||||
// Static top (unfixed, but 100% wide) navbar
|
||||
.navbar-static-top {
|
||||
z-index: $zindex-navbar;
|
||||
border-width: 0 0 1px;
|
||||
|
||||
@media (min-width: $grid-float-breakpoint) {
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Fix the top/bottom navbars when screen real estate supports it
|
||||
.navbar-fixed-top,
|
||||
.navbar-fixed-bottom {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
left: 0;
|
||||
z-index: $zindex-navbar-fixed;
|
||||
|
||||
// Undo the rounded corners
|
||||
@media (min-width: $grid-float-breakpoint) {
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
.navbar-fixed-top {
|
||||
top: 0;
|
||||
border-width: 0 0 1px;
|
||||
}
|
||||
.navbar-fixed-bottom {
|
||||
bottom: 0;
|
||||
margin-bottom: 0; // override .navbar defaults
|
||||
border-width: 1px 0 0;
|
||||
}
|
||||
|
||||
|
||||
// Brand/project name
|
||||
|
||||
.navbar-brand {
|
||||
float: left;
|
||||
padding: $navbar-padding-vertical $navbar-padding-horizontal;
|
||||
font-size: $font-size-large;
|
||||
line-height: $line-height-computed;
|
||||
height: $navbar-height;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
@media (min-width: $grid-float-breakpoint) {
|
||||
.navbar > .container &,
|
||||
.navbar > .container-fluid & {
|
||||
margin-left: -$navbar-padding-horizontal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Navbar toggle
|
||||
//
|
||||
// Custom button for toggling the `.navbar-collapse`, powered by the collapse
|
||||
// JavaScript plugin.
|
||||
|
||||
.navbar-toggle {
|
||||
position: relative;
|
||||
float: right;
|
||||
margin-right: $navbar-padding-horizontal;
|
||||
padding: 9px 10px;
|
||||
@include navbar-vertical-align(34px);
|
||||
background-color: transparent;
|
||||
background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
|
||||
border: 1px solid transparent;
|
||||
border-radius: $border-radius-base;
|
||||
|
||||
// We remove the `outline` here, but later compensate by attaching `:hover`
|
||||
// styles to `:focus`.
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
// Bars
|
||||
.icon-bar {
|
||||
display: block;
|
||||
width: 22px;
|
||||
height: 2px;
|
||||
border-radius: 1px;
|
||||
}
|
||||
.icon-bar + .icon-bar {
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
@media (min-width: $grid-float-breakpoint) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Navbar nav links
|
||||
//
|
||||
// Builds on top of the `.nav` components with its own modifier class to make
|
||||
// the nav the full height of the horizontal nav (above 768px).
|
||||
|
||||
.navbar-nav {
|
||||
margin: ($navbar-padding-vertical / 2) (-$navbar-padding-horizontal);
|
||||
|
||||
> li > a {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
line-height: $line-height-computed;
|
||||
}
|
||||
|
||||
@media (max-width: $grid-float-breakpoint-max) {
|
||||
// Dropdowns get custom display when collapsed
|
||||
.open .dropdown-menu {
|
||||
position: static;
|
||||
float: none;
|
||||
width: auto;
|
||||
margin-top: 0;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
box-shadow: none;
|
||||
> li > a,
|
||||
.dropdown-header {
|
||||
padding: 5px 15px 5px 25px;
|
||||
}
|
||||
> li > a {
|
||||
line-height: $line-height-computed;
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-image: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Uncollapse the nav
|
||||
@media (min-width: $grid-float-breakpoint) {
|
||||
float: left;
|
||||
margin: 0;
|
||||
|
||||
> li {
|
||||
float: left;
|
||||
> a {
|
||||
padding-top: $navbar-padding-vertical;
|
||||
padding-bottom: $navbar-padding-vertical;
|
||||
}
|
||||
}
|
||||
|
||||
&.navbar-right:last-child {
|
||||
margin-right: -$navbar-padding-horizontal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Component alignment
|
||||
//
|
||||
// Repurpose the pull utilities as their own navbar utilities to avoid specificity
|
||||
// issues with parents and chaining. Only do this when the navbar is uncollapsed
|
||||
// though so that navbar contents properly stack and align in mobile.
|
||||
|
||||
@media (min-width: $grid-float-breakpoint) {
|
||||
.navbar-left {
|
||||
float: left !important;
|
||||
}
|
||||
.navbar-right {
|
||||
float: right !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Navbar form
|
||||
//
|
||||
// Extension of the `.form-inline` with some extra flavor for optimum display in
|
||||
// our navbars.
|
||||
|
||||
.navbar-form {
|
||||
margin-left: -$navbar-padding-horizontal;
|
||||
margin-right: -$navbar-padding-horizontal;
|
||||
padding: 10px $navbar-padding-horizontal;
|
||||
border-top: 1px solid transparent;
|
||||
border-bottom: 1px solid transparent;
|
||||
$shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);
|
||||
@include box-shadow($shadow);
|
||||
|
||||
// Mixin behavior for optimum display
|
||||
@extend .form-inline;
|
||||
|
||||
.form-group {
|
||||
@media (max-width: $grid-float-breakpoint-max) {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
// Vertically center in expanded, horizontal navbar
|
||||
@include navbar-vertical-align($input-height-base);
|
||||
|
||||
// Undo 100% width for pull classes
|
||||
@media (min-width: $grid-float-breakpoint) {
|
||||
width: auto;
|
||||
border: 0;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
@include box-shadow(none);
|
||||
|
||||
// Outdent the form if last child to line up with content down the page
|
||||
&.navbar-right:last-child {
|
||||
margin-right: -$navbar-padding-horizontal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Dropdown menus
|
||||
|
||||
// Menu position and menu carets
|
||||
.navbar-nav > li > .dropdown-menu {
|
||||
margin-top: 0;
|
||||
@include border-top-radius(0);
|
||||
}
|
||||
// Menu position and menu caret support for dropups via extra dropup class
|
||||
.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
|
||||
@include border-bottom-radius(0);
|
||||
}
|
||||
|
||||
|
||||
// Buttons in navbars
|
||||
//
|
||||
// Vertically center a button within a navbar (when *not* in a form).
|
||||
|
||||
.navbar-btn {
|
||||
@include navbar-vertical-align($input-height-base);
|
||||
|
||||
&.btn-sm {
|
||||
@include navbar-vertical-align($input-height-small);
|
||||
}
|
||||
&.btn-xs {
|
||||
@include navbar-vertical-align(22);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Text in navbars
|
||||
//
|
||||
// Add a class to make any element properly align itself vertically within the navbars.
|
||||
|
||||
.navbar-text {
|
||||
@include navbar-vertical-align($line-height-computed);
|
||||
|
||||
@media (min-width: $grid-float-breakpoint) {
|
||||
float: left;
|
||||
margin-left: $navbar-padding-horizontal;
|
||||
margin-right: $navbar-padding-horizontal;
|
||||
|
||||
// Outdent the form if last child to line up with content down the page
|
||||
&.navbar-right:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Alternate navbars
|
||||
// --------------------------------------------------
|
||||
|
||||
// Default navbar
|
||||
.navbar-default {
|
||||
background-color: $navbar-default-bg;
|
||||
border-color: $navbar-default-border;
|
||||
|
||||
.navbar-brand {
|
||||
color: $navbar-default-brand-color;
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $navbar-default-brand-hover-color;
|
||||
background-color: $navbar-default-brand-hover-bg;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-text {
|
||||
color: $navbar-default-color;
|
||||
}
|
||||
|
||||
.navbar-nav {
|
||||
> li > a {
|
||||
color: $navbar-default-link-color;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $navbar-default-link-hover-color;
|
||||
background-color: $navbar-default-link-hover-bg;
|
||||
}
|
||||
}
|
||||
> .active > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $navbar-default-link-active-color;
|
||||
background-color: $navbar-default-link-active-bg;
|
||||
}
|
||||
}
|
||||
> .disabled > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $navbar-default-link-disabled-color;
|
||||
background-color: $navbar-default-link-disabled-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-toggle {
|
||||
border-color: $navbar-default-toggle-border-color;
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: $navbar-default-toggle-hover-bg;
|
||||
}
|
||||
.icon-bar {
|
||||
background-color: $navbar-default-toggle-icon-bar-bg;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-collapse,
|
||||
.navbar-form {
|
||||
border-color: $navbar-default-border;
|
||||
}
|
||||
|
||||
// Dropdown menu items
|
||||
.navbar-nav {
|
||||
// Remove background color from open dropdown
|
||||
> .open > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: $navbar-default-link-active-bg;
|
||||
color: $navbar-default-link-active-color;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: $grid-float-breakpoint-max) {
|
||||
// Dropdowns get custom display when collapsed
|
||||
.open .dropdown-menu {
|
||||
> li > a {
|
||||
color: $navbar-default-link-color;
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $navbar-default-link-hover-color;
|
||||
background-color: $navbar-default-link-hover-bg;
|
||||
}
|
||||
}
|
||||
> .active > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $navbar-default-link-active-color;
|
||||
background-color: $navbar-default-link-active-bg;
|
||||
}
|
||||
}
|
||||
> .disabled > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $navbar-default-link-disabled-color;
|
||||
background-color: $navbar-default-link-disabled-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Links in navbars
|
||||
//
|
||||
// Add a class to ensure links outside the navbar nav are colored correctly.
|
||||
|
||||
.navbar-link {
|
||||
color: $navbar-default-link-color;
|
||||
&:hover {
|
||||
color: $navbar-default-link-hover-color;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Inverse navbar
|
||||
|
||||
.navbar-inverse {
|
||||
background-color: $navbar-inverse-bg;
|
||||
border-color: $navbar-inverse-border;
|
||||
|
||||
.navbar-brand {
|
||||
color: $navbar-inverse-brand-color;
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $navbar-inverse-brand-hover-color;
|
||||
background-color: $navbar-inverse-brand-hover-bg;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-text {
|
||||
color: $navbar-inverse-color;
|
||||
}
|
||||
|
||||
.navbar-nav {
|
||||
> li > a {
|
||||
color: $navbar-inverse-link-color;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $navbar-inverse-link-hover-color;
|
||||
background-color: $navbar-inverse-link-hover-bg;
|
||||
}
|
||||
}
|
||||
> .active > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $navbar-inverse-link-active-color;
|
||||
background-color: $navbar-inverse-link-active-bg;
|
||||
}
|
||||
}
|
||||
> .disabled > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $navbar-inverse-link-disabled-color;
|
||||
background-color: $navbar-inverse-link-disabled-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Darken the responsive nav toggle
|
||||
.navbar-toggle {
|
||||
border-color: $navbar-inverse-toggle-border-color;
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: $navbar-inverse-toggle-hover-bg;
|
||||
}
|
||||
.icon-bar {
|
||||
background-color: $navbar-inverse-toggle-icon-bar-bg;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-collapse,
|
||||
.navbar-form {
|
||||
border-color: darken($navbar-inverse-bg, 7%);
|
||||
}
|
||||
|
||||
// Dropdowns
|
||||
.navbar-nav {
|
||||
> .open > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: $navbar-inverse-link-active-bg;
|
||||
color: $navbar-inverse-link-active-color;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: $grid-float-breakpoint-max) {
|
||||
// Dropdowns get custom display
|
||||
.open .dropdown-menu {
|
||||
> .dropdown-header {
|
||||
border-color: $navbar-inverse-border;
|
||||
}
|
||||
.divider {
|
||||
background-color: $navbar-inverse-border;
|
||||
}
|
||||
> li > a {
|
||||
color: $navbar-inverse-link-color;
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $navbar-inverse-link-hover-color;
|
||||
background-color: $navbar-inverse-link-hover-bg;
|
||||
}
|
||||
}
|
||||
> .active > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $navbar-inverse-link-active-color;
|
||||
background-color: $navbar-inverse-link-active-bg;
|
||||
}
|
||||
}
|
||||
> .disabled > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $navbar-inverse-link-disabled-color;
|
||||
background-color: $navbar-inverse-link-disabled-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-link {
|
||||
color: $navbar-inverse-link-color;
|
||||
&:hover {
|
||||
color: $navbar-inverse-link-hover-color;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,242 +0,0 @@
|
|||
//
|
||||
// Navs
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
// Base class
|
||||
// --------------------------------------------------
|
||||
|
||||
.nav {
|
||||
margin-bottom: 0;
|
||||
padding-left: 0; // Override default ul/ol
|
||||
list-style: none;
|
||||
@include clearfix();
|
||||
|
||||
> li {
|
||||
position: relative;
|
||||
display: block;
|
||||
|
||||
> a {
|
||||
position: relative;
|
||||
display: block;
|
||||
padding: $nav-link-padding;
|
||||
&:hover,
|
||||
&:focus {
|
||||
text-decoration: none;
|
||||
background-color: $nav-link-hover-bg;
|
||||
}
|
||||
}
|
||||
|
||||
// Disabled state sets text to gray and nukes hover/tab effects
|
||||
&.disabled > a {
|
||||
color: $nav-disabled-link-color;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $nav-disabled-link-hover-color;
|
||||
text-decoration: none;
|
||||
background-color: transparent;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Open dropdowns
|
||||
.open > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: $nav-link-hover-bg;
|
||||
border-color: $link-color;
|
||||
}
|
||||
}
|
||||
|
||||
// Nav dividers (deprecated with v3.0.1)
|
||||
//
|
||||
// This should have been removed in v3 with the dropping of `.nav-list`, but
|
||||
// we missed it. We don't currently support this anywhere, but in the interest
|
||||
// of maintaining backward compatibility in case you use it, it's deprecated.
|
||||
.nav-divider {
|
||||
@include nav-divider();
|
||||
}
|
||||
|
||||
// Prevent IE8 from misplacing imgs
|
||||
//
|
||||
// See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989
|
||||
> li > a > img {
|
||||
max-width: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Tabs
|
||||
// -------------------------
|
||||
|
||||
// Give the tabs something to sit on
|
||||
.nav-tabs {
|
||||
border-bottom: 1px solid $nav-tabs-border-color;
|
||||
> li {
|
||||
float: left;
|
||||
// Make the list-items overlay the bottom border
|
||||
margin-bottom: -1px;
|
||||
|
||||
// Actual tabs (as links)
|
||||
> a {
|
||||
margin-right: 2px;
|
||||
line-height: $line-height-base;
|
||||
border: 1px solid transparent;
|
||||
border-radius: $border-radius-base $border-radius-base 0 0;
|
||||
&:hover {
|
||||
border-color: $nav-tabs-link-hover-border-color $nav-tabs-link-hover-border-color $nav-tabs-border-color;
|
||||
}
|
||||
}
|
||||
|
||||
// Active state, and its :hover to override normal :hover
|
||||
&.active > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $nav-tabs-active-link-hover-color;
|
||||
background-color: $nav-tabs-active-link-hover-bg;
|
||||
border: 1px solid $nav-tabs-active-link-hover-border-color;
|
||||
border-bottom-color: transparent;
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
}
|
||||
// pulling this in mainly for less shorthand
|
||||
&.nav-justified {
|
||||
@extend .nav-justified;
|
||||
@extend .nav-tabs-justified;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Pills
|
||||
// -------------------------
|
||||
.nav-pills {
|
||||
> li {
|
||||
float: left;
|
||||
|
||||
// Links rendered as pills
|
||||
> a {
|
||||
border-radius: $nav-pills-border-radius;
|
||||
}
|
||||
+ li {
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
// Active state
|
||||
&.active > a {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $nav-pills-active-link-hover-color;
|
||||
background-color: $nav-pills-active-link-hover-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Stacked pills
|
||||
.nav-stacked {
|
||||
> li {
|
||||
float: none;
|
||||
+ li {
|
||||
margin-top: 2px;
|
||||
margin-left: 0; // no need for this gap between nav items
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Nav variations
|
||||
// --------------------------------------------------
|
||||
|
||||
// Justified nav links
|
||||
// -------------------------
|
||||
|
||||
.nav-justified {
|
||||
width: 100%;
|
||||
|
||||
> li {
|
||||
float: none;
|
||||
> a {
|
||||
text-align: center;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
> .dropdown .dropdown-menu {
|
||||
top: auto;
|
||||
left: auto;
|
||||
}
|
||||
|
||||
@media (min-width: $screen-sm-min) {
|
||||
> li {
|
||||
display: table-cell;
|
||||
width: 1%;
|
||||
> a {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Move borders to anchors instead of bottom of list
|
||||
//
|
||||
// Mixin for adding on top the shared `.nav-justified` styles for our tabs
|
||||
.nav-tabs-justified {
|
||||
border-bottom: 0;
|
||||
|
||||
> li > a {
|
||||
// Override margin from .nav-tabs
|
||||
margin-right: 0;
|
||||
border-radius: $border-radius-base;
|
||||
}
|
||||
|
||||
> .active > a,
|
||||
> .active > a:hover,
|
||||
> .active > a:focus {
|
||||
border: 1px solid $nav-tabs-justified-link-border-color;
|
||||
}
|
||||
|
||||
@media (min-width: $screen-sm-min) {
|
||||
> li > a {
|
||||
border-bottom: 1px solid $nav-tabs-justified-link-border-color;
|
||||
border-radius: $border-radius-base $border-radius-base 0 0;
|
||||
}
|
||||
> .active > a,
|
||||
> .active > a:hover,
|
||||
> .active > a:focus {
|
||||
border-bottom-color: $nav-tabs-justified-active-link-border-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Tabbable tabs
|
||||
// -------------------------
|
||||
|
||||
// Hide tabbable panes to start, show them when `.active`
|
||||
.tab-content {
|
||||
> .tab-pane {
|
||||
display: none;
|
||||
}
|
||||
> .active {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Dropdowns
|
||||
// -------------------------
|
||||
|
||||
// Specific dropdowns
|
||||
.nav-tabs .dropdown-menu {
|
||||
// make dropdown border overlap tab border
|
||||
margin-top: -1px;
|
||||
// Remove the top rounded corners here since there is a hard edge above the menu
|
||||
@include border-top-radius(0);
|
||||
}
|
||||
|
|
@ -1,423 +0,0 @@
|
|||
/*! normalize.css v3.0.0 | MIT License | git.io/normalize */
|
||||
|
||||
//
|
||||
// 1. Set default font family to sans-serif.
|
||||
// 2. Prevent iOS text size adjust after orientation change, without disabling
|
||||
// user zoom.
|
||||
//
|
||||
|
||||
html {
|
||||
font-family: sans-serif; // 1
|
||||
-ms-text-size-adjust: 100%; // 2
|
||||
-webkit-text-size-adjust: 100%; // 2
|
||||
}
|
||||
|
||||
//
|
||||
// Remove default margin.
|
||||
//
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
// HTML5 display definitions
|
||||
// ==========================================================================
|
||||
|
||||
//
|
||||
// Correct `block` display not defined in IE 8/9.
|
||||
//
|
||||
|
||||
article,
|
||||
aside,
|
||||
details,
|
||||
figcaption,
|
||||
figure,
|
||||
footer,
|
||||
header,
|
||||
hgroup,
|
||||
main,
|
||||
nav,
|
||||
section,
|
||||
summary {
|
||||
display: block;
|
||||
}
|
||||
|
||||
//
|
||||
// 1. Correct `inline-block` display not defined in IE 8/9.
|
||||
// 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
|
||||
//
|
||||
|
||||
audio,
|
||||
canvas,
|
||||
progress,
|
||||
video {
|
||||
display: inline-block; // 1
|
||||
vertical-align: baseline; // 2
|
||||
}
|
||||
|
||||
//
|
||||
// Prevent modern browsers from displaying `audio` without controls.
|
||||
// Remove excess height in iOS 5 devices.
|
||||
//
|
||||
|
||||
audio:not([controls]) {
|
||||
display: none;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
//
|
||||
// Address `[hidden]` styling not present in IE 8/9.
|
||||
// Hide the `template` element in IE, Safari, and Firefox < 22.
|
||||
//
|
||||
|
||||
[hidden],
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
// Links
|
||||
// ==========================================================================
|
||||
|
||||
//
|
||||
// Remove the gray background color from active links in IE 10.
|
||||
//
|
||||
|
||||
a {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
//
|
||||
// Improve readability when focused and also mouse hovered in all browsers.
|
||||
//
|
||||
|
||||
a:active,
|
||||
a:hover {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
// Text-level semantics
|
||||
// ==========================================================================
|
||||
|
||||
//
|
||||
// Address styling not present in IE 8/9, Safari 5, and Chrome.
|
||||
//
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: 1px dotted;
|
||||
}
|
||||
|
||||
//
|
||||
// Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
|
||||
//
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
//
|
||||
// Address styling not present in Safari 5 and Chrome.
|
||||
//
|
||||
|
||||
dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
//
|
||||
// Address variable `h1` font-size and margin within `section` and `article`
|
||||
// contexts in Firefox 4+, Safari 5, and Chrome.
|
||||
//
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
//
|
||||
// Address styling not present in IE 8/9.
|
||||
//
|
||||
|
||||
mark {
|
||||
background: #ff0;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
//
|
||||
// Address inconsistent and variable font size in all browsers.
|
||||
//
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
//
|
||||
// Prevent `sub` and `sup` affecting `line-height` in all browsers.
|
||||
//
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
// Embedded content
|
||||
// ==========================================================================
|
||||
|
||||
//
|
||||
// Remove border when inside `a` element in IE 8/9.
|
||||
//
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
//
|
||||
// Correct overflow displayed oddly in IE 9.
|
||||
//
|
||||
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
// Grouping content
|
||||
// ==========================================================================
|
||||
|
||||
//
|
||||
// Address margin not present in IE 8/9 and Safari 5.
|
||||
//
|
||||
|
||||
figure {
|
||||
margin: 1em 40px;
|
||||
}
|
||||
|
||||
//
|
||||
// Address differences between Firefox and other browsers.
|
||||
//
|
||||
|
||||
hr {
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
//
|
||||
// Contain overflow in all browsers.
|
||||
//
|
||||
|
||||
pre {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
//
|
||||
// Address odd `em`-unit font size rendering in all browsers.
|
||||
//
|
||||
|
||||
code,
|
||||
kbd,
|
||||
pre,
|
||||
samp {
|
||||
font-family: monospace, monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
// Forms
|
||||
// ==========================================================================
|
||||
|
||||
//
|
||||
// Known limitation: by default, Chrome and Safari on OS X allow very limited
|
||||
// styling of `select`, unless a `border` property is set.
|
||||
//
|
||||
|
||||
//
|
||||
// 1. Correct color not being inherited.
|
||||
// Known issue: affects color of disabled elements.
|
||||
// 2. Correct font properties not being inherited.
|
||||
// 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
|
||||
//
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
color: inherit; // 1
|
||||
font: inherit; // 2
|
||||
margin: 0; // 3
|
||||
}
|
||||
|
||||
//
|
||||
// Address `overflow` set to `hidden` in IE 8/9/10.
|
||||
//
|
||||
|
||||
button {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
//
|
||||
// Address inconsistent `text-transform` inheritance for `button` and `select`.
|
||||
// All other form control elements do not inherit `text-transform` values.
|
||||
// Correct `button` style inheritance in Firefox, IE 8+, and Opera
|
||||
// Correct `select` style inheritance in Firefox.
|
||||
//
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
//
|
||||
// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
|
||||
// and `video` controls.
|
||||
// 2. Correct inability to style clickable `input` types in iOS.
|
||||
// 3. Improve usability and consistency of cursor style between image-type
|
||||
// `input` and others.
|
||||
//
|
||||
|
||||
button,
|
||||
html input[type="button"], // 1
|
||||
input[type="reset"],
|
||||
input[type="submit"] {
|
||||
-webkit-appearance: button; // 2
|
||||
cursor: pointer; // 3
|
||||
}
|
||||
|
||||
//
|
||||
// Re-set default cursor for disabled elements.
|
||||
//
|
||||
|
||||
button[disabled],
|
||||
html input[disabled] {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
//
|
||||
// Remove inner padding and border in Firefox 4+.
|
||||
//
|
||||
|
||||
button::-moz-focus-inner,
|
||||
input::-moz-focus-inner {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
//
|
||||
// Address Firefox 4+ setting `line-height` on `input` using `!important` in
|
||||
// the UA stylesheet.
|
||||
//
|
||||
|
||||
input {
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
//
|
||||
// It's recommended that you don't attempt to style these elements.
|
||||
// Firefox's implementation doesn't respect box-sizing, padding, or width.
|
||||
//
|
||||
// 1. Address box sizing set to `content-box` in IE 8/9/10.
|
||||
// 2. Remove excess padding in IE 8/9/10.
|
||||
//
|
||||
|
||||
input[type="checkbox"],
|
||||
input[type="radio"] {
|
||||
box-sizing: border-box; // 1
|
||||
padding: 0; // 2
|
||||
}
|
||||
|
||||
//
|
||||
// Fix the cursor style for Chrome's increment/decrement buttons. For certain
|
||||
// `font-size` values of the `input`, it causes the cursor style of the
|
||||
// decrement button to change from `default` to `text`.
|
||||
//
|
||||
|
||||
input[type="number"]::-webkit-inner-spin-button,
|
||||
input[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
//
|
||||
// 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
|
||||
// 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
|
||||
// (include `-moz` to future-proof).
|
||||
//
|
||||
|
||||
input[type="search"] {
|
||||
-webkit-appearance: textfield; // 1
|
||||
-moz-box-sizing: content-box;
|
||||
-webkit-box-sizing: content-box; // 2
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
//
|
||||
// Remove inner padding and search cancel button in Safari and Chrome on OS X.
|
||||
// Safari (but not Chrome) clips the cancel button when the search input has
|
||||
// padding (and `textfield` appearance).
|
||||
//
|
||||
|
||||
input[type="search"]::-webkit-search-cancel-button,
|
||||
input[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
//
|
||||
// Define consistent border, margin, and padding.
|
||||
//
|
||||
|
||||
fieldset {
|
||||
border: 1px solid #c0c0c0;
|
||||
margin: 0 2px;
|
||||
padding: 0.35em 0.625em 0.75em;
|
||||
}
|
||||
|
||||
//
|
||||
// 1. Correct `color` not being inherited in IE 8/9.
|
||||
// 2. Remove padding so people aren't caught out if they zero out fieldsets.
|
||||
//
|
||||
|
||||
legend {
|
||||
border: 0; // 1
|
||||
padding: 0; // 2
|
||||
}
|
||||
|
||||
//
|
||||
// Remove default vertical scrollbar in IE 8/9.
|
||||
//
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
//
|
||||
// Don't inherit the `font-weight` (applied by a rule above).
|
||||
// NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
|
||||
//
|
||||
|
||||
optgroup {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
// Tables
|
||||
// ==========================================================================
|
||||
|
||||
//
|
||||
// Remove most spacing between table cells.
|
||||
//
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
td,
|
||||
th {
|
||||
padding: 0;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue