Merge branch 'member_plugin' of https://github.com/Rulingcom/orbit into member_plugin
This commit is contained in:
commit
90c6c88f2f
378 files changed
+13884
-3186
No files matched your search
Vendored
+263
-130
@@ -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 ($) {
|
||||
|
||||
"use strict"; // jshint ;_;
|
||||
|
||||
|
||||
/* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
|
||||
* ======================================================= */
|
||||
|
||||
$(function () {
|
||||
|
||||
"use strict"; // jshint ;_;
|
||||
|
||||
|
||||
/* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
|
||||
* ======================================================= */
|
||||
|
||||
$.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 ) {
|
||||
var $btn = $(e.target)
|
||||
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
|
||||
$btn.button('toggle')
|
||||
})
|
||||
$(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 ) {
|
||||
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())
|
||||
$target.carousel(options)
|
||||
e.preventDefault()
|
||||
})
|
||||
$(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 = $.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,26 +589,33 @@
|
||||
$.fn.collapse.Constructor = Collapse
|
||||
|
||||
|
||||
/* COLLAPSIBLE DATA-API
|
||||
/* COLLAPSE NO CONFLICT
|
||||
* ==================== */
|
||||
|
||||
$(function () {
|
||||
$('body').on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
|
||||
var $this = $(this), href
|
||||
, target = $this.attr('data-target')
|
||||
|| e.preventDefault()
|
||||
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
|
||||
, option = $(target).data('collapse') ? 'toggle' : $this.data()
|
||||
$this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
|
||||
$(target).collapse(option)
|
||||
// for orbit
|
||||
$this.parents('li').siblings().removeClass('active');
|
||||
$this.parents('li').toggleClass('active');
|
||||
})
|
||||
$.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()
|
||||
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
|
||||
, option = $(target).data('collapse') ? 'toggle' : $this.data()
|
||||
$this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
|
||||
$(target).collapse(option)
|
||||
// for orbit
|
||||
$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')
|
||||
.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('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)
|
||||
})
|
||||
$(document)
|
||||
.on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
|
||||
.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,28 +991,36 @@
|
||||
$.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 ) {
|
||||
var $this = $(this)
|
||||
, href = $this.attr('href')
|
||||
, $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
|
||||
, option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
|
||||
$(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
|
||||
, option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
|
||||
|
||||
e.preventDefault()
|
||||
e.preventDefault()
|
||||
|
||||
$target
|
||||
.modal(option)
|
||||
.one('hide', function () {
|
||||
$this.focus()
|
||||
})
|
||||
})
|
||||
$target
|
||||
.modal(option)
|
||||
.one('hide', function () {
|
||||
$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) {
|
||||
e.preventDefault()
|
||||
$(this).tab('show')
|
||||
})
|
||||
$(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({
|
||||
top: pos.top + pos.height
|
||||
, left: pos.left
|
||||
})
|
||||
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 DATA-API
|
||||
/* 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) {
|
||||
var $this = $(this)
|
||||
if ($this.data('typeahead')) return
|
||||
e.preventDefault()
|
||||
$this.typeahead($this.data())
|
||||
})
|
||||
$(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
|
||||
* ============== */
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
$(document).ready(function(){
|
||||
|
||||
$('.date_picker').datetimepicker({
|
||||
pickTime: false
|
||||
});
|
||||
|
||||
$('.default_picker').datetimepicker();
|
||||
|
||||
$('.time_picker').datetimepicker({
|
||||
pickDate: false
|
||||
});
|
||||
|
||||
$('.separated_picker div').on("changeDate",function(){
|
||||
if ($(this).hasClass('date_picker'))
|
||||
{
|
||||
if ($(this).find('input').val() && $(this).siblings('div').css('pointer-events'))
|
||||
{
|
||||
$(this).siblings('div').css('pointer-events', '');
|
||||
}
|
||||
else
|
||||
{
|
||||
$(this).siblings('div').find('input').val(null);
|
||||
$(this).siblings('div').css('pointer-events', 'none');
|
||||
}
|
||||
}
|
||||
$(this).siblings('input').val($(this).find('input').val() + ' ' + $(this).siblings('div').find('input').val());
|
||||
});
|
||||
|
||||
// $('.date_picker').on("changeDate",function(){
|
||||
// $(this).find('input').val('');
|
||||
// });
|
||||
|
||||
});
|
||||
@@ -14,4 +14,5 @@
|
||||
//= require orbitdesktopAPI
|
||||
//= require orbitTimeline
|
||||
//= require orbitdesktop
|
||||
//= require desktop/journal_pages
|
||||
//= require desktop/books_pages
|
||||
//= require desktop/seminar_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();
|
||||
|
||||
}
|
||||
@@ -1,397 +0,0 @@
|
||||
orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ // this init journal papers
|
||||
this.initializeJournalPapers.formCallback = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
o.sub_menu_item($("div[content-type=menu] a").eq(0));
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
|
||||
this.initializeJournalPapers.list = function(){ // to open list part in journal papers page
|
||||
var journalData;
|
||||
var bindHandlers = function(){ // to bind handlers for list page
|
||||
o.simple_drop_down();
|
||||
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.list_t'
|
||||
})
|
||||
|
||||
$("#journal_selection_options a").click(function(){
|
||||
switch($(this).attr("href")){
|
||||
case "all":
|
||||
$(".list_item_action > .icon-check-empty").switchClass("icon-check-empty","icon-check",0);
|
||||
break;
|
||||
case "none":
|
||||
$(".list_item_action > .icon-check").switchClass("icon-check","icon-check-empty",0);
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
})
|
||||
$("#journal_view_selection a").click(function(){
|
||||
switch($(this).attr("href")){
|
||||
case "journal":
|
||||
journalview();
|
||||
break;
|
||||
case "keywords":
|
||||
keywordsview();
|
||||
break;
|
||||
case "title":
|
||||
titleview();
|
||||
break;
|
||||
case "abstract":
|
||||
abstractview();
|
||||
break;
|
||||
case "file":
|
||||
fileview();
|
||||
break;
|
||||
}
|
||||
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(){
|
||||
$("#journal_p div#paper_list a.icon-check-empty").click(function(){
|
||||
if($(this).hasClass("icon-check-empty")){
|
||||
$(this).switchClass("icon-check-empty","icon-check",0);
|
||||
} else if($(this) .hasClass("icon-check")) {
|
||||
$(this).switchClass("icon-check","icon-check-empty",0);
|
||||
} else if($(this).hasClass("icon-star")){
|
||||
$(this).removeClass("icon-star").addClass("icon-star-empty");
|
||||
} else if($(this).hasClass("icon-star-empty")){
|
||||
$(this).removeClass("icon-star-empty").addClass("icon-star");
|
||||
}
|
||||
return false;
|
||||
})
|
||||
}
|
||||
|
||||
var journalview = function(){
|
||||
$("#journal_p div#paper_list div.overview").empty();
|
||||
var column = $('<div class="g_col list_t"><ul></ul></div>'),
|
||||
counter = 1,
|
||||
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>');
|
||||
column.find("ul").append(li);
|
||||
if(counter%5==0){
|
||||
$("#journal_p div#paper_list div.overview").append(column);
|
||||
column = $('<div class="g_col list_t"><ul></ul></div>');
|
||||
}
|
||||
counter++;
|
||||
})
|
||||
})
|
||||
$("#journal_p div#paper_list div.overview").append(column);
|
||||
bindSecondaryHandlers();
|
||||
}
|
||||
var fileview = function(){
|
||||
$("#journal_p div#paper_list div.overview").empty();
|
||||
var column = $('<div class="g_col list_t"><ul></ul></div>'),
|
||||
counter = 1,
|
||||
li = null;
|
||||
$.each(journalData,function(i,journal){
|
||||
$.each(journal.papers,function(j,paper){
|
||||
li = null;
|
||||
li = $('<li class="list_t_item file_view"></li>');
|
||||
li.append('<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"></div>');
|
||||
var file_list = li.find('.list_t_des');
|
||||
$.each(paper.files,function(k,file){
|
||||
var thistitle = file.title;
|
||||
if(!thistitle)
|
||||
thistitle = "";
|
||||
thistitle = ( thistitle.length > 8 )? thistitle.substring(0,8)+'...' : thistitle;
|
||||
if(!file.title){
|
||||
thistitle = "Untitled File";
|
||||
}
|
||||
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>');
|
||||
column.find("ul").append(li);
|
||||
if(counter%3==0){
|
||||
$("#journal_p div#paper_list div.overview").append(column);
|
||||
column = $('<div class="g_col list_t"><ul></ul></div>');
|
||||
}
|
||||
counter++;
|
||||
})
|
||||
})
|
||||
$("#journal_p div#paper_list div.overview").append(column);
|
||||
bindSecondaryHandlers();
|
||||
}
|
||||
var keywordsview = function(){
|
||||
$("#journal_p div#paper_list div.overview").empty();
|
||||
var column = $('<div class="g_col list_t"><ul></ul></div>'),
|
||||
counter = 1,
|
||||
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>');
|
||||
column.find("ul").append(li);
|
||||
if(counter%5==0){
|
||||
$("#journal_p div#paper_list div.overview").append(column);
|
||||
column = $('<div class="g_col list_t"><ul></ul></div>');
|
||||
}
|
||||
counter++;
|
||||
})
|
||||
})
|
||||
$("#journal_p div#paper_list div.overview").append(column);
|
||||
bindSecondaryHandlers();
|
||||
}
|
||||
|
||||
var titleview = function(){
|
||||
$("#journal_p div#paper_list div.overview").empty();
|
||||
var column = $('<div class="g_col list_t"><ul></ul></div>'),
|
||||
counter = 1,
|
||||
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>');
|
||||
column.find("ul").append(li);
|
||||
if(counter%5==0){
|
||||
$("#journal_p div#paper_list div.overview").append(column);
|
||||
column = $('<div class="g_col list_t"><ul></ul></div>');
|
||||
}
|
||||
counter++;
|
||||
})
|
||||
})
|
||||
$("#journal_p div#paper_list div.overview").append(column);
|
||||
bindSecondaryHandlers();
|
||||
}
|
||||
|
||||
var abstractview = function(){
|
||||
$("#journal_p div#paper_list div.overview").empty();
|
||||
var column = $('<div class="g_col list_t"><ul></ul></div>'),
|
||||
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>');
|
||||
column.find("ul").append(li);
|
||||
$("#journal_p div#paper_list div.overview").append(column);
|
||||
column = $('<div class="g_col list_t"><ul></ul></div>');
|
||||
})
|
||||
})
|
||||
$("#journal_p div#paper_list div.overview").append(column);
|
||||
bindSecondaryHandlers();
|
||||
}
|
||||
|
||||
var getData = function(){
|
||||
$.getJSON("/desktop/journal_pages/get_journals_json",function(journals){
|
||||
journalData = eval(journals);
|
||||
journalview();
|
||||
bindHandlers();
|
||||
})
|
||||
}
|
||||
getData();
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.s_grid_con'
|
||||
})
|
||||
}
|
||||
bindHandlers();
|
||||
}
|
||||
|
||||
this.initializeJournalPapers.journal = function(){ // to open add pages in journal papers page
|
||||
var bindHandlers = function(){ // to bind handlers for add page
|
||||
o.simple_drop_down();
|
||||
o.tinyscrollbar_ext({
|
||||
main: '.tinycanvas',
|
||||
fill: '.g_col'
|
||||
})
|
||||
}
|
||||
bindHandlers();
|
||||
}
|
||||
|
||||
this.initializeJournalPapers.coAuthorformCallback = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
o.sub_menu_item($("div[content-type=menu] a").eq(0));
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
this.initializeJournalPapers.coauthor = function(){ // to open add pages in coauthor page
|
||||
var bindHandlers = function(){ // to bind handlers for add page
|
||||
o.simple_drop_down();
|
||||
|
||||
o.tinyscrollbar_ext({
|
||||
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();
|
||||
}
|
||||
this.initializeJournalPapers.coauthorRelationForm = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
$("#co_author_relation_table").html(data.newvalue);
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
this.initializeJournalPapers.coauthorRelationEditForm = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
$("#co_author_relation_table").html(data.newvalue);
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -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',
|
||||
|
||||
+1164
File diff suppressed because it is too large.
Load diff
@@ -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();
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,2 @@
|
||||
/*! jQuery Mobile vGit Build: SHA1: b49cc06499abf8f987cf90f35349cfac0918c939 <> Date: Tue Oct 2 11:22:34 2012 -0700 jquerymobile.com | jquery.org/license !*/
|
||||
(function(a,b,c){typeof define=="function"&&define.amd?define(["jquery"],function(d){return c(d,a,b),d.mobile}):c(a.jQuery,a,b)})(this,document,function(a,b,c,d){(function(a,b,d){var e={};a.mobile=a.extend({},{version:"1.2.0",ns:"",subPageUrlKey:"ui-page",activePageClass:"ui-page-active",activeBtnClass:"ui-btn-active",focusClass:"ui-focus",ajaxEnabled:!0,hashListeningEnabled:!0,linkBindingEnabled:!0,defaultPageTransition:"fade",maxTransitionWidth:!1,minScrollBack:250,touchOverflowEnabled:!1,defaultDialogTransition:"pop",pageLoadErrorMessage:"Error Loading Page",pageLoadErrorMessageTheme:"e",phonegapNavigationEnabled:!1,autoInitializePage:!0,pushStateEnabled:!0,ignoreContentEnabled:!1,orientationChangeEnabled:!0,buttonMarkup:{hoverDelay:200},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91},silentScroll:function(d){a.type(d)!=="number"&&(d=a.mobile.defaultHomeScroll),a.event.special.scrollstart.enabled=!1,setTimeout(function(){b.scrollTo(0,d),a(c).trigger("silentscroll",{x:0,y:d})},20),setTimeout(function(){a.event.special.scrollstart.enabled=!0},150)},nsNormalizeDict:e,nsNormalize:function(b){if(!b)return;return e[b]||(e[b]=a.camelCase(a.mobile.ns+b))},getInheritedTheme:function(a,b){var c=a[0],d="",e=/ui-(bar|body|overlay)-([a-z])\b/,f,g;while(c){f=c.className||"";if(f&&(g=e.exec(f))&&(d=g[2]))break;c=c.parentNode}return d||b||"a"},closestPageData:function(a){return a.closest(':jqmData(role="page"), :jqmData(role="dialog")').data("page")},enhanceable:function(a){return this.haveParents(a,"enhance")},hijackable:function(a){return this.haveParents(a,"ajax")},haveParents:function(b,c){if(!a.mobile.ignoreContentEnabled)return b;var d=b.length,e=a(),f,g,h;for(var i=0;i<d;i++){g=b.eq(i),h=!1,f=b[i];while(f){var j=f.getAttribute?f.getAttribute("data-"+a.mobile.ns+c):"";if(j==="false"){h=!0;break}f=f.parentNode}h||(e=e.add(g))}return e},getScreenHeight:function(){return b.innerHeight||a(b).height()}},a.mobile),a.fn.jqmData=function(b,c){var e;return typeof b!="undefined"&&(b&&(b=a.mobile.nsNormalize(b)),arguments.length<2||c===d?e=this.data(b):e=this.data(b,c)),e},a.jqmData=function(b,c,d){var e;return typeof c!="undefined"&&(e=a.data(b,c?a.mobile.nsNormalize(c):c,d)),e},a.fn.jqmRemoveData=function(b){return this.removeData(a.mobile.nsNormalize(b))},a.jqmRemoveData=function(b,c){return a.removeData(b,a.mobile.nsNormalize(c))},a.fn.removeWithDependents=function(){a.removeWithDependents(this)},a.removeWithDependents=function(b){var c=a(b);(c.jqmData("dependents")||a()).remove(),c.remove()},a.fn.addDependents=function(b){a.addDependents(a(this),b)},a.addDependents=function(b,c){var d=a(b).jqmData("dependents")||a();a(b).jqmData("dependents",a.merge(d,c))},a.fn.getEncodedText=function(){return a("<div/>").text(a(this).text()).html()},a.fn.jqmEnhanceable=function(){return a.mobile.enhanceable(this)},a.fn.jqmHijackable=function(){return a.mobile.hijackable(this)};var f=a.find,g=/:jqmData\(([^)]*)\)/g;a.find=function(b,c,d,e){return b=b.replace(g,"[data-"+(a.mobile.ns||"")+"$1]"),f.call(this,b,c,d,e)},a.extend(a.find,f),a.find.matches=function(b,c){return a.find(b,null,null,c)},a.find.matchesSelector=function(b,c){return a.find(c,null,null,[b]).length>0}})(a,this),function(a,b){var c=0,d=Array.prototype.slice,e=a.cleanData;a.cleanData=function(b){for(var c=0,d;(d=b[c])!=null;c++)try{a(d).triggerHandler("remove")}catch(f){}e(b)},a.widget=function(b,c,d){var e,f,g,h,i=b.split(".")[0];b=b.split(".")[1],e=i+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][e]=function(b){return!!a.data(b,e)},a[i]=a[i]||{},f=a[i][b],g=a[i][b]=function(a,b){if(!this._createWidget)return new g(a,b);arguments.length&&this._createWidget(a,b)},a.extend(g,f,{version:d.version,_proto:a.extend({},d),_childConstructors:[]}),h=new c,h.options=a.widget.extend({},h.options),a.each(d,function(b,e){a.isFunction(e)&&(d[b]=function(){var a=function(){return c.prototype[b].apply(this,arguments)},d=function(a){return c.prototype[b].apply(this,a)};return function(){var b=this._super,c=this._superApply,f;return this._super=a,this._superApply=d,f=e.apply(this,arguments),this._super=b,this._superApply=c,f}}())}),g.prototype=a.widget.extend(h,{widgetEventPrefix:b},d,{constructor:g,namespace:i,widgetName:b,widgetBaseClass:e,widgetFullName:e}),f?(a.each(f._childConstructors,function(b,c){var d=c.prototype;a.widget(d.namespace+"."+d.widgetName,g,c._proto)}),delete f._childConstructors):c._childConstructors.push(g),a.widget.bridge(b,g)},a.widget.extend=function(c){var e=d.call(arguments,1),f=0,g=e.length,h,i;for(;f<g;f++)for(h in e[f])i=e[f][h],e[f].hasOwnProperty(h)&&i!==b&&(c[h]=a.isPlainObject(i)?a.widget.extend({},c[h],i):i);return c},a.widget.bridge=fuLine truncated
|
||||
@@ -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 �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');
|
||||
}
|
||||
});
|
||||
};
|
||||
+373
@@ -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);
|
||||
});
|
||||
$('#announcement_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: $effect,
|
||||
timeout: $timeout
|
||||
});
|
||||
|
||||
$(".newlist").css({
|
||||
"width" : $(".newitem").outerWidth()*(Math.floor($globalW/$(".newitem").outerWidth()))+30,
|
||||
})
|
||||
|
||||
$("#map_canvas").css({
|
||||
'height' : $windowH,
|
||||
})
|
||||
// $('.newlist').swipePlanes();
|
||||
}, 500);
|
||||
});
|
||||
@@ -19,4 +19,6 @@
|
||||
//= require side_bar_history
|
||||
//= require rss
|
||||
//= require ajax_form
|
||||
//= require inc/ajax_setting
|
||||
//= require inc/ajax_setting
|
||||
//= require lib/bootstrap-datetimepicker
|
||||
//= require datetimepicker
|
||||
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user