Merge branch 'master' of https://github.com/Rulingcom/orbit
* 'master' of https://github.com/Rulingcom/orbit: (57 commits) Add translations Add mobile version in site settings Add mobile but remove news in it Remove mysql Fix album widget options Fix link for ad_banner Add missing helper for web_link_category Show design's js in front-end Add link to default widget (temporary) Ika's fix for width Ika's fix for width Gallery i18n Ika's changes for css default widgets Ika's changes for css default widgets change bulletin object to bulletin title fixing default widget error when needs image make default widget works without init Fix order in structure Fix old tags correct pic file format complete page error handler logic change sub_menu to header in site setting ...
1
Gemfile
|
@ -22,7 +22,6 @@ gem 'mini_magick'
|
|||
gem 'mongoid', '> 2.1', '< 3.0.0'
|
||||
gem 'mongoid-tree', :require => 'mongoid/tree'
|
||||
gem "mongo_session_store-rails3"
|
||||
gem 'mysql2'
|
||||
gem 'nokogiri'
|
||||
|
||||
|
||||
|
|
After Width: | Height: | Size: 7.6 KiB |
After Width: | Height: | Size: 177 KiB |
After Width: | Height: | Size: 192 KiB |
After Width: | Height: | Size: 683 KiB |
After Width: | Height: | Size: 461 KiB |
After Width: | Height: | Size: 268 KiB |
After Width: | Height: | Size: 319 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 8.3 KiB |
After Width: | Height: | Size: 96 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 31 KiB |
|
@ -55,7 +55,7 @@ $(document).ready(function() {
|
|||
// }
|
||||
// })
|
||||
|
||||
$("a.preview_trigger").click(function(){
|
||||
$("a.preview_trigger").live('click',function(){
|
||||
$("#main-wrap").after("<span id='show_preview'></span>");
|
||||
$.ajax({
|
||||
type: 'PUT',
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
// This is a manifest file that'll be compiled into including all the files listed below.
|
||||
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
|
||||
// be included in the compiled file accessible from http://example.com/assets/application.js
|
||||
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
||||
// the compiled file.
|
||||
//
|
||||
//= require jquery
|
||||
//= require mobile/jquery.cycle.all
|
||||
//= require mobile/jquery.mu.image.resize
|
||||
//= require mobile/orbit.mobile
|
||||
//= require mobile/jquery.mobile-1.2.0.min
|
||||
//= require mobile/jquery.swipeplanes-1.2.min
|
||||
//= require mobile/add2home
|
||||
//= require mobile/gmAPI
|
||||
//= require mobile/jquery.ui.map
|
|
@ -0,0 +1,350 @@
|
|||
/*!
|
||||
* Add to Homescreen v2.0.4 ~ Copyright (c) 2012 Matteo Spinelli, http://cubiq.org
|
||||
* Released under MIT license, http://cubiq.org/license
|
||||
*/
|
||||
var addToHome = (function (w) {
|
||||
var nav = w.navigator,
|
||||
isIDevice = 'platform' in nav && (/iphone|ipod|ipad/gi).test(nav.platform),
|
||||
isIPad,
|
||||
isRetina,
|
||||
isSafari,
|
||||
isStandalone,
|
||||
OSVersion,
|
||||
startX = 0,
|
||||
startY = 0,
|
||||
lastVisit = 0,
|
||||
isExpired,
|
||||
isSessionActive,
|
||||
isReturningVisitor,
|
||||
balloon,
|
||||
overrideChecks,
|
||||
|
||||
positionInterval,
|
||||
closeTimeout,
|
||||
|
||||
options = {
|
||||
autostart: true, // Automatically open the balloon
|
||||
returningVisitor: false, // Show the balloon to returning visitors only (setting this to true is HIGHLY RECCOMENDED)
|
||||
animationIn: 'bubble', // drop || bubble || fade
|
||||
animationOut: 'drop', // drop || bubble || fade
|
||||
startDelay: 2000, // 2 seconds from page load before the balloon appears
|
||||
lifespan: 10000, // 15 seconds before it is automatically destroyed
|
||||
bottomOffset: 14, // Distance of the balloon from bottom
|
||||
expire: 0, // Minutes to wait before showing the popup again (0 = always displayed)
|
||||
message: '', // Customize your message or force a language ('' = automatic)
|
||||
touchIcon: true, // Display the touch icon
|
||||
arrow: true, // Display the balloon arrow
|
||||
hookOnLoad: true, // Should we hook to onload event? (really advanced usage)
|
||||
iterations: 100 // Internal/debug use
|
||||
},
|
||||
|
||||
intl = {
|
||||
ca_es: 'Per instal·lar aquesta aplicació al vostre %device premeu %icon i llavors <strong>Afegir a pantalla d\'inici</strong>.',
|
||||
cs_cz: 'Pro instalaci aplikace na Váš %device, stiskněte %icon a v nabídce <strong>Přidat na plochu</strong>.',
|
||||
da_dk: 'Tilføj denne side til din %device: tryk på %icon og derefter <strong>Føj til hjemmeskærm</strong>.',
|
||||
de_de: 'Installieren Sie diese App auf Ihrem %device: %icon antippen und dann <strong>Zum Home-Bildschirm</strong>.',
|
||||
el_gr: 'Εγκαταστήσετε αυτήν την Εφαρμογή στήν συσκευή σας %device: %icon μετά πατάτε <strong>Προσθήκη σε Αφετηρία</strong>.',
|
||||
en_us: 'Install this web app on your %device: tap %icon and then <strong>Add to Home Screen</strong>.',
|
||||
es_es: 'Para instalar esta app en su %device, pulse %icon y seleccione <strong>Añadir a pantalla de inicio</strong>.',
|
||||
fi_fi: 'Asenna tämä web-sovellus laitteeseesi %device: paina %icon ja sen jälkeen valitse <strong>Lisää Koti-valikkoon</strong>.',
|
||||
fr_fr: 'Ajoutez cette application sur votre %device en cliquant sur %icon, puis <strong>Ajouter à l\'écran d\'accueil</strong>.',
|
||||
he_il: '<span dir="rtl">התקן אפליקציה זו על ה-%device שלך: הקש %icon ואז <strong>הוסף למסך הבית</strong>.</span>',
|
||||
hr_hr: 'Instaliraj ovu aplikaciju na svoj %device: klikni na %icon i odaberi <strong>Dodaj u početni zaslon</strong>.',
|
||||
hu_hu: 'Telepítse ezt a web-alkalmazást az Ön %device-jára: nyomjon a %icon-ra majd a <strong>Főképernyőhöz adás</strong> gombra.',
|
||||
it_it: 'Installa questa applicazione sul tuo %device: premi su %icon e poi <strong>Aggiungi a Home</strong>.',
|
||||
ja_jp: 'このウェブアプリをあなたの%deviceにインストールするには%iconをタップして<strong>ホーム画面に追加</strong>を選んでください。',
|
||||
ko_kr: '%device에 웹앱을 설치하려면 %icon을 터치 후 "홈화면에 추가"를 선택하세요',
|
||||
nb_no: 'Installer denne appen på din %device: trykk på %icon og deretter <strong>Legg til på Hjem-skjerm</strong>',
|
||||
nl_nl: 'Installeer deze webapp op uw %device: tik %icon en dan <strong>Zet in beginscherm</strong>.',
|
||||
pl_pl: 'Aby zainstalować tę aplikacje na %device: naciśnij %icon a następnie <strong>Dodaj jako ikonę</strong>.',
|
||||
pt_br: 'Instale este web app em seu %device: aperte %icon e selecione <strong>Adicionar à Tela Inicio</strong>.',
|
||||
pt_pt: 'Para instalar esta aplicação no seu %device, prima o %icon e depois o <strong>Adicionar ao ecrã principal</strong>.',
|
||||
ru_ru: 'Установите это веб-приложение на ваш %device: нажмите %icon, затем <strong>Добавить в «Домой»</strong>.',
|
||||
sv_se: 'Lägg till denna webbapplikation på din %device: tryck på %icon och därefter <strong>Lägg till på hemskärmen</strong>.',
|
||||
th_th: 'ติดตั้งเว็บแอพฯ นี้บน %device ของคุณ: แตะ %icon และ <strong>เพิ่มที่หน้าจอโฮม</strong>',
|
||||
tr_tr: '%device için bu uygulamayı kurduktan sonra %icon simgesine dokunarak <strong>Ana Ekrana Ekle</strong>yin.',
|
||||
zh_cn: '您可以将此应用程式安装到您的 %device 上。请按 %icon 然后点选<strong>添加至主屏幕</strong>。',
|
||||
zh_tw: '您可以將此應用程式安裝到您的 %device 上。請按 %icon 然後點選<strong>加入主畫面螢幕</strong>。'
|
||||
};
|
||||
|
||||
function init () {
|
||||
// Preliminary check, all further checks are performed on iDevices only
|
||||
if ( !isIDevice ) return;
|
||||
|
||||
var now = Date.now(),
|
||||
i;
|
||||
|
||||
// Merge local with global options
|
||||
if ( w.addToHomeConfig ) {
|
||||
for ( i in w.addToHomeConfig ) {
|
||||
options[i] = w.addToHomeConfig[i];
|
||||
}
|
||||
}
|
||||
if ( !options.autostart ) options.hookOnLoad = false;
|
||||
|
||||
isIPad = (/ipad/gi).test(nav.platform);
|
||||
isRetina = w.devicePixelRatio && w.devicePixelRatio > 1;
|
||||
isSafari = (/Safari/i).test(nav.appVersion) && !(/CriOS/i).test(nav.appVersion);
|
||||
isStandalone = nav.standalone;
|
||||
OSVersion = nav.appVersion.match(/OS (\d+_\d+)/i);
|
||||
OSVersion = OSVersion[1] ? +OSVersion[1].replace('_', '.') : 0;
|
||||
|
||||
lastVisit = +w.localStorage.getItem('addToHome');
|
||||
|
||||
isSessionActive = w.sessionStorage.getItem('addToHomeSession');
|
||||
isReturningVisitor = options.returningVisitor ? lastVisit && lastVisit + 28*24*60*60*1000 > now : true;
|
||||
|
||||
if ( !lastVisit ) lastVisit = now;
|
||||
|
||||
// If it is expired we need to reissue a new balloon
|
||||
isExpired = isReturningVisitor && lastVisit <= now;
|
||||
|
||||
if ( options.hookOnLoad ) w.addEventListener('load', loaded, false);
|
||||
else if ( !options.hookOnLoad && options.autostart ) loaded();
|
||||
}
|
||||
|
||||
function loaded () {
|
||||
w.removeEventListener('load', loaded, false);
|
||||
|
||||
if ( !isReturningVisitor ) w.localStorage.setItem('addToHome', Date.now());
|
||||
else if ( options.expire && isExpired ) w.localStorage.setItem('addToHome', Date.now() + options.expire * 60000);
|
||||
|
||||
if ( !overrideChecks && ( !isSafari || !isExpired || isSessionActive || isStandalone || !isReturningVisitor ) ) return;
|
||||
|
||||
var icons = options.touchIcon ? document.querySelectorAll('head link[rel=apple-touch-icon],head link[rel=apple-touch-icon-precomposed]') : [],
|
||||
sizes,
|
||||
touchIcon = '',
|
||||
closeButton,
|
||||
platform = nav.platform.split(' ')[0],
|
||||
language = nav.language.replace('-', '_'),
|
||||
i, l;
|
||||
|
||||
balloon = document.createElement('div');
|
||||
balloon.id = 'addToHomeScreen';
|
||||
balloon.style.cssText += 'left:-9999px;-webkit-transition-property:-webkit-transform,opacity;-webkit-transition-duration:0;-webkit-transform:translate3d(0,0,0);position:' + (OSVersion < 5 ? 'absolute' : 'fixed');
|
||||
|
||||
// Localize message
|
||||
if ( options.message in intl ) { // You may force a language despite the user's locale
|
||||
language = options.message;
|
||||
options.message = '';
|
||||
}
|
||||
if ( options.message === '' ) { // We look for a suitable language (defaulted to en_us)
|
||||
options.message = language in intl ? intl[language] : intl['en_us'];
|
||||
}
|
||||
|
||||
// Search for the apple-touch-icon
|
||||
if ( icons.length ) {
|
||||
for ( i = 0, l = icons.length; i < l; i++ ) {
|
||||
sizes = icons[i].getAttribute('sizes');
|
||||
|
||||
if ( sizes ) {
|
||||
if ( isRetina && sizes == '114x114' ) {
|
||||
touchIcon = icons[i].href;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
touchIcon = icons[i].href;
|
||||
}
|
||||
}
|
||||
|
||||
touchIcon = '<span style="background-image:url(' + touchIcon + ')" class="addToHomeTouchIcon"></span>';
|
||||
}
|
||||
|
||||
balloon.className = (isIPad ? 'addToHomeIpad' : 'addToHomeIphone') + (touchIcon ? ' addToHomeWide' : '');
|
||||
balloon.innerHTML = touchIcon +
|
||||
options.message.replace('%device', platform).replace('%icon', OSVersion >= 4.2 ? '<span class="addToHomeShare"></span>' : '<span class="addToHomePlus">+</span>') +
|
||||
(options.arrow ? '<span class="addToHomeArrow"></span>' : '') +
|
||||
'<span class="addToHomeClose">\u00D7</span>';
|
||||
|
||||
document.body.appendChild(balloon);
|
||||
|
||||
// Add the close action
|
||||
closeButton = balloon.querySelector('.addToHomeClose');
|
||||
if ( closeButton ) closeButton.addEventListener('click', clicked, false);
|
||||
|
||||
if ( !isIPad && OSVersion >= 6 ) window.addEventListener('orientationchange', orientationCheck, false);
|
||||
|
||||
setTimeout(show, options.startDelay);
|
||||
}
|
||||
|
||||
function show () {
|
||||
var duration,
|
||||
iPadXShift = 208;
|
||||
|
||||
// Set the initial position
|
||||
if ( isIPad ) {
|
||||
if ( OSVersion < 5 ) {
|
||||
startY = w.scrollY;
|
||||
startX = w.scrollX;
|
||||
} else if ( OSVersion < 6 ) {
|
||||
iPadXShift = 160;
|
||||
}
|
||||
|
||||
balloon.style.top = startY + options.bottomOffset + 'px';
|
||||
balloon.style.left = startX + iPadXShift - Math.round(balloon.offsetWidth / 2) + 'px';
|
||||
|
||||
switch ( options.animationIn ) {
|
||||
case 'drop':
|
||||
duration = '0.6s';
|
||||
balloon.style.webkitTransform = 'translate3d(0,' + -(w.scrollY + options.bottomOffset + balloon.offsetHeight) + 'px,0)';
|
||||
break;
|
||||
case 'bubble':
|
||||
duration = '0.6s';
|
||||
balloon.style.opacity = '0';
|
||||
balloon.style.webkitTransform = 'translate3d(0,' + (startY + 50) + 'px,0)';
|
||||
break;
|
||||
default:
|
||||
duration = '1s';
|
||||
balloon.style.opacity = '0';
|
||||
}
|
||||
} else {
|
||||
startY = w.innerHeight + w.scrollY;
|
||||
|
||||
if ( OSVersion < 5 ) {
|
||||
startX = Math.round((w.innerWidth - balloon.offsetWidth) / 2) + w.scrollX;
|
||||
balloon.style.left = startX + 'px';
|
||||
balloon.style.top = startY - balloon.offsetHeight - options.bottomOffset + 'px';
|
||||
} else {
|
||||
balloon.style.left = '50%';
|
||||
balloon.style.marginLeft = -Math.round(balloon.offsetWidth / 2) - ( w.orientation%180 && OSVersion >= 6 ? 40 : 0 ) + 'px';
|
||||
balloon.style.bottom = options.bottomOffset + 'px';
|
||||
}
|
||||
|
||||
switch (options.animationIn) {
|
||||
case 'drop':
|
||||
duration = '1s';
|
||||
balloon.style.webkitTransform = 'translate3d(0,' + -(startY + options.bottomOffset) + 'px,0)';
|
||||
break;
|
||||
case 'bubble':
|
||||
duration = '0.6s';
|
||||
balloon.style.webkitTransform = 'translate3d(0,' + (balloon.offsetHeight + options.bottomOffset + 50) + 'px,0)';
|
||||
break;
|
||||
default:
|
||||
duration = '1s';
|
||||
balloon.style.opacity = '0';
|
||||
}
|
||||
}
|
||||
|
||||
balloon.offsetHeight; // repaint trick
|
||||
balloon.style.webkitTransitionDuration = duration;
|
||||
balloon.style.opacity = '1';
|
||||
balloon.style.webkitTransform = 'translate3d(0,0,0)';
|
||||
balloon.addEventListener('webkitTransitionEnd', transitionEnd, false);
|
||||
|
||||
closeTimeout = setTimeout(close, options.lifespan);
|
||||
}
|
||||
|
||||
function manualShow (override) {
|
||||
if ( !isIDevice || balloon ) return;
|
||||
|
||||
overrideChecks = override;
|
||||
loaded();
|
||||
}
|
||||
|
||||
function close () {
|
||||
clearInterval( positionInterval );
|
||||
clearTimeout( closeTimeout );
|
||||
closeTimeout = null;
|
||||
|
||||
var posY = 0,
|
||||
posX = 0,
|
||||
opacity = '1',
|
||||
duration = '0',
|
||||
closeButton = balloon.querySelector('.addToHomeClose');
|
||||
|
||||
if ( closeButton ) closeButton.removeEventListener('click', close, false);
|
||||
if ( !isIPad && OSVersion >= 6 ) window.removeEventListener('orientationchange', orientationCheck, false);
|
||||
|
||||
if ( OSVersion < 5 ) {
|
||||
posY = isIPad ? w.scrollY - startY : w.scrollY + w.innerHeight - startY;
|
||||
posX = isIPad ? w.scrollX - startX : w.scrollX + Math.round((w.innerWidth - balloon.offsetWidth)/2) - startX;
|
||||
}
|
||||
|
||||
balloon.style.webkitTransitionProperty = '-webkit-transform,opacity';
|
||||
|
||||
switch ( options.animationOut ) {
|
||||
case 'drop':
|
||||
if ( isIPad ) {
|
||||
duration = '0.4s';
|
||||
opacity = '0';
|
||||
posY = posY + 50;
|
||||
} else {
|
||||
duration = '0.6s';
|
||||
posY = posY + balloon.offsetHeight + options.bottomOffset + 50;
|
||||
}
|
||||
break;
|
||||
case 'bubble':
|
||||
if ( isIPad ) {
|
||||
duration = '0.8s';
|
||||
posY = posY - balloon.offsetHeight - options.bottomOffset - 50;
|
||||
} else {
|
||||
duration = '0.4s';
|
||||
opacity = '0';
|
||||
posY = posY - 50;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
duration = '0.8s';
|
||||
opacity = '0';
|
||||
}
|
||||
|
||||
balloon.addEventListener('webkitTransitionEnd', transitionEnd, false);
|
||||
balloon.style.opacity = opacity;
|
||||
balloon.style.webkitTransitionDuration = duration;
|
||||
balloon.style.webkitTransform = 'translate3d(' + posX + 'px,' + posY + 'px,0)';
|
||||
}
|
||||
|
||||
|
||||
function clicked () {
|
||||
w.sessionStorage.setItem('addToHomeSession', '1');
|
||||
isSessionActive = true;
|
||||
close();
|
||||
}
|
||||
|
||||
function transitionEnd () {
|
||||
balloon.removeEventListener('webkitTransitionEnd', transitionEnd, false);
|
||||
|
||||
balloon.style.webkitTransitionProperty = '-webkit-transform';
|
||||
balloon.style.webkitTransitionDuration = '0.2s';
|
||||
|
||||
// We reached the end!
|
||||
if ( !closeTimeout ) {
|
||||
balloon.parentNode.removeChild(balloon);
|
||||
balloon = null;
|
||||
return;
|
||||
}
|
||||
|
||||
// On iOS 4 we start checking the element position
|
||||
if ( OSVersion < 5 && closeTimeout ) positionInterval = setInterval(setPosition, options.iterations);
|
||||
}
|
||||
|
||||
function setPosition () {
|
||||
var matrix = new WebKitCSSMatrix(w.getComputedStyle(balloon, null).webkitTransform),
|
||||
posY = isIPad ? w.scrollY - startY : w.scrollY + w.innerHeight - startY,
|
||||
posX = isIPad ? w.scrollX - startX : w.scrollX + Math.round((w.innerWidth - balloon.offsetWidth) / 2) - startX;
|
||||
|
||||
// Screen didn't move
|
||||
if ( posY == matrix.m42 && posX == matrix.m41 ) return;
|
||||
|
||||
balloon.style.webkitTransform = 'translate3d(' + posX + 'px,' + posY + 'px,0)';
|
||||
}
|
||||
|
||||
// Clear local and session storages (this is useful primarily in development)
|
||||
function reset () {
|
||||
w.localStorage.removeItem('addToHome');
|
||||
w.sessionStorage.removeItem('addToHomeSession');
|
||||
}
|
||||
|
||||
function orientationCheck () {
|
||||
balloon.style.marginLeft = -Math.round(balloon.offsetWidth / 2) - ( w.orientation%180 && OSVersion >= 6 ? 40 : 0 ) + 'px';
|
||||
}
|
||||
|
||||
// Bootstrap!
|
||||
init();
|
||||
|
||||
return {
|
||||
show: manualShow,
|
||||
close: close,
|
||||
reset: reset
|
||||
};
|
||||
})(window);
|
|
@ -0,0 +1,34 @@
|
|||
String.prototype.format = function() { a = this; for ( k in arguments ) { a = a.replace("{" + k + "}", arguments[k]); } return a; };
|
||||
window.gmAPI = {
|
||||
'version': '3.0-rc1',
|
||||
'ga': '',
|
||||
'primaryUrl': 'http://code.google.com/p/jquery-ui-map/',
|
||||
'url': 'http://jquery-ui-map.googlecode.com/',
|
||||
'forum': 'http://groups.google.com/group/jquery-ui-map-discuss/feed/rss_v2_0_msgs.xml',
|
||||
'subscribe': 'http://groups.google.com/group/jquery-ui-map-discuss/boxsubscribe',
|
||||
'exception': 'Unable to load due to either poor internet connection or some CDN\'s aren\'t as responsive as we would like them to be. Try refreshing the page :D.',
|
||||
'init': function() {
|
||||
//window._gaq = [['_setAccount', this.ga], ['_trackPageview'], ['_trackPageLoadTime']];
|
||||
//Modernizr.load({ 'test': ( location.href.indexOf(this.url) > -1 ), 'yep': 'http://www.google-analytics.com/ga.js' });
|
||||
this.test('Backbone', function() {
|
||||
$('#forum').append('<h2>Forum</h2><ul id="forum_posts"></ul><h2>Subscribe</h2><form id="forum_subscribe" class="subscribe" action="#"><label for="email">E-mail:</label><input id="email" type="text" name="email" /><input type="submit" name="sub" value="Subscribe" /></form>');
|
||||
ForumCollection = Backbone.Collection.extend({ 'url': 'http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&callback=?&q={0}'.format(encodeURIComponent(gmAPI.forum)), 'parse': function(response) { return response.responseData.feed.entries; } });
|
||||
ForumPost = Backbone.View.extend({ 'tagName': 'li', 'className': 'group-item', 'template': _.template('<a href="<%=link%>"><%=title%></a></h3>'), 'render': function() { $(this.el).html(this.template(this.model.toJSON())); return this; } });
|
||||
Forum = Backbone.View.extend({ 'el': $("#forum"), 'initialize': function() { this.col = new ForumCollection(); this.col.bind('reset', this.load, this); this.col.fetch(); }, 'add': function(post) { var view = new ForumPost({'model': post}); $('#forum_posts').append(view.render().el); }, 'load': function () { this.col.each(this.add); $('#forum_subscribe').attr('action', gmAPI.subscribe); $(this.el).show(); } });
|
||||
var app = new Forum();
|
||||
});
|
||||
this.test('prettyPrint', function() { prettyPrint(); });
|
||||
$('#version').text(this.version);
|
||||
},
|
||||
'redirect': function(url) { alert('This page is deprecated. Please update your URL. Redirecting to new page.'); window.location = url; },
|
||||
'col': [],
|
||||
'tests': [],
|
||||
'test': function(a, b) { if ( window[a] ) { b(); } },
|
||||
'add': function(a, b) { if (b) { this.col[a] = b; } else { this.col.push(a); } return this; },
|
||||
'load': function(a) { var self = this; if (a) { self.col[a](); } else { $.each(self.col, function(i,d) { try { d(); } catch (err) { alert(self.exception); } }); } },
|
||||
'timeStart': function(key, desc) { this.tests[key] = { 'start': new Date().getTime(), 'desc': desc }; },
|
||||
'timeEnd': function(key) { this.tests[key].elapsed = new Date().getTime(); },
|
||||
'report': function(id) { var i = 1; for ( var k in this.tests ) { var t = this.tests[k]; $(id).append('<div class="benchmark rounded"><div class="benchmark-result lt">' + (t.elapsed - t.start) + ' ms</div><div class="lt"><p class="benchmark-iteration">Benchmark case ' + i + '</p><p class="benchmark-title">' + t.desc + '</p></div></div>'); i++; }; }
|
||||
};
|
||||
|
||||
gmAPI.init();
|
|
@ -0,0 +1,147 @@
|
|||
(function( $ ) {
|
||||
$.fn.muImageResize = function( params ) {
|
||||
var _defaultSettings = {
|
||||
width:300,
|
||||
height:300,
|
||||
wrap_fix:true // Let image display like in-line.
|
||||
};
|
||||
var _set = $.extend(_defaultSettings, params);
|
||||
var isIE7 = $.browser.msie && (7 == ~~ $.browser.version);
|
||||
|
||||
//var anyDynamicSource = $(this).attr("src");
|
||||
//$(this).attr("src",anyDynamicSource+ "?" + new Date().getTime());
|
||||
|
||||
// Just bind load event once per element.
|
||||
return this.one('load', function() {
|
||||
// Remove all attributes and CSS rules.
|
||||
this.removeAttribute( "width" );
|
||||
this.removeAttribute( "height" );
|
||||
this.style.width = this.style.height = "";
|
||||
|
||||
var ow, oh;
|
||||
|
||||
//[workaround] - msie need get width early
|
||||
if ($.browser.msie)
|
||||
{
|
||||
// Get original size for calcutation.
|
||||
ow = this.width;
|
||||
oh = this.height;
|
||||
}
|
||||
|
||||
if (_set.wrap_fix) {
|
||||
$(this).wrap(function(){
|
||||
return '<div style="width:'+_set.width+'px; height:'+_set.height+'px; display:inline-block;" />';
|
||||
});
|
||||
}
|
||||
|
||||
if (!$.browser.msie)
|
||||
{
|
||||
// Get original size for calcutation.
|
||||
ow = this.width;
|
||||
oh = this.height;
|
||||
}
|
||||
|
||||
// if cannot get width or height.
|
||||
if (0==ow || 0==oh){
|
||||
$(this).width(_set.width);
|
||||
$(this).height(_set.height);
|
||||
}else{
|
||||
|
||||
// Merge position settings
|
||||
var sh_margin_type='';
|
||||
|
||||
// if original image's width > height.
|
||||
if (ow > oh) {
|
||||
p = oh / _set.height;
|
||||
oh = _set.height;
|
||||
ow = ow / p;
|
||||
|
||||
// original image width smaller than settings.
|
||||
if (ow < _set.width){
|
||||
// need to resize again,
|
||||
// because new image size range must can cover settings' range, than we can crop it correctly.
|
||||
p = ow / _set.width;
|
||||
ow = _set.width;
|
||||
oh = oh / p;
|
||||
|
||||
// the crop range would be in the center of new image size.
|
||||
sh = (oh-_set.height)/2;
|
||||
t=sh+'px';
|
||||
r=_set.width+'px';
|
||||
b=(_set.height+sh)+'px';
|
||||
l='0px';
|
||||
|
||||
// need to be adjust top position latter.
|
||||
sh_margin_type = 'margin-top';
|
||||
|
||||
// original image width bigger than settings.
|
||||
}else{
|
||||
// new image range can cover settings' range.
|
||||
sh = (ow-_set.width)/2;
|
||||
t='0px';
|
||||
r=(_set.width+sh)+'px';
|
||||
b=_set.height+'px';
|
||||
l=sh+'px';
|
||||
// need to be adjust left position latter.
|
||||
sh_margin_type = 'margin-left';
|
||||
}
|
||||
// ref above, change width to height then do same things.
|
||||
}else{
|
||||
p = ow / _set.width;
|
||||
ow = _set.width;
|
||||
oh = oh / p;
|
||||
|
||||
if (oh < _set.height) {
|
||||
p = oh / _set.height;
|
||||
oh = _set.height;
|
||||
ow = ow / p;
|
||||
|
||||
sh = (ow-_set.width)/2;
|
||||
t='0px';
|
||||
r=(_set.width+sh)+'px';
|
||||
b=_set.height+'px';
|
||||
l=sh+'px';
|
||||
sh_margin_type = 'margin-left';
|
||||
}else{
|
||||
sh = (oh-_set.height)/2;
|
||||
t=sh+'px';
|
||||
r=_set.width+'px';
|
||||
b=(_set.height+sh)+'px';
|
||||
l='0px';
|
||||
sh_margin_type = 'margin-top';
|
||||
}
|
||||
}
|
||||
|
||||
// Resize img.
|
||||
$(this).width(ow);
|
||||
$(this).height(oh);
|
||||
|
||||
// Crop img by set clip style.
|
||||
$(this).css('clip','rect('+t+' '+r+' '+b+' '+l+')');
|
||||
|
||||
var osh = 0;
|
||||
if('auto' != $(this).css(sh_margin_type)){
|
||||
osh = parseInt($(this).css(sh_margin_type));
|
||||
}
|
||||
|
||||
if (0 < sh) {sh*=-1;}
|
||||
sh += osh;
|
||||
|
||||
$(this).css(sh_margin_type, sh+'px');
|
||||
$(this).css('position','absolute');
|
||||
}
|
||||
$(this).fadeIn('slow');
|
||||
})
|
||||
.one( "error", function() {
|
||||
//$(this).hide();
|
||||
})
|
||||
.each(function() {
|
||||
$(this).hide();
|
||||
// Trigger load event (for Gecko and MSIE)
|
||||
if ( this.complete || $.browser.msie ) {
|
||||
$( this ).trigger( "load" ).trigger( "error" );
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
})( jQuery );
|
|
@ -0,0 +1,242 @@
|
|||
//SwipePlanes v1.2 jQuery Plugin by REMD
|
||||
$.fn.swipePlanes = function(opciones){
|
||||
return this.each(function(){
|
||||
|
||||
var randId = Math.round(100*Math.random()); ////IDENTIFICADOR ALEATORIO DE LA INSTANCIA//////////
|
||||
|
||||
//EL VISOR /////////////////////////////////////
|
||||
this.onselectstart = function(){return false;};
|
||||
this.unselectable = "on";
|
||||
$(this).css('-moz-user-select', 'none');
|
||||
$(this).css('-webkit-user-select', 'none');
|
||||
$(this).css('overflow','hidden');
|
||||
|
||||
if($(this).css('position') != 'absolute')$(this).css('position','relative');
|
||||
|
||||
|
||||
var anchoVisor = $(this).width();
|
||||
var altoVisor = $(this).height;
|
||||
var divVisor = this;
|
||||
|
||||
//El CONTENEDOR /////////////////////////////////////
|
||||
var divContenedor;
|
||||
var pagActual = 0;
|
||||
|
||||
divContenedor = $(this).children('div:first');
|
||||
divContenedor.css('transition','none');
|
||||
divContenedor.css('-moz-user-select', 'none');
|
||||
divContenedor.css('-webkit-user-select', 'none');
|
||||
divContenedor.css('position','relative');
|
||||
divContenedor.css('left','0px');
|
||||
|
||||
//LAS PAGINAS /////////////////////////////////////////
|
||||
var divPaginas;
|
||||
var bufferPaginas = 0;
|
||||
var metaPaginas = 0;
|
||||
var metaPagNum = 0;
|
||||
|
||||
divPaginas = divContenedor.children('div,a');
|
||||
divPaginas.css('display','inline-block');
|
||||
divPaginas.css('float','left');
|
||||
divPaginas.css('position','relative');
|
||||
|
||||
metaPaginas = new Array();
|
||||
metaPaginas[0] = 0;
|
||||
|
||||
divPaginas.each(function(){
|
||||
if((bufferPaginas+(this.offsetWidth)) > anchoVisor+metaPaginas[metaPagNum]){
|
||||
if(bufferPaginas > 0)metaPagNum++;
|
||||
metaPaginas[metaPagNum] = bufferPaginas;
|
||||
}
|
||||
|
||||
bufferPaginas += (this.offsetWidth + parseInt($(this).css('margin-left'))+parseInt($(this).css('margin-right')));
|
||||
});
|
||||
|
||||
metaPaginas[metaPagNum] -= anchoVisor - (bufferPaginas-metaPaginas[metaPagNum]); //Ajuste <20>ltimo salto
|
||||
|
||||
divContenedor.css('width',bufferPaginas+'px'); //Ajuste Contenedor al tamano de las paginas
|
||||
|
||||
generarControles($(this),metaPagNum);
|
||||
|
||||
//LOS EVENTOS ////////////////////////////////////////////
|
||||
var iX = 0,aX = 0,fX = 0; //Manejo de coordenadas
|
||||
var drag = 0,t = 0,ms = 0,metaEvento,dX = 0; //Manejo del entorno/tiempo
|
||||
|
||||
$(this).bind('touchstart',function(event){
|
||||
clearInterval(t);
|
||||
|
||||
if(event.pageX)iX = event.pageX;
|
||||
if(event.originalEvent.touches)iX = event.originalEvent.touches[0].pageX;
|
||||
|
||||
divContenedor.css('transition','none');
|
||||
|
||||
drag = 1;
|
||||
ms = 0;
|
||||
metaEvento = 'click';
|
||||
t = setInterval(function(){ms++;},1);
|
||||
});
|
||||
|
||||
$(this).bind('touchmove',function(event){
|
||||
if(event.pageX)aX = event.pageX;
|
||||
if(event.originalEvent.touches)aX = event.originalEvent.touches[0].pageX;
|
||||
dX = Math.abs(aX - iX);
|
||||
|
||||
if(dX > 50)event.preventDefault();
|
||||
|
||||
|
||||
if(drag && dX > 50){
|
||||
divContenedor.css('left',(((metaPaginas[pagActual]*-1)+(aX - iX)))+'px');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$(this).bind('touchend touchcancel touchleave',function(event){
|
||||
|
||||
if(drag && dX > 20){
|
||||
drag = 0;
|
||||
console.log(metaPaginas);
|
||||
dX = Math.abs(fX - iX);
|
||||
clearInterval(t);
|
||||
|
||||
if(event.pageX)fX = event.pageX;
|
||||
if(event.originalEvent.touches)fX = aX;
|
||||
|
||||
if((iX-fX) > 0 && ms < 100 && dX > 50)metaEvento = 'swipeLeft';
|
||||
if((iX-fX) <= 0 && ms < 100 && dX > 50)metaEvento = 'swipeRight';
|
||||
if((iX-fX) > 0 && ms > 100 && dX > 50)metaEvento = 'moveLeft';
|
||||
if((iX-fX) <= 0 && ms > 100 && dX > 50)metaEvento = 'moveRight';
|
||||
if(dX <= 50)metaEvento = 'click';
|
||||
|
||||
switch(metaEvento){
|
||||
case 'swipeLeft':
|
||||
if(pagActual < metaPagNum){pagActual++;}
|
||||
break;
|
||||
|
||||
case 'moveLeft':
|
||||
if(pagActual < metaPagNum && dX > (Math.abs(anchoVisor/2))){pagActual++;}
|
||||
break;
|
||||
|
||||
case 'swipeRight':
|
||||
if(pagActual > 0){pagActual--;}
|
||||
break;
|
||||
|
||||
case 'moveRight':
|
||||
if(pagActual > 0 && dX > (Math.abs(anchoVisor/2))){pagActual--;}
|
||||
break;
|
||||
}
|
||||
|
||||
ms = 0; dX = 0; iX = 0; aX = 0; fX = 0; metaEvento = '';
|
||||
|
||||
irPagina(pagActual);
|
||||
}
|
||||
});
|
||||
|
||||
//EVENTOS CONTROLES /////////////////////////////////////////
|
||||
$('.'+randId+'swipePlanesMiniPag').click(function(){
|
||||
pagActual = $(this).attr('mpg');
|
||||
irPagina();
|
||||
});
|
||||
|
||||
$('.'+randId+'swipePlanesRowLeft').click(function(e){
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
if(pagActual > 0)pagActual--;
|
||||
irPagina();
|
||||
});
|
||||
|
||||
$('.'+randId+'swipePlanesRowRight').click(function(e){
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if(pagActual < metaPagNum)pagActual++;
|
||||
irPagina();
|
||||
});
|
||||
|
||||
$(this).bind('mousemove',function(){
|
||||
$('.'+randId+'swipePlanesRowLeft').css('display','block');
|
||||
$('.'+randId+'swipePlanesRowRight').css('display','block');
|
||||
$('.'+randId+'swipePlanesRowLeft').css('opacity','1');
|
||||
$('.'+randId+'swipePlanesRowRight').css('opacity','1');
|
||||
});
|
||||
|
||||
$('.'+randId+'swipePlanesRowLeft').bind('mousemove',function(){
|
||||
$('.'+randId+'swipePlanesRowLeft').css('opacity','1');
|
||||
$('.'+randId+'swipePlanesRowRight').css('opacity','1');
|
||||
});
|
||||
|
||||
$('.'+randId+'swipePlanesRowRight').bind('mousemove',function(){
|
||||
$('.'+randId+'swipePlanesRowLeft').css('opacity','1');
|
||||
$('.'+randId+'swipePlanesRowRight').css('opacity','1');
|
||||
});
|
||||
|
||||
$(this).mouseout(function(){
|
||||
$('.'+randId+'swipePlanesRowLeft').css('opacity','0');
|
||||
$('.'+randId+'swipePlanesRowRight').css('opacity','0');
|
||||
});
|
||||
|
||||
//CONTROLES //////////////////////////////////////////////
|
||||
function generarControles(divVisor,metaPagNum){
|
||||
|
||||
|
||||
var i = 0;
|
||||
var miniPaginasHtml = '';
|
||||
var style = '';
|
||||
|
||||
for(i;i <= metaPagNum; i++){
|
||||
if(!i)style='background:#CECECE';
|
||||
else style='';
|
||||
miniPaginasHtml += '<div mpg="'+i+'" style="'+style+'" class="'+randId+'swipePlanesMiniPag"></div>';
|
||||
}
|
||||
// <div class="'+randId+'swipePlanesRowLeft"></div><div class="'+randId+'swipePlanesRowRight"></div>
|
||||
var controlesHtml = '<div class="'+randId+'swipePlanesPaginator">'+miniPaginasHtml+'</div>';
|
||||
|
||||
divVisor.append(controlesHtml);
|
||||
|
||||
$('.'+randId+'swipePlanesMiniPag').css('display','inline-block');
|
||||
$('.'+randId+'swipePlanesMiniPag').css('width','7px');
|
||||
$('.'+randId+'swipePlanesMiniPag').css('height','7px');
|
||||
$('.'+randId+'swipePlanesMiniPag').css('margin-left','2px');
|
||||
$('.'+randId+'swipePlanesMiniPag').css('margin-right','2px');
|
||||
$('.'+randId+'swipePlanesMiniPag').css('border','1px solid #CECECE');
|
||||
$('.'+randId+'swipePlanesMiniPag').css('border-radius','4px');
|
||||
$('.'+randId+'swipePlanesMiniPag').css('cursor','pointer');
|
||||
|
||||
$('.'+randId+'swipePlanesRowLeft').css('background-image','url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABkCAYAAADE6GNbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAKwwAACsMBNCkkqwAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAAWdEVYdENyZWF0aW9uIFRpbWUAMTAvMTkvMTJlCtGpAAABaElEQVR4nO3cS3HEMBRE0atU1oaURTCIwxiSh4NQBNIQcDDEfp/OVF8AKp3yR5IXHsD3GIP/3HmefI4xOI6jey632vedj+5JRGWIWoaoZYhahqhliFqGqGWIWoaoZYhahqhliFqGqGWIWoZENed8RIzTCplzPrZt+4oYqw0SiYAmSDQCGiAZCCiGZCGgEJKJgCJINgIKIBUISIZUISARUomAJEg1AhIgHQgIhnQhIBDSiYAgSDcCAiAKCLgJUUHADYgSAi5C1BBwAaKIAIGPD1H9GbLWer5er5+Mydzp0hVRxFy+tdQwt54RJczth10FE/LWUsCEvX67MaHrSCcmfEHswqSs7B2YtC1KNSZ1r1WJSd80VmFKdr8VmLJtfDam9DySiSk/WGVhWk6IGZi2o240pvXMHolp//iw1npGjNMOicoQtQxRyxC1DFHLELUMUcsQtQxRyxC1DFHLELUMUettIIM3+XXbL64qrlAHZEgkAAAAAElFTkSuQmCC)');
|
||||
$('.'+randId+'swipePlanesRowLeft').css('position','absolute');
|
||||
$('.'+randId+'swipePlanesRowLeft').css('width','50px');
|
||||
$('.'+randId+'swipePlanesRowLeft').css('height','100px');
|
||||
$('.'+randId+'swipePlanesRowLeft').css('cursor','pointer');
|
||||
$('.'+randId+'swipePlanesRowLeft').css('left','0px');
|
||||
$('.'+randId+'swipePlanesRowLeft').css('top',((divVisor.height()/2)-50)+'px');
|
||||
$('.'+randId+'swipePlanesRowLeft').css('z-index','909');
|
||||
$('.'+randId+'swipePlanesRowLeft').css('display','none');
|
||||
$('.'+randId+'swipePlanesRowLeft').css('box-shadow','0 1px 3px rgba(0, 0, 0, 0.3);');
|
||||
|
||||
$('.'+randId+'swipePlanesRowRight').css('background-image','url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABkCAYAAADE6GNbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAKwwAACsMBNCkkqwAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAAWdEVYdENyZWF0aW9uIFRpbWUAMTAvMTkvMTJlCtGpAAABXklEQVR4nO3cvW2EQBRF4TPWxpTkwDXQw1IS7oEqXBINsKlTM+/nenVPDuKTYOZNwgC+xhj8567r4jHGYN/37meZats2ProfIipD1DJELUPUMkQtQ9QyRC1D1DJELUPUMkQtQ9QyRC1D1DLkd+u6PiPuM1MIZFmWz25M2KvVjQn9Rjox4R97FyZl1erApC2/1ZjUfaQSk74hVmFKdvYKTNmIko0pnbUyMeVDYxamZfrNwLSN8dGY1vNIJKb9YBWFaYdADEYCAvMYGQjMYaQgcB8jB7mbHOQ8z5/jOL7/ep0U5C4ChCAzCBCBzCJAABKBgGZIFAIaIZEIaIJEI6ABkoGAYkgWAgohmQgogmQjoABSgYBkSBUCEiGVCEiCVCMgAdKBgGBIFwICIZ0ICIJ0IyAI0o0AgYNVVIaoZYhahqhliFqGqGWIWoaoZYhahqhliFqGqGWIWm8DGbzJr9teHYWuULzgkDAAAAAASUVORK5CYII=)');
|
||||
$('.'+randId+'swipePlanesRowRight').css('position','absolute');
|
||||
$('.'+randId+'swipePlanesRowRight').css('width','50px');
|
||||
$('.'+randId+'swipePlanesRowRight').css('height','100px');
|
||||
$('.'+randId+'swipePlanesRowRight').css('cursor','pointer');
|
||||
$('.'+randId+'swipePlanesRowRight').css('right','0px');
|
||||
$('.'+randId+'swipePlanesRowRight').css('top',((divVisor.height()/2)-50)+'px');
|
||||
$('.'+randId+'swipePlanesRowRight').css('z-index','909');
|
||||
$('.'+randId+'swipePlanesRowRight').css('display','none');
|
||||
$('.'+randId+'swipePlanesRowRight').css('box-shadow','0 1px 3px rgba(0, 0, 0, 0.3);');
|
||||
|
||||
$('.'+randId+'swipePlanesPaginator').css('position','absolute');
|
||||
$('.'+randId+'swipePlanesPaginator').css('padding','0px 4px');
|
||||
$('.'+randId+'swipePlanesPaginator').css('top','10px');
|
||||
$('.'+randId+'swipePlanesPaginator').css('box-shadow','0 1px 3px rgba(0, 0, 0, 0.3);');
|
||||
$('.'+randId+'swipePlanesPaginator').css('border-radius','4px');
|
||||
$('.'+randId+'swipePlanesPaginator').css('left',((divVisor.width()/2)-($('.'+randId+'swipePlanesPaginator').width()/2))+'px');
|
||||
|
||||
}
|
||||
|
||||
function irPagina(){
|
||||
divContenedor.css('transition','left 500ms');
|
||||
divContenedor.css('left',((metaPaginas[pagActual])*-1)+'px');
|
||||
|
||||
$('.'+randId+'swipePlanesMiniPag').css('background','');
|
||||
$('.'+randId+'swipePlanesMiniPag[mpg='+pagActual+']').css('background','#CECECE');
|
||||
}
|
||||
});
|
||||
};
|
|
@ -0,0 +1,373 @@
|
|||
/*!
|
||||
* jQuery FN Google Map 3.0-rc
|
||||
* http://code.google.com/p/jquery-ui-map/
|
||||
* Copyright (c) 2010 - 2012 Johan Säll Larsson
|
||||
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
|
||||
*/
|
||||
( function($) {
|
||||
|
||||
/**
|
||||
* @param name:string
|
||||
* @param prototype:object
|
||||
*/
|
||||
$.a = function(name, prototype) {
|
||||
|
||||
var namespace = name.split('.')[0];
|
||||
name = name.split('.')[1];
|
||||
|
||||
$[namespace] = $[namespace] || {};
|
||||
$[namespace][name] = function(options, element) {
|
||||
if ( arguments.length ) {
|
||||
this._setup(options, element);
|
||||
}
|
||||
};
|
||||
|
||||
$[namespace][name].prototype = $.extend({
|
||||
'namespace': namespace,
|
||||
'pluginName': name
|
||||
}, prototype);
|
||||
|
||||
$.fn[name] = function(options) {
|
||||
|
||||
var isMethodCall = typeof options === "string",
|
||||
args = Array.prototype.slice.call(arguments, 1),
|
||||
returnValue = this;
|
||||
|
||||
if ( isMethodCall && options.substring(0, 1) === '_' ) {
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
this.each(function() {
|
||||
var instance = $.data(this, name);
|
||||
if (!instance) {
|
||||
instance = $.data(this, name, new $[namespace][name](options, this));
|
||||
}
|
||||
if (isMethodCall) {
|
||||
returnValue = instance[options].apply(instance, args);
|
||||
}
|
||||
});
|
||||
|
||||
return returnValue;
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
$.a('ui.gmap', {
|
||||
|
||||
/**
|
||||
* Map options
|
||||
* @see http://code.google.com/intl/sv-SE/apis/maps/documentation/javascript/reference.html#MapOptions
|
||||
*/
|
||||
options: {
|
||||
mapTypeId: 'roadmap',
|
||||
zoom: 5
|
||||
},
|
||||
|
||||
/**
|
||||
* Get or set options
|
||||
* @param key:string
|
||||
* @param options:object
|
||||
* @return object
|
||||
*/
|
||||
option: function(key, options) {
|
||||
if (options) {
|
||||
this.options[key] = options;
|
||||
this.get('map').set(key, options);
|
||||
return this;
|
||||
}
|
||||
return this.options[key];
|
||||
},
|
||||
|
||||
/**
|
||||
* Setup plugin basics,
|
||||
* @param options:object
|
||||
* @param element:node
|
||||
*/
|
||||
_setup: function(options, element) {
|
||||
this.el = element;
|
||||
options = options || {};
|
||||
jQuery.extend(this.options, options, { 'center': this._latLng(options.center) });
|
||||
this._create();
|
||||
if ( this._init ) { this._init(); }
|
||||
},
|
||||
|
||||
/**
|
||||
* Instanciate the Google Maps object
|
||||
*/
|
||||
_create: function() {
|
||||
var self = this;
|
||||
this.instance = { 'map': new google.maps.Map(self.el, self.options), 'markers': [], 'overlays': [], 'services': [] };
|
||||
google.maps.event.addListenerOnce(self.instance.map, 'bounds_changed', function() { $(self.el).trigger('init', self.instance.map); });
|
||||
self._call(self.options.callback, self.instance.map);
|
||||
},
|
||||
|
||||
/**
|
||||
* Adds a latitude longitude pair to the bounds.
|
||||
* @param position:google.maps.LatLng/string
|
||||
*/
|
||||
addBounds: function(position) {
|
||||
var bounds = this.get('bounds', new google.maps.LatLngBounds());
|
||||
bounds.extend(this._latLng(position));
|
||||
this.get('map').fitBounds(bounds);
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Helper function to check if a LatLng is within the viewport
|
||||
* @param marker:google.maps.Marker
|
||||
*/
|
||||
inViewport: function(marker) {
|
||||
var bounds = this.get('map').getBounds();
|
||||
return (bounds) ? bounds.contains(marker.getPosition()) : false;
|
||||
},
|
||||
|
||||
/**
|
||||
* Adds a custom control to the map
|
||||
* @param panel:jquery/node/string
|
||||
* @param position:google.maps.ControlPosition
|
||||
* @see http://code.google.com/intl/sv-SE/apis/maps/documentation/javascript/reference.html#ControlPosition
|
||||
*/
|
||||
addControl: function(panel, position) {
|
||||
this.get('map').controls[position].push(this._unwrap(panel));
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Adds a Marker to the map
|
||||
* @param markerOptions:google.maps.MarkerOptions
|
||||
* @param callback:function(map:google.maps.Map, marker:google.maps.Marker) (optional)
|
||||
* @return $(google.maps.Marker)
|
||||
* @see http://code.google.com/intl/sv-SE/apis/maps/documentation/javascript/reference.html#MarkerOptions
|
||||
*/
|
||||
addMarker: function(markerOptions, callback) {
|
||||
markerOptions.map = this.get('map');
|
||||
markerOptions.position = this._latLng(markerOptions.position);
|
||||
var marker = new (markerOptions.marker || google.maps.Marker)(markerOptions);
|
||||
var markers = this.get('markers');
|
||||
if ( marker.id ) {
|
||||
markers[marker.id] = marker;
|
||||
} else {
|
||||
markers.push(marker);
|
||||
}
|
||||
if ( marker.bounds ) {
|
||||
this.addBounds(marker.getPosition());
|
||||
}
|
||||
this._call(callback, markerOptions.map, marker);
|
||||
return $(marker);
|
||||
},
|
||||
|
||||
/**
|
||||
* Clears by type
|
||||
* @param ctx:string e.g. 'markers', 'overlays', 'services'
|
||||
*/
|
||||
clear: function(ctx) {
|
||||
this._c(this.get(ctx));
|
||||
this.set(ctx, []);
|
||||
return this;
|
||||
},
|
||||
|
||||
_c: function(obj) {
|
||||
for ( var property in obj ) {
|
||||
if ( obj.hasOwnProperty(property) ) {
|
||||
if ( obj[property] instanceof google.maps.MVCObject ) {
|
||||
google.maps.event.clearInstanceListeners(obj[property]);
|
||||
if ( obj[property].setMap ) {
|
||||
obj[property].setMap(null);
|
||||
}
|
||||
} else if ( obj[property] instanceof Array ) {
|
||||
this._c(obj[property]);
|
||||
}
|
||||
obj[property] = null;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the objects with a specific property and value, e.g. 'category', 'tags'
|
||||
* @param ctx:string in what context, e.g. 'markers'
|
||||
* @param options:object property:string the property to search within, value:string, operator:string (optional) (AND/OR)
|
||||
* @param callback:function(marker:google.maps.Marker, isFound:boolean)
|
||||
*/
|
||||
find: function(ctx, options, callback) {
|
||||
var obj = this.get(ctx);
|
||||
options.value = $.isArray(options.value) ? options.value : [options.value];
|
||||
for ( var property in obj ) {
|
||||
if ( obj.hasOwnProperty(property) ) {
|
||||
var isFound = false;
|
||||
for ( var value in options.value ) {
|
||||
if ( $.inArray(options.value[value], obj[property][options.property]) > -1 ) {
|
||||
isFound = true;
|
||||
} else {
|
||||
if ( options.operator && options.operator === 'AND' ) {
|
||||
isFound = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
callback(obj[property], isFound);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns an instance property by key. Has the ability to set an object if the property does not exist
|
||||
* @param key:string
|
||||
* @param value:object(optional)
|
||||
*/
|
||||
get: function(key, value) {
|
||||
var instance = this.instance;
|
||||
if ( !instance[key] ) {
|
||||
if ( key.indexOf('>') > -1 ) {
|
||||
var e = key.replace(/ /g, '').split('>');
|
||||
for ( var i = 0; i < e.length; i++ ) {
|
||||
if ( !instance[e[i]] ) {
|
||||
if (value) {
|
||||
instance[e[i]] = ( (i + 1) < e.length ) ? [] : value;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
instance = instance[e[i]];
|
||||
}
|
||||
return instance;
|
||||
} else if ( value && !instance[key] ) {
|
||||
this.set(key, value);
|
||||
}
|
||||
}
|
||||
return instance[key];
|
||||
},
|
||||
|
||||
/**
|
||||
* Triggers an InfoWindow to open
|
||||
* @param infoWindowOptions:google.maps.InfoWindowOptions
|
||||
* @param marker:google.maps.Marker (optional)
|
||||
* @param callback:function (optional)
|
||||
* @see http://code.google.com/intl/sv-SE/apis/maps/documentation/javascript/reference.html#InfoWindowOptions
|
||||
*/
|
||||
openInfoWindow: function(infoWindowOptions, marker, callback) {
|
||||
var iw = this.get('iw', infoWindowOptions.infoWindow || new google.maps.InfoWindow);
|
||||
iw.setOptions(infoWindowOptions);
|
||||
iw.open(this.get('map'), this._unwrap(marker));
|
||||
this._call(callback, iw);
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Triggers an InfoWindow to close
|
||||
*/
|
||||
closeInfoWindow: function() {
|
||||
if ( this.get('iw') != null ) {
|
||||
this.get('iw').close();
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets an instance property
|
||||
* @param key:string
|
||||
* @param value:object
|
||||
*/
|
||||
set: function(key, value) {
|
||||
this.instance[key] = value;
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Refreshes the map
|
||||
*/
|
||||
refresh: function() {
|
||||
var map = this.get('map');
|
||||
var latLng = map.getCenter();
|
||||
$(map).triggerEvent('resize');
|
||||
map.setCenter(latLng);
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Destroys the plugin.
|
||||
*/
|
||||
destroy: function() {
|
||||
this.clear('markers').clear('services').clear('overlays')._c(this.instance);
|
||||
jQuery.removeData(this.el, this.name);
|
||||
},
|
||||
|
||||
/**
|
||||
* Helper method for calling a function
|
||||
* @param callback
|
||||
*/
|
||||
_call: function(callback) {
|
||||
if ( callback && $.isFunction(callback) ) {
|
||||
callback.apply(this, Array.prototype.slice.call(arguments, 1));
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Helper method for google.maps.Latlng
|
||||
* @param latLng:string/google.maps.LatLng
|
||||
*/
|
||||
_latLng: function(latLng) {
|
||||
if ( !latLng ) {
|
||||
return new google.maps.LatLng(0.0, 0.0);
|
||||
}
|
||||
if ( latLng instanceof google.maps.LatLng ) {
|
||||
return latLng;
|
||||
} else {
|
||||
latLng = latLng.replace(/ /g,'').split(',');
|
||||
return new google.maps.LatLng(latLng[0], latLng[1]);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Helper method for unwrapping jQuery/DOM/string elements
|
||||
* @param obj:string/node/jQuery
|
||||
*/
|
||||
_unwrap: function(obj) {
|
||||
return (!obj) ? null : ( (obj instanceof jQuery) ? obj[0] : ((obj instanceof Object) ? obj : $('#'+obj)[0]) )
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
jQuery.fn.extend( {
|
||||
|
||||
triggerEvent: function(eventType) {
|
||||
google.maps.event.trigger(this[0], eventType);
|
||||
return this;
|
||||
},
|
||||
|
||||
addEventListener: function(eventType, eventDataOrCallback, eventCallback) {
|
||||
if ( google.maps && this[0] instanceof google.maps.MVCObject ) {
|
||||
google.maps.event.addListener(this[0], eventType, eventDataOrCallback);
|
||||
} else {
|
||||
if (eventCallback) {
|
||||
this.bind(eventType, eventDataOrCallback, eventCallback);
|
||||
} else {
|
||||
this.bind(eventType, eventDataOrCallback);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/*removeEventListener: function(eventType) {
|
||||
if ( google.maps && this[0] instanceof google.maps.MVCObject ) {
|
||||
if (eventType) {
|
||||
google.maps.event.clearListeners(this[0], eventType);
|
||||
} else {
|
||||
google.maps.event.clearInstanceListeners(this[0]);
|
||||
}
|
||||
} else {
|
||||
this.unbind(eventType);
|
||||
}
|
||||
return this;
|
||||
}*/
|
||||
|
||||
});
|
||||
|
||||
jQuery.each(('click rightclick dblclick mouseover mouseout drag dragend').split(' '), function(i, name) {
|
||||
jQuery.fn[name] = function(a, b) {
|
||||
return this.addEventListener(name, a, b);
|
||||
}
|
||||
});
|
||||
|
||||
} (jQuery) );
|
|
@ -0,0 +1,129 @@
|
|||
<%#= encoding: utf-8 %>
|
||||
// function slideshow() {
|
||||
// var $globalW = $(".global").width(),
|
||||
// $slideImg = $(".slideImg"),
|
||||
// $slidebanner = $(".slidebanner"),
|
||||
// $slideshow = $(".slideshow"),
|
||||
// $slideImgOW = $slideImg.width(),
|
||||
// $slideImgOH = $slideImg.height();
|
||||
// $slideImg.css({
|
||||
// "widht": $globalW,
|
||||
// "height": Math.floor(($globalW/$slideImgOW)*$slideImgOH),
|
||||
// });
|
||||
// $slideshow.css({
|
||||
// "width": $globalW,
|
||||
// "height": Math.floor(($globalW/$slideImgOW)*$slideImgOH),
|
||||
// });
|
||||
// alert(Math.floor(($globalW/$slideImgOW)*$slideImgOH))
|
||||
// }
|
||||
$('#index').live('pageinit',function(){
|
||||
var $globalW = $(window).width(),
|
||||
$slideshow = $(".slideshow");
|
||||
$slideshow.css({
|
||||
"width": $globalW, "height": Math.floor($globalW/720*240)
|
||||
});
|
||||
$(".slideImg").muImageResize({width: $globalW, height: Math.floor($globalW/720*240)});
|
||||
$(this).find(".newpic img").muImageResize({width: 280, height: 200});
|
||||
$('.slideshow').cycle({
|
||||
fx:'scrollLeft',
|
||||
timeout: 6000,
|
||||
});
|
||||
$(".newlist").css({
|
||||
"width" : $(".newitem").outerWidth()*(Math.floor($globalW/$(".newitem").outerWidth()))+30,
|
||||
})
|
||||
// var oc_timer;
|
||||
// clearTimeout(oc_timer);
|
||||
// oc_timer = setTimeout(function () {
|
||||
// $('.newlist').swipePlanes();
|
||||
// }, 1000);
|
||||
});
|
||||
$('#news_content').live('pageinit',function(){
|
||||
$(this).find(".newpic img").muImageResize({width: 320, height: 220});
|
||||
});
|
||||
var mobileDemo = { 'center': '24.987449, 121.576117', 'zoom': 17 };
|
||||
$('#map').live('pageinit', function() {
|
||||
var $windowH = $(window).height();
|
||||
$("#map_canvas").css({
|
||||
'height' : $windowH,
|
||||
})
|
||||
gmAPI.add('basic_map', function() {
|
||||
$('#map_canvas').gmap({'center': mobileDemo.center, 'zoom': mobileDemo.zoom, 'disableDefaultUI':false, 'callback': function() {
|
||||
var self = this;
|
||||
self.addMarker({'position': this.get('map').getCenter() }).click(function() {
|
||||
self.openInfoWindow({ 'content': "<%= I18n.t('mobile.location_description') %>" }, this);
|
||||
});
|
||||
}});
|
||||
}).load('basic_map');
|
||||
});
|
||||
|
||||
$('#map').live('pageshow', function() {
|
||||
gmAPI.add('basic_map', function() { $('#map_canvas').gmap('refresh'); }).load('basic_map');
|
||||
});
|
||||
|
||||
$(document).bind('pagebeforehide',function(){
|
||||
$("section.main-menu").removeClass("expanded");
|
||||
});
|
||||
$(document).bind("ready", function(){
|
||||
// $(".openmenu").live("tap", function(){
|
||||
// $("section.main-menu").toggleClass("expanded");
|
||||
// return!1
|
||||
// });
|
||||
$("body").delegate(".openmenu","vclick",function(){
|
||||
$("section.main-menu").toggleClass("expanded");
|
||||
return!1
|
||||
});
|
||||
// alert(navigator.userAgent)
|
||||
// $(".newpic img").muImageResize({width: 280, height: 100});
|
||||
// $('.newlist').swipePlanes();
|
||||
});
|
||||
|
||||
// $(window).resize(function(){
|
||||
// alert("Resize");
|
||||
// $(".slidebanner").removeAttr("style");
|
||||
// $(".slidebanner").find("div").removeAttr("style");
|
||||
// $(".slideImg").removeAttr("style");
|
||||
// var $globalW = $(window).width(),
|
||||
// $slideshow = $(".slideshow");
|
||||
// $slideshow.css({
|
||||
// "width": $globalW, "height": Math.floor($globalW/720*240)
|
||||
// });
|
||||
// $(".slideImg").muImageResize({width: $globalW, height: Math.floor($globalW/720*240)});
|
||||
// $('.slideshow').cycle({
|
||||
// fx:'scrollLeft',
|
||||
// timeout: 6000,
|
||||
// });
|
||||
// });
|
||||
$(window).bind("orientationchange", function(){
|
||||
var oc_timer;
|
||||
clearTimeout(oc_timer);
|
||||
oc_timer = setTimeout(function () {
|
||||
$(".slidebanner").removeAttr("style");
|
||||
$(".slidebanner").find("div").removeAttr("style");
|
||||
$(".slideImg").removeAttr("style");
|
||||
// $(".newlist").removeAttr("style");
|
||||
// $(".newlist").find(".clear").removeAttr("style");
|
||||
// $(".newitem").removeAttr("style");
|
||||
// $(".newlist").find(".clear").nextAll("div").remove();
|
||||
var $globalW = $(window).width(),
|
||||
$slideshow = $(".slideshow"),
|
||||
$windowH = $(window).height();
|
||||
$slideshow.css({
|
||||
"width": $globalW, "height": Math.floor($globalW/720*240)
|
||||
});
|
||||
|
||||
$(".slideImg").muImageResize({width: $globalW, height: Math.floor($globalW/720*240)});
|
||||
$('.slideshow').cycle({
|
||||
fx:'scrollLeft',
|
||||
timeout: 6000,
|
||||
});
|
||||
|
||||
$(".newlist").css({
|
||||
"width" : $(".newitem").outerWidth()*(Math.floor($globalW/$(".newitem").outerWidth()))+30,
|
||||
})
|
||||
|
||||
$("#map_canvas").css({
|
||||
'height' : $windowH,
|
||||
})
|
||||
// $('.newlist').swipePlanes();
|
||||
}, 500);
|
||||
});
|
|
@ -1,3 +1,7 @@
|
|||
function get_part_id(){
|
||||
return $(".edit_page_part").attr("action").split('/').pop();
|
||||
}
|
||||
|
||||
$("div.editable").live("mouseenter mouseleave", function (event) {
|
||||
$(this).children('.edit_link').toggle();
|
||||
});
|
||||
|
@ -21,11 +25,11 @@ $("#page_module_app_id").live('change', function() {
|
|||
});
|
||||
|
||||
$("#module_app_list select").live('change', function() {
|
||||
$.getScript($(this).attr('rel') + '/' + $(this).val() + '/reload_widgets');
|
||||
$.getScript($(this).attr('rel') + '/' + $(this).val() + '/reload_widgets?part_id=' + get_part_id());
|
||||
});
|
||||
|
||||
$("#widget_list select").live('change', function() {
|
||||
$.getScript($(this).attr('rel') + '/' + $(this).val() + '/reload_widget_styles?module_app_id=' + $("#module_app_list select").val());
|
||||
$.getScript($(this).attr('rel') + '/' + $(this).val() + '/reload_widget_styles?module_app_id=' + $("#module_app_list select").val() + '&part_id=' + get_part_id());
|
||||
});
|
||||
|
||||
$("#tag_list select").live('change', function() {
|
||||
|
|
|
@ -14,7 +14,6 @@ function load_tinymce() {
|
|||
theme_advanced_toolbar_align : "left",
|
||||
theme_advanced_statusbar_location : "bottom",
|
||||
theme_advanced_resizing : true,
|
||||
relative_urls : false,
|
||||
|
||||
// Skin options
|
||||
skin : "o2k7",
|
||||
|
|
|
@ -0,0 +1,200 @@
|
|||
|
||||
/* 1 */
|
||||
.defulat_widget_typeA{
|
||||
font: 12px/100% 'open sans',sans-serif;
|
||||
margin:0 0 20px;
|
||||
width:510px;
|
||||
}
|
||||
.defulat_widget_tb{
|
||||
border-collapse:collapse;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.defulat_widget_tb th{
|
||||
background: none repeat scroll 0 0 #333333;
|
||||
color: #FFFFFF;
|
||||
padding: 10px;
|
||||
text-align: left;
|
||||
}
|
||||
.defulat_widget_tb td{
|
||||
border-bottom: 1px solid #AAAAAA;
|
||||
padding: 10px;
|
||||
white-space: normal;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
|
||||
/* 2 */
|
||||
|
||||
.defulat_widget_typeB_style2{
|
||||
font: 12px/100% 'open sans',sans-serif;
|
||||
margin:0 0 20px;
|
||||
width:510px;
|
||||
}
|
||||
|
||||
.defulat_widget_typeB_style2 ul{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.defulat_widget_typeB_style2 li{
|
||||
border-bottom: 1px solid #AAAAAA;
|
||||
clear: both;
|
||||
margin: 0 0 10px;
|
||||
overflow: hidden;
|
||||
padding: 0 0 10px;
|
||||
}
|
||||
|
||||
|
||||
.defulat_widget_typeB_style2 .app-pic{
|
||||
background: none repeat scroll 0 0 #AAAAAA;
|
||||
border-radius: 3px;
|
||||
float:left;
|
||||
height: 50px;
|
||||
margin: 0 10px 5px 0;
|
||||
overflow: hidden;
|
||||
width: 50px;
|
||||
}
|
||||
.defulat_widget_typeB_style2 img{
|
||||
height:50px;
|
||||
width:50px;
|
||||
}
|
||||
|
||||
.defulat_widget_typeB_style2 span{
|
||||
display: inline;
|
||||
margin: 0 10px 0 0;
|
||||
}
|
||||
|
||||
/* 3 */
|
||||
|
||||
.defulat_widget_typeB_style3{
|
||||
font: 12px/100% 'open sans',sans-serif;
|
||||
margin:0 0 20px;
|
||||
width:510px;
|
||||
}
|
||||
.defulat_widget_typeB_style3 ul{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.defulat_widget_typeB_style3 li{
|
||||
border-bottom: 1px solid #AAAAAA;
|
||||
clear: both;
|
||||
margin: 0 0 10px;
|
||||
overflow: hidden;
|
||||
padding: 0 0 10px;
|
||||
}
|
||||
|
||||
.defulat_widget_typeB_style3 .app-pic{
|
||||
background: none repeat scroll 0 0 #AAAAAA;
|
||||
border-radius: 3px;
|
||||
float: left;
|
||||
height: 50px;
|
||||
margin: 0 10px 0 0;
|
||||
overflow: hidden;
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.defulat_widget_typeB_style3 span{
|
||||
display:block;
|
||||
margin:0 0 5px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.defulat_widget_typeB_style3 .wrap{
|
||||
overflow: hidden;
|
||||
}
|
||||
.defulat_widget_typeB_style3 img{
|
||||
height:50px;
|
||||
width:50px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* 4 */
|
||||
|
||||
.defulat_widget_typeB_style4{
|
||||
font: 12px/100% 'open sans',sans-serif;
|
||||
margin:0 0 20px;
|
||||
width:510px;
|
||||
}
|
||||
.defulat_widget_typeB_style4 ul{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.defulat_widget_typeB_style4 li{
|
||||
border-bottom: 1px solid #AAAAAA;
|
||||
clear: both;
|
||||
margin: 0 0 10px;
|
||||
overflow: hidden;
|
||||
padding: 0 0 10px;
|
||||
}
|
||||
|
||||
.defulat_widget_typeB_style4 .app-pic{
|
||||
background: none repeat scroll 0 0 #AAAAAA;
|
||||
border-radius: 3px;
|
||||
float: right;
|
||||
height: 50px;
|
||||
margin: 0 0 0 10px;
|
||||
overflow: hidden;
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.defulat_widget_typeB_style4 span{
|
||||
display:block;
|
||||
margin:0 0 5px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.defulat_widget_typeB_style4 .wrap{
|
||||
overflow: hidden;
|
||||
}
|
||||
.defulat_widget_typeB_style4 img{
|
||||
height:50px;
|
||||
width:50px;
|
||||
}
|
||||
|
||||
|
||||
/* 5 */
|
||||
|
||||
.defulat_widget_typeC{
|
||||
font: 12px/100% 'open sans',sans-serif;
|
||||
margin: 0 0 20px;
|
||||
position: relative;
|
||||
width: 510px;
|
||||
}
|
||||
.defulat_widget_typeC ul{
|
||||
margin: 0 0 0 70px;
|
||||
padding: 0;
|
||||
}
|
||||
.defulat_widget_typeC li{
|
||||
border-bottom: 1px solid #AAAAAA;
|
||||
clear: both;
|
||||
margin: 0 0 10px;
|
||||
overflow: hidden;
|
||||
padding: 0 0 10px;
|
||||
}
|
||||
|
||||
.defulat_widget_typeC .app-pic{
|
||||
background: none repeat scroll 0 0 #AAAAAA;
|
||||
border-radius: 3px 3px 3px 3px;
|
||||
height: 50px;
|
||||
left: 0;
|
||||
margin: 0 10px 0 0;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.defulat_widget_typeC span{
|
||||
display:block;
|
||||
margin:0 0 5px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.defulat_widget_typeC .wrap{
|
||||
overflow: hidden;
|
||||
}
|
||||
.defulat_widget_typeC img{
|
||||
height:50px;
|
||||
width:50px;
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
*This is a manifest file that'll automatically include all the stylesheets available in this directory
|
||||
*and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
|
||||
*the top of the compiled file, but it's generally better to create a new file per style scope.
|
||||
*= require mobile/jquery.mobile-1.2.0.css
|
||||
*= require mobile/add2home
|
||||
*= require mobile/orbit-mobile
|
||||
*= require mobile/icons
|
||||
*= require mobile/font-awesome
|
||||
*/
|
|
@ -0,0 +1,158 @@
|
|||
/**
|
||||
*
|
||||
* Main container
|
||||
*
|
||||
*/
|
||||
#addToHomeScreen {
|
||||
z-index:9999;
|
||||
-webkit-user-select:none;
|
||||
-webkit-box-sizing:border-box;
|
||||
width:240px;
|
||||
font-size:15px;
|
||||
padding:12px 14px;
|
||||
text-align:left;
|
||||
font-family:helvetica;
|
||||
background-image:-webkit-gradient(linear,0 0,0 100%,color-stop(0,#fff),color-stop(0.02,#eee),color-stop(0.98,#ccc),color-stop(1,#a3a3a3));
|
||||
border:1px solid #505050;
|
||||
-webkit-border-radius:8px;
|
||||
-webkit-background-clip:padding-box;
|
||||
color:#333;
|
||||
text-shadow:0 1px 0 rgba(255,255,255,0.75);
|
||||
line-height:130%;
|
||||
-webkit-box-shadow:0 0 4px rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
#addToHomeScreen.addToHomeIpad {
|
||||
width:268px;
|
||||
font-size:18px;
|
||||
padding:14px;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* The 'wide' class is added when the popup contains the touch icon
|
||||
*
|
||||
*/
|
||||
#addToHomeScreen.addToHomeWide {
|
||||
width:296px;
|
||||
}
|
||||
|
||||
#addToHomeScreen.addToHomeIpad.addToHomeWide {
|
||||
width:320px;
|
||||
font-size:18px;
|
||||
padding:14px;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* The balloon arrow
|
||||
*
|
||||
*/
|
||||
#addToHomeScreen .addToHomeArrow {
|
||||
position:absolute;
|
||||
background-image:-webkit-gradient(linear,0 0,100% 100%,color-stop(0,rgba(204,204,204,0)),color-stop(0.4,rgba(204,204,204,0)),color-stop(0.4,#ccc));
|
||||
border-width:0 1px 1px 0;
|
||||
border-style:solid;
|
||||
border-color:#505050;
|
||||
width:16px; height:16px;
|
||||
-webkit-transform:rotateZ(45deg);
|
||||
bottom:-9px; left:50%;
|
||||
margin-left:-8px;
|
||||
-webkit-box-shadow:inset -1px -1px 0 #a9a9a9;
|
||||
-webkit-border-bottom-right-radius:2px;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* The balloon arrow for iPad
|
||||
*
|
||||
*/
|
||||
#addToHomeScreen.addToHomeIpad .addToHomeArrow {
|
||||
-webkit-transform:rotateZ(-135deg);
|
||||
background-image:-webkit-gradient(linear,0 0,100% 100%,color-stop(0,rgba(238,238,238,0)),color-stop(0.4,rgba(238,238,238,0)),color-stop(0.4,#eee));
|
||||
-webkit-box-shadow:inset -1px -1px 0 #fff;
|
||||
top:-9px; bottom:auto; left:50%;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Close button
|
||||
*
|
||||
*/
|
||||
#addToHomeScreen .addToHomeClose {
|
||||
-webkit-box-sizing:border-box;
|
||||
position:absolute;
|
||||
right:4px;
|
||||
top:4px;
|
||||
width:18px;
|
||||
height:18px; line-height:14px;
|
||||
text-align:center;
|
||||
text-indent:1px;
|
||||
-webkit-border-radius:9px;
|
||||
background:rgba(0,0,0,0.12);
|
||||
color:#707070;
|
||||
-webkit-box-shadow:0 1px 0 #fff;
|
||||
font-size:16px;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* The '+' icon, displayed only on iOS < 4.2
|
||||
*
|
||||
*/
|
||||
#addToHomeScreen .addToHomePlus {
|
||||
font-weight:bold;
|
||||
font-size:1.3em;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* The 'share' icon, displayed only on iOS >= 4.2
|
||||
*
|
||||
*/
|
||||
#addToHomeScreen .addToHomeShare {
|
||||
display:inline-block;
|
||||
width:18px;
|
||||
height:15px;
|
||||
background-repeat:no-repeat;
|
||||
background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAPCAQAAABDj1eZAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAUdJREFUKFNtkLtLw1AYxS/qJLhXVKr2ZRulUNtiqgSb3CziICI6ucTFVYcOnaQOFRwUnNTRwUWXgpP/QdHNUEQUHGxofYBTlRs83iZNjKTncOGe7/vx3QchXUWn6FL3jhfKUdCCr5zuifV5oDiHQM+c+CIhiiCSWNu08iq9oHXKLAiqrgR4UXqlOEYZt++ExEL0wW7+OW0G10muLv9gmqfe5FAWKmTMYQYiFL7PYwyLOD8lSjNh2gdnPzMII4QUBxc4OothbAF7GCBKQ0YbSWyPQsIhqvetS+y0ygGMo/KFZfviDvR4AhwgZU9dGYnA0J/6ndc15i3ouYIMcVVUcEXIoOxCeRCfwP8sXBSdjtpUv/1QW+K16kCCIUC4id9Fa0JtkluwVkSfqPL6RwfSDA0aNlx7k/bWgViB7bMS2/1vk5sdsZLN/ALSuL3tylO4RAAAAABJRU5ErkJggg==);
|
||||
background-size:18px 15px;
|
||||
text-indent:-9999em;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* The touch icon (if available)
|
||||
*
|
||||
*/
|
||||
#addToHomeScreen .addToHomeTouchIcon {
|
||||
display:block;
|
||||
float:left;
|
||||
-webkit-border-radius:6px;
|
||||
-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.5),
|
||||
inset 0 0 2px rgba(255,255,255,0.9);
|
||||
background-repeat:no-repeat;
|
||||
width:57px; height:57px;
|
||||
-webkit-background-size:57px 57px;
|
||||
margin:0 12px 0 0;
|
||||
border:1px solid #333;
|
||||
-webkit-background-clip:padding-box;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* The 'share' icon for retina display
|
||||
*
|
||||
*/
|
||||
@media all and (-webkit-min-device-pixel-ratio: 2) {
|
||||
#addToHomeScreen .addToHomeShare {
|
||||
background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAeCAQAAADu6HTYAAADPElEQVR4Xq3TX2gcRRzA8e/M7mVv2+TSNpc/TZtrY6jUGqgaSAmEChKLrYK0YH0RFC2CSCkEfCghiKU04J8qNigq6os+iQV98MHWFwVBrQQRWs21lBw5cw3NNb1/udu72RGG5Y77IzXW77D7sAwf5scyYoL6BGXSDKFZwaGpLvIUaeoCkvX1MmsM0Ny6oRSQYOLuIS+YZOpfQdqslpUxcZrzTVAz4qPwW2O3CeIwC/RSzeY6Ow1QhUrkr+YOWfEKDkEP8Rij7CHKJmrFSDHBdwGEE5wiGChPN+PnT8VdRtEIl1d4gRj/1EVe5ZSBKGh8iqQpo/Fo5+3C/gz0MYg4zgwbqday1/Q4B8BGQ45d/Hi54lakCrU5obOcidJpu1+Lg9whjabyaOYLnrIBFFaRD+xe2ybMDWY66GmP/WA9cGfGp0CWhy0wkMN8inepFiH2rV1j0NQSNQbFLRQnS8/8YSDBBpadfv4CYDub2fmeHDNAsL1MBWUel0iA+Xik6eHcyvD3vAMSU1TGuA/YRS+dD7ovCQN43GKRFCU20Kd3V/avDVVyAZ5niTEuLA5/zBGWg9EEEhfJKN200Tat8CmRAQb9+wv7soPlHt2tQorsz1uPbr0HTY4sJwrH47zJZwABBAKLMBoQXepwgTwdHCo+fXMkQ4lrxEmQ5AaXipPqDY9V2vn09tgvTPI71EEGYxM+/uMJLJ4svpgaWGKOi/xKgmqLSUGSUd5f2vIVJ/CgBaTIUsZ7ZBsn0+NzfMOXLFCXQyTcybN6ep5ZZgUOHn7jpfUpsZshdugPGf+E5zjbyHTSRyQ8xfRPPM/s63RHeuknSoT22mjmmnAOIMkUZ6D1xSfPPAfd1WFKM3sO2CMaHx8M1NjnXKHaAGGkOW0C02WeYHUz4qMtx+w5gUDS8NckYe5lHsMYwCZEPyEEmjLDZFmAS7CDviMdxyTkMNVBKEmYLvbiQQBIBBbCQG04bGQvFWz6CfsCQLWCigILFwcfkGYBiOpbYuOizTAyYyDdCtrGaRG1LCkIgMYEFhI0WqQZoSlbGRyHKe4qOx7iv2bVQW9dp4dlM/x6kmwnWQcd/Q3FCqwTEiT5s+6D5v/pb0SSHyg7uhMWAAAAAElFTkSuQmCC);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,303 @@
|
|||
/* Font Awesome
|
||||
the iconic font designed for use with Twitter Bootstrap
|
||||
-------------------------------------------------------
|
||||
The full suite of pictographic icons, examples, and documentation
|
||||
can be found at: http://fortawesome.github.com/Font-Awesome/
|
||||
|
||||
License
|
||||
-------------------------------------------------------
|
||||
The Font Awesome webfont, CSS, and LESS files are licensed under CC BY 3.0:
|
||||
http://creativecommons.org/licenses/by/3.0/ A mention of
|
||||
'Font Awesome - http://fortawesome.github.com/Font-Awesome' in human-readable
|
||||
source code is considered acceptable attribution (most common on the web).
|
||||
If human readable source code is not available to the end user, a mention in
|
||||
an 'About' or 'Credits' screen is considered acceptable (most common in desktop
|
||||
or mobile software).
|
||||
|
||||
Contact
|
||||
-------------------------------------------------------
|
||||
Email: dave@davegandy.com
|
||||
Twitter: http://twitter.com/fortaweso_me
|
||||
Work: http://lemonwi.se co-founder
|
||||
|
||||
*/
|
||||
@font-face {
|
||||
font-family: "FontAwesome";
|
||||
src: url('../fonts/fontawesome-webfont.eot');
|
||||
src: url('../fonts/fontawesome-webfont.eot?#iefix') format('eot'), url('../fonts/fontawesome-webfont.woff') format('woff'), url('../fonts/fontawesome-webfont.ttf') format('truetype'), url('../font/fontawesome-webfont.svg#FontAwesome') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* Font Awesome styles
|
||||
------------------------------------------------------- */
|
||||
[class^="icon-"]:before, [class*=" icon-"]:before {
|
||||
font-family: FontAwesome;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
display: inline-block;
|
||||
text-decoration: inherit;
|
||||
}
|
||||
a [class^="icon-"], a [class*=" icon-"] {
|
||||
display: inline-block;
|
||||
text-decoration: inherit;
|
||||
}
|
||||
/* makes the font 33% larger relative to the icon container */
|
||||
.icon-large:before {
|
||||
vertical-align: top;
|
||||
font-size: 1.3333333333333333em;
|
||||
}
|
||||
.btn [class^="icon-"], .btn [class*=" icon-"] {
|
||||
/* keeps button heights with and without icons the same */
|
||||
|
||||
line-height: .9em;
|
||||
}
|
||||
li [class^="icon-"], li [class*=" icon-"] {
|
||||
display: inline-block;
|
||||
width: 1.25em;
|
||||
text-align: center;
|
||||
}
|
||||
li .icon-large[class^="icon-"], li .icon-large[class*=" icon-"] {
|
||||
/* 1.5 increased font size for icon-large * 1.25 width */
|
||||
|
||||
width: 1.875em;
|
||||
}
|
||||
li[class^="icon-"], li[class*=" icon-"] {
|
||||
margin-left: 0;
|
||||
list-style-type: none;
|
||||
}
|
||||
li[class^="icon-"]:before, li[class*=" icon-"]:before {
|
||||
text-indent: -2em;
|
||||
text-align: center;
|
||||
}
|
||||
li[class^="icon-"].icon-large:before, li[class*=" icon-"].icon-large:before {
|
||||
text-indent: -1.3333333333333333em;
|
||||
}
|
||||
/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
|
||||
readers do not read off random characters that represent icons */
|
||||
.icon-glass:before { content: "\f000"; }
|
||||
.icon-music:before { content: "\f001"; }
|
||||
.icon-search:before { content: "\f002"; }
|
||||
.icon-envelope:before { content: "\f003"; }
|
||||
.icon-heart:before { content: "\f004"; }
|
||||
.icon-star:before { content: "\f005"; }
|
||||
.icon-star-empty:before { content: "\f006"; }
|
||||
.icon-user:before { content: "\f007"; }
|
||||
.icon-film:before { content: "\f008"; }
|
||||
.icon-th-large:before { content: "\f009"; }
|
||||
.icon-th:before { content: "\f00a"; }
|
||||
.icon-th-list:before { content: "\f00b"; }
|
||||
.icon-ok:before { content: "\f00c"; }
|
||||
.icon-remove:before { content: "\f00d"; }
|
||||
.icon-zoom-in:before { content: "\f00e"; }
|
||||
|
||||
.icon-zoom-out:before { content: "\f010"; }
|
||||
.icon-off:before { content: "\f011"; }
|
||||
.icon-signal:before { content: "\f012"; }
|
||||
.icon-cog:before { content: "\f013"; }
|
||||
.icon-trash:before { content: "\f014"; }
|
||||
.icon-home:before { content: "\f015"; }
|
||||
.icon-file:before { content: "\f016"; }
|
||||
.icon-time:before { content: "\f017"; }
|
||||
.icon-road:before { content: "\f018"; }
|
||||
.icon-download-alt:before { content: "\f019"; }
|
||||
.icon-download:before { content: "\f01a"; }
|
||||
.icon-upload:before { content: "\f01b"; }
|
||||
.icon-inbox:before { content: "\f01c"; }
|
||||
.icon-play-circle:before { content: "\f01d"; }
|
||||
.icon-repeat:before { content: "\f01e"; }
|
||||
|
||||
/* \f020 doesn't work in Safari. all shifted one down */
|
||||
.icon-refresh:before { content: "\f021"; }
|
||||
.icon-list-alt:before { content: "\f022"; }
|
||||
.icon-lock:before { content: "\f023"; }
|
||||
.icon-flag:before { content: "\f024"; }
|
||||
.icon-headphones:before { content: "\f025"; }
|
||||
.icon-volume-off:before { content: "\f026"; }
|
||||
.icon-volume-down:before { content: "\f027"; }
|
||||
.icon-volume-up:before { content: "\f028"; }
|
||||
.icon-qrcode:before { content: "\f029"; }
|
||||
.icon-barcode:before { content: "\f02a"; }
|
||||
.icon-tag:before { content: "\f02b"; }
|
||||
.icon-tags:before { content: "\f02c"; }
|
||||
.icon-book:before { content: "\f02d"; }
|
||||
.icon-bookmark:before { content: "\f02e"; }
|
||||
.icon-print:before { content: "\f02f"; }
|
||||
|
||||
.icon-camera:before { content: "\f030"; }
|
||||
.icon-font:before { content: "\f031"; }
|
||||
.icon-bold:before { content: "\f032"; }
|
||||
.icon-italic:before { content: "\f033"; }
|
||||
.icon-text-height:before { content: "\f034"; }
|
||||
.icon-text-width:before { content: "\f035"; }
|
||||
.icon-align-left:before { content: "\f036"; }
|
||||
.icon-align-center:before { content: "\f037"; }
|
||||
.icon-align-right:before { content: "\f038"; }
|
||||
.icon-align-justify:before { content: "\f039"; }
|
||||
.icon-list:before { content: "\f03a"; }
|
||||
.icon-indent-left:before { content: "\f03b"; }
|
||||
.icon-indent-right:before { content: "\f03c"; }
|
||||
.icon-facetime-video:before { content: "\f03d"; }
|
||||
.icon-picture:before { content: "\f03e"; }
|
||||
|
||||
.icon-pencil:before { content: "\f040"; }
|
||||
.icon-map-marker:before { content: "\f041"; }
|
||||
.icon-adjust:before { content: "\f042"; }
|
||||
.icon-tint:before { content: "\f043"; }
|
||||
.icon-edit:before { content: "\f044"; }
|
||||
.icon-share:before { content: "\f045"; }
|
||||
.icon-check:before { content: "\f046"; }
|
||||
.icon-move:before { content: "\f047"; }
|
||||
.icon-step-backward:before { content: "\f048"; }
|
||||
.icon-fast-backward:before { content: "\f049"; }
|
||||
.icon-backward:before { content: "\f04a"; }
|
||||
.icon-play:before { content: "\f04b"; }
|
||||
.icon-pause:before { content: "\f04c"; }
|
||||
.icon-stop:before { content: "\f04d"; }
|
||||
.icon-forward:before { content: "\f04e"; }
|
||||
|
||||
.icon-fast-forward:before { content: "\f050"; }
|
||||
.icon-step-forward:before { content: "\f051"; }
|
||||
.icon-eject:before { content: "\f052"; }
|
||||
.icon-chevron-left:before { content: "\f053"; }
|
||||
.icon-chevron-right:before { content: "\f054"; }
|
||||
.icon-plus-sign:before { content: "\f055"; }
|
||||
.icon-minus-sign:before { content: "\f056"; }
|
||||
.icon-remove-sign:before { content: "\f057"; }
|
||||
.icon-ok-sign:before { content: "\f058"; }
|
||||
.icon-question-sign:before { content: "\f059"; }
|
||||
.icon-info-sign:before { content: "\f05a"; }
|
||||
.icon-screenshot:before { content: "\f05b"; }
|
||||
.icon-remove-circle:before { content: "\f05c"; }
|
||||
.icon-ok-circle:before { content: "\f05d"; }
|
||||
.icon-ban-circle:before { content: "\f05e"; }
|
||||
|
||||
.icon-arrow-left:before { content: "\f060"; }
|
||||
.icon-arrow-right:before { content: "\f061"; }
|
||||
.icon-arrow-up:before { content: "\f062"; }
|
||||
.icon-arrow-down:before { content: "\f063"; }
|
||||
.icon-share-alt:before { content: "\f064"; }
|
||||
.icon-resize-full:before { content: "\f065"; }
|
||||
.icon-resize-small:before { content: "\f066"; }
|
||||
.icon-plus:before { content: "\f067"; }
|
||||
.icon-minus:before { content: "\f068"; }
|
||||
.icon-asterisk:before { content: "\f069"; }
|
||||
.icon-exclamation-sign:before { content: "\f06a"; }
|
||||
.icon-gift:before { content: "\f06b"; }
|
||||
.icon-leaf:before { content: "\f06c"; }
|
||||
.icon-fire:before { content: "\f06d"; }
|
||||
.icon-eye-open:before { content: "\f06e"; }
|
||||
|
||||
.icon-eye-close:before { content: "\f070"; }
|
||||
.icon-warning-sign:before { content: "\f071"; }
|
||||
.icon-plane:before { content: "\f072"; }
|
||||
.icon-calendar:before { content: "\f073"; }
|
||||
.icon-random:before { content: "\f074"; }
|
||||
.icon-comment:before { content: "\f075"; }
|
||||
.icon-magnet:before { content: "\f076"; }
|
||||
.icon-chevron-up:before { content: "\f077"; }
|
||||
.icon-chevron-down:before { content: "\f078"; }
|
||||
.icon-retweet:before { content: "\f079"; }
|
||||
.icon-shopping-cart:before { content: "\f07a"; }
|
||||
.icon-folder-close:before { content: "\f07b"; }
|
||||
.icon-folder-open:before { content: "\f07c"; }
|
||||
.icon-resize-vertical:before { content: "\f07d"; }
|
||||
.icon-resize-horizontal:before { content: "\f07e"; }
|
||||
|
||||
.icon-bar-chart:before { content: "\f080"; }
|
||||
.icon-twitter-sign:before { content: "\f081"; }
|
||||
.icon-facebook-sign:before { content: "\f082"; }
|
||||
.icon-camera-retro:before { content: "\f083"; }
|
||||
.icon-key:before { content: "\f084"; }
|
||||
.icon-cogs:before { content: "\f085"; }
|
||||
.icon-comments:before { content: "\f086"; }
|
||||
.icon-thumbs-up:before { content: "\f087"; }
|
||||
.icon-thumbs-down:before { content: "\f088"; }
|
||||
.icon-star-half:before { content: "\f089"; }
|
||||
.icon-heart-empty:before { content: "\f08a"; }
|
||||
.icon-signout:before { content: "\f08b"; }
|
||||
.icon-linkedin-sign:before { content: "\f08c"; }
|
||||
.icon-pushpin:before { content: "\f08d"; }
|
||||
.icon-external-link:before { content: "\f08e"; }
|
||||
|
||||
.icon-signin:before { content: "\f090"; }
|
||||
.icon-trophy:before { content: "\f091"; }
|
||||
.icon-github-sign:before { content: "\f092"; }
|
||||
.icon-upload-alt:before { content: "\f093"; }
|
||||
.icon-lemon:before { content: "\f094"; }
|
||||
.icon-phone:before { content: "\f095"; }
|
||||
.icon-check-empty:before { content: "\f096"; }
|
||||
.icon-bookmark-empty:before { content: "\f097"; }
|
||||
.icon-phone-sign:before { content: "\f098"; }
|
||||
.icon-twitter:before { content: "\f099"; }
|
||||
.icon-facebook:before { content: "\f09a"; }
|
||||
.icon-github:before { content: "\f09b"; }
|
||||
.icon-unlock:before { content: "\f09c"; }
|
||||
.icon-credit-card:before { content: "\f09d"; }
|
||||
.icon-rss:before { content: "\f09e"; }
|
||||
|
||||
.icon-hdd:before { content: "\f0a0"; }
|
||||
.icon-bullhorn:before { content: "\f0a1"; }
|
||||
.icon-bell:before { content: "\f0a2"; }
|
||||
.icon-certificate:before { content: "\f0a3"; }
|
||||
.icon-hand-right:before { content: "\f0a4"; }
|
||||
.icon-hand-left:before { content: "\f0a5"; }
|
||||
.icon-hand-up:before { content: "\f0a6"; }
|
||||
.icon-hand-down:before { content: "\f0a7"; }
|
||||
.icon-circle-arrow-left:before { content: "\f0a8"; }
|
||||
.icon-circle-arrow-right:before { content: "\f0a9"; }
|
||||
.icon-circle-arrow-up:before { content: "\f0aa"; }
|
||||
.icon-circle-arrow-down:before { content: "\f0ab"; }
|
||||
.icon-globe:before { content: "\f0ac"; }
|
||||
.icon-wrench:before { content: "\f0ad"; }
|
||||
.icon-tasks:before { content: "\f0ae"; }
|
||||
|
||||
.icon-filter:before { content: "\f0b0"; }
|
||||
.icon-briefcase:before { content: "\f0b1"; }
|
||||
.icon-fullscreen:before { content: "\f0b2"; }
|
||||
|
||||
.icon-group:before { content: "\f0c0"; }
|
||||
.icon-link:before { content: "\f0c1"; }
|
||||
.icon-cloud:before { content: "\f0c2"; }
|
||||
.icon-beaker:before { content: "\f0c3"; }
|
||||
.icon-cut:before { content: "\f0c4"; }
|
||||
.icon-copy:before { content: "\f0c5"; }
|
||||
.icon-paper-clip:before { content: "\f0c6"; }
|
||||
.icon-save:before { content: "\f0c7"; }
|
||||
.icon-sign-blank:before { content: "\f0c8"; }
|
||||
.icon-reorder:before { content: "\f0c9"; }
|
||||
.icon-list-ul:before { content: "\f0ca"; }
|
||||
.icon-list-ol:before { content: "\f0cb"; }
|
||||
.icon-strikethrough:before { content: "\f0cc"; }
|
||||
.icon-underline:before { content: "\f0cd"; }
|
||||
.icon-table:before { content: "\f0ce"; }
|
||||
|
||||
.icon-magic:before { content: "\f0d0"; }
|
||||
.icon-truck:before { content: "\f0d1"; }
|
||||
.icon-pinterest:before { content: "\f0d2"; }
|
||||
.icon-pinterest-sign:before { content: "\f0d3"; }
|
||||
.icon-google-plus-sign:before { content: "\f0d4"; }
|
||||
.icon-google-plus:before { content: "\f0d5"; }
|
||||
.icon-money:before { content: "\f0d6"; }
|
||||
.icon-caret-down:before { content: "\f0d7"; }
|
||||
.icon-caret-up:before { content: "\f0d8"; }
|
||||
.icon-caret-left:before { content: "\f0d9"; }
|
||||
.icon-caret-right:before { content: "\f0da"; }
|
||||
.icon-columns:before { content: "\f0db"; }
|
||||
.icon-sort:before { content: "\f0dc"; }
|
||||
.icon-sort-down:before { content: "\f0dd"; }
|
||||
.icon-sort-up:before { content: "\f0de"; }
|
||||
|
||||
.icon-envelope-alt:before { content: "\f0e0"; }
|
||||
.icon-linkedin:before { content: "\f0e1"; }
|
||||
.icon-undo:before { content: "\f0e2"; }
|
||||
.icon-legal:before { content: "\f0e3"; }
|
||||
.icon-dashboard:before { content: "\f0e4"; }
|
||||
.icon-comment-alt:before { content: "\f0e5"; }
|
||||
.icon-comments-alt:before { content: "\f0e6"; }
|
||||
.icon-bolt:before { content: "\f0e7"; }
|
||||
.icon-sitemap:before { content: "\f0e8"; }
|
||||
.icon-umbrella:before { content: "\f0e9"; }
|
||||
.icon-paste:before { content: "\f0ea"; }
|
||||
|
||||
.icon-user-md:before { content: "\f200"; }
|
|
@ -0,0 +1,519 @@
|
|||
/* WARNING: Your are using ligatures for your icon font.
|
||||
Ligatures are not supported in IE 9 (and older).
|
||||
Use the Private Use Area encoding for best browser support.
|
||||
==================================================================== */
|
||||
@font-face {
|
||||
font-family: 'entypo';
|
||||
src:url(<%= asset_path 'entypo.eot' %>);
|
||||
src:url(<%= asset_path 'entypo.eot?#iefix' %>) format('embedded-opentype'),
|
||||
url(<%= asset_path 'entypo.svg#entypo' %>) format('svg'),
|
||||
url(<%= asset_path 'entypo.woff' %>) format('woff'),
|
||||
url(<%= asset_path 'entypo.ttf' %>) format('truetype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* Use the following CSS code if you want to use data attributes for inserting your icons */
|
||||
[data-icons]:before {
|
||||
font-family: 'entypo';
|
||||
content: attr(data-icon);
|
||||
speak: none;
|
||||
/* Enable Ligatures */
|
||||
-webkit-font-feature-settings:"liga","dlig";
|
||||
-moz-font-feature-settings:"liga=1, dlig=1";
|
||||
-moz-font-feature-settings:"liga","dlig";
|
||||
-ms-font-feature-settings:"liga","dlig";
|
||||
-o-font-feature-settings:"liga","dlig";
|
||||
font-feature-settings:"liga","dlig";
|
||||
text-rendering:optimizeLegibility;
|
||||
font-weight: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
/* Use the following CSS code if you want to have a class per icon */
|
||||
[class^="icons-"]:before, [class*=" icons-"]:before {
|
||||
font-size: 1.5em;
|
||||
font-family: 'entypo';
|
||||
font-style: normal;
|
||||
speak: none;
|
||||
/* Enable Ligatures */
|
||||
-webkit-font-feature-settings:"liga","dlig";
|
||||
-moz-font-feature-settings:"liga=1, dlig=1";
|
||||
-moz-font-feature-settings:"liga","dlig";
|
||||
-ms-font-feature-settings:"liga","dlig";
|
||||
-o-font-feature-settings:"liga","dlig";
|
||||
font-feature-settings:"liga","dlig";
|
||||
text-rendering:optimizeLegibility;
|
||||
font-weight: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
display: inline-block;
|
||||
text-decoration: inherit;
|
||||
}
|
||||
a [class^="icons-"], a [class*=" icons-"] {
|
||||
display: inline-block;
|
||||
text-decoration: inherit;
|
||||
}
|
||||
/* makes the font 33% larger relative to the icon container */
|
||||
.icons-large:before {
|
||||
vertical-align: top;
|
||||
font-size: 1.3333333333333333em;
|
||||
}
|
||||
.btn [class^="icons-"], .btn [class*=" icons-"] {
|
||||
/* keeps button heights with and without icons the same */
|
||||
|
||||
line-height: .9em;
|
||||
}
|
||||
li [class^="icons-"], li [class*=" icons-"] {
|
||||
display: inline-block;
|
||||
width: 1.25em;
|
||||
text-align: center;
|
||||
margin-right: 10px;
|
||||
}
|
||||
li .icons-large[class^="icons-"], li .icons-large[class*=" icons-"] {
|
||||
/* 1.5 increased font size for icons-large * 1.25 width */
|
||||
|
||||
width: 1.875em;
|
||||
}
|
||||
li[class^="icons-"], li[class*=" icons-"] {
|
||||
margin-left: 0;
|
||||
list-style-type: none;
|
||||
}
|
||||
li[class^="icons-"]:before, li[class*=" icons-"]:before {
|
||||
text-indent: -2em;
|
||||
text-align: center;
|
||||
}
|
||||
li[class^="icons-"].icons-large:before, li[class*=" icons-"].icons-large:before {
|
||||
text-indent: -1.3333333333333333em;
|
||||
}
|
||||
.icons-phone:before {
|
||||
content: "\70\68\6f\6e\65";
|
||||
}
|
||||
.icons-directions:before {
|
||||
content: "\64\69\72\65\63\74\69\6f\6e\73";
|
||||
}
|
||||
.icons-mail:before {
|
||||
content: "\6d\61\69\6c";
|
||||
}
|
||||
.icons-pencil:before {
|
||||
content: "\70\65\6e\63\69\6c";
|
||||
}
|
||||
.icons-paperclip:before {
|
||||
content: "\70\61\70\65\72\63\6c\69\70";
|
||||
}
|
||||
.icons-drawer:before {
|
||||
content: "\64\72\61\77\65\72";
|
||||
}
|
||||
.icons-member:before {
|
||||
content: "\6d\65\6d\62\65\72";
|
||||
}
|
||||
.icons-group:before {
|
||||
content: "\67\72\6f\75\70";
|
||||
}
|
||||
.icons-addmember:before {
|
||||
content: "\61\64\64\6d\65\6d\62\65\72";
|
||||
}
|
||||
.icons-location:before {
|
||||
content: "\6c\6f\63\61\74\69\6f\6e";
|
||||
}
|
||||
.icons-share:before {
|
||||
content: "\73\68\61\72\65";
|
||||
}
|
||||
.icons-heart-full:before {
|
||||
content: "\68\65\61\72\74\2d\66\75\6c\6c";
|
||||
}
|
||||
.icons-heart-bare:before {
|
||||
content: "\68\65\61\72\74\2d\62\61\72\65";
|
||||
}
|
||||
.icons-star-full:before {
|
||||
content: "\73\74\61\72\2d\66\75\6c\6c";
|
||||
}
|
||||
.icons-star-bare:before {
|
||||
content: "\73\74\61\72\2d\62\61\72\65";
|
||||
}
|
||||
.icons-discuss:before {
|
||||
content: "\64\69\73\63\75\73\73";
|
||||
}
|
||||
.icons-comment:before {
|
||||
content: "\63\6f\6d\6d\65\6e\74";
|
||||
}
|
||||
.icons-quote:before {
|
||||
content: "\71\75\6f\74\65";
|
||||
}
|
||||
.icons-house:before {
|
||||
content: "\68\6f\75\73\65";
|
||||
}
|
||||
.icons-search:before {
|
||||
content: "\73\65\61\72\63\68";
|
||||
}
|
||||
.icons-printer:before {
|
||||
content: "\70\72\69\6e\74\65\72";
|
||||
}
|
||||
.icons-bell:before {
|
||||
content: "\62\65\6c\6c";
|
||||
}
|
||||
.icons-link:before {
|
||||
content: "\6c\69\6e\6b";
|
||||
}
|
||||
.icons-flag:before {
|
||||
content: "\66\61\6c\67";
|
||||
}
|
||||
.icons-cog:before {
|
||||
content: "\63\6f\67";
|
||||
}
|
||||
.icons-tools:before {
|
||||
content: "\74\6f\6f\6c\73";
|
||||
}
|
||||
.icons-tag:before {
|
||||
content: "\74\61\67";
|
||||
}
|
||||
.icons-camera:before {
|
||||
content: "\63\61\6d\65\72\61";
|
||||
}
|
||||
.icons-megaphone:before {
|
||||
content: "\6d\65\67\61\70\68\6f\6e\65";
|
||||
}
|
||||
.icons-new:before {
|
||||
content: "\6e\65\77";
|
||||
}
|
||||
.icons-graduation:before {
|
||||
content: "\67\72\61\64\75\61\74\69\6f\6e";
|
||||
}
|
||||
.icons-books:before {
|
||||
content: "\62\6f\6f\6b\73";
|
||||
}
|
||||
.icons-page:before {
|
||||
content: "\70\61\67\65";
|
||||
}
|
||||
.icons-lifebuoy:before {
|
||||
content: "\6c\69\66\65\62\75\6f\79";
|
||||
}
|
||||
.icons-eye:before {
|
||||
content: "\65\79\65";
|
||||
}
|
||||
.icons-clock:before {
|
||||
content: "\63\6c\6f\63\6b";
|
||||
}
|
||||
.icons-calendar:before {
|
||||
content: "\63\61\6c\65\6e\64\61\72";
|
||||
}
|
||||
.icons-briefcase:before {
|
||||
content: "\62\72\69\65\66\63\61\73\65";
|
||||
}
|
||||
.icons-gauge:before {
|
||||
content: "\67\61\75\67\65";
|
||||
}
|
||||
.icons-language:before {
|
||||
content: "\6c\61\6e\67\75\61\67\65";
|
||||
}
|
||||
.icons-keys:before {
|
||||
content: "\6b\65\79\73";
|
||||
}
|
||||
.icons-earth:before {
|
||||
content: "\65\61\72\74\68";
|
||||
}
|
||||
.icons-keyboard:before {
|
||||
content: "\6b\65\79\62\6f\61\72\64";
|
||||
}
|
||||
.icons-browser:before {
|
||||
content: "\62\72\6f\77\73\65\72";
|
||||
}
|
||||
.icons-publish:before {
|
||||
content: "\70\75\62\6c\69\73\68";
|
||||
}
|
||||
.icons-code:before {
|
||||
content: "\63\6f\64\65";
|
||||
}
|
||||
.icons-light-bulb:before {
|
||||
content: "\6c\69\67\68\74\2d\62\75\6c\62";
|
||||
}
|
||||
.icons-database:before {
|
||||
content: "\64\61\74\61\62\61\73\65";
|
||||
}
|
||||
.icons-box:before {
|
||||
content: "\62\6f\78";
|
||||
}
|
||||
.icons-rss:before {
|
||||
content: "\72\73\73";
|
||||
}
|
||||
.icons-clipboard:before {
|
||||
content: "\63\6c\69\70\62\6f\61\72\64";
|
||||
}
|
||||
.icons-cart:before {
|
||||
content: "\63\61\72\74";
|
||||
}
|
||||
.icons-untitled:before {
|
||||
content: "\75\6e\74\69\74\6c\65\64";
|
||||
}
|
||||
.icons-statistics:before {
|
||||
content: "\73\74\61\74\69\73\74\69\63\73";
|
||||
}
|
||||
.icons-pie:before {
|
||||
content: "\70\69\65";
|
||||
}
|
||||
.icons-bars:before {
|
||||
content: "\62\61\72\73";
|
||||
}
|
||||
.icons-graph:before {
|
||||
content: "\67\72\61\70\68";
|
||||
}
|
||||
.icons-lock:before {
|
||||
content: "\6c\6f\63\6b";
|
||||
}
|
||||
.icons-unlock:before {
|
||||
content: "\75\6e\6c\6f\63\6b";
|
||||
}
|
||||
.icons-outlog:before {
|
||||
content: "\6f\75\74\6c\6f\67";
|
||||
}
|
||||
.icons-inlog:before {
|
||||
content: "\69\6e\6c\6f\67";
|
||||
}
|
||||
.icons-checkmark:before {
|
||||
content: "\63\68\65\63\6b\6d\61\72\6b";
|
||||
}
|
||||
.icons-aminus:before {
|
||||
content: "\61\6d\69\6e\75\73";
|
||||
}
|
||||
.icons-aplus:before {
|
||||
content: "\61\70\6c\75\73";
|
||||
}
|
||||
.icons-aclose:before {
|
||||
content: "\61\63\6c\6f\73\65";
|
||||
}
|
||||
.icons-bminus:before {
|
||||
content: "\62\6d\69\6e\75\73";
|
||||
}
|
||||
.icons-bplus:before {
|
||||
content: "\62\70\6c\75\73";
|
||||
}
|
||||
.icons-bclose:before {
|
||||
content: "\62\63\6c\6f\73\65";
|
||||
}
|
||||
.icons-cminus:before {
|
||||
content: "\63\6d\69\6e\75\73";
|
||||
}
|
||||
.icons-cplus:before {
|
||||
content: "\63\70\6c\75\73";
|
||||
}
|
||||
.icons-cross:before {
|
||||
content: "\63\72\6f\73\73";
|
||||
}
|
||||
.icons-blocked:before {
|
||||
content: "\62\6c\6f\63\6b\65\64";
|
||||
}
|
||||
.icons-information:before {
|
||||
content: "\69\6e\66\6f\72\6d\61\74\69\6f\6e";
|
||||
}
|
||||
.icons-binfo:before {
|
||||
content: "\62\69\6e\66\6f";
|
||||
}
|
||||
.icons-question:before {
|
||||
content: "\71\75\65\73\74\69\6f\6e";
|
||||
}
|
||||
.icons-help:before {
|
||||
content: "\68\65\6c\70";
|
||||
}
|
||||
.icons-warning:before {
|
||||
content: "\77\61\72\6e\69\6e\67";
|
||||
}
|
||||
.icons-shuffle:before {
|
||||
content: "\73\68\75\66\66\6c\65";
|
||||
}
|
||||
.icons-return:before {
|
||||
content: "\72\65\74\75\72\6e";
|
||||
}
|
||||
.icons-enter:before {
|
||||
content: "\65\6e\74\65\72";
|
||||
}
|
||||
.icons-exchange:before {
|
||||
content: "\65\78\63\68\61\6e\67\65";
|
||||
}
|
||||
.icons-loop:before {
|
||||
content: "\6c\6f\6f\70";
|
||||
}
|
||||
.icons-th-list:before {
|
||||
content: "\74\68\2d\6c\69\73\74";
|
||||
}
|
||||
.icons-th-large:before {
|
||||
content: "\74\68\2d\6c\61\72\67\65";
|
||||
}
|
||||
.icons-align-justify:before {
|
||||
content: "\61\6c\69\67\6e\2d\6a\75\73\74\69\66\79";
|
||||
}
|
||||
.icons-wtext:before {
|
||||
content: "\77\74\65\78\74";
|
||||
}
|
||||
.icons-btext:before {
|
||||
content: "\62\74\65\78\74";
|
||||
}
|
||||
.icons-pictures:before {
|
||||
content: "\70\69\63\74\75\72\65";
|
||||
}
|
||||
.icons-video:before {
|
||||
content: "\76\69\64\65\6f";
|
||||
}
|
||||
.icons-music:before {
|
||||
content: "\6d\6f\75\73\65";
|
||||
}
|
||||
.icons-folder:before {
|
||||
content: "\66\6f\6c\64\65\72";
|
||||
}
|
||||
.icons-archive:before {
|
||||
content: "\61\72\63\68\69\76\65";
|
||||
}
|
||||
.icons-trash:before {
|
||||
content: "\74\72\61\73\68";
|
||||
}
|
||||
.icons-upload:before {
|
||||
content: "\75\70\6c\6f\61\64";
|
||||
}
|
||||
.icons-download:before {
|
||||
content: "\64\6f\77\6e\6c\6f\61\64";
|
||||
}
|
||||
.icons-disk:before {
|
||||
content: "\64\69\73\6b";
|
||||
}
|
||||
.icons-bookmark:before {
|
||||
content: "\62\6f\6f\6b\6d\61\72\6b";
|
||||
}
|
||||
.icons-booma:before {
|
||||
content: "\62\6f\6f\6d\61";
|
||||
}
|
||||
.icons-resize-enlarge:before {
|
||||
content: "\72\65\73\69\7a\65\2d\65\6e\6c\61\72\67\65";
|
||||
}
|
||||
.icons-resize-shrink:before {
|
||||
content: "\72\65\73\69\7a\65\2d\73\68\72\69\6e\6b";
|
||||
}
|
||||
.icons-flow-tree:before {
|
||||
content: "\66\6c\6f\77\2d\74\72\65\65";
|
||||
}
|
||||
.icons-arrow-left-a:before {
|
||||
content: "\61\72\72\6f\77\2d\6c\65\66\74\2d\61";
|
||||
}
|
||||
.icons-arrow-bottom-a:before {
|
||||
content: "\61\72\72\6f\77\2d\62\6f\74\74\6f\6d\2d\61";
|
||||
}
|
||||
.icons-arrow-top-a:before {
|
||||
content: "\61\72\72\6f\77\2d\74\6f\70\2d\61";
|
||||
}
|
||||
.icons-arrow-right-a:before {
|
||||
content: "\61\72\72\6f\77\2d\72\69\67\68\74\2d\61";
|
||||
}
|
||||
.icons-arrow-left-b:before {
|
||||
content: "\61\72\72\6f\77\2d\6c\65\66\74\2d\62";
|
||||
}
|
||||
.icons-arrow-bottom-b:before {
|
||||
content: "\61\72\72\6f\77\2d\62\6f\74\74\6f\6d\2d\62";
|
||||
}
|
||||
.icons-arrow-top-b:before {
|
||||
content: "\61\72\72\6f\77\2d\74\6f\70\2d\62";
|
||||
}
|
||||
.icons-arrow-right-b:before {
|
||||
content: "\61\72\72\6f\77\2d\72\69\67\68\74\2d\62";
|
||||
}
|
||||
.icons-arrow-left-c:before {
|
||||
content: "\61\72\72\6f\77\2d\6c\65\66\74\2d\63";
|
||||
}
|
||||
.icons-arrow-bottom-c:before {
|
||||
content: "\61\72\72\6f\77\2d\62\6f\74\74\6f\6d\2d\63";
|
||||
}
|
||||
.icons-arrow-top-c:before {
|
||||
content: "\61\72\72\6f\77\2d\74\6f\70\2d\63";
|
||||
}
|
||||
.icons-arrow-right-c:before {
|
||||
content: "\61\72\72\6f\77\2d\72\69\67\68\74\2d\63";
|
||||
}
|
||||
.icons-arrow-left-d:before {
|
||||
content: "\61\72\72\6f\77\2d\6c\65\66\74\2d\64";
|
||||
}
|
||||
.icons-arrow-bottom-d:before {
|
||||
content: "\61\72\72\6f\77\2d\62\6f\74\74\6f\6d\2d\64";
|
||||
}
|
||||
.icons-arrow-top-d:before {
|
||||
content: "\61\72\72\6f\77\2d\74\6f\70\2d\64";
|
||||
}
|
||||
.icons-arrow-right-d:before {
|
||||
content: "\61\72\72\6f\77\2d\72\69\67\68\74\2d\64";
|
||||
}
|
||||
.icons-arrow-left-e:before {
|
||||
content: "\61\72\72\6f\77\2d\6c\65\66\74\2d\65";
|
||||
}
|
||||
.icons-arrow-bottom-e:before {
|
||||
content: "\61\72\72\6f\77\2d\62\6f\74\74\6f\6d\2d\65";
|
||||
}
|
||||
.icons-arrow-top-e:before {
|
||||
content: "\61\72\72\6f\77\2d\74\6f\70\2d\65";
|
||||
}
|
||||
.icons-arrow-right-e:before {
|
||||
content: "\61\72\72\6f\77\2d\72\69\67\68\74\2d\65";
|
||||
}
|
||||
.icons-arrow-left-f:before {
|
||||
content: "\61\72\72\6f\77\2d\6c\65\66\74\2d\66";
|
||||
}
|
||||
.icons-arrow-bottom-f:before {
|
||||
content: "\61\72\72\6f\77\2d\62\6f\74\74\6f\6d\2d\66";
|
||||
}
|
||||
.icons-arrow-top-f:before {
|
||||
content: "\61\72\72\6f\77\2d\74\6f\70\2d\66";
|
||||
}
|
||||
.icons-left-f:before {
|
||||
content: "\61\72\72\6f\77\2d\72\69\67\68\74\2d\66";
|
||||
}
|
||||
.icons-menu:before {
|
||||
content: "\6d\65\6e\75";
|
||||
}
|
||||
.icons-ellipsis:before {
|
||||
content: "\65\6c\6c\69\70\73\69\73";
|
||||
}
|
||||
.icons-dots:before {
|
||||
content: "\64\6f\74\73";
|
||||
}
|
||||
.icons-dot:before {
|
||||
content: "\64\6f\74";
|
||||
}
|
||||
.icons-like:before {
|
||||
content: "\6c\69\6b\65";
|
||||
}
|
||||
.icons-suck:before {
|
||||
content: "\73\75\63\6b";
|
||||
}
|
||||
.icons-export:before {
|
||||
content: "\65\78\70\6f\72\74";
|
||||
}
|
||||
.icons-vcard:before {
|
||||
content: "\76\63\61\72\64";
|
||||
}
|
||||
.icons-flow-cascade:before {
|
||||
content: "\21";
|
||||
}
|
||||
.icons-landscape:before {
|
||||
content: "\22";
|
||||
}
|
||||
.icons-brush:before {
|
||||
content: "\62\72\75\73\68";
|
||||
}
|
||||
.icons-palette:before {
|
||||
content: "\70\61\6c\65\74\74\65";
|
||||
}
|
||||
.icons-desktop:before {
|
||||
content: "\64\65\73\6b\74\6f\70";
|
||||
}
|
||||
.icons-plane:before {
|
||||
content: "\70\6c\61\6e\65";
|
||||
}
|
||||
.icons-booklet:before {
|
||||
content: "\62\6f\6f\6b\6c\65\74";
|
||||
}
|
||||
.icons-update:before {
|
||||
content: "\75\70\64\61\74\65";
|
||||
}
|
||||
.icons-reload:before {
|
||||
content: "\72\65\6c\6f\61\64";
|
||||
}
|
||||
.icons-unload:before {
|
||||
content: "\75\6e\6c\6f\61\64";
|
||||
}
|
||||
.icons-trophy:before {
|
||||
content: "\74\72\6f\70\68\79";
|
||||
}
|
|
@ -0,0 +1,374 @@
|
|||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
div[data-role="page"] {
|
||||
padding-bottom: 0!important;
|
||||
}
|
||||
.clear:after {
|
||||
clear: both;
|
||||
content: "";
|
||||
display: block;
|
||||
height: 0;
|
||||
visibility: hidden;
|
||||
}
|
||||
.main-menu {
|
||||
display: block;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
top: -50px;
|
||||
display: block;
|
||||
z-index: 49;
|
||||
-webkit-transition: all 0.3s linear;
|
||||
-moz-transition: all 0.3s linear;
|
||||
-ms-transition: all 0.3s linear;
|
||||
-o-transition: all 0.3s linear;
|
||||
transition: all 0.3s linear;
|
||||
}
|
||||
.main-menu.expanded {
|
||||
top: 50px;
|
||||
-webkit-transition: all 0.3s linear;
|
||||
-moz-transition: all 0.3s linear;
|
||||
-ms-transition: all 0.3s linear;
|
||||
-o-transition: all 0.3s linear;
|
||||
transition: all 0.3s linear;
|
||||
}
|
||||
.main-menu ul {
|
||||
background-color: #333;
|
||||
width: 280px;
|
||||
list-style: none;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
-webkit-box-shadow: 0 3px 10px rgba(0,0,0,.8), inset 0 3px 15px rgba(0,0,0,.3);;
|
||||
-webkit-border-radius: 0 0 10px 10px;
|
||||
}
|
||||
.main-menu ul li {
|
||||
float: left;
|
||||
width: 58px;
|
||||
border-right: 1px solid #292929;
|
||||
border-left: 1px solid #3F3F3F;
|
||||
padding: 0 5px;
|
||||
}
|
||||
.main-menu ul li:last-child {
|
||||
-webkit-border-radius: 0 0 10px 0;
|
||||
border-right-color: transparent;
|
||||
}
|
||||
.main-menu ul li:first-child {
|
||||
-webkit-border-radius: 0 0 0 10px;
|
||||
border-left-color: transparent;
|
||||
}
|
||||
.main-menu ul li:hover {
|
||||
background-color: #b4111a;
|
||||
}
|
||||
.main-menu ul i {
|
||||
font-size: 1.4em;
|
||||
width: 100%;
|
||||
display: block;
|
||||
margin: 10px auto 0;
|
||||
}
|
||||
.main-menu ul span {
|
||||
display: block;
|
||||
margin-bottom: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
.main-menu ul li a:link, .main-menu ul li a:visited {
|
||||
font-size: .6em;
|
||||
color: #DFDFDF!important;
|
||||
text-shadow: 0 -1px 0px #000;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
}
|
||||
.main-menu ul li a:hover, .main-menu ul li a:active {
|
||||
color: #DFDFDF!important;
|
||||
}
|
||||
.global {
|
||||
position: relative;
|
||||
background-color: #333;
|
||||
overflow-x: hidden;
|
||||
width: 100%;
|
||||
-webkit-box-shadow: -3px 0px 15px rgba(0,0,0,.5);
|
||||
padding-top: 50px;
|
||||
padding-bottom: 64px;
|
||||
/*margin-bottom: -64px;*/
|
||||
}
|
||||
.header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background-color: #000;
|
||||
padding: 0;
|
||||
border: none;
|
||||
z-index: 50;
|
||||
/*background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#545b60), to(#191a1c));*/
|
||||
background-image: -webkit-linear-gradient(top, #5282A6, #133757);
|
||||
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(127, 149, 165, 1), 0 -1px 0 rgba(31, 32, 36, 1) inset;
|
||||
}
|
||||
.header h1.ui-title {
|
||||
margin: 8px 30%;
|
||||
position: relative;
|
||||
}
|
||||
.header i.openmenu {
|
||||
position: absolute;
|
||||
display: block;
|
||||
top: 40px;
|
||||
left: 50%;
|
||||
margin-left: -15px;
|
||||
font-size: 20px;
|
||||
/*color: #727272;*/
|
||||
color: #7CA6C5;
|
||||
/*background-color: #252525;*/
|
||||
background-color: #144366;
|
||||
border-radius: 0 0 5px 5px;
|
||||
height: 15px;
|
||||
line-height: 16px;
|
||||
box-shadow: 1px 2px 2px rgba(0, 0, 0, .5);
|
||||
}
|
||||
.header .language .ui-btn-text {
|
||||
left: 0;
|
||||
}
|
||||
.header .language .ui-btn-text i {
|
||||
font-size: .83em;
|
||||
margin-top: .2em;
|
||||
}
|
||||
.header .language .ui-icon {
|
||||
background-image: none;
|
||||
}
|
||||
.header .ui-btn-up-a {
|
||||
border: 1px solid #133547;
|
||||
background-color: #0C4C64;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from( #0D6691 ), to( #0E3A4B ));
|
||||
background-image: -webkit-linear-gradient( #0D6691 , #0E3A4B );
|
||||
background-image: -moz-linear-gradient( #0D6691 , #0E3A4B );
|
||||
background-image: -ms-linear-gradient( #0D6691 , #0E3A4B );
|
||||
background-image: -o-linear-gradient( #0D6691 , #0E3A4B );
|
||||
background-image: linear-gradient( #0D6691 , #0E3A4B );
|
||||
}
|
||||
.header h1 img {
|
||||
height: 30px;
|
||||
width: auto;
|
||||
}
|
||||
.header.ui-header > .ui-btn {
|
||||
margin-top: 6px;
|
||||
}
|
||||
.content {
|
||||
position: relative;
|
||||
background-color: #FFF;
|
||||
min-height: 330px;
|
||||
background: url(<%= asset_path "mobile/newlist-bg.jpg" %>) repeat 0 0 transparent;
|
||||
}
|
||||
/*.content .list {
|
||||
position: relative;
|
||||
z-index: 5;
|
||||
box-shadow: -5px 0px 15px rgba(0,0,0,.8)
|
||||
}*/
|
||||
.content .newlist {
|
||||
margin: 0 auto;
|
||||
padding: 10px;
|
||||
}
|
||||
.content .newitem {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
width: 280px;
|
||||
min-height: 490px;
|
||||
max-height: 490px;
|
||||
background-color: #FFFFFF;
|
||||
padding: 10px;
|
||||
margin: 0 10px 10px 0;
|
||||
box-shadow: 0px 3px 5px rgba(0,0,0,.1);
|
||||
}
|
||||
#index .content .newpic {
|
||||
width: 280px;
|
||||
height: 200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
#index .content .newstitle {
|
||||
font-size: 1.4em;
|
||||
margin: 1em 0;
|
||||
}
|
||||
#index .content .newsDate {
|
||||
font-size: 1em;
|
||||
color: #8D8D8D;
|
||||
}
|
||||
#index .content .newsummary {
|
||||
padding: 0 0 20px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
#news_content .content .newpic {
|
||||
width: 320px;
|
||||
height: 220px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
#news_content .content .newstitle {
|
||||
font-size: 1.4em;
|
||||
padding: 0 10px;
|
||||
margin: 1em 0;
|
||||
}
|
||||
#news_content .content .newsDate {
|
||||
padding: 0 10px;
|
||||
font-size: 1em;
|
||||
color: #8D8D8D;
|
||||
}
|
||||
#news_content .content .newsummary {
|
||||
padding: 0 10px 20px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
#announcement_content .content {
|
||||
padding: 10px;
|
||||
}
|
||||
#map div[data-role="content"] {
|
||||
padding: 0;
|
||||
}
|
||||
#map .global {
|
||||
padding: 0;
|
||||
}
|
||||
#page_content .global {
|
||||
overflow-x: auto;
|
||||
-webkit-box-shadow: none;
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
#page_content .content {
|
||||
background-image: none;
|
||||
padding: 10px;
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
#page_content .content .newsummary > * {
|
||||
width: 750px!important;
|
||||
}
|
||||
#page_content .content .newsummary > *:after {
|
||||
clear: both;
|
||||
height: 0;
|
||||
display: block;
|
||||
content: "";
|
||||
visibility: hidden;
|
||||
}
|
||||
div[id^="dialog"] .global {
|
||||
padding: 0;
|
||||
}
|
||||
div[id^="dialog"] .content {
|
||||
padding: 10px;
|
||||
height: auto!important;
|
||||
min-height: 70px;
|
||||
}
|
||||
/*.content .newitem:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
.content .newitem:last-child {
|
||||
margin-right: 0;
|
||||
}*/
|
||||
.pagination {
|
||||
height: 36px;
|
||||
margin: 18px 0 0;
|
||||
padding-bottom: 18px;
|
||||
text-align: center;
|
||||
}
|
||||
.pagination ul {
|
||||
padding: 0;
|
||||
display: inline-block;
|
||||
margin-left: 0;
|
||||
margin: 0;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
-moz-box-shadow: 0 1px 2px rgba(0,0,0,0.05);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.pagination li {
|
||||
display: inline;
|
||||
}
|
||||
.pagination li:first-child a {
|
||||
border-left-width: 1px;
|
||||
-webkit-border-radius: 3px 0 0 3px;
|
||||
-moz-border-radius: 3px 0 0 3px;
|
||||
border-radius: 3px 0 0 3px;
|
||||
}
|
||||
.pagination li:last-child a {
|
||||
-webkit-border-radius: 0 3px 3px 0;
|
||||
-moz-border-radius: 0 3px 3px 0;
|
||||
border-radius: 0 3px 3px 0;
|
||||
}
|
||||
.pagination .active a {
|
||||
color: #999;
|
||||
cursor: default;
|
||||
}
|
||||
.pagination a:hover, .pagination .active a {
|
||||
background-color: #E8E8E8;
|
||||
}
|
||||
.pagination a {
|
||||
background-color: white;
|
||||
}
|
||||
.pagination a {
|
||||
float: left;
|
||||
padding: 0 10px;
|
||||
line-height: 30px;
|
||||
text-decoration: none;
|
||||
border: 1px solid #DDD;
|
||||
border-left-width: 0;
|
||||
font-size: .8em;
|
||||
}
|
||||
.footer {
|
||||
color: #999;
|
||||
/*background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#545b60), to(#191a1c));*/
|
||||
background-image: -webkit-linear-gradient(top, #5282A6, #133757);
|
||||
}
|
||||
.footer div[data-role="navbar"] i {
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
@media(min-width:320px){
|
||||
}
|
||||
@media(min-width: 480px){
|
||||
.content .newitem {
|
||||
width: 440px;
|
||||
}
|
||||
}
|
||||
@media(min-width:600px) {
|
||||
.main-menu ul {
|
||||
width: 560px;
|
||||
}
|
||||
.main-menu ul li {
|
||||
width: 128px;
|
||||
}
|
||||
}
|
||||
@media(min-width:768px) {
|
||||
.main-menu ul {
|
||||
width: 640px;
|
||||
}
|
||||
.main-menu ul li {
|
||||
width: 148px;
|
||||
}
|
||||
.content .newitem {
|
||||
width: 280px;
|
||||
}
|
||||
}
|
||||
@media(min-width:800px) {
|
||||
.main-menu ul {
|
||||
width: 640px;
|
||||
}
|
||||
.main-menu ul li {
|
||||
width: 148px;
|
||||
}
|
||||
}
|
||||
@media(min-width:961px) {
|
||||
.main-menu ul {
|
||||
width: 640px;
|
||||
}
|
||||
.main-menu ul li {
|
||||
width: 148px;
|
||||
}
|
||||
}
|
||||
@media(min-width: 1024px) {
|
||||
.main-menu ul {
|
||||
width: 800px;
|
||||
}
|
||||
.main-menu ul li {
|
||||
width: 188px;
|
||||
}
|
||||
.content .newitem {
|
||||
width: 280px;
|
||||
}
|
||||
}
|
||||
@media(min-width:1280px) {
|
||||
}
|
|
@ -94,7 +94,12 @@ class Admin::DesignsController < OrbitBackendController
|
|||
|
||||
def destroy
|
||||
@design = Design.find(params[:id])
|
||||
if @site.design == @design
|
||||
flash[:error] = "Failed! You can not delete a design that used by default "
|
||||
else
|
||||
@design.destroy
|
||||
flash[:notice] = "Successfully deleted design."
|
||||
end
|
||||
redirect_to admin_designs_url
|
||||
end
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ class Admin::ObjectAuthsNewInterfaceController < OrbitBackendController
|
|||
|
||||
|
||||
def setting
|
||||
|
||||
@sys_users = User.all(conditions: {admin: false}).includes(:avatar).not_guest_user
|
||||
@ob_auth = ObjectAuth.find params[:object_auth_id]
|
||||
@options_from_collection_for_select_ob_auth = @ob_auth.siblings.collect{|oa| [oa.auth_obj.pp_object,oa.id] }
|
||||
|
@ -60,6 +59,7 @@ class Admin::ObjectAuthsNewInterfaceController < OrbitBackendController
|
|||
|
||||
def force_order
|
||||
authenticate_user!
|
||||
setup_vars
|
||||
check_if_user_can_do_object_auth
|
||||
end
|
||||
|
||||
|
@ -76,15 +76,25 @@ class Admin::ObjectAuthsNewInterfaceController < OrbitBackendController
|
|||
end
|
||||
|
||||
def setup_vars
|
||||
if request.env['HTTP_REFERER'].split('/')[4] == "object_auths"
|
||||
http_referer = request.env['HTTP_REFERER'] || ''
|
||||
if http_referer.split('/')[4] == "object_auths"
|
||||
@app_key = params[:app_key]
|
||||
else
|
||||
@app_key = request.env['HTTP_REFERER'].split('/')[4]
|
||||
@app_key = http_referer.split('/')[4]
|
||||
end
|
||||
|
||||
#@app_key = request.fullpath.split('/')[1] if(@app_key == "back_end")
|
||||
if @app_key
|
||||
@app_key.gsub!(/[?].*/,'')
|
||||
@module_app = ModuleApp.first(conditions: {:key => @app_key} )
|
||||
if @module_app.nil?
|
||||
raise ObjectAuthError, 'Auth procress failed, module_app not exist '
|
||||
end
|
||||
else
|
||||
raise ObjectAuthError, 'Auth procress failed, pls redo your sop'
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -39,9 +39,8 @@ class Admin::PagePartsController < ApplicationController
|
|||
when 'announcement'
|
||||
@categories = BulletinCategory.all
|
||||
@tags = AnnouncementTag.all
|
||||
when 'news'
|
||||
@categories = NewsBulletinCategory.all
|
||||
@tags = NewsTag.all
|
||||
when 'gallery'
|
||||
@albums = GalleryAlbum.all
|
||||
when 'web_resource'
|
||||
@categories = WebLinkCategory.all
|
||||
@tags = WebResourceTag.all
|
||||
|
@ -90,6 +89,7 @@ class Admin::PagePartsController < ApplicationController
|
|||
end
|
||||
|
||||
def reload_widgets
|
||||
@part = PagePart.find params[:part_id]
|
||||
@categories =[]
|
||||
@module_app = ModuleApp.find(params[:id])
|
||||
|
||||
|
@ -101,9 +101,8 @@ class Admin::PagePartsController < ApplicationController
|
|||
when 'announcement'
|
||||
@categories = BulletinCategory.all
|
||||
@tags = AnnouncementTag.all
|
||||
when 'news'
|
||||
@categories = NewsBulletinCategory.all
|
||||
@tags = NewsTag.all
|
||||
when 'gallery'
|
||||
@albums = GalleryAlbum.all
|
||||
when 'web_resource'
|
||||
@categories = WebLinkCategory.all
|
||||
@tags = WebResourceTag.all
|
||||
|
@ -112,6 +111,7 @@ class Admin::PagePartsController < ApplicationController
|
|||
@tags = ArchiveTag.all
|
||||
end
|
||||
|
||||
@part.widget_path = @module_app.widgets.first if @module_app.needs_to_widget_option?
|
||||
respond_to do |format|
|
||||
format.js {}
|
||||
end
|
||||
|
|
|
@ -46,12 +46,16 @@ class Admin::TagsController < OrbitBackendController
|
|||
|
||||
protected
|
||||
|
||||
def set_module_app
|
||||
@module_app ||= ModuleApp.first(:conditions => {:key => @app_title.underscore}) rescue nil
|
||||
end
|
||||
|
||||
def get_tags
|
||||
@tags = (@module_app ? @module_app.tags : Tag.all)
|
||||
end
|
||||
|
||||
def setup_vars
|
||||
@app_key = request.env['HTTP_REFERER'].split('/')[4]
|
||||
if @app_key
|
||||
@app_key.gsub!(/[?].*/, '')
|
||||
@module_app = ModuleApp.first(conditions: {:key => @app_key})
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -2,14 +2,23 @@ class ApplicationController < ActionController::Base
|
|||
protect_from_forgery
|
||||
|
||||
include ParserFrontEnd, ParserBackEnd, ApplicationHelper
|
||||
include OrbitApp::ErrorHandlers::PageErrorHandler
|
||||
include OrbitApp::ErrorHandlers::ObjectAuthErrorHandler
|
||||
include OrbitApp::ErrorHandlers::ModuleAppErrorHandler
|
||||
|
||||
rescue_from ObjectAuthError, :with => :render_object_auth_error
|
||||
rescue_from ModuleAppError, :with => :render_module_app_error
|
||||
rescue_from PageError, :with => :render_page_error
|
||||
|
||||
layout :layout_by_resource
|
||||
|
||||
helper :admin
|
||||
before_filter :set_locale, :set_site
|
||||
before_filter :set_locale, :set_site, :prepare_for_mobile
|
||||
|
||||
helper_attr :site_valid_locales
|
||||
|
||||
|
||||
|
||||
def set_current_user
|
||||
User.current = current_or_guest_user
|
||||
end
|
||||
|
@ -121,6 +130,7 @@ class ApplicationController < ActionController::Base
|
|||
respond_to do |format|
|
||||
format.html { render :text => parse_page_content(@item), :layout => 'page_layout' }
|
||||
format.rss { render_main_rss }
|
||||
format.mobile { redirect_to mobile_path }
|
||||
end
|
||||
else
|
||||
render :text => '404 Not Found'
|
||||
|
@ -228,4 +238,22 @@ class ApplicationController < ActionController::Base
|
|||
redirect_to ret
|
||||
end
|
||||
|
||||
|
||||
private
|
||||
|
||||
def mobile_device?
|
||||
if session[:mobile_param]
|
||||
session[:mobile_param] == "1"
|
||||
else
|
||||
request.user_agent =~ /iPhone|iPod|Android/
|
||||
end
|
||||
end
|
||||
|
||||
def prepare_for_mobile
|
||||
if @site.mobile_on
|
||||
session[:mobile_param] = params[:mobile] if params[:mobile]
|
||||
request.format = :mobile if mobile_device?
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
class DefaultWidgetController< OrbitWidgetController
|
||||
|
||||
def front_end_available(var)
|
||||
@page_part = PagePart.find params[:part_id]
|
||||
@page_part.module_app.enable_frontend?
|
||||
end
|
||||
|
||||
def default_widget
|
||||
@tag_class = nil
|
||||
|
||||
@default_widget = @page_part.module_app.get_default_widget
|
||||
@widget_image_field = @default_widget[:image]
|
||||
data_limit = @page_part.widget_data_count.is_a?(Fixnum) ? @page_part.widget_data_count : (@page_part.widget_data_count.to_i rescue 3)
|
||||
@data = eval(@default_widget[:query]).limit(data_limit).includes(@widget_image_field)
|
||||
@fields = @page_part.widget_field
|
||||
|
||||
case params[:type]
|
||||
when "typeA"
|
||||
@tag_class = 'defulat_widget_typeA'
|
||||
render "typeA"
|
||||
when /typeB_/
|
||||
@tag_class = "defulat_widget_#{params[:type]}"
|
||||
render "typeB"
|
||||
when "typeC"
|
||||
@tag_class = 'defulat_widget_typeC'
|
||||
render "typeC"
|
||||
end
|
||||
|
||||
# {"inner"=>"true",
|
||||
# "category_id"=>"false",
|
||||
# "tag_id"=>"",
|
||||
# "page"=>"",
|
||||
# "search_query"=>"",
|
||||
# "part_title"=>"",
|
||||
# "part_id"=>"50ac426f83e75219d20000a7",
|
||||
# "controller"=>"default_widget",
|
||||
# "action"=>"default_widget",
|
||||
# "type"=>"typeA"}
|
||||
end
|
||||
end
|
|
@ -39,7 +39,7 @@ class FrontController < ApplicationController
|
|||
res << "'>"
|
||||
i = nil
|
||||
i = 1 if menu.values["li_incremental_#{current}"]
|
||||
children = current == 1 ? page.visible_children.reverse : page.visible_children
|
||||
children = current == 1 ? page.visible_children : page.visible_children
|
||||
children.each do |child|
|
||||
res << menu_li(child, current_page, current, menu, i)
|
||||
i += 1 if i
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
class MobileController < ApplicationController
|
||||
|
||||
layout 'mobile'
|
||||
|
||||
def index
|
||||
date_now = Time.now
|
||||
@bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page(params[:page_main]).per(15)
|
||||
@ad_banner = AdBanner.where(title: "Banner")[0]
|
||||
end
|
||||
|
||||
def announcement
|
||||
@page_title = t('mobile.bulletin')
|
||||
date_now = Time.now
|
||||
@bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page(params[:page_main]).per(15)
|
||||
end
|
||||
|
||||
def announcement_content
|
||||
@bulletin = Bulletin.find(params[:id]) rescue nil
|
||||
@page_title = @bulletin.title
|
||||
end
|
||||
|
||||
def dialog_contact
|
||||
@no_menu = @no_footer = true
|
||||
@page_title = t('mobile.contact')
|
||||
end
|
||||
|
||||
def dialog_copyright
|
||||
@no_menu = @no_footer = true
|
||||
@page_title = t('mobile.copyright')
|
||||
end
|
||||
|
||||
def dialog_language
|
||||
@no_menu = @no_footer = true
|
||||
@page_title = t('mobile.language')
|
||||
end
|
||||
|
||||
def map
|
||||
@no_menu = @no_footer = true
|
||||
@page_title = t('mobile.location')
|
||||
end
|
||||
|
||||
def page
|
||||
@page_title = t('mobile.page')
|
||||
@page_contexts = PageContext.where(:archived => false).page(params[:page_main]).per(15)
|
||||
end
|
||||
|
||||
def page_content
|
||||
@page_context = PageContext.first(conditions: { id: params[:id], :archived => false }) rescue nil
|
||||
@page_title = @page_context.page.title
|
||||
end
|
||||
|
||||
end
|
|
@ -13,6 +13,7 @@ class OrbitBackendController < ApplicationController
|
|||
def setup_vars
|
||||
@app_title ||= controller_path.split('/')[1].singularize
|
||||
@module_app ||= ModuleApp.first(conditions: {:key => @app_title} )
|
||||
raise ModuleAppError, 'Can not find ModuleApp' if @module_app.nil?
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -17,7 +17,6 @@ class PagesController < ApplicationController
|
|||
def show
|
||||
#begin
|
||||
@item = Item.first(:conditions => {:path => params[:page_name]})
|
||||
#binding.pry
|
||||
if @item && @item.is_published && (@item.enabled_for.nil? ? true : @item.enabled_for.include?(I18n.locale.to_s))
|
||||
impressionist(@item)
|
||||
case @item.class.to_s
|
||||
|
@ -66,6 +65,7 @@ class PagesController < ApplicationController
|
|||
|
||||
def get_item
|
||||
module_app = ModuleApp.first(:conditions => {:key => params[:app_name]})
|
||||
|
||||
if !params[:category_id].blank? && !params[:tag_id].blank?
|
||||
@item = Item.first(:conditions => {:module_app_id => module_app.id, :app_frontend_url => params[:app_action], :category => params[:category_id], :tag => params[:tag_id]})
|
||||
@item = Item.first(:conditions => {:module_app_id => module_app.id, :app_frontend_url => params[:app_action], :category => params[:category_id], :tag => ''}) unless @item
|
||||
|
@ -75,7 +75,8 @@ class PagesController < ApplicationController
|
|||
@item = Item.where(module_app_id: module_app.id,app_frontend_url:params[:app_action],tag: params[:tag_id]).any_in(category: [nil,'']).first
|
||||
end
|
||||
@item = Item.where(module_app_id: module_app.id,app_frontend_url:params[:app_action]).all_of("tag" => {"$in" => [nil,'']},"category" => { "$in" => [nil,'']}).first unless @item
|
||||
#TODO 需要做 error handler 處理沒有新增該模組頁面導致錯誤的可能性
|
||||
@item = Item.where(module_app_id: module_app.id,app_frontend_url:params[:app_action]).first unless @item
|
||||
raise PageError,'Missing Frontend Page' if @item.nil?
|
||||
end
|
||||
|
||||
def save_from_no_lang_for_page
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
class ModuleAppError < StandardError
|
||||
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
class ObjectAuthError < StandardError
|
||||
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
class PageError < StandardError
|
||||
|
||||
end
|
|
@ -0,0 +1,11 @@
|
|||
module Admin::PagePartsHelper
|
||||
|
||||
def support_link
|
||||
url_method = @module_app.get_default_widget[:url_method]
|
||||
unless url_method.nil?
|
||||
res = "Link:"
|
||||
res << select_tag( "page_part[widget_field_is_link][]", options_for_select([["NotLink",false],["Link1",url_method]]))
|
||||
res.html_safe
|
||||
end
|
||||
end
|
||||
end
|
|
@ -184,6 +184,7 @@ module ApplicationHelper
|
|||
stylesheets << "<link href='/assets/orbit-bar.css' rel='stylesheet' type='text/css' />\n"
|
||||
stylesheets << "<link href='/assets/social-share-button.css' rel='stylesheet' type='text/css' />\n"
|
||||
stylesheets << "<link href='#{asset_path 'banner_nav.css'}' rel='stylesheet' type='text/css' />\n"
|
||||
stylesheets << "<link href='#{asset_path 'default_widget.css'}' rel='stylesheet' type='text/css' />\n"
|
||||
stylesheets << "<link href='#{page.design.css_default.file.url}' rel='stylesheet' type='text/css' />\n" if page.design.css_default
|
||||
theme = page.design.themes.detect{ |d| d.id == page.theme_id }
|
||||
stylesheets << "<link href='#{theme.file.url}' rel='stylesheet' type='text/css' />\n" if theme
|
||||
|
@ -208,7 +209,7 @@ module ApplicationHelper
|
|||
javascripts << "<script type='text/javascript' src='/assets/lib/social-share-button.js'></script>\n"
|
||||
javascripts << "<script type='text/javascript' src='/assets/event.js'></script>\n"
|
||||
page.design.javascripts.each do |js|
|
||||
# javascripts << "<script type='text/javascript' src='#{js.file.url}'></script>"
|
||||
javascripts << "<script type='text/javascript' src='#{js.file.url}'></script>"
|
||||
end
|
||||
javascripts
|
||||
end
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
module DefaultWidgetsHelper
|
||||
def get_row_data(row_data,field)
|
||||
field_is_link = (field[0][1]== 'false' ? false : true )
|
||||
field_setting = {:class=>field[0][1],:method=>field[0][0]}
|
||||
if field_is_link
|
||||
field_link = field[0][1].to_s + '_path'
|
||||
binding.pry
|
||||
link = link_to(row_data.send(field_setting[:method]),field_link.send(row_data))
|
||||
content_tag(:span,link,:class=>field_setting[:class])
|
||||
else
|
||||
content_tag(:span,row_data.send(field_setting[:method]),:class=>field_setting[:class])
|
||||
end
|
||||
end
|
||||
end
|
|
@ -47,16 +47,16 @@ class Item
|
|||
new_parent = Item.find(new_parent)
|
||||
current_position_sibling = find_by_parent_and_position(new_parent, position.to_i)
|
||||
if current_position_sibling
|
||||
current_position_sibling.at_bottom? ? move_below(current_position_sibling) : move_above(current_position_sibling)
|
||||
move_above(current_position_sibling)
|
||||
elsif self.parent != new_parent
|
||||
self.parent = new_parent
|
||||
save!
|
||||
save
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def show_in_sitemap_for(locale)
|
||||
if !sitemap_enabled[locale].blank?
|
||||
if sitemap_enabled && !sitemap_enabled[locale].blank?
|
||||
sitemap_enabled[locale].eql?('true') ? true : false
|
||||
else
|
||||
true
|
||||
|
|
|
@ -17,7 +17,8 @@ class ModuleApp
|
|||
# field :widgets ,type: Array
|
||||
field :widgets ,type: Hash
|
||||
field :widget_fields ,type: Array
|
||||
|
||||
field :widget_options,type:Hash
|
||||
field :widget_options_fields_i18n,type:Hash
|
||||
has_many :managers,as: :managing_app ,:class_name => "AppManager" ,:dependent => :destroy#,:foreign_key => "managing_app_id",:inverse_of => :managing_app
|
||||
has_many :sub_managers,as: :sub_managing_app ,:class_name => "AppManager", :dependent => :destroy#,:foreign_key => "sub_managing_app_id",:inverse_of => :sub_managing_app
|
||||
|
||||
|
@ -29,6 +30,13 @@ class ModuleApp
|
|||
|
||||
before_save :set_key
|
||||
|
||||
#>>>>>>>>>>>>> remove after app config applied
|
||||
def get_default_widget
|
||||
{:query=>'Bulletin.all',:image=> 'image'}
|
||||
end
|
||||
#<<<<<<<<<<<<@@
|
||||
|
||||
|
||||
def is_manager?(user)
|
||||
managing_users.include?(user)
|
||||
end
|
||||
|
@ -79,6 +87,14 @@ class ModuleApp
|
|||
end
|
||||
end
|
||||
|
||||
def needs_to_widget_option?
|
||||
if self.widget_options
|
||||
self.widget_options.has_key? widgets.first
|
||||
else
|
||||
false
|
||||
end
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def set_key
|
||||
|
|
|
@ -24,9 +24,8 @@ class Page < Item
|
|||
has_many :page_metas, :autosave => true, :dependent => :destroy
|
||||
accepts_nested_attributes_for :page_parts, :allow_destroy => true
|
||||
|
||||
before_save :delete_empty_frontend_field
|
||||
before_save :create_parts, if: Proc.new { |page| page.new_record? || page.design_id_changed? }
|
||||
after_save :generate_html
|
||||
before_save :delete_empty_frontend_field, :generate_html
|
||||
|
||||
protected
|
||||
|
||||
|
@ -37,6 +36,7 @@ class Page < Item
|
|||
page_design.layout.layout_parts.each do |layout_part|
|
||||
current_part = self.page_parts.detect{|page_part| page_part.name.eql?(layout_part.name)}
|
||||
current_part = self.page_parts.build(:name => layout_part.name) unless current_part
|
||||
|
||||
if menu_part && current_part.name.eql?(menu_part.name)
|
||||
if current_part.new_record?
|
||||
current_part.kind = menu_part.kind
|
||||
|
@ -50,6 +50,10 @@ class Page < Item
|
|||
current_part.update_attributes(:kind => menu_part.kind, :public_r_tag => menu_part.public_r_tag, :public_r_tag_object_id => menu_part.public_r_tag_object_id)
|
||||
end
|
||||
end
|
||||
elsif current_part.new_record?
|
||||
PagePart.without_callback(:save, :after, :update_parent) do
|
||||
current_part.save
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -67,10 +71,7 @@ class Page < Item
|
|||
end
|
||||
|
||||
def generate_html
|
||||
Page.without_callback(:save, :after, :generate_html) do
|
||||
self.content_translations = parse_page_noko(self, Site.first)
|
||||
self.save
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -14,6 +14,7 @@ class PagePart
|
|||
|
||||
field :widget_style
|
||||
field :widget_field , :type => Array
|
||||
field :widget_options ,:type=>Hash
|
||||
field :widget_data_count
|
||||
|
||||
belongs_to :page
|
||||
|
@ -22,6 +23,7 @@ class PagePart
|
|||
before_save :delete_empty_widget_field
|
||||
after_save :update_parent
|
||||
|
||||
|
||||
protected
|
||||
|
||||
def delete_empty_widget_field
|
||||
|
@ -35,4 +37,5 @@ class PagePart
|
|||
self.page.save
|
||||
end
|
||||
|
||||
|
||||
end
|
|
@ -26,6 +26,8 @@ class Site
|
|||
field :footer, localize: true
|
||||
field :sub_menu, localize: true
|
||||
|
||||
field :mobile_on, :type => Boolean, :default => false
|
||||
|
||||
belongs_to :design
|
||||
has_many :site_metas, :autosave => true, :dependent => :destroy
|
||||
|
||||
|
|
|
@ -1,4 +1,45 @@
|
|||
class Tag < ProtoTag
|
||||
belongs_to :module_app
|
||||
# class Tag < ProtoTag
|
||||
# belongs_to :module_app
|
||||
|
||||
# end
|
||||
|
||||
class Tag
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
include Impressionist::Impressionable
|
||||
|
||||
is_impressionable :counter_cache => { :column_name => :view_count }
|
||||
|
||||
field :key
|
||||
field :view_count, :type => Integer, :default => 0
|
||||
#field :cloud_amper,:type: Integer,:default=> 0
|
||||
|
||||
def self.sorted_for_cloud
|
||||
tags = {}
|
||||
self.all.each{ |tag|
|
||||
tags.merge!({tag => self.get_impressionist(tag)})
|
||||
}
|
||||
if !tags.blank?
|
||||
sorted_tags = tags.sort{|a,b| a[1]<=>b[1]}.reverse
|
||||
sorted_tags[0][1] = :hot1
|
||||
offset = (sorted_tags.size - 1) / 3
|
||||
i = 1
|
||||
class_i = 2
|
||||
sorted_tags[1..-1].collect!{ |x|
|
||||
x[1] = "hot#{class_i}"
|
||||
i == offset ? i = 1 : i += 1 if class_i < 4
|
||||
class_i += 1 if i == offset && class_i < 4
|
||||
}
|
||||
sorted_tags
|
||||
else
|
||||
[]
|
||||
end
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def self.get_impressionist(item_tag = self)
|
||||
item_tag.impressions.where(:created_at.gte=> 14.days.ago,:created_at.lte => Time.now).count
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -11,4 +11,8 @@ $("#ad_banner-tab-content").children(".tab-pane").removeClass("active");
|
|||
$('#post-body-content').find(".nav.nav-tabs").children('li[id!="new_ad_banner_tab_but"]').last().addClass("active");
|
||||
$("#ad_banner-tab-content").children(".tab-pane").last().addClass("active");
|
||||
|
||||
|
||||
<% if params[:action] && params[:action] =='create'%>
|
||||
var trigger = $("#ad_banner-tab-content").children(".tab-pane").last().find(".preview_trigger");
|
||||
new_url = trigger.attr("href").replace(/\/admin\/ad_banners\/.*\/preview/gi,"/admin/ad_banners/<%= @ad_banner.id %>/preview");
|
||||
trigger.attr("href",new_url);
|
||||
<% end %>
|
|
@ -46,7 +46,6 @@
|
|||
<%#= select_tag "page_part[widget_field][]", options_for_select(@module_app.widget_fields.collect{|widget_field| [widget_field.humanize, widget_field]}, @part.widget_field.collect{|widget_field| widget_field}), {:multiple => :multiple, :size => 6} %>
|
||||
</span>
|
||||
|
||||
<div id="widget_data_count">
|
||||
<%= f.label :widget_data_count %>
|
||||
<%= f.text_field :widget_data_count %>
|
||||
</div>
|
||||
<span id="widget_options">
|
||||
<%= render 'widget_options' %>
|
||||
</span>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
<% if (@module_app && @module_app.widget_fields) %>
|
||||
|
||||
<%= label_tag('widget_field') %>
|
||||
|
@ -9,4 +8,6 @@
|
|||
<%= select_tag "page_part[widget_field_type][]", options_for_select(LIST[:widget_field_type].collect{|widget_field| [widget_field.humanize, widget_field]}, (@part[:widget_field][i][1] if (@part && !@part[:widget_field].blank? && !@part[:widget_field][i].blank?)) ), :include_blank => true %> <br />
|
||||
<% end %>
|
||||
|
||||
<%= label_tag :widget_data_count %>
|
||||
<%= text_field_tag :widget_data_count,@part.widget_data_count %>
|
||||
<% end %>
|
|
@ -0,0 +1,17 @@
|
|||
<% if (@module_app && @module_app.widget_options) %>
|
||||
<%= label_tag('widget_options') %>
|
||||
<% if @module_app.key.eql?('gallery') %>
|
||||
<%= t('gallery.gallery') %>
|
||||
<%= select_tag "page_part[widget_options][album_id]", options_from_collection_for_select(@albums, :id, :name, :selected => (@part.widget_options[key] rescue nil)) %>
|
||||
<% end %>
|
||||
<% if @module_app.widget_options.has_key? @part.widget_path%>
|
||||
<% @module_app.widget_options[@part.widget_path].each do |key,options| %>
|
||||
<%= label_tag(t(@module_app.widget_options_fields_i18n[@part.widget_path][key]))%>
|
||||
<%= select_tag "page_part[widget_options][#{key}]", options_for_select(options,(@part.widget_options[key] rescue nil)) %>
|
||||
<!-- (@part[:widget_field][i][0] if (@part && !@part[:widget_field].blank? && !@part[:widget_field][i].blank?)) ) -->
|
||||
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
|
@ -3,3 +3,5 @@ $('#widget_style_list').html("<%= escape_javascript(select 'page_part', 'widget_
|
|||
$('#widget_field').html("<%= j render 'widget_fields' %>");
|
||||
$('#widget_category').html("<%= j render 'widget_categories' %>");
|
||||
$('#widget_tag').html("<%= j render 'widget_tags' %>");
|
||||
|
||||
$("#widget_options").html("<%= j render 'widget_options'%>");
|
|
@ -64,6 +64,14 @@
|
|||
<p class="help-block"><%= (t 'site.description_help').html_safe %></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'site.header' %></label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :sub_menu_translations do |f| %>
|
||||
<%= f.text_area locale, :class => "tinymce_textarea input-xxlarge", :value => (@site.sub_menu_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'site.footer' %></label>
|
||||
<div class="controls">
|
||||
|
@ -73,14 +81,6 @@
|
|||
<p class="help-block"><%= (t 'site.footer_help').html_safe %></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'site.sub_menu' %></label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :sub_menu_translations do |f| %>
|
||||
<%= f.text_area locale, :class => "tinymce_textarea input-xxlarge", :value => (@site.sub_menu_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'site.default_image' %></label>
|
||||
<div class="controls">
|
||||
|
@ -94,13 +94,23 @@
|
|||
<% end %>
|
||||
<br>
|
||||
<% if @site.default_image.file %>
|
||||
<%= f.check_box :remove_default_image %>
|
||||
<%= t('刪除已上傳檔案') %>
|
||||
<label class="checkbox">
|
||||
<%= check_box_tag 'site[remove_default_image]' %>
|
||||
<%= t('delete') %>
|
||||
</label>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="control-group" style="margin-bottom: 0;">
|
||||
<label class="control-label"><%= t 'site.mobile_version' %></label>
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<%= f.check_box :mobile_on %>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
<%= content_tag :div,:class=>@tag_class do%>
|
||||
<div class="defulat_widget_type_A">
|
||||
<table class="defulat_widget_tb" border="0" cellpadding="0" cellspacing="0" >
|
||||
<thead>
|
||||
<tr>
|
||||
<% @fields.each do |field|%>
|
||||
<th><%= content_tag(:span,field[0],:class=>field[1])%></th>
|
||||
<% end %>
|
||||
</tr>
|
||||
</thead>
|
||||
<% @data.each do |row_data| %>
|
||||
<tr>
|
||||
<% @fields.each do |field|%>
|
||||
<% if field[0] == "bulletin_category"%>
|
||||
<td><%= content_tag(:span,row_data.send(field[0]).title,:class=>field[1])%></td>
|
||||
<% elsif field[0] == "title" %>
|
||||
<td><%= content_tag(:span, link_to(row_data.send(field[0]), panel_announcement_front_end_bulletin_path(row_data)), :class=>field[1]) %></td>
|
||||
<% else %>
|
||||
<td><%= content_tag(:span,row_data.send(field[0]),:class=>field[1])%></td>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
<% end %>
|
|
@ -0,0 +1,23 @@
|
|||
<%= content_tag :div,:class=>@tag_class do%>
|
||||
<ul class="defulat_widget_list">
|
||||
<% @data.each do |row_data| %>
|
||||
<%= content_tag(:li) do %>
|
||||
<div class="img app-pic">
|
||||
<%= image_tag row_data.send(@widget_image_field)%>
|
||||
</div>
|
||||
<div class="wrap">
|
||||
<% @fields.each do |field|%>
|
||||
<% if field[0] == "bulletin_category"%>
|
||||
<%= content_tag(:span,row_data.send(field[0]).title,:class=>field[1])%>
|
||||
<% elsif field[0] == "title" %>
|
||||
<%= content_tag(:span, link_to(row_data.send(field[0]), panel_announcement_front_end_bulletin_path(row_data)), :class=>field[1]) %>
|
||||
<% else %>
|
||||
<%= content_tag(:span,row_data.send(field[0]),:class=>field[1])%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<div class="more">more</div>
|
||||
<% end %>
|
|
@ -0,0 +1,21 @@
|
|||
<%= content_tag :div,:class=>@tag_class do%>
|
||||
<div class="img app-pic">
|
||||
<%= image_tag @data.first.send(@widget_image_field)%>
|
||||
</div>
|
||||
<ul class="defulat_widget_list">
|
||||
<% @data.each do |row_data| %>
|
||||
<%= content_tag(:li) do %>
|
||||
<% @fields.each do |field|%>
|
||||
<% if field[0] == "bulletin_category"%>
|
||||
<%= content_tag(:span,row_data.send(field[0]).title,:class=>field[1])%>
|
||||
<% elsif field[0] == "title" %>
|
||||
<%= content_tag(:span, link_to(row_data.send(field[0]), panel_announcement_front_end_bulletin_path(row_data)), :class=>field[1]) %>
|
||||
<% else %>
|
||||
<%= content_tag(:span,row_data.send(field[0]),:class=>field[1])%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<div class="more">more</div>
|
||||
<% end %>
|
|
@ -19,7 +19,7 @@
|
|||
<div id='slideshow-<%= @ad_banner.title.dehumanize %>' class='slideshow'>
|
||||
<% (images = @ad_banner.ad_images).shuffle.each do |ad_image| %>
|
||||
<% if ad_image.display? %>
|
||||
<img src='<%= ad_image.file %>' alt='<%= ad_image.title || ' ' %>' time_to_next='<%= @ad_banner.transition_msec %>' link_open='<%= ad_image.link_open %>' link_url='<%= (ad_image.direct_to_after_click? ? ad_image.out_link : ad_image.context) || ' ' %>' link_url='<%= (ad_image.out_link) %>' style=' <%= 'cursor:pointer;' if !ad_image.out_link.blank? %>'/>
|
||||
<img src='<%= ad_image.file %>' alt='<%= ad_image.title || ' ' %>' time_to_next='<%= @ad_banner.transition_msec %>' link_open='<%= ad_image.link_open %>' link_url='<%= (ad_image.out_link) %>' style=' <%= 'cursor:pointer;' if !ad_image.out_link.blank? %>'/>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<% if @menu_page && @menu_page.visible_children.size > 0 %>
|
||||
<div class='category_list'>
|
||||
<h3 class='h3'><%= @menu_page.title %></h3>
|
||||
<ul class='list'>"
|
||||
<ul class='list'>
|
||||
<% @menu_page.visible_children.each do |child| %>
|
||||
<li class="<%= @page_id.eql?(child.id) ? 'active' : nil %>">
|
||||
<a href="<%= (child.class.to_s.eql?('Page') ? '/' + child.path : child.url) %>"><%= child.title %></a>
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<%# Link to the "First" page
|
||||
- available local variables
|
||||
url: url to the first page
|
||||
current_page: a page object for the currently displayed page
|
||||
num_pages: total number of pages
|
||||
per_page: number of items to fetch per page
|
||||
remote: data-remote
|
||||
-%>
|
||||
<li class="first">
|
||||
<%= link_to_unless current_page.first?, "«", url, :remote => remote %>
|
||||
</li>
|
|
@ -0,0 +1,8 @@
|
|||
<%# Non-link tag that stands for skipped pages...
|
||||
- available local variables
|
||||
current_page: a page object for the currently displayed page
|
||||
num_pages: total number of pages
|
||||
per_page: number of items to fetch per page
|
||||
remote: data-remote
|
||||
-%>
|
||||
<!-- <li class="page gap"><%= raw(t 'views.pagination.truncate') %></li> -->
|
|
@ -0,0 +1,11 @@
|
|||
<%# Link to the "Last" page
|
||||
- available local variables
|
||||
url: url to the last page
|
||||
current_page: a page object for the currently displayed page
|
||||
num_pages: total number of pages
|
||||
per_page: number of items to fetch per page
|
||||
remote: data-remote
|
||||
-%>
|
||||
<li class="last">
|
||||
<%= link_to_unless current_page.last?, "»", url, {:remote => remote} %>
|
||||
</li>
|
|
@ -0,0 +1,11 @@
|
|||
<%# Link to the "Next" page
|
||||
- available local variables
|
||||
url: url to the next page
|
||||
current_page: a page object for the currently displayed page
|
||||
num_pages: total number of pages
|
||||
per_page: number of items to fetch per page
|
||||
remote: data-remote
|
||||
-%>
|
||||
<li class="next">
|
||||
<%= link_to_unless current_page.last?, '›', url, :rel => 'next', :remote => remote %>
|
||||
</li>
|
|
@ -0,0 +1,16 @@
|
|||
<%# Link showing page number
|
||||
- available local variables
|
||||
page: a page object for "this" page
|
||||
url: url to this page
|
||||
current_page: a page object for the currently displayed page
|
||||
num_pages: total number of pages
|
||||
per_page: number of items to fetch per page
|
||||
remote: data-remote
|
||||
-%>
|
||||
<li class="page<%= ' active' if page.current? %>">
|
||||
<% if page.current? %>
|
||||
<a><%= page %></a>
|
||||
<% else %>
|
||||
<%= link_to page, url, opts = {:remote => remote, :rel => page.next? ? '›' : page.prev? ? '‹' : nil} %>
|
||||
<% end %>
|
||||
</li>
|
|
@ -0,0 +1,25 @@
|
|||
<%# The container tag
|
||||
- available local variables
|
||||
current_page: a page object for the currently displayed page
|
||||
num_pages: total number of pages
|
||||
per_page: number of items to fetch per page
|
||||
remote: data-remote
|
||||
paginator: the paginator that renders the pagination tags inside
|
||||
-%>
|
||||
<%= paginator.render do -%>
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<%= first_page_tag unless current_page.first? %>
|
||||
<%= prev_page_tag unless current_page.first? %>
|
||||
<% each_page do |page| -%>
|
||||
<% if page.left_outer? || page.right_outer? || page.inside_window? -%>
|
||||
<%= page_tag page %>
|
||||
<% elsif !page.was_truncated? -%>
|
||||
<%= gap_tag %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<%= next_page_tag unless current_page.last? %>
|
||||
<%= last_page_tag unless current_page.last? %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end -%>
|
|
@ -0,0 +1,11 @@
|
|||
<%# Link to the "Previous" page
|
||||
- available local variables
|
||||
url: url to the previous page
|
||||
current_page: a page object for the currently displayed page
|
||||
num_pages: total number of pages
|
||||
per_page: number of items to fetch per page
|
||||
remote: data-remote
|
||||
-%>
|
||||
<li class="prev">
|
||||
<%= link_to_unless current_page.first?, '‹', url, :rel => 'prev', :remote => remote %>
|
||||
</li>
|
|
@ -30,7 +30,7 @@
|
|||
<input type="hidden" name="cof" id="cof" value="AH:center;AWFID:03de271f1940eea3;" />
|
||||
<input type='hidden' name='domains' value='<%= @site.search["domains"] rescue ''%>'>
|
||||
<input type='hidden' name='sitesearch' value='<%= @site.search["sitesearch"] rescue '' %>'>
|
||||
<%= text_field_tag 'q','',{:class => "search-query span3",:placeholder=> t(:search_nccu) ,:disabled=> ((@site.search["sitesearch"] || @site.search["domains"] ).blank? rescue true)}%>
|
||||
<%= text_field_tag 'q','',{:class => "search-query span3",:placeholder=> t(:search_google) ,:disabled=> ((@site.search["sitesearch"] || @site.search["domains"] ).blank? rescue true)}%>
|
||||
</form>
|
||||
</li>
|
||||
<% if user_signed_in? %>
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<base href=<%= "#{request.protocol}#{request.host_with_port}/mobile/"%>>
|
||||
<title><%= @site.title %><%= (' - ' + @page_title) if @page_title %></title>
|
||||
<%= stylesheet_link_tag "mobile" %>
|
||||
<%= javascript_include_tag "mobile" %>
|
||||
<%= javascript_include_tag "http://maps.google.com/maps/api/js?sensor=false&libraries=places" %>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<!-- <meta name="apple-itunes-app" content="app-id=342792525, app-argument=imdb:///?src=mdot"> -->
|
||||
<meta name="description" content="">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0">
|
||||
<!-- iPhone -->
|
||||
<link href="<%= asset_path 'mobile/apple-startup-iPhone.png' %>" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image">
|
||||
|
||||
<!-- iPhone (Retina) -->
|
||||
<link href="<%= asset_path 'mobile/apple-startup-iPhone-RETINA.png' %>" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
|
||||
|
||||
<!-- iPhone 5 -->
|
||||
<link href="<%= asset_path 'mobile/apple-startup-iPhone-Tall-RETINA.png' %>" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
|
||||
|
||||
<!-- iPad Portrait -->
|
||||
<link href="<%= asset_path 'mobile/apple-startup-iPad-Portrait.png' %>" media="(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image">
|
||||
|
||||
<!-- iPad Landscape -->
|
||||
<link href="<%= asset_path 'mobile/apple-startup-iPad-Landscape.png' %>" media="(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image">
|
||||
|
||||
<!-- iPad Portrait (Retina) -->
|
||||
<link href="<%= asset_path 'mobile/apple-startup-iPad-RETINA-Portrait.png' %>" media="(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
|
||||
|
||||
<!-- iPad Landscape (Retina) -->
|
||||
<link href="<%= asset_path 'mobile/apple-startup-iPad-RETINA-Landscape.png' %>" media="(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
|
||||
|
||||
<!-- iPhone icon -->
|
||||
<link rel="apple-touch-icon-precomposed" href="<%= asset_path 'mobile/apple-touch-icon.png' %>">
|
||||
|
||||
<!-- iPhone icon (Retina) -->
|
||||
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="<%= asset_path 'mobile/apple-touch-icon@2x.png' %>">
|
||||
|
||||
<!-- iPad icon -->
|
||||
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="<%= asset_path 'mobile/apple-touch-icon-ipad.png' %>">
|
||||
|
||||
<!-- iPad icon (Retina) -->
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="<%= asset_path 'mobile/apple-touch-icon-ipad@2x.png' %>">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div data-role="page" data-url="<%= request.fullpath %>" id="<%= params[:action] %>" data-add-back-btn="<%= params[:action].eql?('index')? nil : 'true' %>">
|
||||
<section class="global">
|
||||
<% if !(yield :header).blank? %>
|
||||
<%= yield :header %>
|
||||
<% else %>
|
||||
<%= render 'header' %>
|
||||
<% end unless @no_header %>
|
||||
<%= render 'menu' unless @no_menu %>
|
||||
<section class="content">
|
||||
<%= yield %>
|
||||
</section>
|
||||
<%= render 'footer' unless @no_footer %>
|
||||
</section>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,24 @@
|
|||
<footer class="footer" data-role="footer" data-position="fixed">
|
||||
<div data-role="navbar">
|
||||
<ul>
|
||||
<li>
|
||||
<%= link_to mobile_dialog_copyright_path, {"data-transition" => "flip", "data-rel" => "dialog", "data-inline" => "true"} do %>
|
||||
<i class="icons-information"></i>
|
||||
<%= t('mobile.copyright') %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to mobile_map_path, {"data-transition" => "flip"} do %>
|
||||
<i class="icons-location"></i>
|
||||
<%= t('mobile.location') %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to mobile_dialog_contact_path, {"data-rel" => "dialog"} do %>
|
||||
<i class="icons-phone"></i>
|
||||
<%= t('mobile.contact') %>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</footer>
|
|
@ -0,0 +1,9 @@
|
|||
<header class="header" data-role="header">
|
||||
<h1 class="openmenu">
|
||||
<%= image_tag asset_path('mobile/logo.png') %>
|
||||
</h1>
|
||||
<i class="openmenu icons-arrow-bottom-e"></i>
|
||||
<%= link_to mobile_dialog_language_path, {:class => "ui-btn-right language", "data-iconpos" => "notext", "data-icon" => "search", "data-rel" => "dialog"} do %>
|
||||
<i class="icons-earth"></i>
|
||||
<% end %>
|
||||
</header>
|
|
@ -0,0 +1,3 @@
|
|||
<header data-role="header" data-theme="d">
|
||||
<h1><%= t('mobile.contact') %></h1>
|
||||
</header>
|
|
@ -0,0 +1,3 @@
|
|||
<header data-role="header" data-theme="d">
|
||||
<h1><%= t('mobile.copyright') %></h1>
|
||||
</header>
|
|
@ -0,0 +1,3 @@
|
|||
<div data-role="header" data-theme="c">
|
||||
<h3><%= t('mobile.language') %></h3>
|
||||
</div>
|
|
@ -0,0 +1,3 @@
|
|||
<div data-role="header">
|
||||
<h1><%= t('mobile.location') %></h1>
|
||||
</div>
|
|
@ -0,0 +1,9 @@
|
|||
<div data-role="dialog" id="language_select">
|
||||
<div data-role="content" data-theme="c">
|
||||
<h3><%= t('mobile.language') %></h3>
|
||||
<% @site_in_use_locales.each do |locale| %>
|
||||
<%= link_to t(:_locale, :locale => locale), add_locale(remove_locale((referer rescue request.fullpath)), locale), {"data-role" => "button", "data-theme" => "b", "data-shadow" => "true"} %>
|
||||
<% end %>
|
||||
<a href="#" data-role="button" data-mini="true" data-rel="back" data-theme="a"><%= t('mobile.cancel') %></a>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,7 @@
|
|||
<section class="main-menu">
|
||||
<ul class="clear">
|
||||
<li><%= link_to content_tag(:i, nil, :class => "icons-house") + content_tag(:span, t('mobile.home')), mobile_path %></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => "icons-megaphone") + content_tag(:span, t('mobile.bulletin')), mobile_announcement_path %></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => "icons-page") + content_tag(:span, t('mobile.page')), mobile_page_path %></li>
|
||||
</ul>
|
||||
</section>
|
|
@ -0,0 +1,13 @@
|
|||
<ul data-role="listview" class="list">
|
||||
<% @bulletins.each do |bulletin| %>
|
||||
<li data-corners="false" data-shadow="false" data-iconshadow="true" data-wrapperels="div" data-icon="arrow-r" data-iconpos="right" data-theme="c">
|
||||
<%= link_to mobile_announcement_content_path(bulletin), :class => "ui-link-inherit" do %>
|
||||
<%= image_tag bulletin.image.url, :class => "ui-li-thumb" %>
|
||||
<h3><%= bulletin.title %></h3>
|
||||
<p class="ui-li-aside ui-li-desc"><%= display_date(bulletin.postdate) %></p>
|
||||
<div class="ui-li-desc"><%= bulletin.subtitle %></div>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<%= paginate @bulletins, :param_name => :page_main, :window => 2 %>
|
|
@ -0,0 +1,6 @@
|
|||
<div class="newpic">
|
||||
<%= image_tag @bulletin.image.url %>
|
||||
</div>
|
||||
<h3 class="newstitle"><%= @bulletin.title %></h3>
|
||||
<p class="newsDate"><%= display_date_time(@bulletin.postdate) %></p>
|
||||
<div class="newsummary"><%= @bulletin.text.html_safe rescue '' %></div>
|
|
@ -0,0 +1,11 @@
|
|||
<%= content_for :header do %>
|
||||
<%= render 'header_dialog_contact' %>
|
||||
<% end %>
|
||||
|
||||
<ul>
|
||||
<li>總機電話:<a href="tel:+886229393091">02-29393091</a></li>
|
||||
<li>傳真:02-29379611</li>
|
||||
<li>緊急重大事件通聯窗口:校內分機 66119、66110</li>
|
||||
<li>總值日室:<a href="tel:+88229387132">02-29387132</a></li>
|
||||
<li>駐警衛室:<a href="tel:+88229387129">02-29387129</a></li>
|
||||
</ul>
|
|
@ -0,0 +1,6 @@
|
|||
<%= content_for :header do %>
|
||||
<%= render 'header_dialog_copyright' %>
|
||||
<% end %>
|
||||
|
||||
<p>本網站著作權屬於國立政治大學。</p>
|
||||
<p>RulingDigital 銳綸數位建置</p>
|
|
@ -0,0 +1,7 @@
|
|||
<%= content_for :header do %>
|
||||
<%= render 'header_dialog_language' %>
|
||||
<% end %>
|
||||
|
||||
<% @site_in_use_locales.each do |locale| %>
|
||||
<%= link_to t(:_locale, :locale => locale), add_locale(remove_locale((request.referer rescue request.fullpath)), locale), {"data-role" => "button", "data-theme" => "b", "data-shadow" => "true"} %>
|
||||
<% end %>
|
|
@ -0,0 +1,19 @@
|
|||
<div class="slideshow">
|
||||
<% @ad_banner.ad_images.each do |image| %>
|
||||
<div class="slidebanner"><%= image_tag image.file.url, :class => 'slideImg' %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="newlist clear">
|
||||
<% @bulletins.each do |bulletin| %>
|
||||
<div class="newitem">
|
||||
<div class="newpic">
|
||||
<%= image_tag bulletin.image.url %>
|
||||
</div>
|
||||
<h3 class="newstitle">
|
||||
<%= link_to bulletin.title, mobile_announcement_content_path(bulletin) %>
|
||||
</h3>
|
||||
<p class="newsDate"><%= display_date(bulletin.postdate) %></p>
|
||||
<div class="newsummary"><%= bulletin.subtitle %></div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
|
@ -0,0 +1,5 @@
|
|||
<%= content_for :header do %>
|
||||
<%= render 'header_map' %>
|
||||
<% end %>
|
||||
|
||||
<div id='map_canvas'></div>
|
|
@ -0,0 +1,10 @@
|
|||
<ul data-role="listview" class="list">
|
||||
<% @page_contexts.each do |page_context| %>
|
||||
<li>
|
||||
<%= link_to mobile_page_content_path(page_context) do %>
|
||||
<h3><%= page_context.page.title %></h3>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<%= paginate @page_contexts, :param_name => :page_main, :window => 2 %>
|
|
@ -0,0 +1,2 @@
|
|||
<h3 class="newstitle"><%= @page_context.page.title %></h3>
|
||||
<div class="newsummary"><%= @page_context.context.html_safe rescue '' %></div>
|
|
@ -80,7 +80,7 @@ Devise.setup do |config|
|
|||
# The time you want to timeout the user session without activity. After this
|
||||
# time the user will be asked for credentials again.
|
||||
# config.timeout_in = 10.minutes
|
||||
config.timeout_in = 10.minutes
|
||||
config.timeout_in = 5.days
|
||||
|
||||
# ==> Configuration for :lockable
|
||||
# Defines which strategy will be used to lock an account.
|
||||
|
|