Browse Source

Show "Add" form on suggestion details

pull/5180/head
Ruud 10 years ago
parent
commit
defaa3cfca
  1. 2
      couchpotato/core/media/movie/_base/static/details.js
  2. 23
      couchpotato/core/media/movie/_base/static/movie.actions.js
  3. 32
      couchpotato/core/media/movie/_base/static/movie.scss
  4. 2
      couchpotato/static/scripts/library/question.js
  5. 2
      couchpotato/static/style/main.scss

2
couchpotato/core/media/movie/_base/static/details.js

@ -96,7 +96,7 @@ var MovieDetails = new Class({
var ended = function() { var ended = function() {
self.el.dispose(); self.el.dispose();
self.el.removeEventListener('transitionend', ended); self.el.removeEventListener('transitionend', ended);
} };
self.el.addEventListener('transitionend', ended, false); self.el.addEventListener('transitionend', ended, false);
// animate out // animate out

23
couchpotato/core/media/movie/_base/static/movie.actions.js

@ -775,38 +775,33 @@ MA.Refresh = new Class({
MA.Add = new Class({ MA.Add = new Class({
Extends: MovieAction, Extends: MovieAction,
label: 'Add',
create: function() { create: function() {
var self = this; var self = this;
self.button = self.createButton(); self.button = new Element('a.add', {
self.detail_button = self.createButton();
},
createButton: function(){
var self = this;
return new Element('a.add', {
'text': 'Add', 'text': 'Add',
'title': 'Re-add the movie and mark all previous snatched/downloaded as ignored', 'title': 'Re-add the movie and mark all previous snatched/downloaded as ignored',
'events': { 'events': {
'click': self.doAdd.bind(self) 'click': function(){
self.movie.openDetails();
}
} }
}); });
}, },
doAdd: function(e){ getDetails: function(){
var self = this; var self = this;
(e).preventDefault();
var m = new BlockSearchMovieItem(movie, { var m = new BlockSearchMovieItem(self.movie.data.info, {
'onAdded': function(){ 'onAdded': function(){
//self.afterAdded(m, movie);
} }
}); });
m.showOptions();
p(m); return m;
} }
}); });

32
couchpotato/core/media/movie/_base/static/movie.scss

@ -551,6 +551,38 @@
} }
} }
.section_add {
background: $theme_off;
.options > div {
display: flex;
select {
vertical-align: middle;
display: inline-block;
margin-right: 10px;
min-width: 70px;
flex: 1 auto;
@include media-phablet {
min-width: 0;
}
}
.button {
background: #FFF;
flex: 1 auto;
vertical-align: middle;
display: inline-block;
text-align: center;
}
}
.thumbnail, .data {
display: none;
}
}
.releases { .releases {
.buttons { .buttons {

2
couchpotato/static/scripts/library/question.js

@ -64,7 +64,7 @@ var Question = new Class( {
var ended = function() { var ended = function() {
self.container.dispose(); self.container.dispose();
self.container.removeEventListener('transitionend', ended); self.container.removeEventListener('transitionend', ended);
} };
self.container.addEventListener('transitionend', ended, false); self.container.addEventListener('transitionend', ended, false);
// animate out // animate out

2
couchpotato/static/style/main.scss

@ -64,7 +64,7 @@ input, textarea, select {
@include media-phablet { @include media-phablet {
width: $header_width_mobile; width: $header_width_mobile;
min-width: $header_width_mobile; min-width: $header_width_mobile;
z-index: 1; z-index: 21;
} }
a { a {

Loading…
Cancel
Save