Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SickRage-1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
SickRage-1
Commits
c01cafcb
Commit
c01cafcb
authored
Sep 29, 2015
by
Alexis Tyler
Browse files
Options
Downloads
Patches
Plain Diff
Fixes
https://github.com/SiCKRAGETV/sickrage-issues/issues/3010
parent
40a2e325
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
gui/slick/js/config.js
+0
-115
0 additions, 115 deletions
gui/slick/js/config.js
gui/slick/js/new/config_backuprestore.js
+115
-1
115 additions, 1 deletion
gui/slick/js/new/config_backuprestore.js
gui/slick/views/config_backuprestore.mako
+0
-3
0 additions, 3 deletions
gui/slick/views/config_backuprestore.mako
with
115 additions
and
119 deletions
gui/slick/js/config.js
deleted
100644 → 0
+
0
−
115
View file @
40a2e325
$
(
document
).
ready
(
function
(){
$
(
"
.enabler
"
).
each
(
function
(){
if
(
!
$
(
this
).
prop
(
'
checked
'
))
$
(
'
#content_
'
+
$
(
this
).
attr
(
'
id
'
)).
hide
();
});
$
(
"
.enabler
"
).
click
(
function
()
{
if
(
$
(
this
).
prop
(
'
checked
'
)){
$
(
'
#content_
'
+
$
(
this
).
attr
(
'
id
'
)).
fadeIn
(
"
fast
"
,
"
linear
"
);
}
else
{
$
(
'
#content_
'
+
$
(
this
).
attr
(
'
id
'
)).
fadeOut
(
"
fast
"
,
"
linear
"
);
}
});
$
(
"
.viewIf
"
).
click
(
function
()
{
if
(
$
(
this
).
prop
(
'
checked
'
))
{
$
(
'
.hide_if_
'
+
$
(
this
).
attr
(
'
id
'
)).
css
(
'
display
'
,
'
none
'
);
$
(
'
.show_if_
'
+
$
(
this
).
attr
(
'
id
'
)).
fadeIn
(
"
fast
"
,
"
linear
"
);
}
else
{
$
(
'
.show_if_
'
+
$
(
this
).
attr
(
'
id
'
)).
css
(
'
display
'
,
'
none
'
);
$
(
'
.hide_if_
'
+
$
(
this
).
attr
(
'
id
'
)).
fadeIn
(
"
fast
"
,
"
linear
"
);
}
});
$
(
"
.datePresets
"
).
click
(
function
()
{
var
def
=
$
(
'
#date_presets
'
).
val
();
if
(
$
(
this
).
prop
(
'
checked
'
)
&&
'
%x
'
==
def
)
{
def
=
'
%a, %b %d, %Y
'
;
$
(
'
#date_use_system_default
'
).
html
(
'
1
'
);
}
else
if
(
!
$
(
this
).
prop
(
'
checked
'
)
&&
'
1
'
==
$
(
'
#date_use_system_default
'
).
html
()){
def
=
'
%x
'
;
}
$
(
'
#date_presets
'
).
attr
(
'
name
'
,
'
date_preset_old
'
);
$
(
'
#date_presets
'
).
attr
(
'
id
'
,
'
date_presets_old
'
);
$
(
'
#date_presets_na
'
).
attr
(
'
name
'
,
'
date_preset
'
);
$
(
'
#date_presets_na
'
).
attr
(
'
id
'
,
'
date_presets
'
);
$
(
'
#date_presets_old
'
).
attr
(
'
name
'
,
'
date_preset_na
'
);
$
(
'
#date_presets_old
'
).
attr
(
'
id
'
,
'
date_presets_na
'
);
if
(
def
)
$
(
'
#date_presets
'
).
val
(
def
);
});
// bind 'myForm' and provide a simple callback function
$
(
'
#configForm
'
).
ajaxForm
({
beforeSubmit
:
function
(){
$
(
'
.config_submitter .config_submitter_refresh
'
).
each
(
function
(){
$
(
this
).
attr
(
"
disabled
"
,
"
disabled
"
);
$
(
this
).
after
(
'
<span><img src="
'
+
srRoot
+
'
/images/loading16
'
+
themeSpinner
+
'
.gif"> Saving...</span>
'
);
$
(
this
).
hide
();
});
},
success
:
function
(){
setTimeout
(
function
()
{
"
use strict
"
;
config_success
();
},
2000
);
}
});
$
(
'
#api_key
'
).
click
(
function
(){
$
(
'
#api_key
'
).
select
();
});
$
(
"
#generate_new_apikey
"
).
click
(
function
(){
$
.
get
(
srRoot
+
'
/config/general/generateApiKey
'
,
function
(
data
){
if
(
data
.
error
!==
undefined
)
{
alert
(
data
.
error
);
return
;
}
$
(
'
#api_key
'
).
val
(
data
);
});
});
$
(
'
#branchCheckout
'
).
click
(
function
()
{
var
url
=
srRoot
+
'
/home/branchCheckout?branch=
'
+
$
(
"
#branchVersion
"
).
val
();
var
checkDBversion
=
srRoot
+
"
/home/getDBcompare
"
;
$
.
getJSON
(
checkDBversion
,
function
(
data
){
if
(
data
.
status
==
"
success
"
)
{
if
(
data
.
message
==
"
equal
"
)
{
//Checkout Branch
window
.
location
.
href
=
url
;
}
if
(
data
.
message
==
"
upgrade
"
)
{
if
(
confirm
(
"
Changing branch will upgrade your database.
\n
You won't be able to downgrade afterward.
\n
Do you want to continue?
"
)
)
{
//Checkout Branch
window
.
location
.
href
=
url
;
}
}
if
(
data
.
message
==
"
downgrade
"
)
{
alert
(
"
Can't switch branch as this will result in a database downgrade.
"
);
}
}
});
});
});
function
config_success
(){
$
(
'
.config_submitter
'
).
each
(
function
(){
$
(
this
).
removeAttr
(
"
disabled
"
);
$
(
this
).
next
().
remove
();
$
(
this
).
show
();
});
$
(
'
.config_submitter_refresh
'
).
each
(
function
(){
$
(
this
).
removeAttr
(
"
disabled
"
);
$
(
this
).
next
().
remove
();
$
(
this
).
show
();
url
=
srRoot
+
'
/config/providers/
'
;
window
.
location
.
href
=
url
;
});
$
(
'
#email_show
'
).
trigger
(
'
notify
'
);
}
This diff is collapsed.
Click to expand it.
gui/slick/js/new/config_backuprestore.js
+
115
−
1
View file @
c01cafcb
$
(
document
).
lo
ad
(
function
(){
$
(
document
).
re
ad
y
(
function
(){
$
(
'
#backupDir
'
).
fileBrowser
({
title
:
'
Select backup folder to save to
'
,
key
:
'
backupPath
'
});
$
(
'
#backupFile
'
).
fileBrowser
({
title
:
'
Select backup files to restore
'
,
key
:
'
backupFile
'
,
includeFiles
:
1
});
$
(
'
#config-components
'
).
tabs
();
$
(
"
.enabler
"
).
each
(
function
(){
if
(
!
$
(
this
).
prop
(
'
checked
'
))
$
(
'
#content_
'
+
$
(
this
).
attr
(
'
id
'
)).
hide
();
});
$
(
"
.enabler
"
).
click
(
function
()
{
if
(
$
(
this
).
prop
(
'
checked
'
)){
$
(
'
#content_
'
+
$
(
this
).
attr
(
'
id
'
)).
fadeIn
(
"
fast
"
,
"
linear
"
);
}
else
{
$
(
'
#content_
'
+
$
(
this
).
attr
(
'
id
'
)).
fadeOut
(
"
fast
"
,
"
linear
"
);
}
});
$
(
"
.viewIf
"
).
click
(
function
()
{
if
(
$
(
this
).
prop
(
'
checked
'
))
{
$
(
'
.hide_if_
'
+
$
(
this
).
attr
(
'
id
'
)).
css
(
'
display
'
,
'
none
'
);
$
(
'
.show_if_
'
+
$
(
this
).
attr
(
'
id
'
)).
fadeIn
(
"
fast
"
,
"
linear
"
);
}
else
{
$
(
'
.show_if_
'
+
$
(
this
).
attr
(
'
id
'
)).
css
(
'
display
'
,
'
none
'
);
$
(
'
.hide_if_
'
+
$
(
this
).
attr
(
'
id
'
)).
fadeIn
(
"
fast
"
,
"
linear
"
);
}
});
$
(
"
.datePresets
"
).
click
(
function
()
{
var
def
=
$
(
'
#date_presets
'
).
val
();
if
(
$
(
this
).
prop
(
'
checked
'
)
&&
'
%x
'
==
def
)
{
def
=
'
%a, %b %d, %Y
'
;
$
(
'
#date_use_system_default
'
).
html
(
'
1
'
);
}
else
if
(
!
$
(
this
).
prop
(
'
checked
'
)
&&
'
1
'
==
$
(
'
#date_use_system_default
'
).
html
()){
def
=
'
%x
'
;
}
$
(
'
#date_presets
'
).
attr
(
'
name
'
,
'
date_preset_old
'
);
$
(
'
#date_presets
'
).
attr
(
'
id
'
,
'
date_presets_old
'
);
$
(
'
#date_presets_na
'
).
attr
(
'
name
'
,
'
date_preset
'
);
$
(
'
#date_presets_na
'
).
attr
(
'
id
'
,
'
date_presets
'
);
$
(
'
#date_presets_old
'
).
attr
(
'
name
'
,
'
date_preset_na
'
);
$
(
'
#date_presets_old
'
).
attr
(
'
id
'
,
'
date_presets_na
'
);
if
(
def
)
$
(
'
#date_presets
'
).
val
(
def
);
});
// bind 'myForm' and provide a simple callback function
$
(
'
#configForm
'
).
ajaxForm
({
beforeSubmit
:
function
(){
$
(
'
.config_submitter .config_submitter_refresh
'
).
each
(
function
(){
$
(
this
).
attr
(
"
disabled
"
,
"
disabled
"
);
$
(
this
).
after
(
'
<span><img src="
'
+
srRoot
+
'
/images/loading16
'
+
themeSpinner
+
'
.gif"> Saving...</span>
'
);
$
(
this
).
hide
();
});
},
success
:
function
(){
setTimeout
(
function
()
{
"
use strict
"
;
config_success
();
},
2000
);
}
});
$
(
'
#api_key
'
).
click
(
function
(){
$
(
'
#api_key
'
).
select
();
});
$
(
"
#generate_new_apikey
"
).
click
(
function
(){
$
.
get
(
srRoot
+
'
/config/general/generateApiKey
'
,
function
(
data
){
if
(
data
.
error
!==
undefined
)
{
alert
(
data
.
error
);
return
;
}
$
(
'
#api_key
'
).
val
(
data
);
});
});
$
(
'
#branchCheckout
'
).
click
(
function
()
{
var
url
=
srRoot
+
'
/home/branchCheckout?branch=
'
+
$
(
"
#branchVersion
"
).
val
();
var
checkDBversion
=
srRoot
+
"
/home/getDBcompare
"
;
$
.
getJSON
(
checkDBversion
,
function
(
data
){
if
(
data
.
status
==
"
success
"
)
{
if
(
data
.
message
==
"
equal
"
)
{
//Checkout Branch
window
.
location
.
href
=
url
;
}
if
(
data
.
message
==
"
upgrade
"
)
{
if
(
confirm
(
"
Changing branch will upgrade your database.
\n
You won't be able to downgrade afterward.
\n
Do you want to continue?
"
)
)
{
//Checkout Branch
window
.
location
.
href
=
url
;
}
}
if
(
data
.
message
==
"
downgrade
"
)
{
alert
(
"
Can't switch branch as this will result in a database downgrade.
"
);
}
}
});
});
});
function
config_success
(){
$
(
'
.config_submitter
'
).
each
(
function
(){
$
(
this
).
removeAttr
(
"
disabled
"
);
$
(
this
).
next
().
remove
();
$
(
this
).
show
();
});
$
(
'
.config_submitter_refresh
'
).
each
(
function
(){
$
(
this
).
removeAttr
(
"
disabled
"
);
$
(
this
).
next
().
remove
();
$
(
this
).
show
();
url
=
srRoot
+
'
/config/providers/
'
;
window
.
location
.
href
=
url
;
});
$
(
'
#email_show
'
).
trigger
(
'
notify
'
);
}
This diff is collapsed.
Click to expand it.
gui/slick/views/config_backuprestore.mako
+
0
−
3
View file @
c01cafcb
...
...
@@ -25,9 +25,6 @@
% if sickbeard.INDEXER_DEFAULT:
<% indexer = sickbeard.INDEXER_DEFAULT %>
% endif
<script type="text/javascript" src="${srRoot}/js/config.js?${sbPID}"></script>
<div id="config">
<div id="config-content">
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment