serpscan-dashboard 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35f572598520085d548695106ab4cb7c8395a3b6
|
4
|
+
data.tar.gz: ac701311a98658d084d42095d597a26621b5b0c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e4438cab0f4732280c30caa59c681984758d015722e18738d7518bf8dcecb060a8b90130b668217f6e49f13c77d7dd4170a77a46dcc28ee3f8a734be78091e9
|
7
|
+
data.tar.gz: c35147a0e2c31dc239c1fdc686e3258a05e08eb056024cca3764b195fb9eabe9dab5b11558e3f6035eb387be90edf27fde1092ff33c4a158af3c6fcfdcd01f88
|
@@ -19,6 +19,12 @@
|
|
19
19
|
|
20
20
|
<!-- Latest compiled and minified JavaScript -->
|
21
21
|
<script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.7.0/bootstrap-table.min.js"></script>
|
22
|
+
|
23
|
+
<!-- Select box JS -->
|
24
|
+
<script src="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/js/select2.min.js"></script>
|
25
|
+
<!-- Select box theme -->
|
26
|
+
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/css/select2.min.css">
|
27
|
+
|
22
28
|
</head>
|
23
29
|
<body>
|
24
30
|
<div class="container">
|
@@ -11,6 +11,19 @@
|
|
11
11
|
opacity: 1;
|
12
12
|
display: block;
|
13
13
|
}
|
14
|
+
|
15
|
+
.select2-container {
|
16
|
+
display: block;
|
17
|
+
width:90px;
|
18
|
+
}
|
19
|
+
|
20
|
+
.form-inline input {
|
21
|
+
padding: 10px;
|
22
|
+
}
|
23
|
+
|
24
|
+
.select2-selection--multiple {
|
25
|
+
height: 75px;
|
26
|
+
}
|
14
27
|
</style>
|
15
28
|
|
16
29
|
<h1><%= @website.url %></h1>
|
@@ -49,54 +62,57 @@
|
|
49
62
|
<script>
|
50
63
|
$( document ).ready(function() {
|
51
64
|
|
52
|
-
$(document).on('change', 'input:checkbox', function() {
|
65
|
+
$(document).on('change', 'input:checkbox', function() {
|
53
66
|
if($('input[type="checkbox"][name="keyword"]:checked').val()) {
|
54
67
|
$('#delete-keyword-button').attr('disabled', false);
|
55
68
|
} else {
|
56
69
|
$('#delete-keyword-button').attr('disabled', true);
|
57
70
|
}
|
58
|
-
});
|
71
|
+
});
|
59
72
|
|
60
|
-
$('#refresh-button').on('click', function(){
|
61
|
-
|
62
|
-
})
|
73
|
+
$('#refresh-button').on('click', function(){
|
74
|
+
window.location.reload();
|
75
|
+
})
|
63
76
|
|
64
77
|
|
65
|
-
$(function () {
|
66
|
-
|
78
|
+
$(function () {
|
79
|
+
$('#table').bootstrapTable({
|
67
80
|
// data: data
|
68
81
|
});
|
69
|
-
});
|
82
|
+
});
|
70
83
|
|
71
|
-
function hideAlert() {
|
72
|
-
|
73
|
-
}
|
84
|
+
function hideAlert() {
|
85
|
+
$(".fader.in").removeClass("in");
|
86
|
+
}
|
74
87
|
|
75
|
-
window.setTimeout(function () {
|
76
|
-
|
77
|
-
}, 5000);
|
88
|
+
window.setTimeout(function () {
|
89
|
+
hideAlert();
|
90
|
+
}, 5000);
|
78
91
|
|
79
92
|
|
80
|
-
function selectedIds() {
|
81
|
-
|
93
|
+
function selectedIds() {
|
94
|
+
return $('input[type="checkbox"][name="keyword"]:checked').map(function(){
|
82
95
|
return $(this).data('id');
|
83
96
|
}).get();
|
84
|
-
}
|
97
|
+
}
|
85
98
|
|
86
|
-
function deleteURL(){
|
87
|
-
|
88
|
-
}
|
99
|
+
function deleteURL(){
|
100
|
+
return '/serpscan/keywords/delete?ids=' + selectedIds()
|
101
|
+
}
|
89
102
|
|
90
|
-
$('#confirm-delete').on('show.bs.modal', function(e) {
|
103
|
+
$('#confirm-delete').on('show.bs.modal', function(e) {
|
91
104
|
|
92
105
|
|
93
|
-
|
94
|
-
|
95
|
-
});
|
106
|
+
var deleteLink = $(e.relatedTarget).data('href') + '?ids=' + selectedIds;
|
107
|
+
$(document).find('#confirm-delete .btn-ok').attr('href', deleteLink);
|
108
|
+
});
|
96
109
|
|
97
|
-
$('#confirm-delete .btn-ok').on('click', function(){
|
110
|
+
$('#confirm-delete .btn-ok').on('click', function(){
|
98
111
|
$(document).find('#confirm-delete .btn-ok').attr('href', deleteURL);
|
99
|
-
});
|
112
|
+
});
|
113
|
+
|
114
|
+
$(".js-example-basic-multiple").select2();
|
115
|
+
|
100
116
|
});
|
101
117
|
|
102
118
|
</script>
|
@@ -143,9 +159,19 @@ $('#confirm-delete .btn-ok').on('click', function(){
|
|
143
159
|
<div class="modal-body">
|
144
160
|
|
145
161
|
<form class="form-inline" action="/serpscan/<%= @website.id %>/keyword" method="post" id="create-keyword" >
|
162
|
+
<label for="keyword" class="control-label">Keyword:</label>
|
146
163
|
<input type="text" class="form-control" name="keyword" placeholder="Keyword" style="width:100%">
|
147
164
|
|
148
|
-
|
165
|
+
<label for="search_engines" class="control-label">Search Engines:</label><br/>
|
166
|
+
<select class="js-example-basic-multiple search_engines" multiple="multiple" name="search_engines">
|
167
|
+
<% @search_engines.each do |search_engine| %>
|
168
|
+
<optgroup label="<%= search_engine.title %>">
|
169
|
+
<% search_engine.countries.each do |country| %>
|
170
|
+
<option value="<%= country.id %>" <% if country.default %>selected="selected"<% end %>><%= "#{search_engine.title} | #{country.location}" %></option>
|
171
|
+
<% end %>
|
172
|
+
</optgroup>
|
173
|
+
<% end %>
|
174
|
+
</select>
|
149
175
|
|
150
176
|
</div>
|
151
177
|
<div class="modal-footer">
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serpscan-dashboard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dylan Montgomery
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-05-
|
12
|
+
date: 2015-05-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -31,14 +31,14 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 0.1.
|
34
|
+
version: 0.1.4
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 0.1.
|
41
|
+
version: 0.1.4
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: rspec-rails
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|