xforum 0.0.384 → 0.0.385
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 +19 -24
- data/app/models/xforum/category.rb +1 -1
- data/app/models/xforum/forum.rb +1 -1
- data/app/models/xforum/topic.rb +3 -2
- data/app/models/xforum/translation.rb +4 -4
- data/app/views/xforum/admin_lists/_admins_edit_lists.html.erb +2 -2
- data/config/routes.rb +1 -1
- data/lib/xforum/version.rb +1 -1
- metadata +18 -15
- data/db/migrate/20140904300001_add_timestamps_to_hyperlinks.rb +0 -7
- data/test/dummy/bin/bundle +0 -3
- data/test/dummy/bin/rails +0 -4
- data/test/dummy/bin/rake +0 -4
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/log/development.log +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 601560cf10db80b539335f7f60ca3342453eaa59
|
4
|
+
data.tar.gz: c7ee107a7e7b1d4f680ac109bbbb452bb179e7f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb3a9bb7ebacf0e5810f6dd3bdaeea4b32128fef5df8cf68b347a5a49db51709522d6a6e4ff682e88c2a583f5843402bfea112ad8c38be34529dad038dca627c
|
7
|
+
data.tar.gz: 5873bbdd0dd26ff90c78a7e620a00003e82980c1b01e0fc7d42a6f84a57fe7c3898f87ef6d99d2ee5101b77456d54c8f0b1f05704605a1778a49f75997f212e1
|
@@ -18,7 +18,7 @@ jQuery ->
|
|
18
18
|
$('#forum-language').change ->
|
19
19
|
getSenate()
|
20
20
|
$('#forum-category').change ->
|
21
|
-
changeTopic(
|
21
|
+
changeTopic()
|
22
22
|
$('#forum-video-replay').click ->
|
23
23
|
img=document.getElementById('big-forum-picture')
|
24
24
|
img.src=img.src
|
@@ -47,6 +47,7 @@ getTheVideo=(photo)->
|
|
47
47
|
console.log('in get video')
|
48
48
|
showMe({id:'big-forum-video-span'})
|
49
49
|
hideMe({id:'big-forum-picture-span'})
|
50
|
+
forumWait()
|
50
51
|
$.post('xforum/forum_ajax',{function:'get video',forum_id:photo.dataset.forum_id},playVideo)
|
51
52
|
|
52
53
|
playVideo=(params)->
|
@@ -164,13 +165,12 @@ window.pushOption = (q_selector,data,offset)->
|
|
164
165
|
switch selector.tagName
|
165
166
|
when 'UL'
|
166
167
|
option= document.createElement('li')
|
167
|
-
option.innerHTML=data.
|
168
|
+
option.innerHTML=data.value
|
168
169
|
when 'SELECT'
|
169
170
|
option = document.createElement("option")
|
170
|
-
option.text = data.
|
171
|
+
option.text = data.value
|
171
172
|
else
|
172
|
-
option.
|
173
|
-
option.value = data.id
|
173
|
+
option.value = data.item
|
174
174
|
option.id = 'forum-admin-list-option'
|
175
175
|
ref = selector.children[selector.children.length - offset]
|
176
176
|
if ref==undefined
|
@@ -371,24 +371,19 @@ addNewThing = (select)->
|
|
371
371
|
hideMe({id: 'forum-senate'})
|
372
372
|
$('#forum-add-new-thing-span').data.thing = select
|
373
373
|
|
374
|
-
window.changeTopic=
|
374
|
+
window.changeTopic = ->
|
375
375
|
setTopic(0)
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
else if select != 'select category'
|
390
|
-
blockMe({id: 'forum-senate'})
|
391
|
-
hideMe({id: 'forum-senate-admin'})
|
392
|
-
document.getElementById('forum-senate').dataset.category = select
|
393
|
-
$.post('xforum/forum_ajax', {function: 'get topics',list:'forum-topic', category: which.value, hold_test: true, restricted: true}, loadList)
|
376
|
+
select = document.getElementById('forum-category').value
|
377
|
+
hideMe({id: 'forum-senate-admin-lists'})
|
378
|
+
hideMe({id:'forum-senate-admin-users'})
|
379
|
+
clearSenate()
|
380
|
+
if select == 'request new category'
|
381
|
+
addNewThing('forum-category')
|
382
|
+
else if select == 'admin'
|
383
|
+
doAdminStuff()
|
384
|
+
else if select != 'select category'
|
385
|
+
blockMe({id: 'forum-senate'})
|
386
|
+
hideMe({id: 'forum-senate-admin'})
|
387
|
+
document.getElementById('forum-senate').dataset.category = select
|
388
|
+
$.post('xforum/forum_ajax', {function: 'get topics',list:'forum-topic', category: select, hold_test: true, restricted: true}, loadList)
|
394
389
|
|
@@ -75,7 +75,7 @@ module Xforum
|
|
75
75
|
category_list=ForumAssist.make_first(category_list.clone,{key: :id,ref:Category.where(name:'select category').pluck(:id)[0]})
|
76
76
|
category_list=PeopleList.check_restrictions(category_list.clone,user,'categories')
|
77
77
|
category_list=Translation.translate_list(category_list.clone,params[:language],'category')
|
78
|
-
category_list.push({id:0,
|
78
|
+
category_list.push({id:0, item:'admin',value: I18n.t('xForum.Admin_name')}) if user.forum_admin?
|
79
79
|
{list_data:category_list,id:params[:list]}
|
80
80
|
end
|
81
81
|
def self.get_category_id(params)
|
data/app/models/xforum/forum.rb
CHANGED
@@ -45,7 +45,7 @@ module Xforum
|
|
45
45
|
if params[:topic]== 'select topic'
|
46
46
|
return
|
47
47
|
end
|
48
|
-
topic=Topic.find_by(
|
48
|
+
topic=Topic.find_by(name:params[:topic])
|
49
49
|
category=Category.find_by(id:topic.category_id)
|
50
50
|
if (category.private || !user.forum_admin?) && PeopleList.check_invitation(category.name,category.id, user.id, 'category')
|
51
51
|
{to_do:'nothing'}
|
data/app/models/xforum/topic.rb
CHANGED
@@ -21,9 +21,10 @@ module Xforum
|
|
21
21
|
Topic.create(name:'select topic') if Topic.find_by(name:'select topic').nil?
|
22
22
|
Topic.create(name:'request new topic') if Topic.find_by(name:'request new topic').nil?
|
23
23
|
unless params[:category] == 'select category'
|
24
|
+
category_id=Category.where(name:params[:category]).pluck(:id)[0]
|
24
25
|
params[:hold_test]=='true' ?
|
25
|
-
topics=Topic.grab({category_id:
|
26
|
-
topics=Topic.grab({category_id:
|
26
|
+
topics=Topic.grab({category_id:category_id,closed:false,suggestion:false}, [:id,:name,:state,:category_id,:restricted,:closed,:is_moderated],{swap:{name: :item}}) :
|
27
|
+
topics=Topic.grab({category_id:category_id}, [:id,:name,:state,:category_id,:restricted,:closed,:is_moderated],{swap:{name: :item}})
|
27
28
|
topics=[] if topics[0][:id].nil?
|
28
29
|
topics=PeopleList.check_restrictions(topics,user,'topic')
|
29
30
|
a=Topic.grab({name:'select topic'},[:id,:name,:state,:category_id,:restricted,:closed],{swap:{name: :item}})[0]
|
@@ -90,16 +90,16 @@ module Xforum
|
|
90
90
|
case list_name
|
91
91
|
when 'category' , 'categories'
|
92
92
|
entry.store(:item,Category.where(id:entry[:id]).pluck(:name)[0] )
|
93
|
-
entry.store(:
|
93
|
+
entry.store(:value,entry[:item])
|
94
94
|
when 'topic'
|
95
95
|
entry.store(:item,Topic.where(id:entry[:id]).pluck(:name)[0] )
|
96
|
-
entry.store(:
|
96
|
+
entry.store(:value,entry[:item])
|
97
97
|
when 'language'
|
98
98
|
translation ={content:entry[:value].concat(' - ').concat(entry[:local_name])}
|
99
|
-
entry.store(:
|
99
|
+
entry.store(:value,'wait')
|
100
100
|
else
|
101
101
|
end
|
102
|
-
entry[:
|
102
|
+
entry[:value]=translation[:content] unless translation.nil?
|
103
103
|
}
|
104
104
|
alist
|
105
105
|
end
|
@@ -42,7 +42,7 @@
|
|
42
42
|
<span id="forum-add-category-input-span" hidden><input id='forum-add-admin-category' type="text" class="admin-edit-field" ></span> <br>
|
43
43
|
<input class='blue-ellipse comment-btn' type='button' id=forum-admin-button name= 'forum-add-category'
|
44
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'
|
45
|
+
<input class='blue-ellipse comment-btn' type='button' id=forum-admin-button name= 'forum-translate-category'
|
46
46
|
data-state='translate' data-translate= "<%= t('xForum.Translate')%>" data-done= "<%= t('xForum.Done')%>" value= "<%= t('xForum.Translate')%>" >
|
47
47
|
<input class='red-ellipse comment-btn' name='moderate-category' type="button" id="set-moderation" value="<%=t('xForum.moderate')%>">
|
48
48
|
<input class='red-ellipse comment-btn' name='un-moderate-category' type="button" id="set-moderation" value="<%=t('xForum.stop_moderating')%>">
|
@@ -56,7 +56,7 @@
|
|
56
56
|
<input class='blue-ellipse comment-btn' type='button' id= 'forum-admin-button' name='forum-add-topic'
|
57
57
|
data-state='add' data-add= "<%= t('xForum.Add_Topic')%>" data-save= "<%= t('xForum.save')%>" value= "<%= t('xForum.Add_Topic')%>" >
|
58
58
|
<input class='blue-ellipse comment-btn' type='button' id=forum-admin-button name= 'forum-translate-topic'
|
59
|
-
data-state='translate'
|
59
|
+
data-state='translate' data-translate= "<%= t('xForum.Translate')%>" data-done= "<%= t('xForum.Done')%>" value= "<%= t('xForum.Translate')%>" >
|
60
60
|
<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')%>">
|
61
61
|
<input class='red-ellipse comment-btn' name='moderate-topic' type="button" id="set-moderation" value="<%=t('xForum.moderate')%>">
|
62
62
|
<input class='red-ellipse comment-btn' name='un-moderate-topic' type="button" id="set-moderation" value="<%=t('xForum.stop_moderating')%>">
|
data/config/routes.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Xforum::Engine.routes.draw do
|
2
2
|
match 'the_page', to: 'forums#the_page', via: [:get,:post]
|
3
3
|
match 'forum_ajax', to: 'forums#forum_ajax', via: :post
|
4
|
-
match 'photos',
|
4
|
+
match 'photos', to: 'forums#newphoto', via: :post
|
5
5
|
# The priority is based upon order of creation: first created -> highest priority.
|
6
6
|
# See how all your routes lay out with "rake routes".
|
7
7
|
|
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.385
|
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-
|
11
|
+
date: 2014-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sqlite3
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '2.7'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: byebug
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: spawnling
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,14 +142,14 @@ dependencies:
|
|
128
142
|
requirements:
|
129
143
|
- - "~>"
|
130
144
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
145
|
+
version: 5.0.2
|
132
146
|
type: :runtime
|
133
147
|
prerelease: false
|
134
148
|
version_requirements: !ruby/object:Gem::Requirement
|
135
149
|
requirements:
|
136
150
|
- - "~>"
|
137
151
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
152
|
+
version: 5.0.2
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: jquery-turbolinks
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -239,7 +253,6 @@ files:
|
|
239
253
|
- db/migrate/20140604_add_has_video_to_photo.rb
|
240
254
|
- db/migrate/20140813300_add_is_moderated_to_category_topics.rb
|
241
255
|
- db/migrate/20140826100002_add_private_to_people_lists.rb
|
242
|
-
- db/migrate/20140904300001_add_timestamps_to_hyperlinks.rb
|
243
256
|
- lib/active_record_extension.rb
|
244
257
|
- lib/tasks/xforum_tasks.rake
|
245
258
|
- lib/xforum.rb
|
@@ -254,9 +267,6 @@ files:
|
|
254
267
|
- test/dummy/app/controllers/application_controller.rb
|
255
268
|
- test/dummy/app/helpers/application_helper.rb
|
256
269
|
- test/dummy/app/views/layouts/application.html.erb
|
257
|
-
- test/dummy/bin/bundle
|
258
|
-
- test/dummy/bin/rails
|
259
|
-
- test/dummy/bin/rake
|
260
270
|
- test/dummy/config.ru
|
261
271
|
- test/dummy/config/application.rb
|
262
272
|
- test/dummy/config/boot.rb
|
@@ -275,8 +285,6 @@ files:
|
|
275
285
|
- test/dummy/config/locales/en.yml
|
276
286
|
- test/dummy/config/routes.rb
|
277
287
|
- test/dummy/config/secrets.yml
|
278
|
-
- test/dummy/db/development.sqlite3
|
279
|
-
- test/dummy/log/development.log
|
280
288
|
- test/dummy/public/404.html
|
281
289
|
- test/dummy/public/422.html
|
282
290
|
- test/dummy/public/500.html
|
@@ -314,9 +322,6 @@ test_files:
|
|
314
322
|
- test/dummy/app/controllers/application_controller.rb
|
315
323
|
- test/dummy/app/helpers/application_helper.rb
|
316
324
|
- test/dummy/app/views/layouts/application.html.erb
|
317
|
-
- test/dummy/bin/bundle
|
318
|
-
- test/dummy/bin/rails
|
319
|
-
- test/dummy/bin/rake
|
320
325
|
- test/dummy/config/application.rb
|
321
326
|
- test/dummy/config/boot.rb
|
322
327
|
- test/dummy/config/database.yml
|
@@ -335,8 +340,6 @@ test_files:
|
|
335
340
|
- test/dummy/config/routes.rb
|
336
341
|
- test/dummy/config/secrets.yml
|
337
342
|
- test/dummy/config.ru
|
338
|
-
- test/dummy/db/development.sqlite3
|
339
|
-
- test/dummy/log/development.log
|
340
343
|
- test/dummy/public/404.html
|
341
344
|
- test/dummy/public/422.html
|
342
345
|
- test/dummy/public/500.html
|
data/test/dummy/bin/bundle
DELETED
data/test/dummy/bin/rails
DELETED
data/test/dummy/bin/rake
DELETED
File without changes
|
File without changes
|