Merge branch 'sidebar_config' into ntu
Conflicts: app/controllers/admin/object_auths_new_interface_controller.rb app/controllers/orbit_backend_controller.rb app/controllers/orbit_widget_controller.rb app/models/module_app.rb app/views/admin/page_parts/_module_widget.html.erb config/locales/zh_tw.yml lib/parsers/parser_common.rb lib/parsers/parser_front_end.rb
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 |
|
@ -1,5 +1,5 @@
|
|||
/* ===================================================
|
||||
* bootstrap-transition.js v2.1.1
|
||||
* bootstrap-transition.js v2.2.2
|
||||
* http://twitter.github.com/bootstrap/javascript.html#transitions
|
||||
* ===================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
|
@ -20,14 +20,14 @@
|
|||
|
||||
!function ($) {
|
||||
|
||||
$(function () {
|
||||
|
||||
"use strict"; // jshint ;_;
|
||||
|
||||
|
||||
/* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
|
||||
* ======================================================= */
|
||||
|
||||
$(function () {
|
||||
|
||||
$.support.transition = (function () {
|
||||
|
||||
var transitionEnd = (function () {
|
||||
|
@ -58,7 +58,7 @@
|
|||
})
|
||||
|
||||
}(window.jQuery);/* ==========================================================
|
||||
* bootstrap-alert.js v2.1.1
|
||||
* bootstrap-alert.js v2.2.2
|
||||
* http://twitter.github.com/bootstrap/javascript.html#alerts
|
||||
* ==========================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
|
@ -127,6 +127,8 @@
|
|||
/* ALERT PLUGIN DEFINITION
|
||||
* ======================= */
|
||||
|
||||
var old = $.fn.alert
|
||||
|
||||
$.fn.alert = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
|
@ -139,15 +141,22 @@
|
|||
$.fn.alert.Constructor = Alert
|
||||
|
||||
|
||||
/* ALERT NO CONFLICT
|
||||
* ================= */
|
||||
|
||||
$.fn.alert.noConflict = function () {
|
||||
$.fn.alert = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* ALERT DATA-API
|
||||
* ============== */
|
||||
|
||||
$(function () {
|
||||
$('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
|
||||
})
|
||||
$(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
|
||||
|
||||
}(window.jQuery);/* ============================================================
|
||||
* bootstrap-button.js v2.1.1
|
||||
* bootstrap-button.js v2.2.2
|
||||
* http://twitter.github.com/bootstrap/javascript.html#buttons
|
||||
* ============================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
|
@ -212,6 +221,8 @@
|
|||
/* BUTTON PLUGIN DEFINITION
|
||||
* ======================== */
|
||||
|
||||
var old = $.fn.button
|
||||
|
||||
$.fn.button = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
|
@ -230,19 +241,26 @@
|
|||
$.fn.button.Constructor = Button
|
||||
|
||||
|
||||
/* BUTTON NO CONFLICT
|
||||
* ================== */
|
||||
|
||||
$.fn.button.noConflict = function () {
|
||||
$.fn.button = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* BUTTON DATA-API
|
||||
* =============== */
|
||||
|
||||
$(function () {
|
||||
$('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
|
||||
$(document).on('click.button.data-api', '[data-toggle^=button]', function (e) {
|
||||
var $btn = $(e.target)
|
||||
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
|
||||
$btn.button('toggle')
|
||||
})
|
||||
})
|
||||
|
||||
}(window.jQuery);/* ==========================================================
|
||||
* bootstrap-carousel.js v2.1.1
|
||||
* bootstrap-carousel.js v2.2.2
|
||||
* http://twitter.github.com/bootstrap/javascript.html#carousel
|
||||
* ==========================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
|
@ -272,7 +290,6 @@
|
|||
var Carousel = function (element, options) {
|
||||
this.$element = $(element)
|
||||
this.options = options
|
||||
this.options.slide && this.slide(this.options.slide)
|
||||
this.options.pause == 'hover' && this.$element
|
||||
.on('mouseenter', $.proxy(this.pause, this))
|
||||
.on('mouseleave', $.proxy(this.cycle, this))
|
||||
|
@ -337,9 +354,7 @@
|
|||
, direction = type == 'next' ? 'left' : 'right'
|
||||
, fallback = type == 'next' ? 'first' : 'last'
|
||||
, that = this
|
||||
, e = $.Event('slide', {
|
||||
relatedTarget: $next[0]
|
||||
})
|
||||
, e
|
||||
|
||||
this.sliding = true
|
||||
|
||||
|
@ -347,6 +362,10 @@
|
|||
|
||||
$next = $next.length ? $next : this.$element.find('.item')[fallback]()
|
||||
|
||||
e = $.Event('slide', {
|
||||
relatedTarget: $next[0]
|
||||
})
|
||||
|
||||
if ($next.hasClass('active')) return
|
||||
|
||||
if ($.support.transition && this.$element.hasClass('slide')) {
|
||||
|
@ -382,6 +401,8 @@
|
|||
/* CAROUSEL PLUGIN DEFINITION
|
||||
* ========================== */
|
||||
|
||||
var old = $.fn.carousel
|
||||
|
||||
$.fn.carousel = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
|
@ -403,21 +424,27 @@
|
|||
$.fn.carousel.Constructor = Carousel
|
||||
|
||||
|
||||
/* CAROUSEL NO CONFLICT
|
||||
* ==================== */
|
||||
|
||||
$.fn.carousel.noConflict = function () {
|
||||
$.fn.carousel = old
|
||||
return this
|
||||
}
|
||||
|
||||
/* CAROUSEL DATA-API
|
||||
* ================= */
|
||||
|
||||
$(function () {
|
||||
$('body').on('click.carousel.data-api', '[data-slide]', function ( e ) {
|
||||
$(document).on('click.carousel.data-api', '[data-slide]', function (e) {
|
||||
var $this = $(this), href
|
||||
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|
||||
, options = !$target.data('modal') && $.extend({}, $target.data(), $this.data())
|
||||
, options = $.extend({}, $target.data(), $this.data())
|
||||
$target.carousel(options)
|
||||
e.preventDefault()
|
||||
})
|
||||
})
|
||||
|
||||
}(window.jQuery);/* =============================================================
|
||||
* bootstrap-collapse.js v2.1.1
|
||||
* bootstrap-collapse.js v2.2.2
|
||||
* http://twitter.github.com/bootstrap/javascript.html#collapse
|
||||
* =============================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
|
@ -506,6 +533,7 @@
|
|||
[0].offsetWidth
|
||||
|
||||
this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
|
@ -539,8 +567,10 @@
|
|||
}
|
||||
|
||||
|
||||
/* COLLAPSIBLE PLUGIN DEFINITION
|
||||
* ============================== */
|
||||
/* COLLAPSE PLUGIN DEFINITION
|
||||
* ========================== */
|
||||
|
||||
var old = $.fn.collapse
|
||||
|
||||
$.fn.collapse = function (option) {
|
||||
return this.each(function () {
|
||||
|
@ -559,11 +589,19 @@
|
|||
$.fn.collapse.Constructor = Collapse
|
||||
|
||||
|
||||
/* COLLAPSIBLE DATA-API
|
||||
/* COLLAPSE NO CONFLICT
|
||||
* ==================== */
|
||||
|
||||
$(function () {
|
||||
$('body').on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
|
||||
$.fn.collapse.noConflict = function () {
|
||||
$.fn.collapse = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* COLLAPSE DATA-API
|
||||
* ================= */
|
||||
|
||||
$(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
|
||||
var $this = $(this), href
|
||||
, target = $this.attr('data-target')
|
||||
|| e.preventDefault()
|
||||
|
@ -575,10 +613,9 @@
|
|||
$this.parents('li').siblings().removeClass('active');
|
||||
$this.parents('li').toggleClass('active');
|
||||
})
|
||||
})
|
||||
|
||||
}(window.jQuery);/* ============================================================
|
||||
* bootstrap-dropdown.js v2.1.1
|
||||
* bootstrap-dropdown.js v2.2.2
|
||||
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
|
||||
* ============================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
|
@ -632,9 +669,10 @@
|
|||
|
||||
if (!isActive) {
|
||||
$parent.toggleClass('open')
|
||||
$this.focus()
|
||||
}
|
||||
|
||||
$this.focus()
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -661,7 +699,7 @@
|
|||
|
||||
if (!isActive || (isActive && e.keyCode == 27)) return $this.click()
|
||||
|
||||
$items = $('[role=menu] li:not(.divider) a', $parent)
|
||||
$items = $('[role=menu] li:not(.divider):visible a', $parent)
|
||||
|
||||
if (!$items.length) return
|
||||
|
||||
|
@ -679,8 +717,9 @@
|
|||
}
|
||||
|
||||
function clearMenus() {
|
||||
getParent($(toggle))
|
||||
.removeClass('open')
|
||||
$(toggle).each(function () {
|
||||
getParent($(this)).removeClass('open')
|
||||
})
|
||||
}
|
||||
|
||||
function getParent($this) {
|
||||
|
@ -702,6 +741,8 @@
|
|||
/* DROPDOWN PLUGIN DEFINITION
|
||||
* ========================== */
|
||||
|
||||
var old = $.fn.dropdown
|
||||
|
||||
$.fn.dropdown = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
|
@ -714,20 +755,27 @@
|
|||
$.fn.dropdown.Constructor = Dropdown
|
||||
|
||||
|
||||
/* DROPDOWN NO CONFLICT
|
||||
* ==================== */
|
||||
|
||||
$.fn.dropdown.noConflict = function () {
|
||||
$.fn.dropdown = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* APPLY TO STANDARD DROPDOWN ELEMENTS
|
||||
* =================================== */
|
||||
|
||||
$(function () {
|
||||
$('html')
|
||||
$(document)
|
||||
.on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
|
||||
$('body')
|
||||
.on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
|
||||
.on('touchstart.dropdown.data-api', '.dropdown-menu', function (e) { e.stopPropagation() })
|
||||
.on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
|
||||
.on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
|
||||
})
|
||||
|
||||
}(window.jQuery);/* =========================================================
|
||||
* bootstrap-modal.js v2.1.1
|
||||
* bootstrap-modal.js v2.2.2
|
||||
* http://twitter.github.com/bootstrap/javascript.html#modals
|
||||
* =========================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
|
@ -777,8 +825,6 @@
|
|||
|
||||
if (this.isShown || e.isDefaultPrevented()) return
|
||||
|
||||
$('body').addClass('modal-open')
|
||||
|
||||
this.isShown = true
|
||||
|
||||
this.escape()
|
||||
|
@ -800,13 +846,12 @@
|
|||
that.$element
|
||||
.addClass('in')
|
||||
.attr('aria-hidden', false)
|
||||
.focus()
|
||||
|
||||
that.enforceFocus()
|
||||
|
||||
transition ?
|
||||
that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
|
||||
that.$element.trigger('shown')
|
||||
that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
|
||||
that.$element.focus().trigger('shown')
|
||||
|
||||
})
|
||||
}
|
||||
|
@ -824,8 +869,6 @@
|
|||
|
||||
this.isShown = false
|
||||
|
||||
$('body').removeClass('modal-open')
|
||||
|
||||
this.escape()
|
||||
|
||||
$(document).off('focusin.modal')
|
||||
|
@ -895,9 +938,11 @@
|
|||
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
|
||||
.appendTo(document.body)
|
||||
|
||||
if (this.options.backdrop != 'static') {
|
||||
this.$backdrop.click($.proxy(this.hide, this))
|
||||
}
|
||||
this.$backdrop.click(
|
||||
this.options.backdrop == 'static' ?
|
||||
$.proxy(this.$element[0].focus, this.$element[0])
|
||||
: $.proxy(this.hide, this)
|
||||
)
|
||||
|
||||
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
|
||||
|
||||
|
@ -924,6 +969,8 @@
|
|||
/* MODAL PLUGIN DEFINITION
|
||||
* ======================= */
|
||||
|
||||
var old = $.fn.modal
|
||||
|
||||
$.fn.modal = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
|
@ -944,11 +991,19 @@
|
|||
$.fn.modal.Constructor = Modal
|
||||
|
||||
|
||||
/* MODAL NO CONFLICT
|
||||
* ================= */
|
||||
|
||||
$.fn.modal.noConflict = function () {
|
||||
$.fn.modal = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* MODAL DATA-API
|
||||
* ============== */
|
||||
|
||||
$(function () {
|
||||
$('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
|
||||
$(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) {
|
||||
var $this = $(this)
|
||||
, href = $this.attr('href')
|
||||
, $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
|
||||
|
@ -962,10 +1017,10 @@
|
|||
$this.focus()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
}(window.jQuery);/* ===========================================================
|
||||
* bootstrap-tooltip.js v2.1.1
|
||||
}(window.jQuery);
|
||||
/* ===========================================================
|
||||
* bootstrap-tooltip.js v2.2.2
|
||||
* http://twitter.github.com/bootstrap/javascript.html#tooltips
|
||||
* Inspired by the original jQuery.tipsy by Jason Frame
|
||||
* ===========================================================
|
||||
|
@ -1085,9 +1140,9 @@
|
|||
inside = /in/.test(placement)
|
||||
|
||||
$tip
|
||||
.remove()
|
||||
.detach()
|
||||
.css({ top: 0, left: 0, display: 'block' })
|
||||
.appendTo(inside ? this.$element : document.body)
|
||||
.insertAfter(this.$element)
|
||||
|
||||
pos = this.getPosition(inside)
|
||||
|
||||
|
@ -1110,7 +1165,7 @@
|
|||
}
|
||||
|
||||
$tip
|
||||
.css(tp)
|
||||
.offset(tp)
|
||||
.addClass(placement)
|
||||
.addClass('in')
|
||||
}
|
||||
|
@ -1132,18 +1187,18 @@
|
|||
|
||||
function removeWithAnimation() {
|
||||
var timeout = setTimeout(function () {
|
||||
$tip.off($.support.transition.end).remove()
|
||||
$tip.off($.support.transition.end).detach()
|
||||
}, 500)
|
||||
|
||||
$tip.one($.support.transition.end, function () {
|
||||
clearTimeout(timeout)
|
||||
$tip.remove()
|
||||
$tip.detach()
|
||||
})
|
||||
}
|
||||
|
||||
$.support.transition && this.$tip.hasClass('fade') ?
|
||||
removeWithAnimation() :
|
||||
$tip.remove()
|
||||
$tip.detach()
|
||||
|
||||
return this
|
||||
}
|
||||
|
@ -1201,8 +1256,9 @@
|
|||
this.enabled = !this.enabled
|
||||
}
|
||||
|
||||
, toggle: function () {
|
||||
this[this.tip().hasClass('in') ? 'hide' : 'show']()
|
||||
, toggle: function (e) {
|
||||
var self = $(e.currentTarget)[this.type](this._options).data(this.type)
|
||||
self[self.tip().hasClass('in') ? 'hide' : 'show']()
|
||||
}
|
||||
|
||||
, destroy: function () {
|
||||
|
@ -1215,6 +1271,8 @@
|
|||
/* TOOLTIP PLUGIN DEFINITION
|
||||
* ========================= */
|
||||
|
||||
var old = $.fn.tooltip
|
||||
|
||||
$.fn.tooltip = function ( option ) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
|
@ -1235,12 +1293,20 @@
|
|||
, trigger: 'hover'
|
||||
, title: ''
|
||||
, delay: 0
|
||||
, html: true
|
||||
, html: false
|
||||
}
|
||||
|
||||
}(window.jQuery);
|
||||
/* ===========================================================
|
||||
* bootstrap-popover.js v2.1.1
|
||||
|
||||
/* TOOLTIP NO CONFLICT
|
||||
* =================== */
|
||||
|
||||
$.fn.tooltip.noConflict = function () {
|
||||
$.fn.tooltip = old
|
||||
return this
|
||||
}
|
||||
|
||||
}(window.jQuery);/* ===========================================================
|
||||
* bootstrap-popover.js v2.2.2
|
||||
* http://twitter.github.com/bootstrap/javascript.html#popovers
|
||||
* ===========================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
|
@ -1285,7 +1351,7 @@
|
|||
, content = this.getContent()
|
||||
|
||||
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
|
||||
$tip.find('.popover-content > *')[this.options.html ? 'html' : 'text'](content)
|
||||
$tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
|
||||
|
||||
$tip.removeClass('fade top bottom left right in')
|
||||
}
|
||||
|
@ -1322,6 +1388,8 @@
|
|||
/* POPOVER PLUGIN DEFINITION
|
||||
* ======================= */
|
||||
|
||||
var old = $.fn.popover
|
||||
|
||||
$.fn.popover = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
|
@ -1338,11 +1406,20 @@
|
|||
placement: 'right'
|
||||
, trigger: 'click'
|
||||
, content: ''
|
||||
, template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'
|
||||
, template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"></div></div></div>'
|
||||
})
|
||||
|
||||
|
||||
/* POPOVER NO CONFLICT
|
||||
* =================== */
|
||||
|
||||
$.fn.popover.noConflict = function () {
|
||||
$.fn.popover = old
|
||||
return this
|
||||
}
|
||||
|
||||
}(window.jQuery);/* =============================================================
|
||||
* bootstrap-scrollspy.js v2.1.1
|
||||
* bootstrap-scrollspy.js v2.2.2
|
||||
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
|
||||
* =============================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
|
@ -1402,7 +1479,7 @@
|
|||
, $href = /^#\w/.test(href) && $(href)
|
||||
return ( $href
|
||||
&& $href.length
|
||||
&& [[ $href.position().top, href ]] ) || null
|
||||
&& [[ $href.position().top + self.$scrollElement.scrollTop(), href ]] ) || null
|
||||
})
|
||||
.sort(function (a, b) { return a[0] - b[0] })
|
||||
.each(function () {
|
||||
|
@ -1464,6 +1541,8 @@
|
|||
/* SCROLLSPY PLUGIN DEFINITION
|
||||
* =========================== */
|
||||
|
||||
var old = $.fn.scrollspy
|
||||
|
||||
$.fn.scrollspy = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
|
@ -1481,6 +1560,15 @@
|
|||
}
|
||||
|
||||
|
||||
/* SCROLLSPY NO CONFLICT
|
||||
* ===================== */
|
||||
|
||||
$.fn.scrollspy.noConflict = function () {
|
||||
$.fn.scrollspy = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* SCROLLSPY DATA-API
|
||||
* ================== */
|
||||
|
||||
|
@ -1492,7 +1580,7 @@
|
|||
})
|
||||
|
||||
}(window.jQuery);/* ========================================================
|
||||
* bootstrap-tab.js v2.1.1
|
||||
* bootstrap-tab.js v2.2.2
|
||||
* http://twitter.github.com/bootstrap/javascript.html#tabs
|
||||
* ========================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
|
@ -1542,7 +1630,7 @@
|
|||
|
||||
if ( $this.parent('li').hasClass('active') ) return
|
||||
|
||||
previous = $ul.find('.active a').last()[0]
|
||||
previous = $ul.find('.active:last a')[0]
|
||||
|
||||
e = $.Event('show', {
|
||||
relatedTarget: previous
|
||||
|
@ -1603,6 +1691,8 @@
|
|||
/* TAB PLUGIN DEFINITION
|
||||
* ===================== */
|
||||
|
||||
var old = $.fn.tab
|
||||
|
||||
$.fn.tab = function ( option ) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
|
@ -1615,18 +1705,25 @@
|
|||
$.fn.tab.Constructor = Tab
|
||||
|
||||
|
||||
/* TAB NO CONFLICT
|
||||
* =============== */
|
||||
|
||||
$.fn.tab.noConflict = function () {
|
||||
$.fn.tab = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* TAB DATA-API
|
||||
* ============ */
|
||||
|
||||
$(function () {
|
||||
$('body').on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
|
||||
$(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
|
||||
e.preventDefault()
|
||||
$(this).tab('show')
|
||||
})
|
||||
})
|
||||
|
||||
}(window.jQuery);/* =============================================================
|
||||
* bootstrap-typeahead.js v2.1.1
|
||||
* bootstrap-typeahead.js v2.2.2
|
||||
* http://twitter.github.com/bootstrap/javascript.html#typeahead
|
||||
* =============================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
|
@ -1660,8 +1757,8 @@
|
|||
this.sorter = this.options.sorter || this.sorter
|
||||
this.highlighter = this.options.highlighter || this.highlighter
|
||||
this.updater = this.options.updater || this.updater
|
||||
this.$menu = $(this.options.menu).appendTo('body')
|
||||
this.source = this.options.source
|
||||
this.$menu = $(this.options.menu)
|
||||
this.shown = false
|
||||
this.listen()
|
||||
}
|
||||
|
@ -1683,16 +1780,18 @@
|
|||
}
|
||||
|
||||
, show: function () {
|
||||
var pos = $.extend({}, this.$element.offset(), {
|
||||
var pos = $.extend({}, this.$element.position(), {
|
||||
height: this.$element[0].offsetHeight
|
||||
})
|
||||
|
||||
this.$menu.css({
|
||||
this.$menu
|
||||
.insertAfter(this.$element)
|
||||
.css({
|
||||
top: pos.top + pos.height
|
||||
, left: pos.left
|
||||
})
|
||||
.show()
|
||||
|
||||
this.$menu.show()
|
||||
this.shown = true
|
||||
return this
|
||||
}
|
||||
|
@ -1801,7 +1900,7 @@
|
|||
.on('keypress', $.proxy(this.keypress, this))
|
||||
.on('keyup', $.proxy(this.keyup, this))
|
||||
|
||||
if ($.browser.chrome || $.browser.webkit || $.browser.msie) {
|
||||
if (this.eventSupported('keydown')) {
|
||||
this.$element.on('keydown', $.proxy(this.keydown, this))
|
||||
}
|
||||
|
||||
|
@ -1810,6 +1909,15 @@
|
|||
.on('mouseenter', 'li', $.proxy(this.mouseenter, this))
|
||||
}
|
||||
|
||||
, eventSupported: function(eventName) {
|
||||
var isSupported = eventName in this.$element
|
||||
if (!isSupported) {
|
||||
this.$element.setAttribute(eventName, 'return;')
|
||||
isSupported = typeof this.$element[eventName] === 'function'
|
||||
}
|
||||
return isSupported
|
||||
}
|
||||
|
||||
, move: function (e) {
|
||||
if (!this.shown) return
|
||||
|
||||
|
@ -1835,7 +1943,7 @@
|
|||
}
|
||||
|
||||
, keydown: function (e) {
|
||||
this.suppressKeyPressRepeat = !~$.inArray(e.keyCode, [40,38,9,13,27])
|
||||
this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27])
|
||||
this.move(e)
|
||||
}
|
||||
|
||||
|
@ -1848,6 +1956,9 @@
|
|||
switch(e.keyCode) {
|
||||
case 40: // down arrow
|
||||
case 38: // up arrow
|
||||
case 16: // shift
|
||||
case 17: // ctrl
|
||||
case 18: // alt
|
||||
break
|
||||
|
||||
case 9: // tab
|
||||
|
@ -1891,6 +2002,8 @@
|
|||
/* TYPEAHEAD PLUGIN DEFINITION
|
||||
* =========================== */
|
||||
|
||||
var old = $.fn.typeahead
|
||||
|
||||
$.fn.typeahead = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
|
@ -1912,21 +2025,28 @@
|
|||
$.fn.typeahead.Constructor = Typeahead
|
||||
|
||||
|
||||
/* TYPEAHEAD NO CONFLICT
|
||||
* =================== */
|
||||
|
||||
$.fn.typeahead.noConflict = function () {
|
||||
$.fn.typeahead = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* TYPEAHEAD DATA-API
|
||||
* ================== */
|
||||
|
||||
$(function () {
|
||||
$('body').on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
|
||||
$(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
|
||||
var $this = $(this)
|
||||
if ($this.data('typeahead')) return
|
||||
e.preventDefault()
|
||||
$this.typeahead($this.data())
|
||||
})
|
||||
})
|
||||
|
||||
}(window.jQuery);
|
||||
/* ==========================================================
|
||||
* bootstrap-affix.js v2.1.1
|
||||
* bootstrap-affix.js v2.2.2
|
||||
* http://twitter.github.com/bootstrap/javascript.html#affix
|
||||
* ==========================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
|
@ -1955,7 +2075,9 @@
|
|||
|
||||
var Affix = function (element, options) {
|
||||
this.options = $.extend({}, $.fn.affix.defaults, options)
|
||||
this.$window = $(window).on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
|
||||
this.$window = $(window)
|
||||
.on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
|
||||
.on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
|
||||
this.$element = $(element)
|
||||
this.checkPosition()
|
||||
}
|
||||
|
@ -1993,6 +2115,8 @@
|
|||
/* AFFIX PLUGIN DEFINITION
|
||||
* ======================= */
|
||||
|
||||
var old = $.fn.affix
|
||||
|
||||
$.fn.affix = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
|
@ -2010,6 +2134,15 @@
|
|||
}
|
||||
|
||||
|
||||
/* AFFIX NO CONFLICT
|
||||
* ================= */
|
||||
|
||||
$.fn.affix.noConflict = function () {
|
||||
$.fn.affix = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* AFFIX DATA-API
|
||||
* ============== */
|
||||
|
||||
|
|
|
@ -15,3 +15,5 @@
|
|||
//= require orbitTimeline
|
||||
//= require orbitdesktop
|
||||
//= require desktop/journal_pages
|
||||
//= require desktop/seminar_pages
|
||||
//= require desktop/books_pages
|
|
@ -0,0 +1,33 @@
|
|||
orbitDesktop.prototype.initializeBooks = function(target,url,cache){
|
||||
this.initializeBooks.list = function(){
|
||||
var bindHandlers = function(){
|
||||
o.simple_drop_down();
|
||||
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.list_t'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
bindHandlers();
|
||||
|
||||
}
|
||||
|
||||
this.initializeBooks.addbook = function(){
|
||||
var bindHandlers = function(){
|
||||
o.simple_drop_down();
|
||||
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.s_grid_con'
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
bindHandlers();
|
||||
|
||||
}
|
||||
this.initializeBooks.list();
|
||||
|
||||
}
|
|
@ -49,53 +49,6 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
|||
}
|
||||
return false;
|
||||
})
|
||||
|
||||
$("div[container=true]").unbind(".edit").on("click.edit",".journal_paper_edit",function(){
|
||||
$.ajax({
|
||||
url : $(this).attr("href"),
|
||||
type : "get",
|
||||
success : function(data){
|
||||
var prev_data = $("div[container=true]").html();
|
||||
$("div[container=true]").html(data);
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.s_grid_con'
|
||||
})
|
||||
$(".bt-cancel").click(function(){
|
||||
$("div[container=true]").html(prev_data);
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.list_t'
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
return false;
|
||||
})
|
||||
$("div[container=true]").unbind(".delete").on("click.delete",".journal_paper_delete",function(){
|
||||
var delurl = $(this).attr("href");
|
||||
var parent = $(this).parent();
|
||||
o.confirm({
|
||||
buttons : ["Yes","No"],
|
||||
highlighted : 2,
|
||||
message : "Are you sure, you want to delete this paper?"
|
||||
},function(value){
|
||||
if(value){
|
||||
$.ajax({
|
||||
url : delurl,
|
||||
type : "DELETE",
|
||||
success : function(data){
|
||||
if(data.success){
|
||||
parent.hide("slide",function(){parent.remove();});
|
||||
o.notify(data.msg,"success");
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
return false;
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
var bindSecondaryHandlers = function(){
|
||||
|
@ -113,6 +66,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
|||
})
|
||||
}
|
||||
|
||||
|
||||
var journalview = function(){
|
||||
$("#journal_p div#paper_list div.overview").empty();
|
||||
var column = $('<div class="g_col list_t"><ul></ul></div>'),
|
||||
|
@ -120,7 +74,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
|||
li;
|
||||
$.each(journalData,function(i,journal){
|
||||
$.each(journal.papers,function(j,paper){
|
||||
li = $('<li class="list_t_item"><div class="list_item_action"><a href="" class="icon-check-empty"></a><a href="" class="icon-star-empty"></a></div><div class="list_t_title">'+journal.title+'</div><div class="list_t_des">'+paper.title+'</div><div class="list_item_function"><a class="journal_paper_edit admbg2 admtxt" href="'+paper.url_edit+'">Edit</a> <a class="journal_paper_delete admbg2 admtxt" href="'+paper.url_delete+'">Delete</a></div></li>');
|
||||
li = $('<li class="list_t_item"><div class="list_item_action"><a href="" class="icon-check-empty"></a><a href="" class="icon-star-empty"></a></div><div class="list_t_title">'+journal.title+'</div><div class="list_t_des">'+paper.title+'</div><div class="list_item_function"><a class="journal_paper_edit admbg2 admtxt" href="'+paper.url_edit+'" ajax-remote="get" >Edit</a> <a ajax-remote="delete" confirm-message="Are you sure?" callback-method="paperDelete" class="journal_paper_delete admbg2 admtxt" href="'+paper.url_delete+'">Delete</a></div></li>');
|
||||
column.find("ul").append(li);
|
||||
if(counter%5==0){
|
||||
$("#journal_p div#paper_list div.overview").append(column);
|
||||
|
@ -154,7 +108,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
|||
var img = $('<a class="file" href="'+file.url+'" target="_blank" ><img src="'+file.icon+'" /><span class="filetitle">'+thistitle+'</span></a>');
|
||||
file_list.append(img);
|
||||
})
|
||||
li.append('<div class="list_item_function"><a class="journal_paper_edit admbg2 admtxt" href="'+paper.url_edit+'">Edit</a> <a class="journal_paper_delete admbg2 admtxt" href="'+paper.url_delete+'">Delete</a></div>');
|
||||
li.append('<div class="list_item_function"><a class="journal_paper_edit admbg2 admtxt" href="'+paper.url_edit+'" ajax-remote="get" >Edit</a> <a ajax-remote="delete" confirm-message="Are you sure?" callback-method="paperDelete" class="journal_paper_delete admbg2 admtxt" href="'+paper.url_delete+'">Delete</a></div>');
|
||||
column.find("ul").append(li);
|
||||
if(counter%3==0){
|
||||
$("#journal_p div#paper_list div.overview").append(column);
|
||||
|
@ -173,7 +127,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
|||
li;
|
||||
$.each(journalData,function(i,journal){
|
||||
$.each(journal.papers,function(j,paper){
|
||||
li = $('<li class="list_t_item"><div class="list_item_action"><a href="" class="icon-check-empty"></a><a href="" class="icon-star-empty"></a></div><div class="list_t_title">'+paper.title+'</div><div class="list_t_des">'+paper.keywords+'</div><div class="list_item_function"><a class="journal_paper_edit admbg2 admtxt" href="'+paper.url_edit+'">Edit</a> <a class="journal_paper_delete admbg2 admtxt" href="'+paper.url_delete+'">Delete</a></div></li>');
|
||||
li = $('<li class="list_t_item"><div class="list_item_action"><a href="" class="icon-check-empty"></a><a href="" class="icon-star-empty"></a></div><div class="list_t_title">'+paper.title+'</div><div class="list_t_des">'+paper.keywords+'</div><div class="list_item_function"><a class="journal_paper_edit admbg2 admtxt" href="'+paper.url_edit+'" ajax-remote="get" >Edit</a> <a ajax-remote="delete" confirm-message="Are you sure?" callback-method="paperDelete" class="journal_paper_delete admbg2 admtxt" href="'+paper.url_delete+'">Delete</a></div></li>');
|
||||
column.find("ul").append(li);
|
||||
if(counter%5==0){
|
||||
$("#journal_p div#paper_list div.overview").append(column);
|
||||
|
@ -193,7 +147,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
|||
li;
|
||||
$.each(journalData,function(i,journal){
|
||||
$.each(journal.papers,function(j,paper){
|
||||
li = $('<li class="list_t_item"><div class="list_item_action"><a href="" class="icon-check-empty"></a><a href="" class="icon-star-empty"></a></div><div class="list_t_title">'+paper.title+'</div><div class="list_item_function"><a class="journal_paper_edit admbg2 admtxt" href="'+paper.url_edit+'">Edit</a> <a class="journal_paper_delete admbg2 admtxt" href="'+paper.url_delete+'">Delete</a></div></li>');
|
||||
li = $('<li class="list_t_item"><div class="list_item_action"><a href="" class="icon-check-empty"></a><a href="" class="icon-star-empty"></a></div><div class="list_t_title">'+paper.title+'</div><div class="list_item_function"><a class="journal_paper_edit admbg2 admtxt" href="'+paper.url_edit+'" ajax-remote="get" >Edit</a> <a ajax-remote="delete" confirm-message="Are you sure?" callback-method="paperDelete" class="journal_paper_delete admbg2 admtxt" href="'+paper.url_delete+'">Delete</a></div></li>');
|
||||
column.find("ul").append(li);
|
||||
if(counter%5==0){
|
||||
$("#journal_p div#paper_list div.overview").append(column);
|
||||
|
@ -212,7 +166,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
|||
li;
|
||||
$.each(journalData,function(i,journal){
|
||||
$.each(journal.papers,function(j,paper){
|
||||
li = $('<li class="list_t_item" style="height:auto;"><div class="list_item_action"><a href="" class="icon-check-empty"></a><a href="" class="icon-star-empty"></a></div><div class="list_t_title">'+paper.title+'</div><div class="list_t_des">'+paper.abstract+'</div><div class="list_item_function"><a class="journal_paper_edit admbg2 admtxt" href="'+paper.url_edit+'">Edit</a> <a class="journal_paper_delete admbg2 admtxt" href="'+paper.url_delete+'">Delete</a></div></li>');
|
||||
li = $('<li class="list_t_item" style="height:auto;"><div class="list_item_action"><a href="" class="icon-check-empty"></a><a href="" class="icon-star-empty"></a></div><div class="list_t_title">'+paper.title+'</div><div class="list_t_des">'+paper.abstract+'</div><div class="list_item_function"><a class="journal_paper_edit admbg2 admtxt" href="'+paper.url_edit+'" ajax-remote="get" >Edit</a> <a ajax-remote="delete" confirm-message="Are you sure?" callback-method="paperDelete" class="journal_paper_delete admbg2 admtxt" href="'+paper.url_delete+'">Delete</a></div></li>');
|
||||
column.find("ul").append(li);
|
||||
$("#journal_p div#paper_list div.overview").append(column);
|
||||
column = $('<div class="g_col list_t"><ul></ul></div>');
|
||||
|
@ -231,7 +185,13 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
|||
}
|
||||
getData();
|
||||
}
|
||||
|
||||
this.initializeJournalPapers.paperDelete = function(data,dom){
|
||||
var parent = dom.parent().parent();
|
||||
if(data.success){
|
||||
parent.hide("slide",function(){parent.remove();});
|
||||
o.notify(data.msg,"success");
|
||||
}
|
||||
}
|
||||
this.initializeJournalPapers.addpaper = function(){ // to open add pages in journal papers page
|
||||
var bindHandlers = function(){ // to bind handlers for add page
|
||||
o.simple_drop_down();
|
||||
|
@ -271,110 +231,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
|||
main: '.tinycanvas',
|
||||
fill: '.g_col'
|
||||
})
|
||||
$("div[container=true]").unbind(".editcoauthor").on("click.editcoauthor", "a.bt-edit", function(){
|
||||
$.ajax({
|
||||
url : $(this).attr("href"),
|
||||
type : "get",
|
||||
success : function(data){
|
||||
var prev_data = $("div[container=true]").html();
|
||||
$("div[container=true]").html(data);
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.s_grid_con'
|
||||
})
|
||||
$(".bt-cancel").click(function(){
|
||||
$("div[container=true]").html(prev_data);
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.g_col'
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
return false;
|
||||
})
|
||||
$("div[container=true]").unbind(".editype").on("click.edittype", "a.bt-edit-type", function(){
|
||||
var parent = $(this).parent().parent();
|
||||
parent.find('.list_item_function').hide();
|
||||
$.ajax({
|
||||
url : $(this).attr("href"),
|
||||
type : "get",
|
||||
success : function(data){
|
||||
var prev_data = parent.find(".form_space").html();
|
||||
parent.find(".form_space").html(data);
|
||||
$(".bt-cancel-type").click(function(){
|
||||
parent.find(".form_space").html(prev_data);
|
||||
parent.find('.list_item_function').show();
|
||||
});
|
||||
}
|
||||
})
|
||||
return false;
|
||||
})
|
||||
$("div[container=true]").unbind(".delete").on("click.delete","a.bt-delete",function(){
|
||||
|
||||
var delurl = $(this).attr("href");
|
||||
var parent = $(this).parent().parent();
|
||||
o.confirm({
|
||||
buttons : ["Yes","No"],
|
||||
highlighted : 2,
|
||||
message : "Are you sure, you want to delete this author?"
|
||||
},function(value){
|
||||
if(value){
|
||||
$.ajax({
|
||||
url : delurl,
|
||||
type : "DELETE",
|
||||
success : function(data){
|
||||
if(data.success){
|
||||
parent.hide("slide",function(){parent.remove();});
|
||||
o.notify(data.msg,"success");
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
return false;
|
||||
})
|
||||
$("div[container=true]").unbind(".new_type").on("click.new_type","a.bt-new-type",function(){
|
||||
$.ajax({
|
||||
url : $(this).attr("href"),
|
||||
type : "get",
|
||||
success : function(data){
|
||||
var prev_data = $("div[container=true]").html();
|
||||
$("div[container=true]").html(data);
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.s_grid_con'
|
||||
})
|
||||
$(".bt-cancel").click(function(){
|
||||
o.sub_menu_item($("div[content-type=menu] a[custom-load=coauthor]"));
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
return false;
|
||||
})
|
||||
$("div[container=true]").unbind(".bt-co-author").on("click.bt-co-author","a.bt-co-author",function(){
|
||||
$.ajax({
|
||||
url : $(this).attr("href"),
|
||||
type : "get",
|
||||
success : function(data){
|
||||
var prev_data = $("div[container=true]").html();
|
||||
$("div[container=true]").html(data);
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.s_grid_con'
|
||||
})
|
||||
$(".bt-cancel").click(function(){
|
||||
$("div[container=true]").html(prev_data);
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.g_col'
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
return false;
|
||||
})
|
||||
}
|
||||
bindHandlers();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
orbitDesktop.prototype.initializeSeminar = function(target,url,cache){
|
||||
|
||||
this.initializeSeminar.list = function(){
|
||||
var bindHandlers = function(){
|
||||
o.tinyscrollbar_ext({
|
||||
main : ".tinycanvas",
|
||||
fill : ".list_t"
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
bindHandlers();
|
||||
|
||||
}
|
||||
|
||||
this.initializeSeminar.addseminar = function(){
|
||||
var bindHandlers = function(){
|
||||
o.simple_drop_down();
|
||||
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.s_grid_con'
|
||||
})
|
||||
}
|
||||
|
||||
bindHandlers();
|
||||
|
||||
}
|
||||
this.initializeSeminar.seminar = function(){
|
||||
var bindHandlers = function(){
|
||||
o.simple_drop_down();
|
||||
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.s_grid_con'
|
||||
})
|
||||
}
|
||||
|
||||
bindHandlers();
|
||||
|
||||
}
|
||||
this.initializeSeminar.rues = function(){
|
||||
var bindHandlers = function(){
|
||||
o.simple_drop_down();
|
||||
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.s_grid_con'
|
||||
})
|
||||
}
|
||||
|
||||
bindHandlers();
|
||||
|
||||
}
|
||||
|
||||
this.initializeSeminar.list();
|
||||
|
||||
}
|
|
@ -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);
|
||||
});
|
|
@ -7,6 +7,9 @@
|
|||
//load = true is used to load the list element by default
|
||||
//response-type = "json"|"script"|"xml|html" default is json
|
||||
//autocomplete-list = "listname" an array from which autocomplete will be attached to its respective input or textarea
|
||||
//ajax-remote="get/delete/post" this will automatically bind the <a> with remote ajax call. By default if the resposne is html, it ll be inserted in container=true
|
||||
// content-holder = "jquery dom", the returned html of server will be put inside the dom mentioned in content-holder of a tag. this can be used in a tags as attributes
|
||||
//confirm-message ="Some message", this will prompt user with a confirm box and show the message before ajax call is made.
|
||||
|
||||
|
||||
$.extend($.expr[':'], {
|
||||
|
@ -147,6 +150,42 @@ var orbitDesktop = function(dom){
|
|||
return false;
|
||||
})
|
||||
|
||||
$("body").on("click","*[ajax-remote]",function(){
|
||||
var $e = $(this);
|
||||
var exe = $e.attr("callback-method"); // (typeof $e.attr("callback-method") == "function"? $e.attr("callback-method") : "");
|
||||
var ca = $e.attr("content-holder");
|
||||
var a = function(){
|
||||
$.ajax({
|
||||
type : $e.attr("ajax-remote"),
|
||||
url : $e.attr("href"),
|
||||
success : function(data){
|
||||
if(typeof data == "string"){
|
||||
if(ca)
|
||||
$(ca).html(data);
|
||||
else
|
||||
$("div[container=true]").html(data);
|
||||
}
|
||||
if(exe)
|
||||
window.o[o.data_method][exe](data,$e);
|
||||
}
|
||||
});
|
||||
}
|
||||
if($e.attr("confirm-message")){
|
||||
o.confirm({
|
||||
buttons : ["Yes","No"],
|
||||
highlighted : 2,
|
||||
message : $e.attr("confirm-message")
|
||||
},function(value){
|
||||
if(value){
|
||||
a();
|
||||
}
|
||||
})
|
||||
}else{
|
||||
a();
|
||||
}
|
||||
return false;
|
||||
})
|
||||
|
||||
$(window).resize(function(){
|
||||
var ww = $(window).width();
|
||||
$("img#thmbackground").attr({"width":ww});
|
||||
|
@ -177,6 +216,7 @@ var orbitDesktop = function(dom){
|
|||
var extractLast = function( term ) {
|
||||
return split( term ).pop();
|
||||
}
|
||||
|
||||
var autocompleteListName = null;
|
||||
$("body").on("keydown","*[autocomplete-list]", function( event ) {
|
||||
autocompleteListName = $(this).attr("autocomplete-list");
|
||||
|
@ -1064,73 +1104,8 @@ var orbitDesktop = function(dom){
|
|||
this.initializeAppstore.onlinestore();
|
||||
bindHandlers();
|
||||
}
|
||||
this.initializeBooks = function(target,url,cache){
|
||||
|
||||
|
||||
this.initializeBooks.list = function(){
|
||||
var bindHandlers = function(){
|
||||
o.simple_drop_down();
|
||||
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.list_t'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
bindHandlers();
|
||||
|
||||
}
|
||||
|
||||
this.initializeBooks.addbook = function(){
|
||||
var bindHandlers = function(){
|
||||
o.simple_drop_down();
|
||||
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.s_grid_con'
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
bindHandlers();
|
||||
|
||||
}
|
||||
this.initializeBooks.list();
|
||||
|
||||
}
|
||||
this.initializeSeminar = function(target,url,cache){
|
||||
|
||||
|
||||
this.initializeSeminar.list = function(){
|
||||
var bindHandlers = function(){
|
||||
o.tinyscrollbar_ext({
|
||||
main : ".tinycanvas",
|
||||
fill : ".list_t"
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
bindHandlers();
|
||||
|
||||
}
|
||||
|
||||
this.initializeSeminar.addseminar = function(){
|
||||
var bindHandlers = function(){
|
||||
o.simple_drop_down();
|
||||
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.s_grid_con'
|
||||
})
|
||||
}
|
||||
|
||||
bindHandlers();
|
||||
|
||||
}
|
||||
this.initializeSeminar.list();
|
||||
|
||||
}
|
||||
this.initializeResearchDomain = function(target,url,cache){
|
||||
|
||||
this.initializeResearchDomain.list = function(){
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -64,6 +64,7 @@ class Admin::ObjectAuthsNewInterfaceController < OrbitBackendController
|
|||
def force_order
|
||||
authenticate_user!
|
||||
set_module_app
|
||||
setup_vars
|
||||
check_if_user_can_do_object_auth
|
||||
end
|
||||
|
||||
|
@ -80,15 +81,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
|
||||
|
|
|
@ -37,13 +37,18 @@ class Admin::PagePartsController < ApplicationController
|
|||
# @widget_style = @module_app.widgets[@widget_path] if !@widget_path.blank? && !@module_app.widgets.blank?
|
||||
# end
|
||||
|
||||
@widget_path = @part.widget_path ? @part.widget_path : @module_app.widgets.keys[0]
|
||||
|
||||
if @module_app.widgets.any?{|b| b.class == Array}
|
||||
@widget_style = @module_app.widgets[@widget_path] if !@widget_path.blank? && !@module_app.widgets.blank?
|
||||
end
|
||||
# TODO 應該要有一些東西來決定 @categories @tags
|
||||
# case @module_app.key
|
||||
# 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
|
||||
|
@ -51,6 +56,8 @@ class Admin::PagePartsController < ApplicationController
|
|||
# @categories = ArchiveFileCategory.all
|
||||
# @tags = ArchiveTag.all
|
||||
# end
|
||||
|
||||
|
||||
end
|
||||
|
||||
def create
|
||||
|
@ -92,6 +99,7 @@ class Admin::PagePartsController < ApplicationController
|
|||
end
|
||||
|
||||
def reload_widgets
|
||||
@part = PagePart.find params[:part_id]
|
||||
@categories =[]
|
||||
@module_app = ModuleApp.find(params[:id])
|
||||
|
||||
|
@ -103,9 +111,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
|
||||
|
@ -114,6 +121,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
|
||||
|
|
|
@ -8,6 +8,12 @@ class Admin::UsersNewInterfaceController < OrbitBackendController
|
|||
before_filter :force_order_for_user,:except => [:index,:show]
|
||||
before_filter :set_attribute,:except => [:index,:show]
|
||||
|
||||
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
|
||||
|
||||
def index
|
||||
get_tags
|
||||
get_sub_roles
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -11,7 +11,8 @@ class DefaultWidgetController< OrbitWidgetController
|
|||
@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)
|
||||
@data = eval(@default_widget["query"]).limit(data_limit).includes(@widget_image_field)
|
||||
|
||||
@fields = @page_part.widget_field
|
||||
|
||||
case params[:type]
|
||||
|
@ -25,19 +26,6 @@ class DefaultWidgetController< OrbitWidgetController
|
|||
@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
|
|
@ -6,6 +6,33 @@ class OrbitBackendController < ApplicationController
|
|||
|
||||
layout 'new_admin'
|
||||
|
||||
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
|
||||
|
||||
def force_order_for_visitor
|
||||
setup_vars
|
||||
set_current_user
|
||||
end
|
||||
|
||||
|
||||
def force_order_for_user
|
||||
setup_vars
|
||||
set_current_user
|
||||
authenticate_user!
|
||||
check_user_can_use
|
||||
end
|
||||
|
||||
def check_user_can_use
|
||||
unless check_permission
|
||||
#redirect_to polymorphic_path(['panel',@app_title,'back_end','public'])
|
||||
redirect_to root_url
|
||||
end
|
||||
end
|
||||
|
||||
def get_sorted_and_filtered(object_class, query=nil)
|
||||
objects = get_objects(object_class, query)
|
||||
|
|
|
@ -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,22 @@
|
|||
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
|
||||
|
||||
def widget_field_options(i)
|
||||
options = @module_app.widget_fields.collect{|widget_field| [I18n.t(widget_field[1]), widget_field[0]]}
|
||||
options_for_select(options, (@part[:widget_field][i][0] if (@part && !@part[:widget_field].blank? && !@part[:widget_field][i].blank?)) )
|
||||
end
|
||||
|
||||
def widget_fiield_type_options(i)
|
||||
options = LIST[:widget_field_type].collect{|widget_field| [widget_field.humanize, widget_field]}
|
||||
options_for_select(options, (@part[:widget_field][i][1] if (@part && !@part[:widget_field].blank? && !@part[:widget_field][i].blank?)) )
|
||||
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,72 @@
|
|||
module DefaultWidgetHelper
|
||||
def get_field_header(field)
|
||||
I18n.t(@page_part.module_app.widget_fields.select{|t|t[0]==field}[0][1])
|
||||
end
|
||||
|
||||
def link_to_field(row_data,field)
|
||||
method_ary = @page_part.module_app.widget_fields_link_method
|
||||
if method_ary.has_key? field
|
||||
url = case method_ary[field]["args"]
|
||||
when nil # no args
|
||||
get_data_link(method_ary[field]["method"])
|
||||
when :self # passing self
|
||||
get_data_link(method_ary[field]['method'],row_data.id)
|
||||
else
|
||||
ary = method_ary[field]["args"].clone
|
||||
object_hash = ary.each do |key,val|
|
||||
ary[key]= type_trans_or_to_s(row_data.send(val[0]).send(val[1]))
|
||||
end
|
||||
get_data_link(method_ary[field]['method'],object_hash)
|
||||
end
|
||||
|
||||
link_to row_data.send(field),url
|
||||
else
|
||||
type_trans_or_to_s(row_data.send(field) )
|
||||
end
|
||||
end
|
||||
|
||||
# def get_args_mapping(object,row_hash)
|
||||
# first_hash = row_hash.first
|
||||
|
||||
# # row_data.send(method_ary[field]["args"])
|
||||
# end
|
||||
|
||||
def type_trans_or_to_s(object)
|
||||
case object
|
||||
when Date
|
||||
display_date(object)
|
||||
when DateTime
|
||||
display_date_time(object)
|
||||
when String
|
||||
object
|
||||
else
|
||||
object.to_s
|
||||
end
|
||||
end
|
||||
|
||||
def get_data_link(method_entry,object = nil)
|
||||
case object
|
||||
when nil
|
||||
eval method_entry
|
||||
else
|
||||
eval("#{method_entry}('#{object}')" )
|
||||
end
|
||||
end
|
||||
|
||||
def get_display(row_data,field_setting)
|
||||
label = row_data.send(field_setting[:method])
|
||||
type_trans_or_to_s(label)
|
||||
end
|
||||
|
||||
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'
|
||||
link = link_to(get_display(row_data,field_setting),field_link.send(row_data))
|
||||
content_tag(:span,link,:class=>field_setting[:class])
|
||||
else
|
||||
content_tag(:span,get_display(row_data,field_setting),:class=>field_setting[:class])
|
||||
end
|
||||
end
|
||||
end
|
|
@ -48,16 +48,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
|
||||
|
|
|
@ -6,6 +6,24 @@ class ModuleApp
|
|||
field :key
|
||||
field :title
|
||||
|
||||
field :version
|
||||
field :organization
|
||||
field :author
|
||||
field :intro
|
||||
field :update_info
|
||||
field :create_date
|
||||
field :enable_frontend, type: Boolean, :default => true
|
||||
|
||||
field :app_pages ,type: Array
|
||||
# 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
|
||||
field :widget_fields_link_method,type:Hash
|
||||
field :get_default_widget,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
|
||||
|
||||
|
@ -132,10 +150,19 @@ class ModuleApp
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
def label
|
||||
I18n.t(label_i18n)
|
||||
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
|
||||
|
|
|
@ -3,7 +3,7 @@ class User
|
|||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
|
||||
devise :database_authenticatable, :recoverable, :rememberable, :trackable, :registerable, :validatable, :timeoutable
|
||||
devise :database_authenticatable, :recoverable, :rememberable, :trackable, :registerable, :validatable #, :timeoutable
|
||||
|
||||
mount_uploader :avatar, AvatarUploader
|
||||
|
||||
|
|
|
@ -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 %>
|
|
@ -37,8 +37,6 @@
|
|||
<%= render 'widget_fields' %>
|
||||
</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,12 +1,13 @@
|
|||
|
||||
<% if (@module_app && @module_app.widget_fields) %>
|
||||
|
||||
<%= label_tag('widget_field') %>
|
||||
|
||||
<% @module_app.widget_fields.each_with_index do |widget_field, i| %>
|
||||
<%= i+1 %>
|
||||
<%= select_tag "page_part[widget_field][]", options_for_select(@module_app.widget_fields.collect{|widget_field| [widget_field.humanize, widget_field]}, (@part[:widget_field][i][0] if (@part && !@part[:widget_field].blank? && !@part[:widget_field][i].blank?)) ), :include_blank => true %>
|
||||
<%= 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 />
|
||||
<%= select_tag "page_part[widget_field][]", widget_field_options(i), :include_blank => true %>
|
||||
<%= select_tag "page_part[widget_field_type][]", widget_fiield_type_options(i), :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>
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<% @fields.each do |field|%>
|
||||
<th><%= content_tag(:span,field[0],:class=>field[1])%></th>
|
||||
<th><%= content_tag(:span,get_field_header(field[0]),:class=>field[1])%></th>
|
||||
<% end %>
|
||||
</tr>
|
||||
</thead>
|
||||
<% @data.each do |row_data| %>
|
||||
<tr>
|
||||
<% @fields.each do |field|%>
|
||||
<td><%= content_tag(:span,row_data.send(field[0]),:class=>field[1])%></td>
|
||||
<td><%= content_tag(:span,link_to_field(row_data,field[0]),:class=>field[1])%></td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
|
|
@ -1,22 +1,17 @@
|
|||
<%= 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|%>
|
||||
<%= content_tag(:span,row_data.send(field[0]),:class=>field[1])%>
|
||||
<%= content_tag(:span,link_to_field(row_data,field[0]),:class=>field[1])%>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
|
||||
</ul>
|
||||
<div class="more">more</div>
|
||||
<% end %>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<% @data.each do |row_data| %>
|
||||
<%= content_tag(:li) do %>
|
||||
<% @fields.each do |field|%>
|
||||
<%= content_tag(:span,row_data.send(field[0]),:class=>field[1])%>
|
||||
<%= content_tag(:span,link_to_field(row_data,field[0]),:class=>field[1])%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<div id="panel_l" class="ph">
|
||||
<div class="s_menu sm_v" content-type="menu">
|
||||
<ul id='setting_left_nav'>
|
||||
<li><a href="<%= desktop_publications_books_list_path %>" callback-method="harry"class="hh2 w2 hp active thmc1 thmtxt" onclick='return false;'>List</a></li>
|
||||
<li><a href="<%= desktop_publications_books_list_path %>" callback-method="list" class="hh2 w2 hp active thmc1 thmtxt" onclick='return false;'>List</a></li>
|
||||
<li><a href="<%= desktop_publications_books_add_path %>" callback-method="addbook" class="admtxt hh2 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Books</a></li>
|
||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<ul>
|
||||
<% end %>
|
||||
<li class="s_grid_row">
|
||||
<div class="form_space"><%= co_author_relation.relation %></div>
|
||||
<div class="form_space" id="form_space_<%= i.to_s %>"><%= co_author_relation.relation %></div>
|
||||
<div class="list_item_function">
|
||||
<%= link_to 'Edit', edit_desktop_co_author_relation_path(co_author_relation), :class => "bt-edit-type admbg2 admtxt" %>
|
||||
<%= link_to 'Destroy', desktop_co_author_relation_path(co_author_relation), confirm: 'Are you sure?', method: :delete, :class=>"bt-delete admbg2 admtxt" %>
|
||||
<%= link_to 'Edit', edit_desktop_co_author_relation_path(co_author_relation), :class => "bt-edit-type admbg2 admtxt", "content-holder"=>"#form_space_"+i.to_s, "ajax-remote"=>"get" %>
|
||||
<%= link_to 'Destroy', desktop_co_author_relation_path(co_author_relation), "confirm-message"=>'Are you sure?', "ajax-remote"=>"delete", :class=>"bt-delete admbg2 admtxt" %>
|
||||
</div>
|
||||
</li>
|
||||
<% if ( i % 6 ) == 5 %>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="toolbar hh2">
|
||||
<div class="fn_g hp">
|
||||
<%= link_to "New Co-Author", new_desktop_co_author_path, :class=>"bt-co-author fn_btn hp hh2 thmc2 thmtxt" %>
|
||||
<%= link_to "New Type", desktop_co_author_relations_path, :class=>"bt-new-type fn_btn hp hh2 thmc2 thmtxt" %>
|
||||
<%= link_to "New Co-Author", new_desktop_co_author_path, :class=>"bt-co-author fn_btn hp hh2 thmc2 thmtxt", "ajax-remote"=>"get" %>
|
||||
<%= link_to "New Type", desktop_co_author_relations_path, :class=>"bt-new-type fn_btn hp hh2 thmc2 thmtxt", "ajax-remote"=>"get" %>
|
||||
</div>
|
||||
</div>
|
||||
<div id="co_author" class="tinycanvas vp">
|
||||
|
@ -20,8 +20,8 @@
|
|||
<li><div class="relations"><i class="icon-user"></i> <%= @co_author_relations.find(co_author.co_author_relations_id).relation unless co_author.co_author_relations_id.nil?%></div></li>
|
||||
</ul>
|
||||
<div class="list_item_function">
|
||||
<%= link_to 'Edit', edit_desktop_co_author_path(co_author), :class => "bt-edit admbg2 admtxt" %>
|
||||
<%= link_to 'Destroy', desktop_co_author_path(co_author), method: :delete, confirm: 'Are you sure?', :class=>"bt-delete admbg2 admtxt" %>
|
||||
<%= link_to 'Edit', edit_desktop_co_author_path(co_author), :class => "bt-edit admbg2 admtxt", "ajax-remote"=>"get" %>
|
||||
<%= link_to 'Destroy', desktop_co_author_path(co_author), "ajax-remote"=>"delete", "confirm-message"=>'Are you sure?', "callback-method"=>"paperDelete", :class=>"bt-delete admbg2 admtxt" %>
|
||||
</div>
|
||||
</li>
|
||||
<% if ( i % 4 ) == 3 %>
|
||||
|
|
|
@ -13,11 +13,10 @@
|
|||
|
||||
<li class="dock_item"><a callback-method='initializeJournalPapers' href="<%= desktop_publications_journal_p_path %>" class="widget_fn wh3 hh3" id='d_journal_p' custom-load="journal" onclick="return false;"><span class="widget_icon"><img src="" alt="Journal Papers" id="journal_p_icon" width="30" height="30"/></span></a></li>
|
||||
|
||||
<li class="dock_item"><a callback-method='initializeSeminar' href="<%= desktop_publications_seminar_p_path %>" class="widget_fn wh3 hh3" id='d_seminar_p' onclick="return false;"><span class="widget_icon"><img src="" alt="Seminar Papers" id="seminar_p_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='initializeSeminar' href="<%= desktop_publications_seminar_p_path %>" class="widget_fn wh3 hh3" id='d_seminar_p' custom-load="seminar" onclick="return false;"><span class="widget_icon"><img src="" alt="Seminar Papers" id="seminar_p_icon" width="30" height="30"/></span></a></li>
|
||||
|
||||
<li class="dock_item"><a callback-method='initializeContact' href="<%= desktop_publications_books_path %>" class="widget_fn wh3 hh3" id='d_books' onclick="return false;"><span class="widget_icon"><img src="" alt="Books" id="books_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='initializeBooks' href="<%= desktop_publications_books_path %>" class="widget_fn wh3 hh3" id='d_books' onclick="return false;"><span class="widget_icon"><img src="" alt="Books" id="books_icon" width="30" height="30"/></span></a></li>
|
||||
|
||||
<li class="dock_item"><a callback-method='initializeContact' href="<%= desktop_publications_books_path %>" class="widget_fn wh3 hh3" id='d_contacts' onclick="return false;"><span class="widget_icon"><img src="" alt="Books" id="books_icon" width="30" height="30"/></span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="d_cate"><a callback-method='' href="" class="widget_fn wh3 hh3" id='d_research' onclick="return false;"><span class="widget_icon"><img src="" alt="Research" id="research_icon" width="30" height="30"/></span></a>
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
<div class="s_menu sm_v" content-type="menu">
|
||||
<ul id='setting_left_nav'>
|
||||
<li><a href="<%= desktop_publications_seminar_p_list_path %>" callback-method="list" class="hh2 w2 hp active thmc1 thmtxt" onclick='return false;'>List</a></li>
|
||||
<li><a href="<%= desktop_publications_seminar_p_add_path %>" callback-method="addseminar" class="admtxt hh2 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Seminar</a></li>
|
||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
||||
<li><a href="<%= desktop_publications_seminar_p_add_path %>" callback-method="addseminar" custom-load="add" class="admtxt hh2 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
||||
<li><a href="<%= desktop_publications_seminar_p_add_path %>" callback-method="seminar" class="admtxt hh2 w2 hp" onclick='return false;'>Seminar</a></li>
|
||||
<li><a href="<%= desktop_publications_seminar_p_list_path %>" callback-method="rues" class="admtxt hh2 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Analysis</a></li>
|
||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Import</a></li>
|
||||
|
|
|
@ -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>
|