xforum 0.0.28 → 0.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ccdca9ec2d4f6352bf91ba4cd1df5482f5699f6a
4
- data.tar.gz: 0f282dfdb7fa5e032cdd3af8954b4038ff382afa
3
+ metadata.gz: 72f5069146e8160cb8b5b9f02eaf800518b8d401
4
+ data.tar.gz: 864f579bd870f50b7b0f0329f11e0105c629bef0
5
5
  SHA512:
6
- metadata.gz: f7184aaade110b84f14172d4ce578e9b8e2bfef3e55f6572536fbbc5bd8918c2d489616294046c47d9fdec5a9b19780e148b6ad4f737a66089588dd9f1b051ae
7
- data.tar.gz: 1fe01f92370f964aaa44cad333b60fd8a344a2f0e2ca0fa73af387473ab5862ae8ce81145a1b8a7d02fb7e6887d19743ed123bc7085d13109d6fb712312b5ce2
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-admin-list-option'
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
- "use strict";
6
- return 'the_page';
5
+ "use strict";
6
+ return 'the_page';
7
7
  }
8
8
 
9
9
  function showPageName() {
10
- "use strict";
11
- return 'show-page';
10
+ "use strict";
11
+ return 'show-page';
12
12
  }
13
13
 
14
14
  function checkPage(page) {
15
- "use strict";
16
- var path;
17
- path = window.location.href.split("/").pop();
18
- return (path === "" || path === page || path === page + '#' || path.length === 2);
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
- "use strict";
23
- document.getElementById('whatsup1').innerHTML = message;
22
+ "use strict";
23
+ document.getElementById('whatsup1').innerHTML = message;
24
24
  }
25
25
 
26
26
  function whatsup2(message) {
27
- "use strict";
28
- document.getElementById('whatsup2').innerHTML = message;
27
+ "use strict";
28
+ document.getElementById('whatsup2').innerHTML = message;
29
29
  }
30
30
 
31
31
  function getSelectValues(params) {
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);
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
- "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;
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
- "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) {me.style.display = 'block'; }
86
- return true;
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
- "use strict";
90
- var me, test;
91
- if (params.id !== undefined && params.id !== null) {
92
- me = document.getElementById(params.id);
93
- } else if (params.name !== undefined && params.name !== null) {
94
- test = "[name=" + params.name + "]";
95
- me = $(test).get()[0];
96
- } else if (params.obj !== undefined && params.obj !== null) {
97
- me = params.obj;
98
- }
99
- if (me !== null && me !== undefined) {me.style.display = 'none'; }
100
- return true;
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
- "use strict";
104
- var me, test;
105
- if (params.id !== undefined && params.id !== null) {
106
- me = document.getElementById(params.id);
107
- } else if (params.name !== undefined && params.name !== null) {
108
- test = "[name=" + params.name + "]";
109
- me = $(test).get()[0];
110
- } else if (params.obj !== undefined && params.obj !== null) {
111
- me = params.obj;
112
- }
113
- if (me !== null && me !== undefined) {me.parentNode.removeChild(me); }
114
- return true;
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
- "use strict";
119
- obj.parentNode.removeChild(obj);
120
- return true;
124
+ "use strict";
125
+ obj.parentNode.removeChild(obj);
126
+ return true;
121
127
  }
122
128
  function setMyValue(id, value) {
123
- "use strict";
124
- document.getElementById(id).value = value;
125
- return true;
129
+ "use strict";
130
+ document.getElementById(id).value = value;
131
+ return true;
126
132
  }
127
133
 
128
134
  function getMyValue(id) {
129
- "use strict";
130
- return document.getElementById(id).value.trim();
135
+ "use strict";
136
+ return document.getElementById(id).value.trim();
131
137
  }
132
138
 
133
139
  function deleteMyData(obj) {
134
- 'use strict';
135
- var the_keys, ref, i;
136
- the_keys = Object.keys(obj.dataset);
137
- for (i = 0; i < the_keys.length; i += 1) {
138
- ref = 'data-' + the_keys[i];
139
- obj.removeAttribute(ref);
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
  }
@@ -40,7 +40,7 @@ module Xforum
40
40
  end
41
41
 
42
42
  def self.senate(params,user)
43
- if params[:topic]== "select topic"
43
+ if params[:topic]== 'select topic'
44
44
  {to_do:'nothing'}
45
45
  else
46
46
  topic_id=Topic.where(name:params[:topic]).pluck(:id)[0]
@@ -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_langauge_code(params)
84
- code=I18n.locale.to_s
85
- params[:language].nil? ? Language.where(code:code) : Language.get_me(params)
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?
@@ -8,7 +8,7 @@
8
8
 
9
9
  <img src="https://openstuff.s3.amazonaws.com/pdmlogo2.png" height=80>
10
10
 
11
- <h2>'<%= t('forum.from_Forum_Admin')%>'</h2>
11
+ <h2>'<%= t('xForum.from_Forum_Admin')%>'</h2>
12
12
 
13
13
  <br>
14
14
  </div>
@@ -1,16 +1,15 @@
1
1
  <div class="forum-senate" id="forum-senate-admin-users" style="display: none;">
2
2
 
3
- <%@empty= [[t( :empty_list),0 ]] %>
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('xforum.New')%></label> <input type="text" id='forum-new-distribution-list' class="admin-edit-field" >
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('xForum.select topic'),0] ] %>
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') %>
@@ -90,4 +90,5 @@ de:
90
90
  select_topic: Thema wählen
91
91
  select_category: Kategorie auswählen
92
92
  Replay: Wiederholung
93
- Back: Zurück
93
+ Back: Zurück
94
+ Action: "Forum Action"
@@ -4,7 +4,7 @@ module ActiveRecordExtension
4
4
 
5
5
  # add your instance methods here
6
6
  def foo
7
- "foo"
7
+ 'foo'
8
8
  end
9
9
 
10
10
  # add your static(class) methods here
@@ -1,5 +1,5 @@
1
1
  module Xforum
2
- require "active_record_extension"
2
+ require 'active_record_extension'
3
3
  class Engine < ::Rails::Engine
4
4
  isolate_namespace Xforum
5
5
 
@@ -1,3 +1,3 @@
1
1
  module Xforum
2
- VERSION = '0.0.28'
2
+ VERSION = '0.0.30'
3
3
  end
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.28
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-25 00:00:00.000000000 Z
11
+ date: 2014-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sqlite3