Browse Source

Adopt > grab

old/redesign
Ruud 10 years ago
parent
commit
6442eb7dca
  1. 2
      couchpotato/core/_base/downloader/static/downloaders.js
  2. 2
      couchpotato/core/media/movie/_base/static/list.js
  3. 8
      couchpotato/core/media/movie/_base/static/search.js
  4. 2
      couchpotato/core/notifications/core/static/notification.js
  5. 2
      couchpotato/core/plugins/quality/static/quality.js
  6. 6
      couchpotato/core/plugins/wizard/static/wizard.js
  7. 20
      couchpotato/static/scripts/combined.plugins.min.js

2
couchpotato/core/_base/downloader/static/downloaders.js

@ -27,7 +27,7 @@ var DownloadersBase = new Class({
if(button_name.contains('Downloaders')) return; if(button_name.contains('Downloaders')) return;
new Element('.ctrlHolder.test_button').adopt( new Element('.ctrlHolder.test_button').grab(
new Element('a.button', { new Element('a.button', {
'text': button_name, 'text': button_name,
'events': { 'events': {

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

@ -582,7 +582,7 @@ var MovieList = new Class({
var loader_timeout; var loader_timeout;
if(self.movies.length === 0 && self.options.loader){ if(self.movies.length === 0 && self.options.loader){
self.loader_first = new Element('div.mask.loading.with_message').adopt( self.loader_first = new Element('div.mask.loading.with_message').grab(
new Element('div.message', {'text': self.options.title ? 'Loading \'' + self.options.title + '\'' : 'Loading...'}) new Element('div.message', {'text': self.options.title ? 'Loading \'' + self.options.title + '\'' : 'Loading...'})
).inject(self.el, 'top'); ).inject(self.el, 'top');
createSpinner(self.loader_first); createSpinner(self.loader_first);

8
couchpotato/core/media/movie/_base/static/search.js

@ -38,8 +38,8 @@ var BlockSearchMovieItem = new Class({
'width': null 'width': null
}) : null, }) : null,
self.options_el = new Element('div.options'), self.options_el = new Element('div.options'),
self.data_container = new Element('div.data').adopt( self.data_container = new Element('div.data').grab(
self.info_container = new Element('div.info').adopt( self.info_container = new Element('div.info').grab(
new Element('h2', { new Element('h2', {
'class': info.in_wanted && info.in_wanted.profile_id || in_library ? 'in_library_wanted' : '', 'class': info.in_wanted && info.in_wanted.profile_id || in_library ? 'in_library_wanted' : '',
'title': self.getTitle() 'title': self.getTitle()
@ -122,7 +122,7 @@ var BlockSearchMovieItem = new Class({
}, },
'onComplete': function(json){ 'onComplete': function(json){
self.options_el.empty(); self.options_el.empty();
self.options_el.adopt( self.options_el.grab(
new Element('div.message', { new Element('div.message', {
'text': json.success ? 'Movie successfully added.' : 'Movie didn\'t add properly. Check logs' 'text': json.success ? 'Movie successfully added.' : 'Movie didn\'t add properly. Check logs'
}) })
@ -133,7 +133,7 @@ var BlockSearchMovieItem = new Class({
}, },
'onFailure': function(){ 'onFailure': function(){
self.options_el.empty(); self.options_el.empty();
self.options_el.adopt( self.options_el.grab(
new Element('div.message', { new Element('div.message', {
'text': 'Something went wrong, check the logs for more info.' 'text': 'Something went wrong, check the logs for more info.'
}) })

2
couchpotato/core/notifications/core/static/notification.js

@ -221,7 +221,7 @@ var NotificationBase = new Class({
if(button_name.contains('Notifications')) return; if(button_name.contains('Notifications')) return;
new Element('.ctrlHolder.test_button').adopt( new Element('.ctrlHolder.test_button').grab(
new Element('a.button', { new Element('a.button', {
'text': button_name, 'text': button_name,
'events': { 'events': {

2
couchpotato/core/plugins/quality/static/quality.js

@ -110,7 +110,7 @@ var QualityBase = new Class({
self.settings.createGroup({ self.settings.createGroup({
'label': 'Profile Defaults', 'label': 'Profile Defaults',
'description': '(Needs refresh \'' +(App.isMac() ? 'CMD+R' : 'F5')+ '\' after editing)' 'description': '(Needs refresh \'' +(App.isMac() ? 'CMD+R' : 'F5')+ '\' after editing)'
}).adopt( }).grab(
new Element('.ctrlHolder#profile_ordering').adopt( new Element('.ctrlHolder#profile_ordering').adopt(
new Element('label[text=Order]'), new Element('label[text=Order]'),
self.profiles_list = new Element('ul'), self.profiles_list = new Element('ul'),

6
couchpotato/core/plugins/wizard/static/wizard.js

@ -50,7 +50,7 @@ Page.Wizard = new Class({
'description': 'Are you done? Did you fill in everything as much as possible?' + 'description': 'Are you done? Did you fill in everything as much as possible?' +
'<br />Be sure to check the settings to see what more CP can do!<br /><br />' + '<br />Be sure to check the settings to see what more CP can do!<br /><br />' +
'<div class="wizard_support">After you\'ve used CP for a while, and you like it (which of course you will), consider supporting CP. Maybe even by writing some code. <br />Or by getting a subscription at <a href="https://usenetserver.com/partners/?a_aid=couchpotato&a_bid=3f357c6f">Usenet Server</a> or <a href="http://www.newshosting.com/partners/?a_aid=couchpotato&a_bid=a0b022df">Newshosting</a>.</div>', '<div class="wizard_support">After you\'ve used CP for a while, and you like it (which of course you will), consider supporting CP. Maybe even by writing some code. <br />Or by getting a subscription at <a href="https://usenetserver.com/partners/?a_aid=couchpotato&a_bid=3f357c6f">Usenet Server</a> or <a href="http://www.newshosting.com/partners/?a_aid=couchpotato&a_bid=a0b022df">Newshosting</a>.</div>',
'content': new Element('div').adopt( 'content': new Element('div').grab(
new Element('a.button.green', { new Element('a.button.green', {
'styles': { 'styles': {
'margin-top': 20 'margin-top': 20
@ -158,7 +158,7 @@ Page.Wizard = new Class({
self.el.getElement('.tab_'+inc).inject(group_container); self.el.getElement('.tab_'+inc).inject(group_container);
}); });
new Element('li.t_'+group).adopt( new Element('li.t_'+group).grab(
new Element('a', { new Element('a', {
'href': App.createUrl('wizard/'+group), 'href': App.createUrl('wizard/'+group),
'text': (self.headers[group].label || group).capitalize() 'text': (self.headers[group].label || group).capitalize()
@ -179,7 +179,7 @@ Page.Wizard = new Class({
} }
} }
else { else {
new Element('li.t_'+group).adopt( new Element('li.t_'+group).grab(
new Element('a', { new Element('a', {
'href': App.createUrl('wizard/'+group), 'href': App.createUrl('wizard/'+group),
'text': (self.headers[group].label || group).capitalize() 'text': (self.headers[group].label || group).capitalize()

20
couchpotato/static/scripts/combined.plugins.min.js

@ -14,7 +14,7 @@ var DownloadersBase = new Class({
addTestButton: function(fieldset, plugin_name) { addTestButton: function(fieldset, plugin_name) {
var self = this, button_name = self.testButtonName(fieldset); var self = this, button_name = self.testButtonName(fieldset);
if (button_name.contains("Downloaders")) return; if (button_name.contains("Downloaders")) return;
new Element(".ctrlHolder.test_button").adopt(new Element("a.button", { new Element(".ctrlHolder.test_button").grab(new Element("a.button", {
text: button_name, text: button_name,
events: { events: {
click: function() { click: function() {
@ -837,7 +837,7 @@ var MovieList = new Class({
} }
var loader_timeout; var loader_timeout;
if (self.movies.length === 0 && self.options.loader) { if (self.movies.length === 0 && self.options.loader) {
self.loader_first = new Element("div.mask.loading.with_message").adopt(new Element("div.message", { self.loader_first = new Element("div.mask.loading.with_message").grab(new Element("div.message", {
text: self.options.title ? "Loading '" + self.options.title + "'" : "Loading..." text: self.options.title ? "Loading '" + self.options.title + "'" : "Loading..."
})).inject(self.el, "top"); })).inject(self.el, "top");
createSpinner(self.loader_first); createSpinner(self.loader_first);
@ -2102,7 +2102,7 @@ var BlockSearchMovieItem = new Class({
src: info.images.poster[0], src: info.images.poster[0],
height: null, height: null,
width: null width: null
}) : null, self.options_el = new Element("div.options"), self.data_container = new Element("div.data").adopt(self.info_container = new Element("div.info").adopt(new Element("h2", { }) : null, self.options_el = new Element("div.options"), self.data_container = new Element("div.data").grab(self.info_container = new Element("div.info").grab(new Element("h2", {
class: info.in_wanted && info.in_wanted.profile_id || in_library ? "in_library_wanted" : "", class: info.in_wanted && info.in_wanted.profile_id || in_library ? "in_library_wanted" : "",
title: self.getTitle() title: self.getTitle()
}).adopt(self.title = new Element("span.title", { }).adopt(self.title = new Element("span.title", {
@ -2159,7 +2159,7 @@ var BlockSearchMovieItem = new Class({
}, },
onComplete: function(json) { onComplete: function(json) {
self.options_el.empty(); self.options_el.empty();
self.options_el.adopt(new Element("div.message", { self.options_el.grab(new Element("div.message", {
text: json.success ? "Movie successfully added." : "Movie didn't add properly. Check logs" text: json.success ? "Movie successfully added." : "Movie didn't add properly. Check logs"
})); }));
self.mask.fade("out"); self.mask.fade("out");
@ -2167,7 +2167,7 @@ var BlockSearchMovieItem = new Class({
}, },
onFailure: function() { onFailure: function() {
self.options_el.empty(); self.options_el.empty();
self.options_el.adopt(new Element("div.message", { self.options_el.grab(new Element("div.message", {
text: "Something went wrong, check the logs for more info." text: "Something went wrong, check the logs for more info."
})); }));
self.mask.fade("out"); self.mask.fade("out");
@ -2616,7 +2616,7 @@ var NotificationBase = new Class({
addTestButton: function(fieldset, plugin_name) { addTestButton: function(fieldset, plugin_name) {
var self = this, button_name = self.testButtonName(fieldset); var self = this, button_name = self.testButtonName(fieldset);
if (button_name.contains("Notifications")) return; if (button_name.contains("Notifications")) return;
new Element(".ctrlHolder.test_button").adopt(new Element("a.button", { new Element(".ctrlHolder.test_button").grab(new Element("a.button", {
text: button_name, text: button_name,
events: { events: {
click: function() { click: function() {
@ -3496,7 +3496,7 @@ var QualityBase = new Class({
self.settings.createGroup({ self.settings.createGroup({
label: "Profile Defaults", label: "Profile Defaults",
description: "(Needs refresh '" + (App.isMac() ? "CMD+R" : "F5") + "' after editing)" description: "(Needs refresh '" + (App.isMac() ? "CMD+R" : "F5") + "' after editing)"
}).adopt(new Element(".ctrlHolder#profile_ordering").adopt(new Element("label[text=Order]"), self.profiles_list = new Element("ul"), new Element("p.formHint", { }).grab(new Element(".ctrlHolder#profile_ordering").adopt(new Element("label[text=Order]"), self.profiles_list = new Element("ul"), new Element("p.formHint", {
html: "Change the order the profiles are in the dropdown list. Uncheck to hide it completely.<br />First one will be default." html: "Change the order the profiles are in the dropdown list. Uncheck to hide it completely.<br />First one will be default."
}))).inject(self.content); }))).inject(self.content);
Array.each(self.profiles, function(profile) { Array.each(self.profiles, function(profile) {
@ -3729,7 +3729,7 @@ Page.Wizard = new Class({
finish: { finish: {
title: "Finishing Up", title: "Finishing Up",
description: "Are you done? Did you fill in everything as much as possible?" + "<br />Be sure to check the settings to see what more CP can do!<br /><br />" + '<div class="wizard_support">After you\'ve used CP for a while, and you like it (which of course you will), consider supporting CP. Maybe even by writing some code. <br />Or by getting a subscription at <a href="https://usenetserver.com/partners/?a_aid=couchpotato&a_bid=3f357c6f">Usenet Server</a> or <a href="http://www.newshosting.com/partners/?a_aid=couchpotato&a_bid=a0b022df">Newshosting</a>.</div>', description: "Are you done? Did you fill in everything as much as possible?" + "<br />Be sure to check the settings to see what more CP can do!<br /><br />" + '<div class="wizard_support">After you\'ve used CP for a while, and you like it (which of course you will), consider supporting CP. Maybe even by writing some code. <br />Or by getting a subscription at <a href="https://usenetserver.com/partners/?a_aid=couchpotato&a_bid=3f357c6f">Usenet Server</a> or <a href="http://www.newshosting.com/partners/?a_aid=couchpotato&a_bid=a0b022df">Newshosting</a>.</div>',
content: new Element("div").adopt(new Element("a.button.green", { content: new Element("div").grab(new Element("a.button.green", {
styles: { styles: {
"margin-top": 20 "margin-top": 20
}, },
@ -3809,7 +3809,7 @@ Page.Wizard = new Class({
self.headers[group].include.each(function(inc) { self.headers[group].include.each(function(inc) {
self.el.getElement(".tab_" + inc).inject(group_container); self.el.getElement(".tab_" + inc).inject(group_container);
}); });
new Element("li.t_" + group).adopt(new Element("a", { new Element("li.t_" + group).grab(new Element("a", {
href: App.createUrl("wizard/" + group), href: App.createUrl("wizard/" + group),
text: (self.headers[group].label || group).capitalize() text: (self.headers[group].label || group).capitalize()
})).inject(tabs); })).inject(tabs);
@ -3821,7 +3821,7 @@ Page.Wizard = new Class({
if (url_split.length > 3) a.set("href", a.get("href").replace(url_split[url_split.length - 3] + "/", "")); if (url_split.length > 3) a.set("href", a.get("href").replace(url_split[url_split.length - 3] + "/", ""));
} }
} else { } else {
new Element("li.t_" + group).adopt(new Element("a", { new Element("li.t_" + group).grab(new Element("a", {
href: App.createUrl("wizard/" + group), href: App.createUrl("wizard/" + group),
text: (self.headers[group].label || group).capitalize() text: (self.headers[group].label || group).capitalize()
})).inject(tabs); })).inject(tabs);

Loading…
Cancel
Save