xforum 0.0.28 → 0.0.30
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/xforum/forum_basic.js.coffee +2 -1
- data/app/assets/javascripts/xforum/global_java.js +104 -98
- data/app/models/xforum/forum.rb +1 -1
- data/app/models/xforum/language.rb +3 -3
- data/app/views/user_mailer/xforum/note_to_forum_users.html.erb +1 -1
- data/app/views/xforum/admin_users/_admin_users.html.erb +3 -4
- data/app/views/xforum/forums/_forum.html.erb +1 -1
- data/config/locales/forum.de.yml +2 -1
- data/lib/active_record_extension.rb +1 -1
- data/lib/xforum/engine.rb +1 -1
- data/lib/xforum/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72f5069146e8160cb8b5b9f02eaf800518b8d401
|
4
|
+
data.tar.gz: 864f579bd870f50b7b0f0329f11e0105c629bef0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35a45bc2cd646d4504233db6dba94cd1a1be7821ba5c58f34b5ac2084ae7daa64fea80831ddd9976f0843d45fdad037ed834a5cf4d97d332b70232fe4c2e6872
|
7
|
+
data.tar.gz: 08f3645848e89d186ba69e113fdcc8a805e4a16e28f20815746c370dae248951fa8d9a86db1b7f1a5ed90908b58423271cda37b6837df337822d1a9947ffa730
|
@@ -129,7 +129,7 @@ window.pushOption = (q_selector,data,offset)->
|
|
129
129
|
option = document.createElement("option")
|
130
130
|
option.text = data.value
|
131
131
|
option.value = data.item
|
132
|
-
option.id = 'forum-
|
132
|
+
option.id = 'forum-admin_lists-option'
|
133
133
|
ref = selector.children[selector.children.length - offset]
|
134
134
|
if ref==undefined
|
135
135
|
selector.appendChild(option)
|
@@ -138,6 +138,7 @@ window.pushOption = (q_selector,data,offset)->
|
|
138
138
|
else
|
139
139
|
alert "#{q_selector} is not there"
|
140
140
|
|
141
|
+
|
141
142
|
window.getLanguage = ->
|
142
143
|
getSelectValues({id:'forum-language', ref:true})
|
143
144
|
|
@@ -2,140 +2,146 @@
|
|
2
2
|
/*global $, jQuery, alert*/
|
3
3
|
|
4
4
|
function getHomeName() {
|
5
|
-
|
6
|
-
|
5
|
+
"use strict";
|
6
|
+
return 'the_page';
|
7
7
|
}
|
8
8
|
|
9
9
|
function showPageName() {
|
10
|
-
|
11
|
-
|
10
|
+
"use strict";
|
11
|
+
return 'show-page';
|
12
12
|
}
|
13
13
|
|
14
14
|
function checkPage(page) {
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
"use strict";
|
16
|
+
var path;
|
17
|
+
path = window.location.href.split("/").pop();
|
18
|
+
return (path === "" || path === page || path === page + '#' || path.length === 2);
|
19
19
|
}
|
20
20
|
|
21
21
|
function whatsup1(message) {
|
22
|
-
|
23
|
-
|
22
|
+
"use strict";
|
23
|
+
document.getElementById('whatsup1').innerHTML = message;
|
24
24
|
}
|
25
25
|
|
26
26
|
function whatsup2(message) {
|
27
|
-
|
28
|
-
|
27
|
+
"use strict";
|
28
|
+
document.getElementById('whatsup2').innerHTML = message;
|
29
29
|
}
|
30
30
|
|
31
31
|
function getSelectValues(params) {
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
32
|
+
"use strict";
|
33
|
+
var select, result = [], options, opt, i, iLen;
|
34
|
+
if (params.id !== undefined && params.id !== null) {
|
35
|
+
select = document.getElementById(params.id);
|
36
|
+
} else if (params.name !== undefined && params.name !== null) {
|
37
|
+
select = $('[name =' + params.name + ']').get()[0];
|
38
|
+
} else if (params.obj !== undefined && params.obj !== null) {
|
39
|
+
select = params.obj;
|
40
|
+
}
|
41
|
+
options = select && select.options;
|
42
|
+
if (options !== null) {
|
43
|
+
for (i = 0, iLen = options.length; i < iLen; i += 1) {
|
44
|
+
opt = options[i];
|
45
|
+
if (opt.selected) {
|
46
|
+
if (params.ref) {
|
47
|
+
result.push(opt.text || opt.value);
|
48
|
+
} else {
|
49
|
+
result.push(opt.value || opt.text);
|
50
|
+
}
|
51
|
+
}
|
50
52
|
}
|
51
|
-
}
|
52
53
|
}
|
53
|
-
|
54
|
-
return result;
|
54
|
+
return result;
|
55
55
|
}
|
56
56
|
|
57
57
|
function showMe(params) {
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
58
|
+
"use strict";
|
59
|
+
var me, test;
|
60
|
+
if (params.id !== undefined && params.id !== null) {
|
61
|
+
me = document.getElementById(params.id);
|
62
|
+
} else if (params.name !== undefined && params.name !== null) {
|
63
|
+
test = "[name=" + params.name + "]";
|
64
|
+
me = $(test).get()[0];
|
65
|
+
} else if (params.obj !== undefined && params.obj !== null) {
|
66
|
+
me = params.obj;
|
67
|
+
}
|
68
|
+
if (me !== null && me !== undefined) {
|
69
|
+
me.style.display = 'inline';
|
70
|
+
}
|
71
|
+
return true;
|
72
72
|
}
|
73
73
|
|
74
74
|
function blockMe(params) {
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
75
|
+
"use strict";
|
76
|
+
var me, test;
|
77
|
+
if (params.id !== undefined && params.id !== null) {
|
78
|
+
me = document.getElementById(params.id);
|
79
|
+
} else if (params.name !== undefined && params.name !== null) {
|
80
|
+
test = "[name=" + params.name + "]";
|
81
|
+
me = $(test).get()[0];
|
82
|
+
} else if (params.obj !== undefined && params.obj !== null) {
|
83
|
+
me = params.obj;
|
84
|
+
}
|
85
|
+
if (me !== null && me !== undefined) {
|
86
|
+
me.style.display = 'block';
|
87
|
+
}
|
88
|
+
return true;
|
87
89
|
}
|
88
90
|
function hideMe(params) {
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
91
|
+
"use strict";
|
92
|
+
var me, test;
|
93
|
+
if (params.id !== undefined && params.id !== null) {
|
94
|
+
me = document.getElementById(params.id);
|
95
|
+
} else if (params.name !== undefined && params.name !== null) {
|
96
|
+
test = "[name=" + params.name + "]";
|
97
|
+
me = $(test).get()[0];
|
98
|
+
} else if (params.obj !== undefined && params.obj !== null) {
|
99
|
+
me = params.obj;
|
100
|
+
}
|
101
|
+
if (me !== null && me !== undefined) {
|
102
|
+
me.style.display = 'none';
|
103
|
+
}
|
104
|
+
return true;
|
101
105
|
}
|
102
106
|
function removeMe(params) {
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
107
|
+
"use strict";
|
108
|
+
var me, test;
|
109
|
+
if (params.id !== undefined && params.id !== null) {
|
110
|
+
me = document.getElementById(params.id);
|
111
|
+
} else if (params.name !== undefined && params.name !== null) {
|
112
|
+
test = "[name=" + params.name + "]";
|
113
|
+
me = $(test).get()[0];
|
114
|
+
} else if (params.obj !== undefined && params.obj !== null) {
|
115
|
+
me = params.obj;
|
116
|
+
}
|
117
|
+
if (me !== null && me !== undefined) {
|
118
|
+
me.parentNode.removeChild(me);
|
119
|
+
}
|
120
|
+
return true;
|
115
121
|
}
|
116
122
|
|
117
123
|
function removeIt(obj) {
|
118
|
-
|
119
|
-
|
120
|
-
|
124
|
+
"use strict";
|
125
|
+
obj.parentNode.removeChild(obj);
|
126
|
+
return true;
|
121
127
|
}
|
122
128
|
function setMyValue(id, value) {
|
123
|
-
|
124
|
-
|
125
|
-
|
129
|
+
"use strict";
|
130
|
+
document.getElementById(id).value = value;
|
131
|
+
return true;
|
126
132
|
}
|
127
133
|
|
128
134
|
function getMyValue(id) {
|
129
|
-
|
130
|
-
|
135
|
+
"use strict";
|
136
|
+
return document.getElementById(id).value.trim();
|
131
137
|
}
|
132
138
|
|
133
139
|
function deleteMyData(obj) {
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
140
|
+
'use strict';
|
141
|
+
var the_keys, ref, i;
|
142
|
+
the_keys = Object.keys(obj.dataset);
|
143
|
+
for (i = 0; i < the_keys.length; i += 1) {
|
144
|
+
ref = 'data-' + the_keys[i];
|
145
|
+
obj.removeAttribute(ref);
|
146
|
+
}
|
141
147
|
}
|
data/app/models/xforum/forum.rb
CHANGED
@@ -80,9 +80,9 @@ module Xforum
|
|
80
80
|
(Language.where(id: params[:id]).update_all(suggestion: false) if user.forum_admin?) :
|
81
81
|
Language.where(id: params[:id]).update_all(state: 'closed') if user.forum_admin?
|
82
82
|
end
|
83
|
-
def self.
|
84
|
-
code
|
85
|
-
|
83
|
+
def self.get_locale(params)
|
84
|
+
params[:language].nil? ? id= Language.where(code:I18n.locale.to_s).pluck(:id)[0] : id=Language.get_me(params)
|
85
|
+
id.nil? ? Langauge.first.id : id
|
86
86
|
end
|
87
87
|
def self.get_me(params)
|
88
88
|
return if params[:langeuage].nil?
|
@@ -1,16 +1,15 @@
|
|
1
1
|
<div class="forum-senate" id="forum-senate-admin-users" style="display: none;">
|
2
2
|
|
3
|
-
<%@empty= [[t(
|
3
|
+
<%@empty= [[t('xForum.empty_list'),0 ]] %>
|
4
4
|
<div class='forum-row'><br>
|
5
5
|
<span class="col-md-3">
|
6
6
|
<label> <%= t('xForum.Action')%> </label> <br><br>
|
7
7
|
<%=select_tag(:users,options_for_select(@forum_actions ), id:'forum-actions', class:'forum-select')%>
|
8
8
|
<input class='red-ellipse comment-btn' type='button' id= "forum-admin-button" name ='forum-act-on-admin-selector' value= "<%= t('xForum.Submit')%>" >
|
9
|
-
<span id="forum-email-selections" class="forum-admin-user-list"><br><ul name="forum-email-selections"></ul></span>
|
10
|
-
|
11
9
|
</span>
|
12
10
|
<span class="col-md-3">
|
13
11
|
<label> <%= t('xForum.User_Name') %> </label> <br><br>
|
12
|
+
|
14
13
|
<button class="cool-selector" name="forum-user-tag-show"><input class= 'silver-selector' type='button' id= 'forum-admin-button' name='forum-user-tag-choose' value="<%= t('xForum.select_user')%>"></button>
|
15
14
|
<span id='forum-user-tag-span'><%=select_tag(:users,options_for_select(@user_tags ), multiple:true, name:'forum-user-tag',size:6, class:'forum-select')%></span>
|
16
15
|
</span>
|
@@ -23,7 +22,7 @@
|
|
23
22
|
<span id="forum-distribution-span">
|
24
23
|
<label> <%= t('xForum.Distribuiton_List_Name')%> </label> <br><br>
|
25
24
|
<%=select_tag(:forum,options_for_select(@distribution_lists), id:'forum-distribution-lists', class:'forum-select')%>
|
26
|
-
<label><%=t('
|
25
|
+
<label><%=t('xForum.New')%></label> <input type="text" id='forum-new-distribution-list' class="admin-edit-field" >
|
27
26
|
</span>
|
28
27
|
<span id="forum-moderator-add-span">
|
29
28
|
<label> <%= t('xForum.Add_Topic_Monitor')%> </label> <br><br>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<%if Xforum::Language.first.nil? then Xforum::Language.init_language_set end %>
|
8
8
|
<%unless ENV['XFORUM_LANGUAGES'].nil? then @languages= Xforum::Language.languages({active:'true',list:'forum-language'})[:list_data] end %>
|
9
9
|
<%@aphoto= 'photo' %>
|
10
|
-
<%@topics=[[t('
|
10
|
+
<%@topics=[[t('Forum.select_topic'),0] ] %>
|
11
11
|
|
12
12
|
<%= select_tag(:forum, options_for_select(@categories),id:'forum-category', class: 'forum-select') %>
|
13
13
|
<%= select_tag(:forum, options_for_select(@topics), id:'forum-topic', class: 'forum-select') %>
|
data/config/locales/forum.de.yml
CHANGED
data/lib/xforum/engine.rb
CHANGED
data/lib/xforum/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xforum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert D Blanton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sqlite3
|