Update styles for confirm modal box

This commit is contained in:
Jonathan Wong 2015-09-25 00:26:54 -07:00
parent dfd0b1bf64
commit 1c3a3876e3
4 changed files with 36 additions and 19 deletions

View file

@ -1418,6 +1418,13 @@ a:hover .item-children-poster {
width: 40px; width: 40px;
margin-right: 20px; margin-right: 20px;
} }
#new_title h3 {
color: #F9AA03;
font-size: 14px;
line-height: 1.42857143;
font-weight: bold;
margin: 0;
}
.settings-alert { .settings-alert {
float: left; float: left;
padding: 0; padding: 0;

View file

@ -41,6 +41,7 @@ parent_title Returns the name of the album.
grandparent_title Returns the name of the show, or artist. grandparent_title Returns the name of the show, or artist.
media_index Returns the index number of the episode, or track. media_index Returns the index number of the episode, or track.
parent_media_index Returns the index number of the season. parent_media_index Returns the index number of the season.
year Returns the release year of the movie, or show.
media_type Returns the type of media. Either 'movie', 'show', 'season', 'episode', 'artist', 'album', or 'track'. media_type Returns the type of media. Either 'movie', 'show', 'season', 'episode', 'artist', 'album', or 'track'.
rating_key Returns the unique identifier for the media item. rating_key Returns the unique identifier for the media item.
@ -454,8 +455,26 @@ DOCUMENTATION :: END
<h4 class="modal-title" id="myModalLabel">Confirm Update</h4> <h4 class="modal-title" id="myModalLabel">Confirm Update</h4>
</div> </div>
<div class="modal-body" style="text-align: center;"> <div class="modal-body" style="text-align: center;">
<p>Are you REALLY sure you want to replace <strong>${query['title']}</strong> with </p> <p>Are you REALLY sure you want to replace
<p><strong><span id="new_title"></span></strong></p> <p><strong>
% if query['media_type'] == 'movie':
${query['title']}<br />${query['year']}
% elif query['media_type'] == 'show':
${query['grandparent_title']}<br />${query['year']}
% elif query['media_type'] == 'season':
${query['grandparent_title']}<br />S${query['parent_media_index']}
% elif query['media_type'] == 'episode':
${query['grandparent_title']}<br />${query['title']}<br />S${query['parent_media_index']} &middot; E${query['media_index']}
% elif query['media_type'] == 'artist':
${query['grandparent_title']}
% elif query['media_type'] == 'album':
${query['grandparent_title']}<br />${query['parent_title']}
% elif query['media_type'] == 'track':
${query['grandparent_title']}<br />${query['title']}<br />${query['parent_title']}
% endif
</strong></p>
<p> with </p>
<p><span id="new_title"></span></p>
<p>This is permanent and cannot be undone!</p> <p>This is permanent and cannot be undone!</p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
@ -613,7 +632,7 @@ DOCUMENTATION :: END
var new_rating_key = $(this).attr("id"); var new_rating_key = $(this).attr("id");
var new_href = $(this).attr("href"); var new_href = $(this).attr("href");
$('#new_title').text($(this).find('.item-children-instance-text-wrapper').text()); $('#new_title').html($(this).find('.item-children-instance-text-wrapper').html());
$('#confirm-modal').modal(); $('#confirm-modal').modal();
$('#confirm-modal').one('click', '#confirm-update', function () { $('#confirm-modal').one('click', '#confirm-update', function () {

View file

@ -108,16 +108,11 @@ DOCUMENTATION :: END
<li> <li>
<a href="info?item_id=${child['rating_key']}" id="${child['rating_key']}"> <a href="info?item_id=${child['rating_key']}" id="${child['rating_key']}">
<div class="item-children-poster"> <div class="item-children-poster">
<div class="item-children-poster-face season-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450);"> <div class="item-children-poster-face season-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450);"></div>
<div class="item-children-card-overlay">
<div class="item-children-overlay-text">
Season ${child['index']}
</div>
</div>
</div>
</div> </div>
<div class="item-children-instance-text-wrapper season-item"> <div class="item-children-instance-text-wrapper season-item">
<h3 title="${child['parent_title']}">${child['parent_title']}</h3> <h3 title="${child['parent_title']}">${child['parent_title']}</h3>
<h3 class="text-muted">S${child['parent_index']}</h3>
</div> </div>
</a> </a>
</li> </li>
@ -135,18 +130,12 @@ DOCUMENTATION :: END
<li> <li>
<a href="info?item_id=${child['rating_key']}" id="${child['rating_key']}"> <a href="info?item_id=${child['rating_key']}" id="${child['rating_key']}">
<div class="item-children-poster"> <div class="item-children-poster">
<div class="item-children-poster-face episode-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450);"> <div class="item-children-poster-face episode-poster" style="background-image: url(pms_image_proxy?img=${child['thumb']}&width=300&height=450);"></div>
<div class="item-children-card-overlay">
<div class="item-children-overlay-text">
Episode ${child['index']}
</div>
</div>
</div>
</div> </div>
<div class="item-children-instance-text-wrapper episode-item"> <div class="item-children-instance-text-wrapper episode-item">
<h3 title="${child['grandparent_title']}">${child['grandparent_title']}</h3> <h3 title="${child['grandparent_title']}">${child['grandparent_title']}</h3>
<h3 title="${child['title']}">${child['title']}</h3> <h3 title="${child['title']}">${child['title']}</h3>
<h3 class="text-muted">S${child['parent_index']}</h3> <h3 class="text-muted">S${child['parent_index']} &middot; E${child['index']}</h3>
</div> </div>
</a> </a>
</li> </li>

View file

@ -784,7 +784,7 @@ class DataFactory(object):
if rating_key: if rating_key:
query = 'SELECT rating_key, parent_rating_key, grandparent_rating_key, title, parent_title, grandparent_title, ' \ query = 'SELECT rating_key, parent_rating_key, grandparent_rating_key, title, parent_title, grandparent_title, ' \
'media_index, parent_media_index, media_type ' \ 'media_index, parent_media_index, year, media_type ' \
'FROM session_history_metadata ' \ 'FROM session_history_metadata ' \
'WHERE rating_key = ? ' \ 'WHERE rating_key = ? ' \
'OR parent_rating_key = ? ' \ 'OR parent_rating_key = ? ' \
@ -804,6 +804,7 @@ class DataFactory(object):
grandparent_title = item['grandparent_title'] grandparent_title = item['grandparent_title']
media_index = item['media_index'] media_index = item['media_index']
parent_media_index = item['parent_media_index'] parent_media_index = item['parent_media_index']
year = item['year']
if str(item['rating_key']) == rating_key: if str(item['rating_key']) == rating_key:
query_string = item['title'] query_string = item['title']
@ -832,6 +833,7 @@ class DataFactory(object):
'grandparent_title': grandparent_title, 'grandparent_title': grandparent_title,
'media_index': media_index, 'media_index': media_index,
'parent_media_index': parent_media_index, 'parent_media_index': parent_media_index,
'year': year,
'media_type': media_type, 'media_type': media_type,
'rating_key': rating_key 'rating_key': rating_key
} }