diff --git a/dashboard-ui/bower_components/doc-ready/.bower.json b/dashboard-ui/bower_components/doc-ready/.bower.json index adda4287b4..d4d75eca65 100644 --- a/dashboard-ui/bower_components/doc-ready/.bower.json +++ b/dashboard-ui/bower_components/doc-ready/.bower.json @@ -39,6 +39,6 @@ "commit": "cec8e49744a1e18b14a711eea77e201bb70de544" }, "_source": "git://github.com/desandro/doc-ready.git", - "_target": "1.0.x", + "_target": "~1.0.4", "_originalSource": "doc-ready" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/eventie/.bower.json b/dashboard-ui/bower_components/eventie/.bower.json index 6b5b662fdc..917d217ea8 100644 --- a/dashboard-ui/bower_components/eventie/.bower.json +++ b/dashboard-ui/bower_components/eventie/.bower.json @@ -30,6 +30,6 @@ "commit": "14d2ca3df97da64c820829a8310f9198fbafbcfa" }, "_source": "git://github.com/desandro/eventie.git", - "_target": "~1.0.3", + "_target": "^1", "_originalSource": "eventie" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-meta/.bower.json b/dashboard-ui/bower_components/iron-meta/.bower.json index e1304d174b..f4bfef4a7c 100644 --- a/dashboard-ui/bower_components/iron-meta/.bower.json +++ b/dashboard-ui/bower_components/iron-meta/.bower.json @@ -26,14 +26,14 @@ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, "main": "iron-meta.html", - "homepage": "https://github.com/PolymerElements/iron-meta", + "homepage": "https://github.com/polymerelements/iron-meta", "_release": "1.1.1", "_resolution": { "type": "version", "tag": "v1.1.1", "commit": "e171ee234b482219c9514e6f9551df48ef48bd9f" }, - "_source": "git://github.com/PolymerElements/iron-meta.git", + "_source": "git://github.com/polymerelements/iron-meta.git", "_target": "^1.0.0", - "_originalSource": "PolymerElements/iron-meta" + "_originalSource": "polymerelements/iron-meta" } \ No newline at end of file diff --git a/dashboard-ui/scripts/channelitems.js b/dashboard-ui/scripts/channelitems.js index e83f8b9ed1..2ad5c61aa1 100644 --- a/dashboard-ui/scripts/channelitems.js +++ b/dashboard-ui/scripts/channelitems.js @@ -223,7 +223,7 @@ $('.alphabetPicker', page).alphaValue(query.NameStartsWith); } - $(document).on('pageinit', "#channelItemsPage", function () { + pageIdOn.on('pageinit', "channelItemsPage", function () { var page = this; @@ -261,7 +261,9 @@ reloadItems(page); }); - }).on('pagebeforeshow', "#channelItemsPage", function () { + }); + + pageIdOn('pagebeforeshow', "channelItemsPage", function () { var page = this; reloadFeatures(page); diff --git a/dashboard-ui/scripts/channels.js b/dashboard-ui/scripts/channels.js index 20a09b189f..668e620b1e 100644 --- a/dashboard-ui/scripts/channels.js +++ b/dashboard-ui/scripts/channels.js @@ -70,7 +70,7 @@ } } - $(document).on('pageinit', "#channelsPage", function () { + pageIdOn.on('pageinit', "channelsPage", function () { var page = this; @@ -79,8 +79,8 @@ LibraryBrowser.configurePaperLibraryTabs(page, tabs, pages, 'channels.html'); - $(pages).on('tabchange', function () { - loadTab(page, parseInt(this.selected)); + pages.addEventListener('tabchange', function (e) { + loadTab(page, parseInt(e.target.selected)); }); }); diff --git a/dashboard-ui/scripts/channelslatest.js b/dashboard-ui/scripts/channelslatest.js index 980c24ad8b..5faeeabade 100644 --- a/dashboard-ui/scripts/channelslatest.js +++ b/dashboard-ui/scripts/channelslatest.js @@ -21,13 +21,13 @@ } } - $(document).on('pageinit', "#channelsPage", function () { + pageIdOn('pageinit', "channelsPage", function () { var page = this; var pages = page.querySelector('neon-animated-pages'); - $(pages).on('tabchange', function () { - loadTab(page, parseInt(this.selected)); + pages.addEventListener('tabchange', function (e) { + loadTab(page, parseInt(e.target.selected)); }); }); diff --git a/dashboard-ui/scripts/indexpage.js b/dashboard-ui/scripts/indexpage.js index 7d1726886e..5407fb5d40 100644 --- a/dashboard-ui/scripts/indexpage.js +++ b/dashboard-ui/scripts/indexpage.js @@ -266,11 +266,11 @@ LibraryBrowser.configurePaperLibraryTabs(page, tabs, pages, 'index.html'); - $(pages).on('tabchange', function () { - loadTab(page, parseInt(this.selected)); + pages.addEventListener('tabchange', function (e) { + loadTab(page, parseInt(e.target.selected)); }); - Events.on(page.querySelector('.btnTakeTour'), 'click', function () { + page.querySelector('.btnTakeTour').addEventListener('click', function () { takeTour(page, Dashboard.getCurrentUserId()); }); @@ -301,7 +301,7 @@ var page = $($.mobile.activePage)[0]; var pages = page.querySelector('neon-animated-pages'); - $(pages).trigger('tabchange'); + pages.dispatchEvent(new CustomEvent("tabchange", {})); } } diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js index a7d19cc564..7065ed2075 100644 --- a/dashboard-ui/scripts/itemdetailpage.js +++ b/dashboard-ui/scripts/itemdetailpage.js @@ -1945,31 +1945,31 @@ }); } - $(document).on('pageinit', "#itemDetailPage", function () { + pageIdOn('pageinit', "itemDetailPage", function() { var page = this; - $('.btnPlay', page).on('click', function () { + $('.btnPlay', page).on('click', function() { playCurrentItem(this); }); - $('.btnPlayTrailer', page).on('click', function () { + $('.btnPlayTrailer', page).on('click', function() { playTrailer(page); }); - $('.btnSplitVersions', page).on('click', function () { + $('.btnSplitVersions', page).on('click', function() { splitVersions(page); }); - $('.btnSync', page).on('click', function () { + $('.btnSync', page).on('click', function() { SyncManager.showMenu({ items: [currentItem] }); }); - $('.btnRecord,.btnFloatingRecord', page).on('click', function () { + $('.btnRecord,.btnFloatingRecord', page).on('click', function() { var id = getParameterByName('id'); @@ -1977,48 +1977,48 @@ }); - $('.btnCancelRecording', page).on('click', function () { + $('.btnCancelRecording', page).on('click', function() { deleteTimer(page, currentItem.TimerId); }); - $('.btnMoreCommands', page).on('click', function () { + $('.btnMoreCommands', page).on('click', function() { var button = this; - Dashboard.getCurrentUser().done(function (user) { + Dashboard.getCurrentUser().done(function(user) { LibraryBrowser.showMoreCommands(button, currentItem.Id, LibraryBrowser.getMoreCommands(currentItem, user)); }); }); - $('.childrenItemsContainer', page).on('playallfromhere', function (e, index) { + $('.childrenItemsContainer', page).on('playallfromhere', function(e, index) { LibraryBrowser.playAllFromHere(_childrenItemsFunction, index); - }).on('queueallfromhere', function (e, index) { + }).on('queueallfromhere', function(e, index) { LibraryBrowser.queueAllFromHere(_childrenItemsFunction, index); }); - $(page).on("click", ".moreScenes", function () { + $(page).on("click", ".moreScenes", function() { - Dashboard.getCurrentUser().done(function (user) { + Dashboard.getCurrentUser().done(function(user) { renderScenes(page, currentItem, user); }); - }).on("click", ".morePeople", function () { + }).on("click", ".morePeople", function() { renderCast(page, currentItem, getContext(currentItem)); - }).on("click", ".moreSpecials", function () { + }).on("click", ".moreSpecials", function() { - Dashboard.getCurrentUser().done(function (user) { + Dashboard.getCurrentUser().done(function(user) { renderSpecials(page, currentItem, user); }); - }).on("click", ".moreCriticReviews", function () { + }).on("click", ".moreCriticReviews", function() { renderCriticReviews(page, currentItem); }); @@ -2028,7 +2028,9 @@ // btnMore[i].icon = AppInfo.moreIcon; //} - }).on('pagebeforeshow', "#itemDetailPage", function () { + }); + + pageIdOn('pagebeforeshow', "itemDetailPage", function() { var page = this; @@ -2038,7 +2040,10 @@ Events.on(LibraryBrowser, 'itemdeleting', onItemDeleted); - }).on('pagebeforehide', "#itemDetailPage", function () { + }); + + + pageIdOn('pagebeforehide', "itemDetailPage", function () { Events.off(LibraryBrowser, 'itemdeleting', onItemDeleted); diff --git a/dashboard-ui/scripts/itemlistpage.js b/dashboard-ui/scripts/itemlistpage.js index 27f192c703..45b70bc4fc 100644 --- a/dashboard-ui/scripts/itemlistpage.js +++ b/dashboard-ui/scripts/itemlistpage.js @@ -236,7 +236,7 @@ } } - $(document).on('pageinit', "#itemListPage", function () { + pageIdOn('pageinit', "itemListPage", function () { var page = this; @@ -276,7 +276,9 @@ $(page).on('click', '.mediaItem', onListItemClick); - }).on('pagebeforeshow', "#itemListPage", function () { + }); + + pageIdOn('pagebeforeshow', "itemListPage", function () { var page = this; @@ -284,7 +286,9 @@ updateFilterControls(page); LibraryMenu.setBackButtonVisible(getParameterByName('context')); - }).on('pagebeforehide', "#itemListPage", function () { + }); + + pageIdOn('pagebeforehide', "itemListPage", function () { currentItem = null; diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index f7b6cd84ee..9c1a34b963 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -264,7 +264,7 @@ var delay = LibraryBrowser.animatePaperTabs() || !tabs.noSlide ? 500 : 0; setTimeout(function () { - $(pgs).trigger('tabchange'); + pgs.dispatchEvent(new CustomEvent("tabchange", {})); }, delay); }); @@ -361,7 +361,7 @@ return; } } - Events.trigger(pages, 'tabchange'); + pages.dispatchEvent(new CustomEvent("tabchange", {})); } }, diff --git a/dashboard-ui/scripts/librarylist.js b/dashboard-ui/scripts/librarylist.js index 735853982e..7ca124fff8 100644 --- a/dashboard-ui/scripts/librarylist.js +++ b/dashboard-ui/scripts/librarylist.js @@ -1208,6 +1208,7 @@ MediaController.instantMix(itemId); } + e.stopPropagation(); e.preventDefault(); return false; } diff --git a/dashboard-ui/scripts/librarymenu.js b/dashboard-ui/scripts/librarymenu.js index 0536d07341..0e79ca6c4e 100644 --- a/dashboard-ui/scripts/librarymenu.js +++ b/dashboard-ui/scripts/librarymenu.js @@ -52,7 +52,7 @@ ImageLoader.lazyChildren(document.querySelector('.viewMenuBar')); - Events.trigger(document, 'headercreated'); + document.dispatchEvent(new CustomEvent("headercreated", {})); bindMenuEvents(); } diff --git a/dashboard-ui/scripts/livetvitems.js b/dashboard-ui/scripts/livetvitems.js index df28007321..54debd31c8 100644 --- a/dashboard-ui/scripts/livetvitems.js +++ b/dashboard-ui/scripts/livetvitems.js @@ -85,7 +85,7 @@ }); } - $(document).on('pagebeforeshow', "#liveTvItemsPage", function () { + pageIdOn('pagebeforeshow', "liveTvItemsPage", function () { query.ParentId = LibraryMenu.getTopParentId(); diff --git a/dashboard-ui/scripts/livetvsuggested.js b/dashboard-ui/scripts/livetvsuggested.js index 2cd87eb866..23fd2a3caf 100644 --- a/dashboard-ui/scripts/livetvsuggested.js +++ b/dashboard-ui/scripts/livetvsuggested.js @@ -191,7 +191,7 @@ }); } - $(document).on('pageinit', "#liveTvSuggestedPage", function () { + pageIdOn('pageinit', "liveTvSuggestedPage", function () { var page = this; @@ -200,8 +200,8 @@ LibraryBrowser.configurePaperLibraryTabs(page, tabs, pages, 'livetv.html'); - $(pages).on('tabchange', function () { - loadTab(page, parseInt(this.selected)); + pages.addEventListener('tabchange', function (e) { + loadTab(page, parseInt(e.target.selected)); }); }); diff --git a/dashboard-ui/scripts/mediacontroller.js b/dashboard-ui/scripts/mediacontroller.js index cd8e37e291..ba5bc202e9 100644 --- a/dashboard-ui/scripts/mediacontroller.js +++ b/dashboard-ui/scripts/mediacontroller.js @@ -1012,17 +1012,21 @@ showPlayerSelection(); } - $(document).on('headercreated', function () { + document.addEventListener('headercreated', function () { $('.btnCast').off('click', onCastButtonClicked).on('click', onCastButtonClicked); - }).on('pagebeforeshow', ".page", function () { + }); + + pageClassOn('pagebeforeshow', "page", function () { var page = this; currentDisplayInfo = null; - }).on('displayingitem', ".libraryPage", function (e, info) { + }); + + pageClassOn('displayingitem', "libraryPage", function (e, info) { currentDisplayInfo = info; diff --git a/dashboard-ui/scripts/mediaplayer-video.js b/dashboard-ui/scripts/mediaplayer-video.js index add177513b..87e96b8306 100644 --- a/dashboard-ui/scripts/mediaplayer-video.js +++ b/dashboard-ui/scripts/mediaplayer-video.js @@ -880,9 +880,9 @@ var itemVideo = document.querySelector('.itemVideo'); if (itemVideo) { //Events.on(itemVideo, 'mousemove', onMouseMove); - Events.on(itemVideo, 'keydown', idleHandler); - Events.on(itemVideo, 'scroll', idleHandler); - Events.on(itemVideo, 'mousedown', idleHandler); + itemVideo.addEventListener('keydown', idleHandler); + itemVideo.addEventListener('scroll', idleHandler); + itemVideo.addEventListener('mousedown', idleHandler); idleHandler(); } } @@ -914,9 +914,9 @@ var itemVideo = document.querySelector('.itemVideo'); if (itemVideo) { //Events.off(itemVideo, 'mousemove', onMouseMove); - Events.off(itemVideo, 'keydown', idleHandler); - Events.off(itemVideo, 'scroll', idleHandler); - Events.off(itemVideo, 'mousedown', idleHandler); + itemVideo.removeEventListener('keydown', idleHandler); + itemVideo.removeEventListener('scroll', idleHandler); + itemVideo.removeEventListener('mousedown', idleHandler); } } diff --git a/dashboard-ui/scripts/moviecollections.js b/dashboard-ui/scripts/moviecollections.js index 54c97e45ff..07fda3b1fe 100644 --- a/dashboard-ui/scripts/moviecollections.js +++ b/dashboard-ui/scripts/moviecollections.js @@ -202,21 +202,23 @@ }); } - $(document).on('pageinit', "#boxsetsPage", function () { - + pageIdOn('pageinit', 'boxsetsPage', function () { + var page = this; var content = page; initPage(content); - }).on('pagebeforeshow', "#boxsetsPage", function () { + }); + pageIdOn('pagebeforeshow', 'boxsetsPage', function () { var page = this; var content = page; reloadItems(content); + }); window.MoviesPage = window.MoviesPage || {}; diff --git a/dashboard-ui/scripts/moviesrecommended.js b/dashboard-ui/scripts/moviesrecommended.js index 4a3a9e3f13..65642be6b8 100644 --- a/dashboard-ui/scripts/moviesrecommended.js +++ b/dashboard-ui/scripts/moviesrecommended.js @@ -340,8 +340,8 @@ LibraryBrowser.configurePaperLibraryTabs(page, tabs, pages, baseUrl); - $(pages).on('tabchange', function () { - loadTab(page, parseInt(this.selected)); + pages.addEventListener('tabchange', function (e) { + loadTab(page, parseInt(e.target.selected)); }); }); @@ -383,7 +383,7 @@ var page = $($.mobile.activePage)[0]; var pages = page.querySelector('neon-animated-pages'); - $(pages).trigger('tabchange'); + pages.dispatchEvent(new CustomEvent("tabchange", {})); } } diff --git a/dashboard-ui/scripts/musicrecommended.js b/dashboard-ui/scripts/musicrecommended.js index fa359944e7..a7e1091f04 100644 --- a/dashboard-ui/scripts/musicrecommended.js +++ b/dashboard-ui/scripts/musicrecommended.js @@ -302,8 +302,8 @@ LibraryBrowser.configurePaperLibraryTabs(page, tabs, pages, baseUrl); - $(pages).on('tabchange', function () { - loadTab(page, parseInt(this.selected)); + pages.addEventListener('tabchange', function (e) { + loadTab(page, parseInt(e.target.selected)); }); }).on('pageshow', "#musicRecommendedPage", function () { diff --git a/dashboard-ui/scripts/notifications.js b/dashboard-ui/scripts/notifications.js index 30c761629a..ffb0a2dac9 100644 --- a/dashboard-ui/scripts/notifications.js +++ b/dashboard-ui/scripts/notifications.js @@ -178,7 +178,7 @@ $(apiClient).off("websocketmessage", onWebSocketMessage).on("websocketmessage", onWebSocketMessage); } - $(document).on('headercreated', function (e, apiClient) { + document.addEventListener('headercreated', function () { $('.btnNotifications').on('click', function () { Dashboard.navigate('notificationlist.html'); }); diff --git a/dashboard-ui/scripts/photos.js b/dashboard-ui/scripts/photos.js index a577adb191..80398726ec 100644 --- a/dashboard-ui/scripts/photos.js +++ b/dashboard-ui/scripts/photos.js @@ -201,7 +201,7 @@ } } - $(document).on('pageinit', "#photosPage", function () { + pageIdOn('pageinit', "photosPage", function () { var page = this; @@ -215,8 +215,8 @@ LibraryBrowser.configurePaperLibraryTabs(page, tabs, page.querySelector('neon-animated-pages'), baseUrl); - $(page.querySelector('neon-animated-pages')).on('tabchange', function () { - loadTab(page, parseInt(this.selected)); + page.querySelector('neon-animated-pages').addEventListener('tabchange', function (e) { + loadTab(page, parseInt(e.target.selected)); }); $(page).on('click', '.mediaItem', onListItemClick); diff --git a/dashboard-ui/scripts/playlists.js b/dashboard-ui/scripts/playlists.js index 96fd453502..d6742cbc3e 100644 --- a/dashboard-ui/scripts/playlists.js +++ b/dashboard-ui/scripts/playlists.js @@ -162,7 +162,7 @@ }); } - $(document).on('pagebeforeshow', "#playlistsPage", function () { + pageIdOn('pagebeforeshow', "playlistsPage", function () { var page = this; reloadItems(page); diff --git a/dashboard-ui/scripts/search.js b/dashboard-ui/scripts/search.js index 2f3499a660..2c6da4557f 100644 --- a/dashboard-ui/scripts/search.js +++ b/dashboard-ui/scripts/search.js @@ -217,7 +217,7 @@ $(document).on('pagecontainerbeforehide', closeSearchResults); - $(document).on('headercreated', function () { + document.addEventListener('headercreated', function () { bindSearchEvents(); }); diff --git a/dashboard-ui/scripts/secondaryitems.js b/dashboard-ui/scripts/secondaryitems.js index e923aa62f3..3ce6b67934 100644 --- a/dashboard-ui/scripts/secondaryitems.js +++ b/dashboard-ui/scripts/secondaryitems.js @@ -161,13 +161,15 @@ }); } - $(document).on('pageinit', "#secondaryItemsPage", function () { + pageIdOn('pageinit', "secondaryItemsPage", function () { var page = this; $(page).on('click', '.mediaItem', onListItemClick); - }).on('pagebeforeshow', "#secondaryItemsPage", function () { + }); + + pageIdOn('pagebeforeshow', "secondaryItemsPage", function () { var page = this; diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index d145f2faaa..c304ef936d 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -12,12 +12,17 @@ cache: false }); } + + $.support.cors = true; + + function onOneDocumentClick() { + document.removeEventListener('click', onOneDocumentClick); + WebNotifications.requestPermission(); + } + document.addEventListener('click', onOneDocumentClick); + })(); -$.support.cors = true; - -$(document).one('click', WebNotifications.requestPermission); - var Dashboard = { jQueryMobileInit: function () { @@ -2226,8 +2231,6 @@ var AppInfo = {}; }); define("jqmpanel", ["thirdparty/jquerymobile-1.4.5/jqm.panel"], function () { - $.mobile.panel.prototype.options.classes.modalOpen = "largePanelModalOpen ui-panel-dismiss-open"; - $.mobile.panel.prototype.options.classes.panel = "largePanel ui-panel"; Dashboard.importCss('thirdparty/jquerymobile-1.4.5/jqm.panel.css'); return {}; diff --git a/dashboard-ui/scripts/tvrecommended.js b/dashboard-ui/scripts/tvrecommended.js index a05a320529..7e83c2b6b3 100644 --- a/dashboard-ui/scripts/tvrecommended.js +++ b/dashboard-ui/scripts/tvrecommended.js @@ -270,7 +270,7 @@ LibraryBrowser.configurePaperLibraryTabs(page, tabs, pages, baseUrl); - $(pages).on('tabchange', function () { + pages.addEventListener('tabchange', function (e) { loadTab(page, parseInt(this.selected)); }); }); @@ -313,7 +313,7 @@ var page = $($.mobile.activePage)[0]; var pages = page.querySelector('neon-animated-pages'); - $(pages).trigger('tabchange'); + pages.dispatchEvent(new CustomEvent("tabchange", {})); } } diff --git a/dashboard-ui/thirdparty/jquerymobile-1.4.5/custombuild.txt b/dashboard-ui/thirdparty/jquerymobile-1.4.5/custombuild.txt deleted file mode 100644 index bfcbad3dde..0000000000 --- a/dashboard-ui/thirdparty/jquerymobile-1.4.5/custombuild.txt +++ /dev/null @@ -1,21 +0,0 @@ -removed: -text input clear -flip -flow -pop -slide -slidedown -slidefade -slideup -turn -nojs -listview auto-dividers -listview hide-dividers -zoom handling -ios orientation -grid layouts -accordions -filterable -tabs -toolbars:fixed -selects: custom menus \ No newline at end of file diff --git a/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.checkbox.js b/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.checkbox.js index d3b258a8d5..2d610b4cd2 100644 --- a/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.checkbox.js +++ b/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.checkbox.js @@ -22,8 +22,8 @@ var input = this.element, o = this.options, inheritAttr = function (input, dataAttr) { - return input.jqmData(dataAttr) || - input.closest("form, fieldset").jqmData(dataAttr); + return input.data(dataAttr) || + input.closest("form, fieldset").data(dataAttr); }, label = this.options.enhanced ? { @@ -44,7 +44,7 @@ } o.iconpos = inheritAttr(input, "iconpos") || - label.element.attr("data-" + $.mobile.ns + "iconpos") || o.iconpos, + label.element.attr("data-iconpos") || o.iconpos, // Establish options o.mini = inheritAttr(input, "mini") || o.mini; @@ -183,7 +183,7 @@ _cacheVals: function () { this._getInputSet().each(function () { - $(this).attr("data-" + $.mobile.ns + "cacheVal", this.checked); + $(this).attr("data-cacheVal", this.checked); }); }, @@ -272,7 +272,7 @@ return ((controlgroupWidget ? controlgroupWidget.options.type : // ... otherwise decide based on the "type" data attribute. - controlgroup.attr("data-" + $.mobile.ns + "type")) !== "horizontal"); + controlgroup.attr("data-type")) !== "horizontal"); } } diff --git a/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.collapsible.js b/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.collapsible.js index 72af2eedce..988b1dadcb 100644 --- a/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.collapsible.js +++ b/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.collapsible.js @@ -1,4 +1,41 @@ -(function ($, undefined) { +(function ($, window, undefined) { + var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/; + + $.extend($.mobile, { + + // Namespace used framework-wide for data-attrs. Default is no namespace + + // Retrieve an attribute from an element and perform some massaging of the value + + getAttribute: function (element, key) { + var data; + + element = element.jquery ? element[0] : element; + + if (element && element.getAttribute) { + data = element.getAttribute("data-" + key); + } + + // Copied from core's src/data.js:dataAttr() + // Convert from a string to a proper data type + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test(data) ? JSON.parse(data) : + data; + } catch (err) { } + + return data; + } + + }); + +})(jQuery, this); + +(function ($, undefined) { var rInitialLetter = /([A-Z])/g, diff --git a/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.listview.js b/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.listview.js index 2a32f2aa6f..7a8e0c3123 100644 --- a/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.listview.js +++ b/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.listview.js @@ -1,4 +1,41 @@ -(function ($, undefined) { +(function ($, window, undefined) { + var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/; + + $.extend($.mobile, { + + // Namespace used framework-wide for data-attrs. Default is no namespace + + // Retrieve an attribute from an element and perform some massaging of the value + + getAttribute: function (element, key) { + var data; + + element = element.jquery ? element[0] : element; + + if (element && element.getAttribute) { + data = element.getAttribute("data-" + key); + } + + // Copied from core's src/data.js:dataAttr() + // Convert from a string to a proper data type + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test(data) ? JSON.parse(data) : + data; + } catch (err) { } + + return data; + } + + }); + +})(jQuery, this); + +(function ($, undefined) { var uiScreenHiddenRegex = /\bui-screen-hidden\b/; function noHiddenClass(elements) { diff --git a/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.panel.js b/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.panel.js index 7368e389cf..a4e47c49bc 100644 --- a/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.panel.js +++ b/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.panel.js @@ -82,27 +82,13 @@ $.widget("mobile.panel", { options: { - classes: { - panel: "ui-panel", - panelOpen: "ui-panel-open", - panelClosed: "ui-panel-closed", - panelFixed: "ui-panel-fixed", - panelInner: "ui-panel-inner", - modal: "ui-panel-dismiss", - modalOpen: "ui-panel-dismiss-open", - pageContainer: "ui-panel-page-container", - pageWrapper: "ui-panel-wrapper", - pageFixedToolbar: "ui-panel-fixed-toolbar", - pageContentPrefix: "ui-panel-page-content", /* Used for wrapper and fixed toolbars position, display and open classes. */ - animate: "ui-panel-animate" - }, animate: true, theme: null, position: "left", dismissible: true, - display: "reveal", //accepts reveal, push, overlay + display: "overlay", //accepts reveal, push, overlay swipeClose: true, - positionFixed: false + positionFixed: true }, _parentPage: null, @@ -129,7 +115,7 @@ // if animating, add the class to do so if (!!this.options.animate) { - this.element.addClass(this.options.classes.animate); + this.element.addClass("ui-panel-animate"); } this._bindUpdateLayout(); @@ -145,9 +131,9 @@ }, _getPanelInner: function () { - var panelInner = this.element[0].querySelector("." + this.options.classes.panelInner); + var panelInner = this.element[0].querySelector("." + "ui-panel-inner"); if (!panelInner) { - panelInner = this.element.children().wrapAll("
").parent(); + panelInner = this.element.children().wrapAll("").parent(); } else { panelInner = $(panelInner); } @@ -159,7 +145,7 @@ var self = this, target = self._parentPage ? self._parentPage.parent() : self.element.parent(); - self._modal = $("") + self._modal = $("") .on("mousedown", function () { self.close(); }) @@ -167,16 +153,16 @@ }, _getPage: function () { - var page = this._openedPage || this._parentPage || $("." + $.mobile.activePageClass); + var page = this._openedPage || this._parentPage || $(".ui-page-active"); return page; }, _getWrapper: function () { - var wrapper = this._page().find("." + this.options.classes.pageWrapper); + var wrapper = this._page().find("." + "ui-panel-wrapper"); if (wrapper.length === 0) { wrapper = this._page().children(".ui-header:not(.ui-header-fixed), .ui-content:not(.ui-popup), .ui-footer:not(.ui-footer-fixed)") - .wrapAll("") + .wrapAll("") .parent(); } @@ -184,17 +170,17 @@ }, _getPosDisplayClasses: function (prefix) { - return prefix + "-position-" + this.options.position + " " + prefix + "-display-" + this.options.display; + return prefix + "-position-right " + prefix + "-display-" + this.options.display; }, _getPanelClasses: function () { - var panelClasses = this.options.classes.panel + - " " + this._getPosDisplayClasses(this.options.classes.panel) + - " " + this.options.classes.panelClosed + + var panelClasses = "ui-panel" + + " " + this._getPosDisplayClasses("ui-panel") + + " " + "ui-panel-closed" + " " + "ui-body-" + (this.options.theme ? this.options.theme : "inherit"); if (!!this.options.positionFixed) { - panelClasses += " " + this.options.classes.panelFixed; + panelClasses += " " + "ui-panel-fixed"; } return panelClasses; @@ -239,14 +225,14 @@ }, _unfixPanel: function () { - if (!!this.options.positionFixed && $.support.fixedPosition) { - this.element.removeClass(this.options.classes.panelFixed); + if (!!this.options.positionFixed) { + this.element.removeClass("ui-panel-fixed"); } }, _fixPanel: function () { - if (!!this.options.positionFixed && $.support.fixedPosition) { - this.element.addClass(this.options.classes.panelFixed); + if (!!this.options.positionFixed) { + this.element.addClass("ui-panel-fixed"); } }, @@ -355,10 +341,10 @@ _openPanel = function () { self._off(self.document, "panelclose"); - self._page().jqmData("panel", "open"); + self._page().data("panel", "open"); if (!!o.animate && o.display !== "overlay") { - self._wrapper.addClass(o.classes.animate); + self._wrapper.addClass("ui-panel-animate"); } if (!immediate && !!o.animate) { @@ -370,23 +356,23 @@ if (o.theme && o.display !== "overlay") { self._page().parent() - .addClass(o.classes.pageContainer + "-themed " + o.classes.pageContainer + "-" + o.theme); + .addClass("ui-panel-page-container" + "-themed " + "ui-panel-page-container" + "-" + o.theme); } self.element - .removeClass(o.classes.panelClosed) - .addClass(o.classes.panelOpen); + .removeClass("ui-panel-closed") + .addClass("ui-panel-open"); self._positionPanel(true); - self._pageContentOpenClasses = self._getPosDisplayClasses(o.classes.pageContentPrefix); + self._pageContentOpenClasses = self._getPosDisplayClasses("ui-panel-page-content"); if (o.display !== "overlay") { - self._page().parent().addClass(o.classes.pageContainer); + self._page().parent().addClass("ui-panel-page-container"); self._wrapper.addClass(self._pageContentOpenClasses); } - self._modalOpenClasses = self._getPosDisplayClasses(o.classes.modal) + " " + o.classes.modalOpen; + self._modalOpenClasses = self._getPosDisplayClasses("ui-panel-dismiss") + " " + "ui-panel-dismiss-open"; if (self._modal) { self._modal .addClass(self._modalOpenClasses) @@ -401,7 +387,7 @@ } if (o.display !== "overlay") { - self._wrapper.addClass(o.classes.pageContentPrefix + "-open"); + self._wrapper.addClass("ui-panel-page-content" + "-open"); } self._bindFixListener(); @@ -413,7 +399,7 @@ self._trigger("beforeopen"); - if (self._page().jqmData("panel") === "open") { + if (self._page().data("panel") === "open") { self._on(self.document, { "panelclose": _openPanel }); @@ -432,7 +418,7 @@ _closePanel = function () { - self.element.removeClass(o.classes.panelOpen); + self.element.removeClass("ui-panel-open"); if (o.display !== "overlay") { self._wrapper.removeClass(self._pageContentOpenClasses); @@ -453,24 +439,24 @@ }, complete = function () { if (o.theme && o.display !== "overlay") { - self._page().parent().removeClass(o.classes.pageContainer + "-themed " + o.classes.pageContainer + "-" + o.theme); + self._page().parent().removeClass("ui-panel-page-container" + "-themed " + "ui-panel-page-container" + "-" + o.theme); } - self.element.addClass(o.classes.panelClosed); + self.element.addClass("ui-panel-closed"); if (o.display !== "overlay") { - self._page().parent().removeClass(o.classes.pageContainer); - self._wrapper.removeClass(o.classes.pageContentPrefix + "-open"); + self._page().parent().removeClass("ui-panel-page-container"); + self._wrapper.removeClass("ui-panel-page-content" + "-open"); } if (!!o.animate && o.display !== "overlay") { - self._wrapper.removeClass(o.classes.animate); + self._wrapper.removeClass("ui-panel-animate"); } self._fixPanel(); self._unbindFixListener(); - self._page().jqmRemoveData("panel"); + self._page().removeData("panel"); self._trigger("close"); @@ -504,10 +490,10 @@ if (this._open) { - this._page().parent().removeClass(o.classes.pageContainer); + this._page().parent().removeClass("ui-panel-page-container"); if (o.theme) { - this._page().parent().removeClass(o.classes.pageContainer + "-themed " + o.classes.pageContainer + "-" + o.theme); + this._page().parent().removeClass("ui-panel-page-container" + "-themed " + "ui-panel-page-container" + "-" + o.theme); } } } @@ -519,13 +505,13 @@ } if (this._open) { - this._page().jqmRemoveData("panel"); + this._page().removeData("panel"); } this._panelInner.children().unwrap(); this.element - .removeClass([this._getPanelClasses(), o.classes.panelOpen, o.classes.animate].join(" ")) + .removeClass([this._getPanelClasses(), "ui-panel-open", "ui-panel-animate"].join(" ")) .off("swipeleft.panel swiperight.panel") .off("panelbeforeopen") .off("panelhide") diff --git a/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.popup.js b/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.popup.js index 07debfe022..d6a47c187c 100644 --- a/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.popup.js +++ b/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.popup.js @@ -894,7 +894,7 @@ if (typeof data.toPage === "string") { parsedDst = data.toPage; } else { - parsedDst = data.toPage.jqmData("url"); + parsedDst = data.toPage.data("url"); } parsedDst = $.mobile.path.parseUrl(parsedDst); toUrl = parsedDst.pathname + parsedDst.search + parsedDst.hash; @@ -1030,8 +1030,8 @@ popup.popup("open", { x: offset.left + $link.outerWidth() / 2, y: offset.top + $link.outerHeight() / 2, - transition: $link.jqmData("transition"), - positionTo: $link.jqmData("position-to") + transition: $link.data("transition"), + positionTo: $link.data("position-to") }); } @@ -1042,7 +1042,7 @@ }; // TODO move inside _create - $.mobile.document.on("pagebeforechange", function (theEvent, data) { + $(document).on("pagebeforechange", function (theEvent, data) { if (data.options.role === "popup") { $.mobile.popup.handleLink(data.options.link); theEvent.preventDefault(); diff --git a/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.slider.js b/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.slider.js index 61e55119a1..d36632ebf2 100644 --- a/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.slider.js +++ b/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.slider.js @@ -1,4 +1,41 @@ -(function ($, undefined) { +(function ($, window, undefined) { + var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/; + + $.extend($.mobile, { + + // Namespace used framework-wide for data-attrs. Default is no namespace + + // Retrieve an attribute from an element and perform some massaging of the value + + getAttribute: function (element, key) { + var data; + + element = element.jquery ? element[0] : element; + + if (element && element.getAttribute) { + data = element.getAttribute("data-" + key); + } + + // Copied from core's src/data.js:dataAttr() + // Convert from a string to a proper data type + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test(data) ? JSON.parse(data) : + data; + } catch (err) { } + + return data; + } + + }); + +})(jQuery, this); + +(function ($, undefined) { /*! * jQuery UI Core c0ab71056b936627e8a7821f03c044aec6280a40 @@ -63,8 +100,8 @@ control = this.element, trackTheme = this.options.trackTheme || $.mobile.getAttribute(control[0], "theme"), trackThemeClass = trackTheme ? " ui-bar-" + trackTheme : " ui-bar-inherit", - cornerClass = (this.options.corners || control.jqmData("corners")) ? " ui-corner-all" : "", - miniClass = (this.options.mini || control.jqmData("mini")) ? " ui-mini" : "", + cornerClass = (this.options.corners || control.data("corners")) ? " ui-corner-all" : "", + miniClass = (this.options.mini || control.data("mini")) ? " ui-mini" : "", cType = control[0].nodeName.toLowerCase(), isToggleSwitch = (cType === "select"), isRangeslider = control.parent().is(":jqmData(role='rangeslider')"), diff --git a/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.table.js b/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.table.js index b194ec764f..40721ffa71 100644 --- a/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.table.js +++ b/dashboard-ui/thirdparty/jquerymobile-1.4.5/jqm.table.js @@ -1,16 +1,50 @@ -(function ($, undefined) { +(function ($, window, undefined) { + var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/; + + $.extend($.mobile, { + + // Namespace used framework-wide for data-attrs. Default is no namespace + + // Retrieve an attribute from an element and perform some massaging of the value + + getAttribute: function (element, key) { + var data; + + element = element.jquery ? element[0] : element; + + if (element && element.getAttribute) { + data = element.getAttribute("data-" + key); + } + + // Copied from core's src/data.js:dataAttr() + // Convert from a string to a proper data type + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test(data) ? JSON.parse(data) : + data; + } catch (err) { } + + return data; + } + + }); + +})(jQuery, this); + +(function ($, undefined) { $.widget("mobile.table", { options: { - classes: { - table: "ui-table" - }, enhanced: false }, _create: function () { if (!this.options.enhanced) { - this.element.addClass(this.options.classes.table); + this.element.addClass("ui-table"); } // extend here, assign on refresh > _setHeaders @@ -58,7 +92,7 @@ selector = ":nth-child(" + (columnCount + 1) + ")", j; - this.setAttribute("data-" + $.mobile.ns + "colstart", columnCount + 1); + this.setAttribute("data-colstart", columnCount + 1); if (span) { for (j = 0; j < span - 1; j++) { @@ -69,7 +103,7 @@ // Store "cells" data on header as a reference to all cells in the // same column as this TH - $(this).jqmData("cells", table.find("tr").not(trs.eq(0)).not(this).children(selector)); + $(this).data("cells", table.find("tr").not(trs.eq(0)).not(this).children(selector)); columnCount++; }); @@ -84,11 +118,7 @@ $.widget("mobile.table", $.mobile.table, { options: { - mode: "reflow", - classes: $.extend($.mobile.table.prototype.options.classes, { - reflowTable: "ui-table-reflow", - cellLabels: "ui-table-cell-label" - }) + mode: "reflow" }, _create: function () { @@ -100,7 +130,7 @@ } if (!this.options.enhanced) { - this.element.addClass(this.options.classes.reflowTable); + this.element.addClass("ui-table-reflow"); this._updateReflow(); } @@ -127,7 +157,7 @@ // get headers in reverse order so that top-level headers are appended last $(table.allHeaders.get().reverse()).each(function () { - var cells = $(this).jqmData("cells"), + var cells = $(this).data("cells"), colstart = $.mobile.getAttribute(this, "colstart"), hierarchyClass = cells.not(this).filter("thead th").length && " ui-table-cell-label-top", contents = $(this).clone().contents(), @@ -144,9 +174,9 @@ } table._addLabels(cells.filter(filter), - opts.classes.cellLabels + hierarchyClass, contents); + "ui-table-cell-label" + hierarchyClass, contents); } else { - table._addLabels(cells, opts.classes.cellLabels, contents); + table._addLabels(cells, "ui-table-cell-label", contents); } } diff --git a/dashboard-ui/thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.js b/dashboard-ui/thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.js index 4bc347110a..4943069a9a 100644 --- a/dashboard-ui/thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.js +++ b/dashboard-ui/thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.js @@ -20,84 +20,6 @@ * http://benalman.com/about/license/ */ - // Script: jQuery hashchange event - // - // *Version: 1.3, Last updated: 7/21/2010* - // - // Project Home - http://benalman.com/projects/jquery-hashchange-plugin/ - // GitHub - http://github.com/cowboy/jquery-hashchange/ - // Source - http://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.js - // (Minified) - http://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.min.js (0.8kb gzipped) - // - // About: License - // - // Copyright (c) 2010 "Cowboy" Ben Alman, - // Dual licensed under the MIT and GPL licenses. - // http://benalman.com/about/license/ - // - // About: Examples - // - // These working examples, complete with fully commented code, illustrate a few - // ways in which this plugin can be used. - // - // hashchange event - http://benalman.com/code/projects/jquery-hashchange/examples/hashchange/ - // document.domain - http://benalman.com/code/projects/jquery-hashchange/examples/document_domain/ - // - // About: Support and Testing - // - // Information about what version or versions of jQuery this plugin has been - // tested with, what browsers it has been tested in, and where the unit tests - // reside (so you can test it yourself). - // - // jQuery Versions - 1.2.6, 1.3.2, 1.4.1, 1.4.2 - // Browsers Tested - Internet Explorer 6-8, Firefox 2-4, Chrome 5-6, Safari 3.2-5, - // Opera 9.6-10.60, iPhone 3.1, Android 1.6-2.2, BlackBerry 4.6-5. - // Unit Tests - http://benalman.com/code/projects/jquery-hashchange/unit/ - // - // About: Known issues - // - // While this jQuery hashchange event implementation is quite stable and - // robust, there are a few unfortunate browser bugs surrounding expected - // hashchange event-based behaviors, independent of any JavaScript - // window.onhashchange abstraction. See the following examples for more - // information: - // - // Chrome: Back Button - http://benalman.com/code/projects/jquery-hashchange/examples/bug-chrome-back-button/ - // Firefox: Remote XMLHttpRequest - http://benalman.com/code/projects/jquery-hashchange/examples/bug-firefox-remote-xhr/ - // WebKit: Back Button in an Iframe - http://benalman.com/code/projects/jquery-hashchange/examples/bug-webkit-hash-iframe/ - // Safari: Back Button from a different domain - http://benalman.com/code/projects/jquery-hashchange/examples/bug-safari-back-from-diff-domain/ - // - // Also note that should a browser natively support the window.onhashchange - // event, but not report that it does, the fallback polling loop will be used. - // - // About: Release History - // - // 1.3 - (7/21/2010) Reorganized IE6/7 Iframe code to make it more - // "removable" for mobile-only development. Added IE6/7 document.title - // support. Attempted to make Iframe as hidden as possible by using - // techniques from http://www.paciellogroup.com/blog/?p=604. Added - // support for the "shortcut" format $(window).hashchange( fn ) and - // $(window).hashchange() like jQuery provides for built-in events. - // Renamed jQuery.hashchangeDelay to