Skip to content

Commit

Permalink
MovieOrganizer: migrated to emby controls
Browse files Browse the repository at this point in the history
  • Loading branch information
softworkz committed Aug 27, 2016
1 parent 52818d1 commit 1ad27ce
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 88 deletions.
8 changes: 4 additions & 4 deletions MovieOrganizer/Html/fileorganizer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
define(['dialogHelper', 'paper-checkbox', 'paper-input', 'emby-button', 'paper-icon-button-light'], function (dialogHelper) {
define(['dialogHelper', 'require', 'emby-checkbox', 'emby-input', 'emby-button', 'emby-select', 'formDialogStyle'], function (dialogHelper, require) {

var extractedName;
var extractedYear;
Expand Down Expand Up @@ -220,7 +220,7 @@
data: JSON.stringify(options),
contentType: 'application/json'
});
};
}

function showNewSeriesDialog(dlg) {

Expand Down Expand Up @@ -345,7 +345,7 @@
dlg.innerHTML = html;
document.body.appendChild(dlg);

dlg.querySelector('.dialogHeaderTitle').innerHTML = Globalize.translate('FileOrganizeManually');
dlg.querySelector('.formDialogHeaderTitle').innerHTML = Globalize.translate('FileOrganizeManually');

dialogHelper.open(dlg);

Expand Down Expand Up @@ -407,7 +407,7 @@
selectTab(dlg, 0);

initForms(dlg, item);
}
};

xhr.send();
});
Expand Down
169 changes: 87 additions & 82 deletions MovieOrganizer/Html/fileorganizer.template.html
Original file line number Diff line number Diff line change
@@ -1,91 +1,96 @@
<div class="dialogHeader" style="margin:0 0 2em;">
<button is="paper-icon-button-light" class="btnCancel autoSize" tabindex="-1">
<i class="md-icon">&#xE5C4;</i>
</button>
<div class="dialogHeaderTitle">
<div class="formDialogHeader">
<button is="emby-button" class="btnCancel autoSize" tabindex="-1"><i class="md-icon">&#xE5C4;</i></button>
<div class="formDialogHeaderTitle">
</div>
</div>

<div id="tabcontainer" class="readOnlyContent" style="margin:auto;">
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true" style="margin-top: 1em">
<a id="episode" href="#" data-role="button" class="ui-btn-active">Series Episode</a>
<a id="movie" href="#" data-role="button">Organize Movie</a>
</div>
</div>
<div class="formDialogContent smoothScrollY">
<div class="dialog-content-centered">
<div id="tabcontainer" class="readOnlyContent" style="margin:auto;">
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true" style="margin-top: 1em">
<a id="episode" href="#" data-role="button" class="ui-btn-active">Series Episode</a>
<a id="movie" href="#" data-role="button">Organize Movie</a>
</div>
</div>

<form id="organizeSeries" class="episodeCorrectionForm" style="margin:auto;">
<form id="organizeSeries" class="episodeCorrectionForm" style="margin:auto;">

<p><b>Filename:</b><br /><span class="inputFile"></span></p>
<p class="paraInputSeriesName"><b>Extracted Series Name:</b><br /><span class="inputSeriesName"></span></p>
<p class="paraInputYear"><b>Extracted Year::</b><br /><span class="inputYear"></span></p>
<p><b>Filename:</b> <span class="inputFile"></span></p>
<p class="paraInputSeriesName"><b>Extracted Series Name:</b> <span class="inputSeriesName"></span></p>
<p class="paraInputYear"><b>Extracted Year::</b> <span class="inputYear"></span></p>

<div style="margin: 2em 0 1em;">
<div style="width:85%;display:inline-block;">
<label for="selectSeries" class="selectLabel">${LabelSeries}</label>
<select id="selectSeries" data-mini="true" required="required"></select>
</div>
<button type="button" is="paper-icon-button-light" id="btnNewSeries" class="autoSize" title="${ButtonNew}">
<i class="md-icon">add</i>
</button>
</div>
<div class="fldSelectSeriesFolder hide" style="margin: 1em 0 1em;">
<div style="width:100%;display:inline-block;">
<label for="selectSeriesFolder" class="selectLabel">Series Root Folder</label>
<select id="selectSeriesFolder" data-mini="true"></select>
</div>
</div>
<div style="margin: 1em 0;">
<paper-input id="txtSeason" type="number" pattern="[0-9]*" required min="0" label="${LabelSeasonNumber}"></paper-input>
</div>
<div style="margin: 1em 0;">
<paper-input id="txtEpisode" type="number" pattern="[0-9]*" required min="0" label="${LabelEpisodeNumber}"></paper-input>
</div>
<div style="margin: 1em 0;">
<paper-input id="txtEndingEpisode" type="number" pattern="[0-9]*" min="0" label="${LabelEndingEpisodeNumber}"></paper-input>
<div class="fieldDescription">${LabelEndingEpisodeNumberHelp}</div>
</div>
<div class="fldRemember hide">
<br />
<paper-checkbox type="checkbox" id="chkRememberCorrection">${OptionRememberOrganizeCorrection} <span class="extractedName" style="font-weight: bold; font-style: italic" /></paper-checkbox>
</div>
<br />
<button is="emby-button" type="submit" class="raised submit block">
<i class="md-icon">check</i>
<span>${ButtonOk}</span>
</button>
<input id="hfResultId" type="hidden" />
</form>

