mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 10:58:20 -07:00
update menus
This commit is contained in:
parent
aa7ea8891c
commit
02b433a97f
@ -568,7 +568,7 @@ To change the drawer container when it's in the right side:
|
||||
if (this.rightDrawer) {
|
||||
this[xDirection ? 'closeDrawer' : 'openDrawer']();
|
||||
} else {
|
||||
this[xDirection ? 'openDrawer' : 'closeDrawer']();
|
||||
this[xDirection || event.detail.dx > -80 ? 'openDrawer' : 'closeDrawer']();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -555,7 +555,8 @@ prevent = dy > dx;
|
||||
prevent = dx > dy;
|
||||
}
|
||||
if (prevent) {
|
||||
ev.preventDefault();
|
||||
//This breaks scrolling in safari
|
||||
//ev.preventDefault();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
BIN
dashboard-ui/css/images/splash720.jpg
Normal file
BIN
dashboard-ui/css/images/splash720.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
@ -41,12 +41,18 @@
|
||||
position: static !important;
|
||||
width: auto !important;
|
||||
height: auto !important;
|
||||
touch-action: auto !important;
|
||||
}
|
||||
|
||||
.mainDrawerPanelPreInit #drawer {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.mainDrawerPanelPreInit #main {
|
||||
left: 0 !important;
|
||||
position: static !important;
|
||||
}
|
||||
|
||||
.mainDrawerPanel #drawer {
|
||||
z-index: 1000 !important;
|
||||
position: fixed !important;
|
||||
@ -55,6 +61,8 @@
|
||||
overflow-y: auto !important;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overflow-x: hidden;
|
||||
/* Need to reset this because it causes the entire panel to be draggable in safari */
|
||||
box-sizing: initial !important;
|
||||
}
|
||||
|
||||
.mainDrawerPanel #main {
|
||||
@ -62,6 +70,13 @@
|
||||
position: static !important;
|
||||
}
|
||||
|
||||
.mainDrawerPanel #scrim {
|
||||
/* Give it at least something to make it visible */
|
||||
z-index: 1000;
|
||||
/* It defaults to absolute, not visible after scrolling */
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
.mainDrawer {
|
||||
height: auto !important;
|
||||
border-right: 1px solid #e0e0e0;
|
||||
@ -290,7 +305,7 @@
|
||||
}
|
||||
|
||||
.drawerUserPanel {
|
||||
background: url(images/splash.jpg);
|
||||
background: url(images/splash720.jpg);
|
||||
background-size: cover;
|
||||
background-position: center center;
|
||||
margin-bottom: 1em;
|
||||
@ -300,7 +315,7 @@
|
||||
}
|
||||
|
||||
.drawerUserPanelInner {
|
||||
background-color: rgba(0, 0, 0, .75);
|
||||
background-color: rgba(0, 0, 0, .70);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
@ -325,7 +340,7 @@
|
||||
|
||||
.drawerUserPanelUserName {
|
||||
padding-top: 1.5em;
|
||||
padding-left: .25em;
|
||||
padding-left: .35em;
|
||||
}
|
||||
|
||||
.libraryDocument .dashboardDrawerContent {
|
||||
|
63
dashboard-ui/css/materialize.css
vendored
63
dashboard-ui/css/materialize.css
vendored
@ -61,52 +61,6 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn-floating {
|
||||
-webkit-border-radius: 2px;
|
||||
-moz-border-radius: 2px;
|
||||
text-transform: uppercase;
|
||||
border: none;
|
||||
outline: 0;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
margin-bottom: 15px;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
width: 37px;
|
||||
height: 37px;
|
||||
line-height: 37px;
|
||||
padding: 0;
|
||||
background-color: #2196F3;
|
||||
-webkit-border-radius: 50%;
|
||||
-moz-border-radius: 50%;
|
||||
border-radius: 50%;
|
||||
background-clip: padding-box;
|
||||
-webkit-transition: 0.3s;
|
||||
-moz-transition: 0.3s;
|
||||
-o-transition: 0.3s;
|
||||
-ms-transition: 0.3s;
|
||||
transition: 0.3s;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn-floating i {
|
||||
width: inherit;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
color: #FFF;
|
||||
font-size: 1.6rem;
|
||||
line-height: 37px;
|
||||
}
|
||||
|
||||
.btn-floating.btn-floating-large {
|
||||
width: 55.5px;
|
||||
height: 55.5px;
|
||||
}
|
||||
|
||||
.btn-floating.btn-floating-large i {
|
||||
line-height: 55.5px;
|
||||
}
|
||||
|
||||
.btn-flat {
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
@ -170,23 +124,6 @@
|
||||
font-family: Roboto !important;
|
||||
}
|
||||
|
||||
.btnSmall {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.btnCancel {
|
||||
background-color: #444;
|
||||
}
|
||||
|
||||
.ui-page-theme-a .btnCancel {
|
||||
background-color: #e8e8e8;
|
||||
color: #333 !important;
|
||||
}
|
||||
|
||||
.ui-page-theme-a .btnCancel i {
|
||||
color: #666 !important;
|
||||
}
|
||||
|
||||
.btn-inline {
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
|
@ -316,6 +316,11 @@ body {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
/* Without this, no content will be displayed in mobile safari */
|
||||
.pageContainer {
|
||||
overflow-x: visible !important;
|
||||
}
|
||||
|
||||
.bodyWithPopupOpen {
|
||||
overflow-y: hidden !important;
|
||||
}
|
||||
@ -712,7 +717,7 @@ h1 .imageLink {
|
||||
|
||||
.sidebarLinkIcon {
|
||||
font-size: 20px;
|
||||
width: 72px!important;
|
||||
width: 72px !important;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
color: #7f7f7f;
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>Emby</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="liveTvChannelPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvcomponents,scripts/livetvchannel,paperbuttonstyle">
|
||||
<div id="liveTvChannelPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvcomponents,scripts/livetvchannel,paperbuttonstyle,livetvcss">
|
||||
<div class="libraryViewNav">
|
||||
<a href="livetvsuggested.html"><i class="material-icons">info</i>${TabSuggestions}</a>
|
||||
<a href="livetvguide.html"><i class="material-icons">grid_on</i>${TabGuide}</a>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>Emby</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="liveTvChannelsPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvchannels">
|
||||
<div id="liveTvChannelsPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvchannels,livetvcss">
|
||||
<div class="libraryViewNav">
|
||||
<a href="livetvsuggested.html"><i class="material-icons">info</i>${TabSuggestions}</a>
|
||||
<a href="livetvguide.html"><i class="material-icons">grid_on</i>${TabGuide}</a>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>Emby</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="liveTvGuidePage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/registrationservices,scripts/livetvcomponents,scripts/livetvguide,paperbuttonstyle">
|
||||
<div id="liveTvGuidePage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/registrationservices,scripts/livetvcomponents,scripts/livetvguide,paperbuttonstyle,livetvcss">
|
||||
<div class="libraryViewNav">
|
||||
<a href="livetvsuggested.html"><i class="material-icons">info</i>${TabSuggestions}</a>
|
||||
<a href="livetvguide.html" class="ui-btn-active"><i class="material-icons">grid_on</i>${TabGuide}</a>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>Emby</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="liveTvItemsPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvitems,scripts/queryfilters">
|
||||
<div id="liveTvItemsPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvitems,scripts/queryfilters,livetvcss">
|
||||
<div class="libraryViewNav">
|
||||
<a href="livetvsuggested.html" class="ui-btn-active"><i class="material-icons">info</i>${TabSuggestions}</a>
|
||||
<a href="livetvguide.html"><i class="material-icons">grid_on</i>${TabGuide}</a>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>Emby</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="liveTvNewRecordingPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvcomponents,scripts/livetvnewrecording">
|
||||
<div id="liveTvNewRecordingPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvcomponents,scripts/livetvnewrecording,livetvcss">
|
||||
<div class="libraryViewNav">
|
||||
<a href="livetvsuggested.html"><i class="material-icons">info</i>${TabSuggestions}</a>
|
||||
<a href="livetvguide.html"><i class="material-icons">grid_on</i>${TabGuide}</a>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>Emby</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="liveTvProgramPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvcomponents,scripts/livetvprogram">
|
||||
<div id="liveTvProgramPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvcomponents,scripts/livetvprogram,livetvcss">
|
||||
<div class="libraryViewNav">
|
||||
<a href="livetvsuggested.html"><i class="material-icons">info</i>${TabSuggestions}</a>
|
||||
<a href="livetvguide.html"><i class="material-icons">grid_on</i>${TabGuide}</a>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>Emby</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="liveTvRecordingPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvcomponents,scripts/livetvrecording,paperbuttonstyle">
|
||||
<div id="liveTvRecordingPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvcomponents,scripts/livetvrecording,paperbuttonstyle,livetvcss">
|
||||
<div class="libraryViewNav">
|
||||
<a href="livetvsuggested.html"><i class="material-icons">info</i>${TabSuggestions}</a>
|
||||
<a href="livetvguide.html"><i class="material-icons">grid_on</i>${TabGuide}</a>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>Emby</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="liveTvRecordingListPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvrecordinglist">
|
||||
<div id="liveTvRecordingListPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvrecordinglist,livetvcss">
|
||||
<div class="libraryViewNav">
|
||||
<a href="livetvsuggested.html"><i class="material-icons">info</i>${TabSuggestions}</a>
|
||||
<a href="livetvguide.html"><i class="material-icons">grid_on</i>${TabGuide}</a>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>Emby</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="liveTvRecordingsPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvrecordings,paperbuttonstyle">
|
||||
<div id="liveTvRecordingsPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvrecordings,paperbuttonstyle,livetvcss">
|
||||
|
||||
<div class="libraryViewNav">
|
||||
<a href="livetvsuggested.html"><i class="material-icons">info</i>${TabSuggestions}</a>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>Emby</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="liveTvSeriesTimerPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvcomponents,scripts/livetvseriestimer">
|
||||
<div id="liveTvSeriesTimerPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvcomponents,scripts/livetvseriestimer,livetvcss">
|
||||
<div class="libraryViewNav">
|
||||
<a href="livetvsuggested.html"><i class="material-icons">info</i>${TabSuggestions}</a>
|
||||
<a href="livetvguide.html"><i class="material-icons">grid_on</i>${TabGuide}</a>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>Emby</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="liveTvSeriesTimersPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvseriestimers">
|
||||
<div id="liveTvSeriesTimersPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvseriestimers,livetvcss">
|
||||
<div class="libraryViewNav">
|
||||
<a href="livetvsuggested.html"><i class="material-icons">info</i>${TabSuggestions}</a>
|
||||
<a href="livetvguide.html"><i class="material-icons">grid_on</i>${TabGuide}</a>
|
||||
@ -17,7 +17,7 @@
|
||||
<div style="max-width: 600px; margin: 0 auto;">
|
||||
|
||||
<div style="text-align: right;">
|
||||
<button data-mini="true" data-icon="sort" data-inline="true" onclick="$('#sortPanel', $(this).parents('.page')).panel( 'toggle' );">${ButtonSort}</button>
|
||||
<button data-mini="true" data-inline="true" onclick="$('#sortPanel', $(this).parents('.page')).panel( 'toggle' );">${ButtonSort}</button>
|
||||
</div>
|
||||
|
||||
<div id="items"></div>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>Emby</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="liveTvSuggestedPage" data-role="page" class="page libraryPage liveTvPage backdropPage globalBackdropPage" data-contextname="${HeaderLiveTv}" data-backdroptype="series,movie" data-require="scripts/livetvsuggested,paperbuttonstyle">
|
||||
<div id="liveTvSuggestedPage" data-role="page" class="page libraryPage liveTvPage backdropPage globalBackdropPage" data-contextname="${HeaderLiveTv}" data-backdroptype="series,movie" data-require="scripts/livetvsuggested,paperbuttonstyle,livetvcss">
|
||||
|
||||
<div class="libraryViewNav">
|
||||
<a href="#" class="ui-btn-active"><i class="material-icons">info</i>${TabSuggestions}</a>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>Emby</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="liveTvTimerPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvcomponents,scripts/livetvtimer">
|
||||
<div id="liveTvTimerPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvcomponents,scripts/livetvtimer,livetvcss">
|
||||
<div class="libraryViewNav">
|
||||
<a href="livetvsuggested.html"><i class="material-icons">info</i>${TabSuggestions}</a>
|
||||
<a href="livetvguide.html"><i class="material-icons">grid_on</i>${TabGuide}</a>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>Emby</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="liveTvTimersPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvtimers">
|
||||
<div id="liveTvTimersPage" data-role="page" class="page libraryPage liveTvPage" data-contextname="${HeaderLiveTv}" data-require="scripts/livetvtimers,livetvcss">
|
||||
<div class="libraryViewNav">
|
||||
<a href="livetvsuggested.html"><i class="material-icons">info</i>${TabSuggestions}</a>
|
||||
<a href="livetvguide.html"><i class="material-icons">grid_on</i>${TabGuide}</a>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>${TitleMetadata}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="metadataConfigurationPage" data-role="page" class="page type-interior metadataConfigurationPage" data-require="scripts/metadataconfigurationpage">
|
||||
<div id="metadataConfigurationPage" data-role="page" class="page type-interior metadataConfigurationPage" data-require="scripts/metadataconfigurationpage,paperbuttonstyle">
|
||||
|
||||
<div data-role="content">
|
||||
|
||||
@ -46,12 +46,11 @@
|
||||
<select name="selectCountry" id="selectCountry" data-mini="true" required="required"></select>
|
||||
</li>
|
||||
<li>
|
||||
<button type="submit" data-theme="b" data-icon="check" data-mini="true">
|
||||
${ButtonSave}
|
||||
</button>
|
||||
<button type="button" onclick="Dashboard.navigate('dashboard.html');" data-icon="delete" data-mini="true">
|
||||
${ButtonCancel}
|
||||
<button type="submit" data-role="none" class="clearButton">
|
||||
<paper-button raised class="submit block"><iron-icon icon="check"></iron-icon><span>${ButtonSave}</span></paper-button>
|
||||
</button>
|
||||
|
||||
<paper-button raised class="cancel block btnCancel" onclick="history.back();"><iron-icon icon="close"></iron-icon><span>${ButtonCancel}</span></paper-button>
|
||||
</li>
|
||||
</ul>
|
||||
</form>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>${TitleMetadata}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="advancedMetadataConfigurationPage" data-role="page" class="page type-interior metadataConfigurationPage" data-require="scripts/metadataadvanced">
|
||||
<div id="advancedMetadataConfigurationPage" data-role="page" class="page type-interior metadataConfigurationPage" data-require="scripts/metadataadvanced,paperbuttonstyle">
|
||||
|
||||
<div data-role="content">
|
||||
|
||||
@ -171,12 +171,11 @@
|
||||
<br /><br />
|
||||
<ul data-role="listview" class="ulForm">
|
||||
<li>
|
||||
<button type="submit" data-theme="b" data-icon="check" data-mini="true">
|
||||
${ButtonSave}
|
||||
</button>
|
||||
<button type="button" onclick="Dashboard.navigate('dashboard.html');" data-icon="delete" data-mini="true">
|
||||
${ButtonCancel}
|
||||
<button type="submit" data-role="none" class="clearButton">
|
||||
<paper-button raised class="submit block"><iron-icon icon="check"></iron-icon><span>${ButtonSave}</span></paper-button>
|
||||
</button>
|
||||
|
||||
<paper-button raised class="cancel block btnCancel" onclick="history.back();"><iron-icon icon="close"></iron-icon><span>${ButtonCancel}</span></paper-button>
|
||||
</li>
|
||||
</ul>
|
||||
</form>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>${TitleMetadata}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="metadataImagesConfigurationPage" data-role="page" class="page type-interior metadataConfigurationPage" data-require="scripts/metadataimagespage">
|
||||
<div id="metadataImagesConfigurationPage" data-role="page" class="page type-interior metadataConfigurationPage" data-require="scripts/metadataimagespage,paperbuttonstyle">
|
||||
|
||||
<div data-role="content">
|
||||
|
||||
@ -118,12 +118,11 @@
|
||||
<br />
|
||||
<ul data-role="listview" class="ulForm">
|
||||
<li>
|
||||
<button type="submit" data-theme="b" data-icon="check" data-mini="true">
|
||||
${ButtonSave}
|
||||
</button>
|
||||
<button type="button" onclick="Dashboard.navigate('dashboard.html');" data-icon="delete" data-mini="true">
|
||||
${ButtonCancel}
|
||||
<button type="submit" data-role="none" class="clearButton">
|
||||
<paper-button raised class="submit block"><iron-icon icon="check"></iron-icon><span>${ButtonSave}</span></paper-button>
|
||||
</button>
|
||||
|
||||
<paper-button raised class="cancel block btnCancel" onclick="history.back();"><iron-icon icon="close"></iron-icon><span>${ButtonCancel}</span></paper-button>
|
||||
</li>
|
||||
</ul>
|
||||
</form>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>${TitleMetadata}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="metadataNfoPage" data-role="page" class="page type-interior metadataConfigurationPage" data-require="scripts/metadatanfo">
|
||||
<div id="metadataNfoPage" data-role="page" class="page type-interior metadataConfigurationPage" data-require="scripts/metadatanfo,paperbuttonstyle">
|
||||
|
||||
<div data-role="content">
|
||||
|
||||
@ -58,12 +58,11 @@
|
||||
<br />
|
||||
<ul data-role="listview" class="ulForm">
|
||||
<li>
|
||||
<button type="submit" data-theme="b" data-icon="check" data-mini="true">
|
||||
${ButtonSave}
|
||||
</button>
|
||||
<button type="button" onclick="Dashboard.navigate('dashboard.html');" data-icon="delete" data-mini="true">
|
||||
${ButtonCancel}
|
||||
<button type="submit" data-role="none" class="clearButton">
|
||||
<paper-button raised class="submit block"><iron-icon icon="check"></iron-icon><span>${ButtonSave}</span></paper-button>
|
||||
</button>
|
||||
|
||||
<paper-button raised class="cancel block btnCancel" onclick="history.back();"><iron-icon icon="close"></iron-icon><span>${ButtonCancel}</span></paper-button>
|
||||
</li>
|
||||
</ul>
|
||||
</form>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>${TitleMetadata}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="metadataSubtitlesPage" data-role="page" class="page type-interior metadataConfigurationPage" data-require="scripts/metadatasubtitles">
|
||||
<div id="metadataSubtitlesPage" data-role="page" class="page type-interior metadataConfigurationPage" data-require="scripts/metadatasubtitles,paperbuttonstyle">
|
||||
|
||||
<div data-role="content">
|
||||
|
||||
@ -58,12 +58,11 @@
|
||||
</ul>
|
||||
<ul data-role="listview" class="ulForm">
|
||||
<li>
|
||||
<button type="submit" data-theme="b" data-icon="check" data-mini="true">
|
||||
${ButtonSave}
|
||||
</button>
|
||||
<button type="button" onclick="Dashboard.navigate('dashboard.html');" data-icon="delete" data-mini="true">
|
||||
${ButtonCancel}
|
||||
<button type="submit" data-role="none" class="clearButton">
|
||||
<paper-button raised class="submit block"><iron-icon icon="check"></iron-icon><span>${ButtonSave}</span></paper-button>
|
||||
</button>
|
||||
|
||||
<paper-button raised class="cancel block btnCancel" onclick="history.back();"><iron-icon icon="close"></iron-icon><span>${ButtonCancel}</span></paper-button>
|
||||
</li>
|
||||
</ul>
|
||||
</form>
|
||||
|
@ -775,7 +775,7 @@
|
||||
|
||||
html += "<span style='color:#009F00;margin-left:5px;margin-right:5px;'>" + progress + "%</span>";
|
||||
|
||||
html += '<button type="button" data-icon="stop" data-iconpos="notext" data-inline="true" data-mini="true" onclick="DashboardPage.stopTask(\'' + task.Id + '\');">' + Globalize.translate('ButtonStop') + '</button>';
|
||||
html += '<button type="button" data-icon="delete" data-iconpos="notext" data-inline="true" data-mini="true" onclick="DashboardPage.stopTask(\'' + task.Id + '\');">' + Globalize.translate('ButtonStop') + '</button>';
|
||||
}
|
||||
else if (task.State == "Cancelling") {
|
||||
html += '<span style="color:#cc0000;">' + Globalize.translate('LabelStopping') + '</span>';
|
||||
|
@ -40,7 +40,7 @@
|
||||
}
|
||||
|
||||
if (!$.browser.mobile && !AppInfo.isNativeApp) {
|
||||
html += '<a href="dashboard.html" class="headerButton headerButtonRight dashboardEntryHeaderButton hide"><i class="material-icons">settings</i></a>';
|
||||
html += '<a href="dashboard.html" class="headerButton headerButtonRight dashboardEntryHeaderButton hide" onclick="LibraryMenu.onLinkClicked(this);return false;"><i class="material-icons">settings</i></a>';
|
||||
//html += '<a href="dashboard.html" class="headerButton headerButtonRight dashboardEntryHeaderButton clearLink" style="display:none;"><paper-icon-button icon="settings"></paper-icon-button></a>';
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@
|
||||
if (AppInfo.isTouchPreferred) {
|
||||
|
||||
if ('ontouchend' in document) {
|
||||
$('.mainDrawerButton').on('touchend', openMainDrawer);
|
||||
$('.mainDrawerButton').on('touchend click', openMainDrawer);
|
||||
} else {
|
||||
$('.mainDrawerButton').on('click', openMainDrawer);
|
||||
}
|
||||
@ -277,18 +277,18 @@
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
|
||||
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="remote" href="index.html"><iron-icon icon="home" class="sidebarLinkIcon" style="color:#2196F3;"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonHome') + '</span></a>';
|
||||
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="remote" href="index.html" onclick="LibraryMenu.onLinkClicked(this);return false;"><iron-icon icon="home" class="sidebarLinkIcon" style="color:#2196F3;"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonHome') + '</span></a>';
|
||||
|
||||
} else {
|
||||
html += '<div style="margin-top:5px;"></div>';
|
||||
|
||||
html += '<a class="lnkMediaFolder sidebarLink" href="' + homeHref + '">';
|
||||
html += '<a class="lnkMediaFolder sidebarLink" href="' + homeHref + '" onclick="LibraryMenu.onLinkClicked(this);return false;">';
|
||||
html += '<div class="lazy" data-src="css/images/mblogoicon.png" style="width:' + 28 + 'px;height:' + 28 + 'px;background-size:contain;background-repeat:no-repeat;background-position:center center;border-radius:1000px;vertical-align:middle;margin:0 1.6em 0 1.5em;display:inline-block;"></div>';
|
||||
html += Globalize.translate('ButtonHome');
|
||||
html += '</a>';
|
||||
}
|
||||
|
||||
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="remote" href="nowplaying.html"><iron-icon icon="tablet-android" class="sidebarLinkIcon" style="color:#673AB7;"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonRemote') + '</span></a>';
|
||||
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="remote" href="nowplaying.html" onclick="LibraryMenu.onLinkClicked(this);return false;"><iron-icon icon="tablet-android" class="sidebarLinkIcon" style="color:#673AB7;"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonRemote') + '</span></a>';
|
||||
|
||||
$('.userheader', drawer).html(html).lazyChildren();
|
||||
}
|
||||
@ -328,33 +328,33 @@
|
||||
html += '</div>';
|
||||
|
||||
html += '<a class="sidebarLink lnkMediaFolder lnkManageServer" data-itemid="dashboard" href="#"><iron-icon icon="dashboard" class="sidebarLinkIcon"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonManageServer') + '</span></a>';
|
||||
html += '<a class="sidebarLink lnkMediaFolder editorViewMenu" data-itemid="editor" href="edititemmetadata.html"><iron-icon icon="mode-edit" class="sidebarLinkIcon"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonMetadataManager') + '</span></a>';
|
||||
html += '<a class="sidebarLink lnkMediaFolder editorViewMenu" data-itemid="editor" onclick="LibraryMenu.onLinkClicked(this);return false;" href="edititemmetadata.html"><iron-icon icon="mode-edit" class="sidebarLinkIcon"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonMetadataManager') + '</span></a>';
|
||||
|
||||
if (!$.browser.mobile && !AppInfo.isTouchPreferred) {
|
||||
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="reports" href="reports.html"><iron-icon icon="insert-chart" class="sidebarLinkIcon"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonReports') + '</span></a>';
|
||||
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="reports" onclick="LibraryMenu.onLinkClicked(this);return false;" href="reports.html"><iron-icon icon="insert-chart" class="sidebarLinkIcon"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonReports') + '</span></a>';
|
||||
}
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="userMenuOptions">';
|
||||
html += '<div class="sidebarDivider"></div>';
|
||||
|
||||
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="inbox" href="notificationlist.html"><iron-icon icon="inbox" class="sidebarLinkIcon"></iron-icon>';
|
||||
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="inbox" onclick="LibraryMenu.onLinkClicked(this);return false;" href="notificationlist.html"><iron-icon icon="inbox" class="sidebarLinkIcon"></iron-icon>';
|
||||
html += Globalize.translate('ButtonInbox');
|
||||
html += '<div class="btnNotifications"><div class="btnNotificationsInner">0</div></div>';
|
||||
html += '</a>';
|
||||
|
||||
if (user.localUser) {
|
||||
html += '<a class="sidebarLink lnkMediaFolder lnkMySettings" data-itemid="mysync" href="mypreferencesdisplay.html?userId=' + user.localUser.Id + '"><iron-icon icon="settings" class="sidebarLinkIcon"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonSettings') + '</span></a>';
|
||||
html += '<a class="sidebarLink lnkMediaFolder lnkMySettings" onclick="LibraryMenu.onLinkClicked(this);return false;" data-itemid="mysync" href="mypreferencesdisplay.html?userId=' + user.localUser.Id + '"><iron-icon icon="settings" class="sidebarLinkIcon"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonSettings') + '</span></a>';
|
||||
}
|
||||
|
||||
html += '<a class="sidebarLink lnkMediaFolder lnkMySync" data-itemid="mysync" href="mysync.html"><iron-icon icon="refresh" class="sidebarLinkIcon"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonSync') + '</span></a>';
|
||||
html += '<a class="sidebarLink lnkMediaFolder lnkMySync" data-itemid="mysync" onclick="LibraryMenu.onLinkClicked(this);return false;" href="mysync.html"><iron-icon icon="refresh" class="sidebarLinkIcon"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonSync') + '</span></a>';
|
||||
|
||||
if (Dashboard.isConnectMode()) {
|
||||
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="selectserver" href="selectserver.html"><span class="fa fa-globe sidebarLinkIcon"></span><span class="sidebarLinkText">' + Globalize.translate('ButtonSelectServer') + '</span></a>';
|
||||
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="selectserver" onclick="LibraryMenu.onLinkClicked(this);return false;" href="selectserver.html"><span class="fa fa-globe sidebarLinkIcon"></span><span class="sidebarLinkText">' + Globalize.translate('ButtonSelectServer') + '</span></a>';
|
||||
}
|
||||
|
||||
if (showUserAtTop()) {
|
||||
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="logout" href="#" onclick="Dashboard.logout();"><iron-icon icon="lock" class="sidebarLinkIcon"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonSignOut') + '</span></a>';
|
||||
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="logout" onclick="LibraryMenu.onLinkClicked(this);return false;" href="#" onclick="Dashboard.logout();"><iron-icon icon="lock" class="sidebarLinkIcon"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonSignOut') + '</span></a>';
|
||||
}
|
||||
|
||||
html += '</div>';
|
||||
@ -440,7 +440,7 @@
|
||||
color = "#293AAE";
|
||||
}
|
||||
|
||||
return '<a data-itemid="' + itemId + '" class="lnkMediaFolder sidebarLink" href="' + getItemHref(i, i.CollectionType) + '"><iron-icon icon="' + icon + '" class="sidebarLinkIcon" style="color:' + color + '"></iron-icon><span class="sectionName">' + i.Name + '</span></a>';
|
||||
return '<a data-itemid="' + itemId + '" class="lnkMediaFolder sidebarLink" onclick="LibraryMenu.onLinkClicked(this);return false;" href="' + getItemHref(i, i.CollectionType) + '"><iron-icon icon="' + icon + '" class="sidebarLinkIcon" style="color:' + color + '"></iron-icon><span class="sectionName">' + i.Name + '</span></a>';
|
||||
|
||||
}).join('');
|
||||
|
||||
@ -479,6 +479,8 @@
|
||||
|
||||
function onManageServerClicked() {
|
||||
|
||||
closeMainDrawer();
|
||||
|
||||
requirejs(["scripts/registrationservices"], function () {
|
||||
|
||||
RegistrationServices.validateFeature('manageserver').done(function () {
|
||||
@ -502,7 +504,16 @@
|
||||
window.LibraryMenu = {
|
||||
getTopParentId: getTopParentId,
|
||||
|
||||
setText: setLibraryMenuText
|
||||
setText: setLibraryMenuText,
|
||||
|
||||
onLinkClicked: function (link) {
|
||||
|
||||
closeMainDrawer();
|
||||
|
||||
setTimeout(function () {
|
||||
Dashboard.navigate(link.href);
|
||||
}, 1000);
|
||||
}
|
||||
};
|
||||
|
||||
function updateCastIcon() {
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
var html = "";
|
||||
|
||||
html += '<ul data-role="listview" data-inset="true" data-auto-enhanced="false" data-split-icon="Play">';
|
||||
html += '<ul data-role="listview" data-inset="true" data-auto-enhanced="false" data-split-icon="action">';
|
||||
|
||||
var currentCategory;
|
||||
|
||||
@ -53,15 +53,15 @@
|
||||
|
||||
if (task.State == "Idle") {
|
||||
|
||||
html += "<a id='btnTask" + task.Id + "' class='btnStartTask' href='#' data-taskid='" + task.Id + "' data-icon='play'>" + Globalize.translate('ButtonStart') + "</a>";
|
||||
html += "<a id='btnTask" + task.Id + "' class='btnStartTask' href='#' data-taskid='" + task.Id + "' data-icon='action'>" + Globalize.translate('ButtonStart') + "</a>";
|
||||
}
|
||||
else if (task.State == "Running") {
|
||||
|
||||
html += "<a id='btnTask" + task.Id + "' class='btnStopTask' href='#' data-taskid='" + task.Id + "' data-icon='stop'>" + Globalize.translate('ButtonStop') + "</a>";
|
||||
html += "<a id='btnTask" + task.Id + "' class='btnStopTask' href='#' data-taskid='" + task.Id + "' data-icon='delete'>" + Globalize.translate('ButtonStop') + "</a>";
|
||||
|
||||
} else {
|
||||
|
||||
html += "<a id='btnTask" + task.Id + "' class='btnStartTask' href='#' data-taskid='" + task.Id + "' data-icon='play' style='display:none;'>" + Globalize.translate('ButtonStart') + "</a>";
|
||||
html += "<a id='btnTask" + task.Id + "' class='btnStartTask' href='#' data-taskid='" + task.Id + "' data-icon='action' style='display:none;'>" + Globalize.translate('ButtonStart') + "</a>";
|
||||
}
|
||||
|
||||
html += "</a>";
|
||||
@ -143,21 +143,21 @@
|
||||
|
||||
if (state == "Idle") {
|
||||
|
||||
elem = btnTask.addClass('btnStartTask').removeClass('btnStopTask').show().data("icon", "play").attr("title", Globalize.translate('ButtonStart'));
|
||||
elem = btnTask.addClass('btnStartTask').removeClass('btnStopTask').show().data("icon", "action").attr("title", Globalize.translate('ButtonStart'));
|
||||
|
||||
elem.removeClass('ui-icon-stop').addClass('ui-icon-play');
|
||||
elem.removeClass('ui-icon-delete').addClass('ui-icon-action');
|
||||
}
|
||||
else if (state == "Running") {
|
||||
|
||||
elem = btnTask.addClass('btnStopTask').removeClass('btnStartTask').show().data("icon", "stop").attr("title", Globalize.translate('ButtonStop'));
|
||||
elem = btnTask.addClass('btnStopTask').removeClass('btnStartTask').show().data("icon", "delete").attr("title", Globalize.translate('ButtonStop'));
|
||||
|
||||
elem.removeClass('ui-icon-play').addClass('ui-icon-stop');
|
||||
elem.removeClass('ui-icon-action').addClass('ui-icon-delete');
|
||||
|
||||
} else {
|
||||
|
||||
elem = btnTask.addClass('btnStartTask').removeClass('btnStopTask').hide().data("icon", "play").attr("title", Globalize.translate('ButtonStart'));
|
||||
elem = btnTask.addClass('btnStartTask').removeClass('btnStopTask').hide().data("icon", "action").attr("title", Globalize.translate('ButtonStart'));
|
||||
|
||||
elem.removeClass('ui-icon-stop').addClass('ui-icon-play');
|
||||
elem.removeClass('ui-icon-stdeleteop').addClass('ui-icon-action');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -218,33 +218,35 @@
|
||||
|
||||
var card = $(elem).parents('.card');
|
||||
var page = $(elem).parents('.page');
|
||||
var id = card.attr('data-id');
|
||||
var serverId = card.attr('data-id');
|
||||
var connectserverid = card.attr('data-connectserverid');
|
||||
|
||||
$('.serverMenu', page).popup("close").remove();
|
||||
|
||||
var html = '<div data-role="popup" class="serverMenu" data-theme="a">';
|
||||
|
||||
html += '<ul data-role="listview" style="min-width: 180px;">';
|
||||
html += '<li data-role="list-divider">' + Globalize.translate('HeaderMenu') + '</li>';
|
||||
|
||||
html += '<li><a href="#" class="btnDelete" data-connectserverid="' + connectserverid + '">' + Globalize.translate('ButtonDelete') + '</a></li>';
|
||||
|
||||
html += '</ul>';
|
||||
|
||||
html += '</div>';
|
||||
|
||||
page.append(html);
|
||||
|
||||
var flyout = $('.serverMenu', page).popup({ positionTo: elem || "window" }).trigger('create').popup("open").on("popupafterclose", function () {
|
||||
|
||||
$(this).off("popupafterclose").remove();
|
||||
var menuItems = [];
|
||||
|
||||
menuItems.push({
|
||||
name: Globalize.translate('ButtonDelete'),
|
||||
id: 'delete',
|
||||
ironIcon: 'delete'
|
||||
});
|
||||
|
||||
$('.btnDelete', flyout).on('click', function () {
|
||||
deleteServer(page, this.getAttribute('data-connectserverid'));
|
||||
$('.serverMenu', page).popup("close").remove();
|
||||
require(['actionsheet'], function () {
|
||||
|
||||
ActionSheetElement.show({
|
||||
items: menuItems,
|
||||
positionTo: elem,
|
||||
callback: function (id) {
|
||||
|
||||
switch (id) {
|
||||
|
||||
case 'delete':
|
||||
deleteServer(page, connectserverid);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -2034,6 +2034,10 @@ var AppInfo = {};
|
||||
Dashboard.importCss('thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.icons.css');
|
||||
return {};
|
||||
});
|
||||
define("livetvcss", [], function () {
|
||||
Dashboard.importCss('css/livetv.css');
|
||||
return {};
|
||||
});
|
||||
|
||||
if (Dashboard.isRunningInCordova() && $.browser.safari) {
|
||||
define("actionsheet", ["cordova/ios/actionsheet"]);
|
||||
@ -2050,7 +2054,10 @@ var AppInfo = {};
|
||||
var drawer = $('.mainDrawerPanel').removeClass('mainDrawerPanelPreInit')[0];
|
||||
drawer.forceNarrow = true;
|
||||
drawer.drawerWidth = screen.availWidth >= 330 ? "310px" : "270px";
|
||||
drawer.transition = true;
|
||||
|
||||
if ($.browser.safari && !AppInfo.isNativeApp) {
|
||||
drawer.disableEdgeSwipe = true;
|
||||
}
|
||||
|
||||
if (Dashboard.isConnectMode()) {
|
||||
|
||||
|
@ -2,30 +2,24 @@
|
||||
|
||||
function cancelJob(page, id) {
|
||||
|
||||
$('.jobMenu', page).on("popupafterclose.deleteuser", function () {
|
||||
var msg = Globalize.translate('CancelSyncJobConfirmation');
|
||||
|
||||
$(this).off('popupafterclose.deleteuser');
|
||||
Dashboard.confirm(msg, Globalize.translate('HeaderCancelSyncJob'), function (result) {
|
||||
|
||||
var msg = Globalize.translate('CancelSyncJobConfirmation');
|
||||
if (result) {
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
Dashboard.confirm(msg, Globalize.translate('HeaderCancelSyncJob'), function (result) {
|
||||
ApiClient.ajax({
|
||||
|
||||
if (result) {
|
||||
Dashboard.showLoadingMsg();
|
||||
url: ApiClient.getUrl('Sync/Jobs/' + id),
|
||||
type: 'DELETE'
|
||||
|
||||
ApiClient.ajax({
|
||||
}).done(function () {
|
||||
|
||||
url: ApiClient.getUrl('Sync/Jobs/' + id),
|
||||
type: 'DELETE'
|
||||
|
||||
}).done(function () {
|
||||
|
||||
reloadData(page);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}).popup('close');
|
||||
reloadData(page);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getSyncJobHtml(page, job, cardBoxCssClass, syncJobPage) {
|
||||
@ -202,37 +196,46 @@
|
||||
function showJobMenu(elem) {
|
||||
|
||||
var card = $(elem).parents('.card');
|
||||
var page = $(elem).parents('.page');
|
||||
var id = card.attr('data-id');
|
||||
var jobId = card.attr('data-id');
|
||||
var status = card.attr('data-status');
|
||||
|
||||
$('.jobMenu', page).popup("close").remove();
|
||||
|
||||
var html = '<div data-role="popup" class="jobMenu tapHoldMenu" data-theme="a">';
|
||||
|
||||
html += '<ul data-role="listview" style="min-width: 180px;">';
|
||||
html += '<li data-role="list-divider">' + Globalize.translate('HeaderMenu') + '</li>';
|
||||
var menuItems = [];
|
||||
|
||||
if (status == 'Cancelled') {
|
||||
html += '<li data-icon="delete"><a href="#" class="btnCancelJob" data-id="' + id + '">' + Globalize.translate('ButtonDelete') + '</a></li>';
|
||||
menuItems.push({
|
||||
name: Globalize.translate('ButtonDelete'),
|
||||
id: 'delete',
|
||||
ironIcon: 'delete'
|
||||
});
|
||||
} else {
|
||||
html += '<li data-icon="delete"><a href="#" class="btnCancelJob" data-id="' + id + '">' + Globalize.translate('ButtonCancel') + '</a></li>';
|
||||
menuItems.push({
|
||||
name: Globalize.translate('ButtonCancelSyncJob'),
|
||||
id: 'cancel',
|
||||
ironIcon: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
html += '</ul>';
|
||||
require(['actionsheet'], function () {
|
||||
|
||||
html += '</div>';
|
||||
ActionSheetElement.show({
|
||||
items: menuItems,
|
||||
positionTo: elem,
|
||||
callback: function (id) {
|
||||
|
||||
page.append(html);
|
||||
switch (id) {
|
||||
|
||||
var flyout = $('.jobMenu', page).popup({ positionTo: elem || "window" }).trigger('create').popup("open").on("popupafterclose", function () {
|
||||
case 'delete':
|
||||
cancelJob(jobId);
|
||||
break;
|
||||
case 'cancel':
|
||||
cancelJob(jobId);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(this).off("popupafterclose").remove();
|
||||
|
||||
});
|
||||
|
||||
$('.btnCancelJob', flyout).on('click', function () {
|
||||
cancelJob(page, this.getAttribute('data-id'));
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
function renderJob(page, job, dialogOptions) {
|
||||
|
||||
require(['paperbuttonstyle']);
|
||||
|
||||
var html = '';
|
||||
|
||||
html += '<div>';
|
||||
@ -12,7 +14,9 @@
|
||||
|
||||
html += '<br/>';
|
||||
html += '<br/>';
|
||||
html += '<button type="submit" data-icon="check">' + Globalize.translate('ButtonSave') + '</button>';
|
||||
html += '<button type="submit" data-role="none" class="clearButton">';
|
||||
html += '<paper-button raised class="submit block"><iron-icon icon="check"></iron-icon><span>' + Globalize.translate('ButtonSave') + '</span></paper-button>';
|
||||
html += '</button>';
|
||||
|
||||
$('.syncJobForm', page).html(html).trigger('create');
|
||||
SyncManager.renderForm({
|
||||
@ -131,66 +135,80 @@
|
||||
|
||||
var page = $(elem).parents('.page');
|
||||
var listItem = $(elem).parents('li');
|
||||
var id = listItem.attr('data-itemid');
|
||||
var jobItemId = listItem.attr('data-itemid');
|
||||
var status = listItem.attr('data-status');
|
||||
var remove = listItem.attr('data-remove').toLowerCase() == 'true';
|
||||
|
||||
$('.jobMenu', page).popup("close").remove();
|
||||
|
||||
var html = '<div data-role="popup" class="jobMenu tapHoldMenu" data-theme="a">';
|
||||
|
||||
html += '<ul data-role="listview" style="min-width: 180px;">';
|
||||
html += '<li data-role="list-divider">' + Globalize.translate('HeaderMenu') + '</li>';
|
||||
var menuItems = [];
|
||||
|
||||
if (status == 'Failed') {
|
||||
html += '<li data-icon="check"><a href="#" class="btnRetryJobItem" data-id="' + id + '">' + Globalize.translate('ButtonQueueForRetry') + '</a></li>';
|
||||
menuItems.push({
|
||||
name: Globalize.translate('ButtonQueueForRetry'),
|
||||
id: 'retry',
|
||||
ironIcon: 'check'
|
||||
});
|
||||
}
|
||||
else if (status == 'Cancelled') {
|
||||
html += '<li data-icon="check"><a href="#" class="btnRetryJobItem" data-id="' + id + '">' + Globalize.translate('ButtonReenable') + '</a></li>';
|
||||
menuItems.push({
|
||||
name: Globalize.translate('ButtonReenable'),
|
||||
id: 'retry',
|
||||
ironIcon: 'check'
|
||||
});
|
||||
}
|
||||
else if (status == 'Queued' || status == 'Transferring' || status == 'Converting' || status == 'ReadyToTransfer') {
|
||||
html += '<li data-icon="delete"><a href="#" class="btnCancelJobItem" data-id="' + id + '">' + Globalize.translate('ButtonCancelItem') + '</a></li>';
|
||||
menuItems.push({
|
||||
name: Globalize.translate('ButtonCancelItem'),
|
||||
id: 'cancel',
|
||||
ironIcon: 'delete'
|
||||
});
|
||||
}
|
||||
else if (status == 'Synced' && remove) {
|
||||
html += '<li data-icon="check"><a href="#" class="btnUnmarkForRemoval" data-id="' + id + '">' + Globalize.translate('ButtonUnmarkForRemoval') + '</a></li>';
|
||||
menuItems.push({
|
||||
name: Globalize.translate('ButtonUnmarkForRemoval'),
|
||||
id: 'unmarkforremoval',
|
||||
ironIcon: 'check'
|
||||
});
|
||||
}
|
||||
else if (status == 'Synced') {
|
||||
html += '<li data-icon="check"><a href="#" class="btnMarkForRemoval" data-id="' + id + '">' + Globalize.translate('ButtonMarkForRemoval') + '</a></li>';
|
||||
menuItems.push({
|
||||
name: Globalize.translate('ButtonMarkForRemoval'),
|
||||
id: 'markforremoval',
|
||||
ironIcon: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
html += '</ul>';
|
||||
require(['actionsheet'], function () {
|
||||
|
||||
html += '</div>';
|
||||
ActionSheetElement.show({
|
||||
items: menuItems,
|
||||
positionTo: elem,
|
||||
callback: function (id) {
|
||||
|
||||
page.append(html);
|
||||
switch (id) {
|
||||
|
||||
var flyout = $('.jobMenu', page).popup({ positionTo: elem || "window" }).trigger('create').popup("open").on("popupafterclose", function () {
|
||||
case 'cancel':
|
||||
cancelJobItem(page, jobItemId);
|
||||
break;
|
||||
case 'retry':
|
||||
retryJobItem(page, jobItemId);
|
||||
break;
|
||||
case 'markforremoval':
|
||||
markForRemoval(page, jobItemId);
|
||||
break;
|
||||
case 'unmarkforremoval':
|
||||
unMarkForRemoval(page, jobItemId);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(this).off("popupafterclose").remove();
|
||||
|
||||
});
|
||||
|
||||
$('.btnCancelJobItem', flyout).on('click', function () {
|
||||
cancelJobItem(page, this.getAttribute('data-id'));
|
||||
});
|
||||
|
||||
$('.btnRetryJobItem', flyout).on('click', function () {
|
||||
retryJobItem(page, this.getAttribute('data-id'));
|
||||
});
|
||||
|
||||
$('.btnUnmarkForRemoval', flyout).on('click', function () {
|
||||
unMarkForRemoval(page, this.getAttribute('data-id'));
|
||||
});
|
||||
|
||||
$('.btnMarkForRemoval', flyout).on('click', function () {
|
||||
markForRemoval(page, this.getAttribute('data-id'));
|
||||
});
|
||||
}
|
||||
|
||||
function cancelJobItem(page, jobItemId) {
|
||||
|
||||
$('.jobMenu', page).popup('close');
|
||||
|
||||
// Need a timeout because jquery mobile will not show a popup while another is in the act of closing
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
@ -209,8 +227,6 @@
|
||||
|
||||
function markForRemoval(page, jobItemId) {
|
||||
|
||||
$('.jobMenu', page).popup('close');
|
||||
|
||||
ApiClient.ajax({
|
||||
|
||||
type: "POST",
|
||||
@ -224,8 +240,6 @@
|
||||
|
||||
function unMarkForRemoval(page, jobItemId) {
|
||||
|
||||
$('.jobMenu', page).popup('close');
|
||||
|
||||
ApiClient.ajax({
|
||||
|
||||
type: "POST",
|
||||
@ -239,8 +253,6 @@
|
||||
|
||||
function retryJobItem(page, jobItemId) {
|
||||
|
||||
$('.jobMenu', page).popup('close');
|
||||
|
||||
ApiClient.ajax({
|
||||
|
||||
type: "POST",
|
||||
|
@ -49,10 +49,6 @@
|
||||
color: #539FFD !important;
|
||||
}
|
||||
|
||||
.btn, .btn-large {
|
||||
font-family: Helvetica Neue !important;
|
||||
}
|
||||
|
||||
.pageTitle {
|
||||
font-family: Helvetica Neue;
|
||||
}
|
||||
@ -146,3 +142,7 @@ h1, h1 a {
|
||||
.bottomFab {
|
||||
bottom: 70px;
|
||||
}
|
||||
|
||||
.sidebarLinkText {
|
||||
font-weight: 400 !important;
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
// Need to fix those before this can be set to 0
|
||||
|
||||
if (window.AppInfo && AppInfo.isNativeApp && $.browser.safari) {
|
||||
return 7500;
|
||||
return 7000;
|
||||
}
|
||||
|
||||
var screens = $.browser.mobile ? 2.5 : 1;
|
||||
|
@ -70,11 +70,11 @@
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
paper-button.cancel {
|
||||
.ui-page-theme-b paper-button.cancel {
|
||||
color: #444;
|
||||
}
|
||||
|
||||
paper-button[raised].cancel {
|
||||
.ui-page-theme-b paper-button[raised].cancel {
|
||||
background: #444;
|
||||
color: #fff;
|
||||
}
|
||||
|
27
dashboard-ui/thirdparty/polymer/LICENSE.txt
vendored
27
dashboard-ui/thirdparty/polymer/LICENSE.txt
vendored
@ -1,27 +0,0 @@
|
||||
// Copyright (c) 2014 The Polymer Authors. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
26
dashboard-ui/thirdparty/polymer/bower.json
vendored
26
dashboard-ui/thirdparty/polymer/bower.json
vendored
@ -1,26 +0,0 @@
|
||||
{
|
||||
"name": "polymer",
|
||||
"version": "1.0.0",
|
||||
"main": [
|
||||
"polymer.html"
|
||||
],
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"ignore": [
|
||||
"/.*",
|
||||
"/test/"
|
||||
],
|
||||
"authors": [
|
||||
"The Polymer Authors (http://polymer.github.io/AUTHORS.txt)"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Polymer/polymer.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"webcomponentsjs": "^0.7.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"web-component-tester": "*"
|
||||
},
|
||||
"private": true
|
||||
}
|
544
dashboard-ui/thirdparty/polymer/polymer-micro.html
vendored
544
dashboard-ui/thirdparty/polymer/polymer-micro.html
vendored
@ -1,544 +0,0 @@
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
--><script>(function() {
|
||||
function resolve() {
|
||||
document.body.removeAttribute("unresolved");
|
||||
}
|
||||
if (window.WebComponents) {
|
||||
addEventListener("WebComponentsReady", resolve);
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
})();
|
||||
|
||||
Polymer = {
|
||||
Settings: function() {
|
||||
var user = window.Polymer || {};
|
||||
location.search.slice(1).split("&").forEach(function(o) {
|
||||
o = o.split("=");
|
||||
o[0] && (user[o[0]] = o[1] || true);
|
||||
});
|
||||
var wantShadow = user.dom === "shadow";
|
||||
var hasShadow = Boolean(Element.prototype.createShadowRoot);
|
||||
var nativeShadow = hasShadow && !window.ShadowDOMPolyfill;
|
||||
var useShadow = wantShadow && hasShadow;
|
||||
var hasNativeImports = Boolean("import" in document.createElement("link"));
|
||||
var useNativeImports = hasNativeImports;
|
||||
var useNativeCustomElements = !window.CustomElements || window.CustomElements.useNative;
|
||||
return {
|
||||
wantShadow: wantShadow,
|
||||
hasShadow: hasShadow,
|
||||
nativeShadow: nativeShadow,
|
||||
useShadow: useShadow,
|
||||
useNativeShadow: useShadow && nativeShadow,
|
||||
useNativeImports: useNativeImports,
|
||||
useNativeCustomElements: useNativeCustomElements
|
||||
};
|
||||
}()
|
||||
};
|
||||
|
||||
(function() {
|
||||
var userPolymer = window.Polymer;
|
||||
window.Polymer = function(prototype) {
|
||||
var ctor = desugar(prototype);
|
||||
prototype = ctor.prototype;
|
||||
var options = {
|
||||
prototype: prototype
|
||||
};
|
||||
if (prototype.extends) {
|
||||
options.extends = prototype.extends;
|
||||
}
|
||||
Polymer.telemetry._registrate(prototype);
|
||||
document.registerElement(prototype.is, options);
|
||||
return ctor;
|
||||
};
|
||||
var desugar = function(prototype) {
|
||||
prototype = Polymer.Base.chainObject(prototype, Polymer.Base);
|
||||
prototype.registerCallback();
|
||||
return prototype.constructor;
|
||||
};
|
||||
window.Polymer = Polymer;
|
||||
if (userPolymer) {
|
||||
for (var i in userPolymer) {
|
||||
Polymer[i] = userPolymer[i];
|
||||
}
|
||||
}
|
||||
Polymer.Class = desugar;
|
||||
})();
|
||||
|
||||
Polymer.telemetry = {
|
||||
registrations: [],
|
||||
_regLog: function(prototype) {
|
||||
console.log("[" + prototype.is + "]: registered");
|
||||
},
|
||||
_registrate: function(prototype) {
|
||||
this.registrations.push(prototype);
|
||||
Polymer.log && this._regLog(prototype);
|
||||
},
|
||||
dumpRegistrations: function() {
|
||||
this.registrations.forEach(this._regLog);
|
||||
}
|
||||
};
|
||||
|
||||
Object.defineProperty(window, "currentImport", {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
get: function() {
|
||||
return (document._currentScript || document.currentScript).ownerDocument;
|
||||
}
|
||||
});
|
||||
|
||||
Polymer.Base = {
|
||||
_addFeature: function(feature) {
|
||||
this.extend(this, feature);
|
||||
},
|
||||
registerCallback: function() {
|
||||
this._registerFeatures();
|
||||
this._doBehavior("registered");
|
||||
},
|
||||
createdCallback: function() {
|
||||
Polymer.telemetry.instanceCount++;
|
||||
this.root = this;
|
||||
this._doBehavior("created");
|
||||
this._initFeatures();
|
||||
},
|
||||
attachedCallback: function() {
|
||||
this.isAttached = true;
|
||||
this._doBehavior("attached");
|
||||
},
|
||||
detachedCallback: function() {
|
||||
this.isAttached = false;
|
||||
this._doBehavior("detached");
|
||||
},
|
||||
attributeChangedCallback: function(name) {
|
||||
this._setAttributeToProperty(this, name);
|
||||
this._doBehavior("attributeChanged", arguments);
|
||||
},
|
||||
extend: function(prototype, api) {
|
||||
if (prototype && api) {
|
||||
Object.getOwnPropertyNames(api).forEach(function(n) {
|
||||
this.copyOwnProperty(n, api, prototype);
|
||||
}, this);
|
||||
}
|
||||
return prototype || api;
|
||||
},
|
||||
copyOwnProperty: function(name, source, target) {
|
||||
var pd = Object.getOwnPropertyDescriptor(source, name);
|
||||
if (pd) {
|
||||
Object.defineProperty(target, name, pd);
|
||||
}
|
||||
},
|
||||
_log: console.log.apply.bind(console.log, console),
|
||||
_warn: console.warn.apply.bind(console.warn, console),
|
||||
_error: console.error.apply.bind(console.error, console),
|
||||
_logf: function() {
|
||||
return this._logPrefix.concat([ this.is ]).concat(Array.prototype.slice.call(arguments, 0));
|
||||
}
|
||||
};
|
||||
|
||||
Polymer.Base._logPrefix = function() {
|
||||
var color = window.chrome || /firefox/i.test(navigator.userAgent);
|
||||
return color ? [ "%c[%s::%s]:", "font-weight: bold; background-color:#EEEE00;" ] : [ "[%s::%s]:" ];
|
||||
}();
|
||||
|
||||
Polymer.Base.chainObject = function(object, inherited) {
|
||||
if (object && inherited && object !== inherited) {
|
||||
if (!Object.__proto__) {
|
||||
object = Polymer.Base.extend(Object.create(inherited), object);
|
||||
}
|
||||
object.__proto__ = inherited;
|
||||
}
|
||||
return object;
|
||||
};
|
||||
|
||||
Polymer.Base = Polymer.Base.chainObject(Polymer.Base, HTMLElement.prototype);
|
||||
|
||||
Polymer.telemetry.instanceCount = 0;
|
||||
|
||||
(function() {
|
||||
var modules = {};
|
||||
var DomModule = function() {
|
||||
return document.createElement("dom-module");
|
||||
};
|
||||
DomModule.prototype = Object.create(HTMLElement.prototype);
|
||||
DomModule.prototype.constructor = DomModule;
|
||||
DomModule.prototype.createdCallback = function() {
|
||||
var id = this.id || this.getAttribute("name") || this.getAttribute("is");
|
||||
if (id) {
|
||||
this.id = id;
|
||||
modules[id] = this;
|
||||
}
|
||||
};
|
||||
DomModule.prototype.import = function(id, slctr) {
|
||||
var m = modules[id];
|
||||
if (!m) {
|
||||
forceDocumentUpgrade();
|
||||
m = modules[id];
|
||||
}
|
||||
if (m && slctr) {
|
||||
m = m.querySelector(slctr);
|
||||
}
|
||||
return m;
|
||||
};
|
||||
var cePolyfill = window.CustomElements && !CustomElements.useNative;
|
||||
if (cePolyfill) {
|
||||
var ready = CustomElements.ready;
|
||||
CustomElements.ready = true;
|
||||
}
|
||||
document.registerElement("dom-module", DomModule);
|
||||
if (cePolyfill) {
|
||||
CustomElements.ready = ready;
|
||||
}
|
||||
function forceDocumentUpgrade() {
|
||||
if (cePolyfill) {
|
||||
var script = document._currentScript || document.currentScript;
|
||||
if (script) {
|
||||
CustomElements.upgradeAll(script.ownerDocument);
|
||||
}
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
||||
Polymer.Base._addFeature({
|
||||
_prepIs: function() {
|
||||
if (!this.is) {
|
||||
var module = (document._currentScript || document.currentScript).parentNode;
|
||||
if (module.localName === "dom-module") {
|
||||
var id = module.id || module.getAttribute("name") || module.getAttribute("is");
|
||||
this.is = id;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Polymer.Base._addFeature({
|
||||
behaviors: [],
|
||||
_prepBehaviors: function() {
|
||||
if (this.behaviors.length) {
|
||||
this.behaviors = this._flattenBehaviorsList(this.behaviors);
|
||||
}
|
||||
this._prepAllBehaviors(this.behaviors);
|
||||
},
|
||||
_flattenBehaviorsList: function(behaviors) {
|
||||
var flat = [];
|
||||
behaviors.forEach(function(b) {
|
||||
if (b instanceof Array) {
|
||||
flat = flat.concat(this._flattenBehaviorsList(b));
|
||||
} else if (b) {
|
||||
flat.push(b);
|
||||
} else {
|
||||
this._warn(this._logf("_flattenBehaviorsList", "behavior is null, check for missing or 404 import"));
|
||||
}
|
||||
}, this);
|
||||
return flat;
|
||||
},
|
||||
_prepAllBehaviors: function(behaviors) {
|
||||
for (var i = behaviors.length - 1; i >= 0; i--) {
|
||||
this._mixinBehavior(behaviors[i]);
|
||||
}
|
||||
for (var i = 0, l = behaviors.length; i < l; i++) {
|
||||
this._prepBehavior(behaviors[i]);
|
||||
}
|
||||
this._prepBehavior(this);
|
||||
},
|
||||
_mixinBehavior: function(b) {
|
||||
Object.getOwnPropertyNames(b).forEach(function(n) {
|
||||
switch (n) {
|
||||
case "hostAttributes":
|
||||
case "registered":
|
||||
case "properties":
|
||||
case "observers":
|
||||
case "listeners":
|
||||
case "created":
|
||||
case "attached":
|
||||
case "detached":
|
||||
case "attributeChanged":
|
||||
case "configure":
|
||||
case "ready":
|
||||
break;
|
||||
|
||||
default:
|
||||
if (!this.hasOwnProperty(n)) {
|
||||
this.copyOwnProperty(n, b, this);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}, this);
|
||||
},
|
||||
_doBehavior: function(name, args) {
|
||||
this.behaviors.forEach(function(b) {
|
||||
this._invokeBehavior(b, name, args);
|
||||
}, this);
|
||||
this._invokeBehavior(this, name, args);
|
||||
},
|
||||
_invokeBehavior: function(b, name, args) {
|
||||
var fn = b[name];
|
||||
if (fn) {
|
||||
fn.apply(this, args || Polymer.nar);
|
||||
}
|
||||
},
|
||||
_marshalBehaviors: function() {
|
||||
this.behaviors.forEach(function(b) {
|
||||
this._marshalBehavior(b);
|
||||
}, this);
|
||||
this._marshalBehavior(this);
|
||||
}
|
||||
});
|
||||
|
||||
Polymer.Base._addFeature({
|
||||
_prepExtends: function() {
|
||||
if (this.extends) {
|
||||
this.__proto__ = this._getExtendedPrototype(this.extends);
|
||||
}
|
||||
},
|
||||
_getExtendedPrototype: function(tag) {
|
||||
return this._getExtendedNativePrototype(tag);
|
||||
},
|
||||
_nativePrototypes: {},
|
||||
_getExtendedNativePrototype: function(tag) {
|
||||
var p = this._nativePrototypes[tag];
|
||||
if (!p) {
|
||||
var np = this.getNativePrototype(tag);
|
||||
p = this.extend(Object.create(np), Polymer.Base);
|
||||
this._nativePrototypes[tag] = p;
|
||||
}
|
||||
return p;
|
||||
},
|
||||
getNativePrototype: function(tag) {
|
||||
return Object.getPrototypeOf(document.createElement(tag));
|
||||
}
|
||||
});
|
||||
|
||||
Polymer.Base._addFeature({
|
||||
_prepConstructor: function() {
|
||||
this._factoryArgs = this.extends ? [ this.extends, this.is ] : [ this.is ];
|
||||
var ctor = function() {
|
||||
return this._factory(arguments);
|
||||
};
|
||||
if (this.hasOwnProperty("extends")) {
|
||||
ctor.extends = this.extends;
|
||||
}
|
||||
Object.defineProperty(this, "constructor", {
|
||||
value: ctor,
|
||||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
ctor.prototype = this;
|
||||
},
|
||||
_factory: function(args) {
|
||||
var elt = document.createElement.apply(document, this._factoryArgs);
|
||||
if (this.factoryImpl) {
|
||||
this.factoryImpl.apply(elt, args);
|
||||
}
|
||||
return elt;
|
||||
}
|
||||
});
|
||||
|
||||
Polymer.nob = Object.create(null);
|
||||
|
||||
Polymer.Base._addFeature({
|
||||
properties: {},
|
||||
getPropertyInfo: function(property) {
|
||||
var info = this._getPropertyInfo(property, this.properties);
|
||||
if (!info) {
|
||||
this.behaviors.some(function(b) {
|
||||
return info = this._getPropertyInfo(property, b.properties);
|
||||
}, this);
|
||||
}
|
||||
return info || Polymer.nob;
|
||||
},
|
||||
_getPropertyInfo: function(property, properties) {
|
||||
var p = properties && properties[property];
|
||||
if (typeof p === "function") {
|
||||
p = properties[property] = {
|
||||
type: p
|
||||
};
|
||||
}
|
||||
if (p) {
|
||||
p.defined = true;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
});
|
||||
|
||||
Polymer.CaseMap = {
|
||||
_caseMap: {},
|
||||
dashToCamelCase: function(dash) {
|
||||
var mapped = Polymer.CaseMap._caseMap[dash];
|
||||
if (mapped) {
|
||||
return mapped;
|
||||
}
|
||||
if (dash.indexOf("-") < 0) {
|
||||
return Polymer.CaseMap._caseMap[dash] = dash;
|
||||
}
|
||||
return Polymer.CaseMap._caseMap[dash] = dash.replace(/-([a-z])/g, function(m) {
|
||||
return m[1].toUpperCase();
|
||||
});
|
||||
},
|
||||
camelToDashCase: function(camel) {
|
||||
var mapped = Polymer.CaseMap._caseMap[camel];
|
||||
if (mapped) {
|
||||
return mapped;
|
||||
}
|
||||
return Polymer.CaseMap._caseMap[camel] = camel.replace(/([a-z][A-Z])/g, function(g) {
|
||||
return g[0] + "-" + g[1].toLowerCase();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Polymer.Base._addFeature({
|
||||
_prepAttributes: function() {
|
||||
this._aggregatedAttributes = {};
|
||||
},
|
||||
_addHostAttributes: function(attributes) {
|
||||
if (attributes) {
|
||||
this.mixin(this._aggregatedAttributes, attributes);
|
||||
}
|
||||
},
|
||||
_marshalHostAttributes: function() {
|
||||
this._applyAttributes(this, this._aggregatedAttributes);
|
||||
},
|
||||
_applyAttributes: function(node, attr$) {
|
||||
for (var n in attr$) {
|
||||
if (!this.hasAttribute(n) && n !== "class") {
|
||||
this.serializeValueToAttribute(attr$[n], n, this);
|
||||
}
|
||||
}
|
||||
},
|
||||
_marshalAttributes: function() {
|
||||
this._takeAttributesToModel(this);
|
||||
},
|
||||
_takeAttributesToModel: function(model) {
|
||||
for (var i = 0, l = this.attributes.length; i < l; i++) {
|
||||
this._setAttributeToProperty(model, this.attributes[i].name);
|
||||
}
|
||||
},
|
||||
_setAttributeToProperty: function(model, attrName) {
|
||||
if (!this._serializing) {
|
||||
var propName = Polymer.CaseMap.dashToCamelCase(attrName);
|
||||
var info = this.getPropertyInfo(propName);
|
||||
if (info.defined || this._propertyEffects && this._propertyEffects[propName]) {
|
||||
var val = this.getAttribute(attrName);
|
||||
model[propName] = this.deserialize(val, info.type);
|
||||
}
|
||||
}
|
||||
},
|
||||
_serializing: false,
|
||||
reflectPropertyToAttribute: function(name) {
|
||||
this._serializing = true;
|
||||
this.serializeValueToAttribute(this[name], Polymer.CaseMap.camelToDashCase(name));
|
||||
this._serializing = false;
|
||||
},
|
||||
serializeValueToAttribute: function(value, attribute, node) {
|
||||
var str = this.serialize(value);
|
||||
(node || this)[str === undefined ? "removeAttribute" : "setAttribute"](attribute, str);
|
||||
},
|
||||
deserialize: function(value, type) {
|
||||
switch (type) {
|
||||
case Number:
|
||||
value = Number(value);
|
||||
break;
|
||||
|
||||
case Boolean:
|
||||
value = value !== null;
|
||||
break;
|
||||
|
||||
case Object:
|
||||
try {
|
||||
value = JSON.parse(value);
|
||||
} catch (x) {}
|
||||
break;
|
||||
|
||||
case Array:
|
||||
try {
|
||||
value = JSON.parse(value);
|
||||
} catch (x) {
|
||||
value = null;
|
||||
console.warn("Polymer::Attributes: couldn`t decode Array as JSON");
|
||||
}
|
||||
break;
|
||||
|
||||
case Date:
|
||||
value = new Date(value);
|
||||
break;
|
||||
|
||||
case String:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return value;
|
||||
},
|
||||
serialize: function(value) {
|
||||
switch (typeof value) {
|
||||
case "boolean":
|
||||
return value ? "" : undefined;
|
||||
|
||||
case "object":
|
||||
if (value instanceof Date) {
|
||||
return value;
|
||||
} else if (value) {
|
||||
try {
|
||||
return JSON.stringify(value);
|
||||
} catch (x) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
default:
|
||||
return value != null ? value : undefined;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Polymer.Base._addFeature({
|
||||
_setupDebouncers: function() {
|
||||
this._debouncers = {};
|
||||
},
|
||||
debounce: function(jobName, callback, wait) {
|
||||
this._debouncers[jobName] = Polymer.Debounce.call(this, this._debouncers[jobName], callback, wait);
|
||||
},
|
||||
isDebouncerActive: function(jobName) {
|
||||
var debouncer = this._debouncers[jobName];
|
||||
return debouncer && debouncer.finish;
|
||||
},
|
||||
flushDebouncer: function(jobName) {
|
||||
var debouncer = this._debouncers[jobName];
|
||||
if (debouncer) {
|
||||
debouncer.complete();
|
||||
}
|
||||
},
|
||||
cancelDebouncer: function(jobName) {
|
||||
var debouncer = this._debouncers[jobName];
|
||||
if (debouncer) {
|
||||
debouncer.stop();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Polymer.version = "1.0.0";
|
||||
|
||||
Polymer.Base._addFeature({
|
||||
_registerFeatures: function() {
|
||||
this._prepIs();
|
||||
this._prepAttributes();
|
||||
this._prepBehaviors();
|
||||
this._prepExtends();
|
||||
this._prepConstructor();
|
||||
},
|
||||
_prepBehavior: function(b) {
|
||||
this._addHostAttributes(b.hostAttributes);
|
||||
},
|
||||
_marshalBehavior: function(b) {},
|
||||
_initFeatures: function() {
|
||||
this._marshalHostAttributes();
|
||||
this._setupDebouncers();
|
||||
this._marshalBehaviors();
|
||||
}
|
||||
});</script>
|
||||
|
1323
dashboard-ui/thirdparty/polymer/polymer-mini.html
vendored
1323
dashboard-ui/thirdparty/polymer/polymer-mini.html
vendored
File diff suppressed because it is too large
Load Diff
3776
dashboard-ui/thirdparty/polymer/polymer.html
vendored
3776
dashboard-ui/thirdparty/polymer/polymer.html
vendored
File diff suppressed because it is too large
Load Diff
@ -2462,7 +2462,8 @@ prevent = dy > dx;
|
||||
prevent = dx > dy;
|
||||
}
|
||||
if (prevent) {
|
||||
ev.preventDefault();
|
||||
//This breaks scrolling in safari
|
||||
//ev.preventDefault();
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -13455,7 +13456,7 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] {
|
||||
if (this.rightDrawer) {
|
||||
this[xDirection ? 'closeDrawer' : 'openDrawer']();
|
||||
} else {
|
||||
this[xDirection ? 'openDrawer' : 'closeDrawer']();
|
||||
this[xDirection || event.detail.dx > -80 ? 'openDrawer' : 'closeDrawer']();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user