xforum 0.0.30 → 0.0.31

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: 72f5069146e8160cb8b5b9f02eaf800518b8d401
4
- data.tar.gz: 864f579bd870f50b7b0f0329f11e0105c629bef0
3
+ metadata.gz: 628d7925886e565f066e30c7fb394f7280ea631a
4
+ data.tar.gz: 7d5de4c3e07a5184d8991de6ec5d34800288037c
5
5
  SHA512:
6
- metadata.gz: 35a45bc2cd646d4504233db6dba94cd1a1be7821ba5c58f34b5ac2084ae7daa64fea80831ddd9976f0843d45fdad037ed834a5cf4d97d332b70232fe4c2e6872
7
- data.tar.gz: 08f3645848e89d186ba69e113fdcc8a805e4a16e28f20815746c370dae248951fa8d9a86db1b7f1a5ed90908b58423271cda37b6837df337822d1a9947ffa730
6
+ metadata.gz: e22888656c577285bdff36080f25440dbfc59d5a3a35c6e97009dac214802f7232a11e43cbb4cd242ffb8224efb116791888813279f5440c0a835e7fdff484f8
7
+ data.tar.gz: 2e3c7597050ee5fabaa5141f71a99a4587aa91ad6e5f7e174d92f75222f5bdb79962519bdca1c2ae4aaeb3c7b563ef650e6e8d85b248ca3d137e2d4c2a4a0104
@@ -174,7 +174,7 @@ window.clearSenate = ->
174
174
 
175
175
  window.setSenate = (params)->
176
176
  page = document.getElementById('forum-senate')
177
- showMe({id: '#forum-senate'})
177
+ blockMe({id:'forum-senate'})
178
178
  document.getElementById('forum-comment-span').dataset.next_id = params.index
179
179
  kids = $(page).children()
180
180
  unless !params.the_list?
@@ -220,7 +220,8 @@ buildSpan = (page, index, params) ->
220
220
  else if page.dataset.moderator == 'true' && params.comment_state == 'reject'
221
221
  da_class = 'forum-comment-reject'
222
222
  else da_class = 'forum-comment'
223
- span.innerHTML = '<p>' + params.content + '</p>'
223
+ the_comment=params.content.replace('::',':<br>')
224
+ span.innerHTML = '<p>' + the_comment + '</p>'
224
225
  page.appendChild(span)
225
226
  paragraph=span.getElementsByTagName('p')[0]
226
227
  paragraph.classList.add(da_class)
@@ -206,6 +206,7 @@ setNewComment = (id)->
206
206
 
207
207
  placeCommentSpan = (offset, id) ->
208
208
  comment = document.getElementById('forum-comment-span')
209
+ offset=Math.min(400,offset)
209
210
  comment.style.position = 'absolute'
210
211
  comment.style.top = offset + 'px'
211
212
  comment.style.left = '250px'
@@ -108,6 +108,10 @@ input{
108
108
  width:20px;
109
109
  display:inline;
110
110
  }
111
+ .xforum-simple-list{
112
+ list-style-type: none;
113
+ padding:0;
114
+ }
111
115
  .biggest-forum-photo{
112
116
  max-width:1140px;
113
117
  height:600px;
@@ -43,7 +43,7 @@ module Xforum
43
43
  response= Category.add_category(params, current_user)
44
44
  when 'topic'
45
45
  response= Topic.add_topic(params, current_user)
46
- when 'langauge'
46
+ when 'language'
47
47
  response= Language.activate_language(params, current_user)
48
48
  else
49
49
  end
@@ -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.get_locale(params)
83
+ def self.get_language_locale(params)
84
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
85
+ id.nil? ? Language.first.id : id
86
86
  end
87
87
  def self.get_me(params)
88
88
  return if params[:langeuage].nil?
@@ -18,10 +18,9 @@ module Xforum
18
18
  serialize :votes
19
19
 
20
20
  def self.topics(params,user)
21
- if Topic.first.nil?
22
- Topic.create(name:'select topic')
23
- Topic.create(name:'request new topic')
24
- end
21
+ Topic.create(name:'select topic') if Topic.find_by(name:'select topic').nil?
22
+ Topic.create(name:'request new topic') if Topic.find_by(name:'request new topic').nil?
23
+
25
24
  unless params[:category] == 'select category'
26
25
  category_id=Category.where(name:params[:category]).pluck(:id)[0]
27
26
  params[:hold_test]=='true' ?
@@ -0,0 +1,68 @@
1
+ <div class= "row">
2
+ <span class="col-md-4">
3
+ <ul id= 'forum-admins-category-list' class="xforum-simple-list">
4
+ <li>
5
+ <input class='red-ellipse btn-sm' type='button' id= 'delete-forum-object' data-parent='category-list'
6
+ data-del= "<%= t('xForum.del')%>" data-open= "<%= t('xForum.open')%>" value= "<%= t('xForum.del')%>" >
7
+ <input class='blue-ellipse btn-sm' type='button' id= 'edit-forum-object' data-parent='category-list'
8
+ data-save= "<%= t('xForum.save')%>" data-edit= "<%= t('xForum.edit')%>" value= "<%= t('xForum.edit')%>" >
9
+ <span></span><span id="forum-edit-me" hidden><input type="text" class="admin-edit-field" data-parent='category-list' ></span>
10
+ </li>
11
+ </ul>
12
+ </span>
13
+ <span class="col-md-6">
14
+ <ul id="forum-admins-topic-list" class="xforum-simple-list">
15
+ <li>
16
+ <input class='red-ellipse btn-sm' type='button' id= 'delete-forum-object' data-parent='topic-list'
17
+ data-del= "<%= t('xForum.del')%>" data-open= "<%= t('xForum.open')%>" value= "<%= t('xForum.del')%>" >
18
+ <input class='blue-ellipse btn-sm' type='button' id= 'edit-forum-object' data-parent='topic-list'
19
+ data-save= "<%= t('xForum.save')%>" data-edit= "<%= t('xForum.edit')%>" value= "<%= t('xForum.edit')%>" >
20
+ <span ></span><span id="forum-edit-me" hidden><input type="text" class="admin-edit-field" data-parent='topic-list'></span>
21
+ </li>
22
+ </ul>
23
+ </span>
24
+ <span class="col-md-2" class="xforum-simple-list">
25
+ <span id="forum-add-language-input-span" hidden>
26
+ <label><%= t('xForum.Language_Name')%> </label>
27
+ <input id='forum-add-admin-language' type="text" class="admin-edit-field" >
28
+ <label><%= t('xForum.Localized_Name') %></label>
29
+ <input id='forum-add-admin-language-localized' type="text" class="admin-edit-field" >
30
+ <label><%= t('xForum.Language_code') %></label>
31
+ <input id='forum-add-admin-language-code' type="text" class="admin-edit-field" >
32
+ </span><br>
33
+ <span id="language-selector-span" hidden>
34
+ <%=select_tag(:users,options_for_select([t('xForum.Select_Language')] ), id:'forum-admin-language-select', class:'forum-select')%><br>
35
+ </span>
36
+ </span>
37
+ </div>
38
+
39
+ <div class="row" name="edit-list-buttons">
40
+ <span class="col-md-4">
41
+
42
+ <span id="forum-add-category-input-span" hidden><input id='forum-add-admin-category' type="text" class="admin-edit-field" ></span> <br>
43
+ <input class='blue-ellipse comment-btn' type='button' id=forum-admin-button name= 'forum-add-category'
44
+ data-state='add' data-add= "<%= t('xForum.Add_Category')%>" data-save= "<%= t('xForum.save')%>" value= "<%= t('xForum.Add_Category')%>" >
45
+ <input class='blue-ellipse comment-btn' type='button' id=forum-admin-button name= 'forum-translate-category'
46
+ data-state='translate' data-translate= "<%= t('xForum.Translate')%>" data-done= "<%= t('xForum.Done')%>" value= "<%= t('xForum.Translate')%>" >
47
+ <input class='red-ellipse comment-btn' type="button" id="restrict-category" data-submit= "<%=t('xForum.Submit')%>" data-restrict="<%=t('xForum.Restrict')%>" value="<%=t('xForum.Restrict')%>">
48
+ <input class='red-ellipse comment-btn' type='button' id=forum-admin-button name= 'forum-add-cancel'
49
+ data-who='category' value= "<%= t('xForum.Cancel')%>" >
50
+ </span>
51
+ <span class="col-md-5">
52
+ <span id="forum-add-topic-input-span" hidden><input id='forum-add-admin-topic' type="text" class="admin-edit-field" ></span><br>
53
+ <input class='blue-ellipse comment-btn' type='button' id= 'forum-admin-button' name='forum-add-topic'
54
+ data-state='add' data-add= "<%= t('xForum.Add_Topic')%>" data-save= "<%= t('xForum.save')%>" value= "<%= t('xForum.Add_Topic')%>" >
55
+ <input class='blue-ellipse comment-btn' type='button' id=forum-admin-button name= 'forum-translate-topic'
56
+ data-state='translate' data-translate= "<%= t('xForum.Translate')%>" data-done= "<%= t('xForum.Done')%>" value= "<%= t('xForum.Translate')%>" >
57
+ <input class='red-ellipse comment-btn' type="button" id="restrict-topic" data-submit= "<%=t('xForum.Submit')%>" data-restrict="<%=t('xForum.Restrict')%>" value="<%=t('xForum.Restrict')%>">
58
+ <input class='red-ellipse comment-btn' type='button' id= 'forum-admin-button' name='forum-add-cancel'
59
+ data-who='topic' value= "<%= t('xForum.Cancel')%>" >
60
+ </span>
61
+ <span class="col-md-3">
62
+ <input class='blue-ellipse comment-btn right' type='button' id= 'forum-admin-button' name= 'forum-activate-language' value= "<%= t('xForum.Activate')%>">
63
+ <input class='blue-ellipse comment-btn right' type='button' id= 'forum-admin-button' name= 'forum-deactivate-language' value= "<%= t('xForum.Deactivate')%>"><br>
64
+ <input class='blue-ellipse comment-btn right' type='button' id= 'forum-admin-button' name= 'forum-add-language'
65
+ data-state='add' data-add= "<%= t('xForum.Add_Language')%>" data-save= "<%= t('xForum.save')%>" value= "<%= t('xForum.Add_Language')%>" >
66
+ <input class='red-ellipse comment-btn' type='button' id= 'forum-admin-button' name='forum-add-cancel' data-who='language' value= "<%= t('xForum.Cancel')%>" >
67
+ </span>
68
+ </div>
@@ -0,0 +1,29 @@
1
+ <div class="row">
2
+ <span class="col-md-4">
3
+ <ul id="forum-category-prososals-list" class="xforum-simple-list">
4
+ <li>
5
+ <input class='green-ellipse btn-sm' type='button' id= 'forum-admin-button' name= 'forum-suggestion-response' data-parent='category-list'
6
+ data-action='accept' value= "<%= t('xForum.Accept')%>" >
7
+ <input class='red-ellipse btn-sm' type='button' id= 'forum-admin-button' name= 'forum-suggestion-response' data-parent='category-list'
8
+ data-action='reject' value= "<%= t('xForum.Reject')%>" >
9
+ <span data-type="item"></span><span data-type="user"></span>
10
+ </li>
11
+ </ul>
12
+ </span>
13
+ <span class="col-md-6">
14
+ <ul id="forum-topic-prososals-list" class="xforum-simple-list" >
15
+ <li>
16
+ <input class='green-ellipse btn-sm' type='button' id= 'forum-admin-button' name='forum-suggestion-response' data-parent='topic-list'
17
+ data-action='accept' value= "<%= t('xForum.Accept')%>" >
18
+ <input class='red-ellipse btn-sm' type='button' id= 'forum-admin-button' name='forum-suggestion-response' data-parent='topic-list'
19
+ data-action='reject' value= "<%= t('xForum.Reject')%>" >
20
+ <span data-type="item"></span><span data-type='user'></span><span data-type="category"></span>
21
+ </li>
22
+ </ul>
23
+ </span>
24
+ <span class="col-md-2" class="xforum-simple-list">
25
+
26
+ </span>
27
+
28
+
29
+ </div>
@@ -1,4 +1,4 @@
1
- <%=render partial: 'xforum/admin_users/admin_users'%>
1
+ <%=render partial: 'xforum/admin_lists/admin_users'%>
2
2
 
3
3
  <div class="forum-senate" id="forum-senate-admin-lists" style="display: none;">
4
4
  <%@categories.pop%>
@@ -8,9 +8,8 @@
8
8
  <%= select_tag(:forum, options_for_select(@topics),id:'forum-admin-topic', class: 'forum-select') %>
9
9
  <%=select_tag(:forum,options_for_select(@distribution_lists), id:'forum-restricted-list', class:'forum-select')%>
10
10
  <div class="forum-row senate-row">
11
- <%=render partial: 'xforum/admin_lists/category_set'%>
12
- <%=render partial: 'xforum/admin_lists/topic_set'%>
13
- <%=render partial: 'xforum/admin_lists/language_set'%>
11
+ <%=render partial: 'xforum/admin_lists/admins_edit_lists'%>
12
+ <%=render partial: 'xforum/admin_lists/admins_suggestions_lists'%>
14
13
  </div>
15
14
  </div>
16
15
 
@@ -1,3 +1,3 @@
1
1
  module Xforum
2
- VERSION = '0.0.30'
2
+ VERSION = '0.0.31'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xforum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.30
4
+ version: 0.0.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert D Blanton
@@ -215,10 +215,9 @@ files:
215
215
  - app/models/xforum/translation.rb
216
216
  - app/views/layouts/xforum/application.html.erb
217
217
  - app/views/user_mailer/xforum/note_to_forum_users.html.erb
218
- - app/views/xforum/admin_lists/_category_set.html.erb
219
- - app/views/xforum/admin_lists/_language_set.html.erb
220
- - app/views/xforum/admin_lists/_topic_set.html.erb
221
- - app/views/xforum/admin_users/_admin_users.html.erb
218
+ - app/views/xforum/admin_lists/_admin_users.html.erb
219
+ - app/views/xforum/admin_lists/_admins_edit_lists.html.erb
220
+ - app/views/xforum/admin_lists/_admins_suggestions_lists.html.erb
222
221
  - app/views/xforum/comments/_forum_comments.html.erb
223
222
  - app/views/xforum/comments/_forum_entry.html.erb
224
223
  - app/views/xforum/comments/_forum_video.html.erb
@@ -1,28 +0,0 @@
1
- <div id= 'forum-category-set' class="col-md-4">
2
- <ul id= 'forum-admins-category-list'>
3
- <li>
4
- <input class='red-ellipse btn-sm' type='button' id= 'delete-forum-object' data-parent='category-list'
5
- data-del= "<%= t('xForum.del')%>" data-open= "<%= t('xForum.open')%>" value= "<%= t('xForum.del')%>" >
6
- <input class='blue-ellipse btn-sm' type='button' id= 'edit-forum-object' data-parent='category-list'
7
- data-save= "<%= t('xForum.save')%>" data-edit= "<%= t('xForum.edit')%>" value= "<%= t('xForum.edit')%>" >
8
- <span></span><span id="forum-edit-me" hidden><input type="text" class="admin-edit-field" data-parent='category-list' ></span>
9
- </li>
10
- </ul>
11
- <span id="forum-add-category-input-span" hidden><input id='forum-add-admin-category' type="text" class="admin-edit-field" ></span> <br>
12
- <input class='blue-ellipse comment-btn' type='button' id=forum-admin-button name= 'forum-add-category'
13
- data-state='add' data-add= "<%= t('xForum.Add_Category')%>" data-save= "<%= t('xForum.save')%>" value= "<%= t('xForum.Add_Category')%>" >
14
- <input class='blue-ellipse comment-btn' type='button' id=forum-admin-button name= 'forum-translate-category'
15
- data-state='translate' data-translate= "<%= t('xForum.Translate')%>" data-done= "<%= t('xForum.Done')%>" value= "<%= t('xForum.Translate')%>" >
16
- <input class='red-ellipse comment-btn' type="button" id="restrict-category" data-submit= "<%=t('xForum.Submit')%>" data-restrict="<%=t('xForum.Restrict')%>" value="<%=t('xForum.Restrict')%>">
17
- <input class='red-ellipse comment-btn' type='button' id=forum-admin-button name= 'forum-add-cancel'
18
- data-who='category' value= "<%= t('xForum.Cancel')%>" >
19
- <ul id="forum-category-prososals-list" >
20
- <li>
21
- <input class='green-ellipse btn-sm' type='button' id= 'forum-admin-button' name= 'forum-suggestion-response' data-parent='category-list'
22
- data-action='accept' value= "<%= t('xForum.Accept')%>" >
23
- <input class='red-ellipse btn-sm' type='button' id= 'forum-admin-button' name= 'forum-suggestion-response' data-parent='category-list'
24
- data-action='reject' value= "<%= t('xForum.Reject')%>" >
25
- <span data-type="item"></span><span data-type="user"></span>
26
- </li>
27
- </ul>
28
- </div>
@@ -1,28 +0,0 @@
1
- <div id= 'forum-language-set' class="col-md-3">
2
- <span id="forum-add-language-input-span" hidden>
3
- <label><%= t('xForum.Language_Name')%> </label>
4
- <input id='forum-add-admin-language' type="text" class="admin-edit-field" >
5
- <label><%= t('xForum.Localized_Name') %></label>
6
- <input id='forum-add-admin-language-localized' type="text" class="admin-edit-field" >
7
- <label><%= t('xForum.Language_code') %></label>
8
- <input id='forum-add-admin-language-code' type="text" class="admin-edit-field" >
9
- </span><br>
10
-
11
- <span id="language-selector-span" hidden>
12
- <%=select_tag(:users,options_for_select([t('xForum.Select_Language')] ), id:'forum-admin-language-select', class:'forum-select')%><br>
13
- </span>
14
- <input class='blue-ellipse comment-btn' type='button' id= 'forum-admin-button' name= 'forum-activate-language' value= "<%= t('xForum.Activate')%>" >
15
- <input class='blue-ellipse comment-btn' type='button' id= 'forum-admin-button' name= 'forum-deactivate-language' value= "<%= t('xForum.Deactivate')%>" >
16
- <br>
17
- <input class='blue-ellipse comment-btn' type='button' id= 'forum-admin-button' name= 'forum-add-language'
18
- data-state='add' data-add= "<%= t('xForum.Add_Language')%>" data-save= "<%= t('xForum.save')%>" value= "<%= t('xForum.Add_Language')%>" >
19
- <input class='red-ellipse comment-btn' type='button' id= 'forum-admin-button' name='forum-add-cancel' data-who='language' value= "<%= t('xForum.Cancel')%>" >
20
-
21
- <ul id="forum-language-prososals-list" >
22
- <li>
23
- <input class='blue-ellipse btn-sm' type='button' id= 'forum-admin-button' name= 'forum-suggestion-response' value= "<%= t('xForum.Close')%>" >
24
- <span></span>
25
- <span data-type="language"></span><span></span>
26
- </li>
27
- </ul>
28
- </div>
@@ -1,29 +0,0 @@
1
- <div id= 'forum-topic-set' class="col-md-5">
2
- <ul id="forum-admins-topic-list">
3
- <li>
4
- <input class='red-ellipse btn-sm' type='button' id= 'delete-forum-object' data-parent='topic-list'
5
- data-del= "<%= t('xForum.del')%>" data-open= "<%= t('xForum.open')%>" value= "<%= t('xForum.del')%>" >
6
- <input class='blue-ellipse btn-sm' type='button' id= 'edit-forum-object' data-parent='topic-list'
7
- data-save= "<%= t('xForum.save')%>" data-edit= "<%= t('xForum.edit')%>" value= "<%= t('xForum.edit')%>" >
8
- <span ></span><span id="forum-edit-me" hidden><input type="text" class="admin-edit-field" data-parent='topic-list'></span>
9
- </li>
10
- </ul>
11
- <span id="forum-add-topic-input-span" hidden><input id='forum-add-admin-topic' type="text" class="admin-edit-field" ></span><br>
12
- <input class='blue-ellipse comment-btn' type='button' id= 'forum-admin-button' name='forum-add-topic'
13
- data-state='add' data-add= "<%= t('xForum.Add_Topic')%>" data-save= "<%= t('xForum.save')%>" value= "<%= t('xForum.Add_Topic')%>" >
14
- <input class='blue-ellipse comment-btn' type='button' id=forum-admin-button name= 'forum-translate-topic'
15
- data-state='translate' data-translate= "<%= t('xForum.Translate')%>" data-done= "<%= t('xForum.Done')%>" value= "<%= t('xForum.Translate')%>" >
16
- <input class='red-ellipse comment-btn' type="button" id="restrict-topic" data-submit= "<%=t('xForum.Submit')%>" data-restrict="<%=t('xForum.Restrict')%>" value="<%=t('xForum.Restrict')%>">
17
-
18
- <input class='red-ellipse comment-btn' type='button' id= 'forum-admin-button' name='forum-add-cancel'
19
- data-who='topic' value= "<%= t('xForum.Cancel')%>" >
20
- <ul id="forum-topic-prososals-list" >
21
- <li>
22
- <input class='green-ellipse btn-sm' type='button' id= 'forum-admin-button' name='forum-suggestion-response' data-parent='topic-list'
23
- data-action='accept' value= "<%= t('xForum.Accept')%>" >
24
- <input class='red-ellipse btn-sm' type='button' id= 'forum-admin-button' name='forum-suggestion-response' data-parent='topic-list'
25
- data-action='reject' value= "<%= t('xForum.Reject')%>" >
26
- <span data-type="item"></span><span data-type='user'></span><span data-type="category"></span>
27
- </li>
28
- </ul>
29
- </div>