<form class="organizeMovieForm" id="organizeMovies" class="hide" style="margin:auto;">

<p><b>Filename:</b><br /><span class="inputFile2"></span></p>
<p class="paraInputSeriesName2"><b>Extracted Name:</b><br /><span class="inputSeriesName2"></span></p>
<p class="paraInputYear2"><b>Extracted Year::</b><br /><span class="inputYear2"></span></p>

<div style="margin: 2em 0 1em;">
<button is="emby-button" type="button" class="raised block" id="btnIdentifyMovie">
<i class="md-icon">check</i>
<span>Identify Movie</span>
</button>
</div>
<div class="selectContainer" style="margin: 2em 0 1em;">
<div style="display:flex; align-items:center;">
<div style="flex-grow:1;">
<select is="emby-select" id="selectSeries" label="${LabelSeries}" required></select>
</div>
<button type="button" is="emby-button" id="btnNewSeries" class="autoSize" title="${ButtonNew}"><i class="md-icon">add</i></button>
</div>
</div>
<div class="selectContainer fldSelectSeriesFolder hide">
<select is="emby-select" id="selectSeriesFolder" label="Series Root Folder" required></select>
<div class="fieldDescription"></div>
</div>

<div id="identifiedMovie" class="hide">
<div style="margin: 1em 0;">
<paper-input id="txtSelectedMovie" required readonly label="Identified Movie"></paper-input>
</div>
<br />
<div class="fldSelectMovieFolder" style="margin: 1em 0 1em;">
<div style="width:100%;display:inline-block;">
<label for="selectMovieFolder" class="selectLabel">Movie Root Folder</label>
<select id="selectMovieFolder" data-mini="true"></select>

<div class="inputContainer">
<input is="emby-input" id="txtSeason" type="number" pattern="[0-9]*" required min="0" label="${LabelSeasonNumber}" />
</div>
</div>
<button is="emby-button" type="submit" class="raised submit block">
<i class="md-icon">check</i>
<span>${ButtonOk}</span>
</button>
</div>
<input id="hfResultIdMovie" type="hidden" />
</form>

<div id="bottomspace" style="min-height: 1em;" />
<div class="inputContainer">
<input is="emby-input" id="txtEpisode" type="number" pattern="[0-9]*" required min="0" label="${LabelEpisodeNumber}" />
</div>

<div class="inputContainer">
<input is="emby-input" id="txtEndingEpisode" type="number" pattern="[0-9]*" min="0" label="${LabelEndingEpisodeNumber}" />
<div class="fieldDescription">${LabelEndingEpisodeNumberHelp}</div>
</div>

<div class="fldRemember hide">
<label class="checkboxContainer">
<input type="checkbox" is="emby-checkbox" id="chkRememberCorrection" />
<span>${OptionRememberOrganizeCorrection} <span class="extractedName" style="font-weight: bold; font-style: italic" /></span>
</label>
</div>
<br />
<button is="emby-button" type="submit" class="raised submit block">
<i class="md-icon">check</i>
<span>${ButtonOk}</span>
</button>
<input id="hfResultId" type="hidden" />
</form>

<form class="organizeMovieForm hide" id="organizeMovies" style="margin:auto;">

<p><b>Filename:</b><br /><span class="inputFile2"></span></p>
<p class="paraInputSeriesName2"><b>Extracted Name:</b><br /><span class="inputSeriesName2"></span></p>
<p class="paraInputYear2"><b>Extracted Year::</b><br /><span class="inputYear2"></span></p>

<div style="margin: 2em 0 1em;">
<button is="emby-button" type="button" class="raised block" id="btnIdentifyMovie">
<i class="md-icon">check</i>
<span>Identify Movie</span>
</button>
</div>

<div id="identifiedMovie" class="hide">
<div class="inputContainer">
<input is="emby-input" id="txtSelectedMovie" type="text" required readonly label="Identified Movie" />
</div>

<div class="selectContainer fldSelectMovieFolder">
<select is="emby-select" id="selectMovieFolder" label="Movie Root Folder" required></select>
<div class="fieldDescription"></div>
</div>

<button is="emby-button" type="submit" class="raised submit block">
<i class="md-icon">check</i>
<span>${ButtonOk}</span>
</button>
</div>
<input id="hfResultIdMovie" type="hidden" />
</form>

<div id="bottomspace" style="min-height: 1em;" />
</div>
</div>
4 changes: 2 additions & 2 deletions MovieOrganizer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("MovieOrganizer Beta 4")]
[assembly: AssemblyDescription("Beta 4")]
[assembly: AssemblyTitle("MovieOrganizer Beta 5")]
[assembly: AssemblyDescription("Beta 5")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MovieOrganizer")]
Expand Down

0 comments on commit 1ad27ce

Please sign in to comment.