Skip to content

Commit

Permalink
Merge branch 'master' into translations_en-yml--master_fa_IR
Browse files Browse the repository at this point in the history
  • Loading branch information
farhatahmad committed Jul 29, 2020
2 parents 880876c + 9932c32 commit 4832d47
Show file tree
Hide file tree
Showing 65 changed files with 1,858 additions and 400 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ vendor/bundle
/public/assets/**
/public/b/**

# Ignore uploaded files
/storage

# Ignore production paths.
/db/production
/db/production-postgres
Expand Down
8 changes: 6 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ gem 'coffee-rails', '~> 4.2'
# gem 'mini_racer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails', '~> 4.3.3'
gem 'jquery-rails', '~> 4.4'
gem 'jquery-ui-rails'

# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
Expand Down Expand Up @@ -56,7 +56,7 @@ gem 'bn-ldap-authentication', '~> 0.1.4'
gem 'omniauth-bn-office365', '~> 0.1.1'

# BigBlueButton API wrapper.
gem 'bigbluebutton-api-ruby'
gem 'bigbluebutton-api-ruby', git: 'https://github.com/mconf/bigbluebutton-api-ruby.git', branch: 'master'

# Front-end.
gem 'bootstrap', '~> 4.3.1'
Expand All @@ -76,6 +76,10 @@ gem 'redcarpet'
# For limiting access based on user roles
gem 'cancancan', '~> 2.0'

# Active Storage gems
gem 'aws-sdk-s3', '~> 1.75'
gem 'google-cloud-storage', '~> 1.26'

group :production do
# Use a postgres database in production.
gem 'pg', '~> 0.18'
Expand Down
91 changes: 85 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ GIT
tabler-rubygem (0.1.4.1)
autoprefixer-rails (>= 6.0.3)

GIT
remote: https://github.com/mconf/bigbluebutton-api-ruby.git
revision: 91dc495324a6b7e162773227ec3650f8a5b39c50
branch: master
specs:
bigbluebutton-api-ruby (1.7.0)
childprocess (>= 1.0.1)
ffi (>= 1.9.24)
json (>= 1.8.6)
nokogiri (>= 1.10.4)
rack (>= 1.6.11)
rubyzip (>= 1.3.0)
xml-simple (~> 1.1)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -58,9 +72,23 @@ GEM
ast (2.4.0)
autoprefixer-rails (9.7.6)
execjs
aws-eventstream (1.1.0)
aws-partitions (1.343.0)
aws-sdk-core (3.104.1)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.36.0)
aws-sdk-core (~> 3, >= 3.99.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.75.0)
aws-sdk-core (~> 3, >= 3.104.1)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.2.1)
aws-eventstream (~> 1, >= 1.0.2)
bcrypt (3.1.13)
bigbluebutton-api-ruby (1.7.0)
xml-simple (~> 1.1)
bindex (0.8.1)
bn-ldap-authentication (0.1.4)
net-ldap (~> 0)
Expand All @@ -73,6 +101,7 @@ GEM
builder (3.2.4)
byebug (11.1.3)
cancancan (2.3.0)
childprocess (4.0.0)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0)
Expand All @@ -90,7 +119,11 @@ GEM
crack (0.4.3)
safe_yaml (~> 1.0.0)
crass (1.0.6)
declarative (0.0.20)
declarative-option (0.1.0)
diff-lcs (1.3)
digest-crc (0.6.1)
rake (~> 13.0)
docile (1.3.2)
dotenv (2.7.5)
dotenv-rails (2.7.5)
Expand All @@ -112,16 +145,46 @@ GEM
sassc (>= 1.11)
globalid (0.4.2)
activesupport (>= 4.2.0)
google-api-client (0.42.1)
addressable (~> 2.5, >= 2.5.1)
googleauth (~> 0.9)
httpclient (>= 2.8.1, < 3.0)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
signet (~> 0.12)
google-cloud-core (1.5.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.3.3)
faraday (>= 0.17.3, < 2.0)
google-cloud-errors (1.0.1)
google-cloud-storage (1.26.2)
addressable (~> 2.5)
digest-crc (~> 0.4)
google-api-client (~> 0.33)
google-cloud-core (~> 1.2)
googleauth (~> 0.9)
mini_mime (~> 1.0)
googleauth (0.13.0)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (~> 0.14)
hashdiff (1.0.1)
hashie (4.1.0)
hiredis (0.6.3)
http_accept_language (2.1.1)
httpclient (2.8.3)
i18n (1.8.2)
concurrent-ruby (~> 1.0)
i18n-language-mapping (0.1.2)
jbuilder (2.10.0)
activesupport (>= 5.0.0)
jquery-rails (4.3.5)
jmespath (1.4.0)
jquery-rails (4.4.0)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
Expand All @@ -144,6 +207,7 @@ GEM
mini_mime (>= 0.1.1)
marcel (0.3.3)
mimemagic (~> 0.3.2)
memoist (0.16.2)
method_source (1.0.0)
mimemagic (0.3.5)
mini_mime (1.0.2)
Expand Down Expand Up @@ -186,6 +250,7 @@ GEM
omniauth-twitter (1.4.0)
omniauth-oauth (~> 1.1)
rack
os (1.1.0)
pagy (3.8.1)
parallel (1.19.1)
parser (2.7.1.3)
Expand All @@ -194,7 +259,7 @@ GEM
popper_js (1.16.0)
public_suffix (4.0.5)
puma (3.12.6)
rack (2.2.2)
rack (2.2.3)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.4.3)
Expand Down Expand Up @@ -237,8 +302,13 @@ GEM
redis (4.1.4)
remote_syslog_logger (1.0.4)
syslog_protocol
representable (3.0.4)
declarative (< 0.1.0)
declarative-option (< 0.2.0)
uber (< 0.2.0)
request_store (1.5.0)
rack (>= 1.4)
retriable (3.1.2)
rexml (3.2.4)
rspec-core (3.9.2)
rspec-support (~> 3.9.3)
Expand Down Expand Up @@ -268,6 +338,7 @@ GEM
rubocop-ast (0.0.3)
parser (>= 2.7.0.1)
ruby-progressbar (1.10.1)
rubyzip (2.3.0)
safe_yaml (1.0.5)
sassc (2.3.0)
ffi (~> 1.9)
Expand All @@ -280,6 +351,11 @@ GEM
sequel (5.32.0)
shoulda-matchers (3.1.3)
activesupport (>= 4.0.0)
signet (0.14.0)
addressable (~> 2.3)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simplecov (0.16.1)
docile (~> 1.1)
json (>= 1.8, < 3)
Expand Down Expand Up @@ -313,6 +389,7 @@ GEM
thread_safe (~> 0.1)
tzinfo-data (1.2020.1)
tzinfo (>= 1.0.0)
uber (0.1.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.7.0)
Expand All @@ -335,8 +412,9 @@ PLATFORMS

DEPENDENCIES
action-cable-testing
aws-sdk-s3 (~> 1.75)
bcrypt (~> 3.1.7)
bigbluebutton-api-ruby
bigbluebutton-api-ruby!
bn-ldap-authentication (~> 0.1.4)
bootsnap (>= 1.1.0)
bootstrap (~> 4.3.1)
Expand All @@ -348,11 +426,12 @@ DEPENDENCIES
factory_bot_rails
faker
font-awesome-sass (~> 5.9.0)
google-cloud-storage (~> 1.26)
hiredis
http_accept_language
i18n-language-mapping (~> 0.1.1)
jbuilder (~> 2.5)
jquery-rails (~> 4.3.3)
jquery-rails (~> 4.4)
jquery-ui-rails
listen (~> 3.0.5)
lograge
Expand Down
Binary file added app/assets/images/favicon.ico
Binary file not shown.
27 changes: 21 additions & 6 deletions app/assets/javascripts/admins.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ $(document).on('turbolinks:load', function(){
})
}
else if(action == "site_settings"){
loadColourSelectors()
var urlParams = new URLSearchParams(window.location.search);
// Only load the colour selectors if on the appearance tab
if (urlParams.get("tab") == null || urlParams.get("tab") == "appearance") {
loadColourSelectors()
}
}
else if (action == "roles"){
// Refreshes the new role modal
Expand Down Expand Up @@ -119,19 +123,30 @@ $(document).on('turbolinks:load', function(){
// Change the branding image to the image provided
function changeBrandingImage(path) {
var url = $("#branding-url").val()
$.post(path, {value: url})
$.post(path, {value: url, tab: "appearance"})
}

// Change the Legal URL to the one provided
function changeLegalURL(path) {
var url = $("#legal-url").val()
$.post(path, {value: url})
$.post(path, {value: url, tab: "administration"})
}

// Change the Privacy Policy URL to the one provided
function changePrivacyPolicyURL(path) {
var url = $("#privpolicy-url").val()
$.post(path, {value: url})
$.post(path, {value: url, tab: "administration"})
}

// Display the maintenance Banner
function displayMaintenanceBanner(path) {
var message = $("#maintenance-banner").val()
$.post(path, {value: message, tab: "administration"})
}

// Clear the maintenance Banner
function clearMaintenanceBanner(path) {
$.post(path, {value: "", tab: "administration"})
}

function mergeUsers() {
Expand Down Expand Up @@ -234,13 +249,13 @@ function loadColourSelectors() {
})

pickrLighten.on("save", (color, instance) => {
$.post($("#coloring-path-lighten").val(), {value: color.toHEXA().toString()}).done(function() {
$.post($("#coloring-path-lighten").val(), {value: color.toHEXA().toString(), tab: "appearance"}).done(function() {
location.reload()
});
})

pickrDarken.on("save", (color, instance) => {
$.post($("#coloring-path-darken").val(), {value: color.toHEXA().toString()}).done(function() {
$.post($("#coloring-path-darken").val(), {value: color.toHEXA().toString(), tab: "appearance"}).done(function() {
location.reload()
});
})
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// about supported directives.
//
//= require turbolinks
//= require jquery
//= require jquery3
//= require tabler
//= require tabler.plugins
//= require jquery_ujs
Expand Down
9 changes: 6 additions & 3 deletions app/assets/javascripts/cookies.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ $(document).on('turbolinks:load', function(){
})

$("#maintenance-close").click(function(event) {
//create a cookie that lasts 1 year
var cookieDate = new Date();
cookieDate.setFullYear(cookieDate.getFullYear() + 1); //1 year from now
//create a cookie that lasts 1 day

var cookieDate = new Date()
cookieDate.setDate(cookieDate.getDate() + 1) //1 day from now
console.log("maintenance_window=" + $(event.target).data("date") + "; path=/; expires=" + cookieDate.toUTCString() + ";")

document.cookie = "maintenance_window=" + $(event.target).data("date") + "; path=/; expires=" + cookieDate.toUTCString() + ";"
})
})

0 comments on commit 4832d47

Please sign in to comment.