diff --git a/vendor/built_in_modules/archive/.gitignore b/vendor/built_in_modules/archive/.gitignore deleted file mode 100644 index 1463de6d..00000000 --- a/vendor/built_in_modules/archive/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.bundle/ -log/*.log -pkg/ -test/dummy/db/*.sqlite3 -test/dummy/log/*.log -test/dummy/tmp/ \ No newline at end of file diff --git a/vendor/built_in_modules/archive/Gemfile b/vendor/built_in_modules/archive/Gemfile deleted file mode 100644 index f92bd902..00000000 --- a/vendor/built_in_modules/archive/Gemfile +++ /dev/null @@ -1,17 +0,0 @@ -source "http://rubygems.org" - -# Declare your gem's dependencies in archive.gemspec. -# Bundler will treat runtime dependencies like base dependencies, and -# development dependencies will be added by default to the :development group. -gemspec - -# jquery-rails is used by the dummy application -gem "jquery-rails" - -# Declare any dependencies that are still in development here instead of in -# your gemspec. These might include edge Rails or gems from your path or -# Git. Remember to move these dependencies to your gemspec before releasing -# your gem to rubygems.org. - -# To use debugger -# gem 'ruby-debug19', :require => 'ruby-debug' diff --git a/vendor/built_in_modules/archive/MIT-LICENSE b/vendor/built_in_modules/archive/MIT-LICENSE deleted file mode 100644 index 406f17b7..00000000 --- a/vendor/built_in_modules/archive/MIT-LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2012 YOURNAME - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/built_in_modules/archive/README.rdoc b/vendor/built_in_modules/archive/README.rdoc deleted file mode 100644 index 2a19864e..00000000 --- a/vendor/built_in_modules/archive/README.rdoc +++ /dev/null @@ -1,3 +0,0 @@ -= Archive - -This project rocks and uses MIT-LICENSE. \ No newline at end of file diff --git a/vendor/built_in_modules/archive/Rakefile b/vendor/built_in_modules/archive/Rakefile deleted file mode 100644 index b57290d4..00000000 --- a/vendor/built_in_modules/archive/Rakefile +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env rake -begin - require 'bundler/setup' -rescue LoadError - puts 'You must `gem install bundler` and `bundle install` to run rake tasks' -end -begin - require 'rdoc/task' -rescue LoadError - require 'rdoc/rdoc' - require 'rake/rdoctask' - RDoc::Task = Rake::RDocTask -end - -RDoc::Task.new(:rdoc) do |rdoc| - rdoc.rdoc_dir = 'rdoc' - rdoc.title = 'Archive' - rdoc.options << '--line-numbers' - rdoc.rdoc_files.include('README.rdoc') - rdoc.rdoc_files.include('lib/**/*.rb') -end - -APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__) -load 'rails/tasks/engine.rake' - - -Bundler::GemHelper.install_tasks - -require 'rake/testtask' - -Rake::TestTask.new(:test) do |t| - t.libs << 'lib' - t.libs << 'test' - t.pattern = 'test/**/*_test.rb' - t.verbose = false -end - - -task :default => :test diff --git a/vendor/built_in_modules/archive/app/assets/images/archive/.gitkeep b/vendor/built_in_modules/archive/app/assets/images/archive/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/archive/app/assets/javascripts/archive/.gitkeep b/vendor/built_in_modules/archive/app/assets/javascripts/archive/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/archive/app/assets/stylesheets/archive/.gitkeep b/vendor/built_in_modules/archive/app/assets/stylesheets/archive/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/archive/app/assets/stylesheets/archive/archives.css b/vendor/built_in_modules/archive/app/assets/stylesheets/archive/archives.css deleted file mode 100644 index e0aa39d6..00000000 --- a/vendor/built_in_modules/archive/app/assets/stylesheets/archive/archives.css +++ /dev/null @@ -1,157 +0,0 @@ -/* General style with default layout */ -.o-archives {} -.o-archives .o-archives-content {} -.o-archives .o-archives-group { - margin: 20px 0 0 0; - padding: 20px 0 0 0; - border-top: dashed 1px #eee; -} -.o-archives .o-archives-group:first-child { - margin: 0; - padding: 0; - border: 0; -} -.o-archives .o-archives-category { - padding-bottom: 16px; - margin-bottom: 16px; - border-bottom: solid 2px #ccc; - font-weight: bold; -} -.o-archives .o-archives-list {} -.o-archives .o-archives-list ul { - margin: 0; - padding: 0; - list-style: none; -} -.o-archives .o-archives-list li {} -.o-archives .o-archives-title { - border-left: solid 8px #eee; - border-bottom: solid 1px #eee; - padding: 0 0 0 16px; - line-height: 2em; -} -.o-archives .o-archives-list-item { - padding: 12px 0; -} -.o-archives .o-archives-list-item ol { - list-style-type: disc; - margin: 0; -} -.o-archives .o-archives-list-item li { - margin: 0 0 8px 0; -} -.o-archives .o-archives-file { - font-size: 0.85em; -} -.o-archives .o-archives-file:hover {} -.o-archives .o-archives-file-type { - display: inline-block; - vertical-align: top; - margin-left: 8px; - padding: 0 6px; - height: 16px; - font-size: 10px; - text-transform: uppercase; - line-height: 16px; - background-color: #666; - color: #fff; - border-radius: 3px; -} -.o-archives .o-archives-hot { - font-size: 11px; - font-weight: normal; - padding: 0 4px; - display: inline-block; - vertical-align: top; - margin: 0 0 0 8px; - background-color: #D83131; - color: #FFF; -} - -/* Tag list */ -.o-archives .o-archives-tag-list {} -.o-archives .o-archives-tag-list ul { - margin: 0 -4px; - padding: 0; - list-style: none; -} -.o-archives .o-archives-tag-list ul:after { - content: "."; - clear: both; - display: block; - height: 0; - visibility: hidden; -} -.o-archives .o-archives-tag-list li { - float: left; - margin: 0 4px 8px 4px; -} -.o-archives .o-archives-tag { - display: block; - border: solid 1px #ccc; - padding: 4px; - font-size: 0.85em; -} -.o-archives .o-archives-tag:hover {} - -/* Table layout */ -.o-archives.layout-table {} -.o-archives .o-archives-search { - overflow: hidden; - margin: 0 0 10px 0; -} -.o-archives .o-archives-search label { - display: inline-block; - margin: 0 8px 0 0; -} -.o-archives .o-archives-search-option { - float: right; -} -.o-archives .o-archives-search-option select { - width: 80px; -} -.o-archives .o-archives-search-keyword {} -.o-archives .o-archives-search-keyword input[type=submit] { - display: inline-block; - vertical-align: top; - margin: 0 0 0 8px; -} -.o-archives.layout-table table { - width: 100%; - table-layout: fixed; -} -.o-archives.layout-table tbody td { - vertical-align: top; - border-top: solid 1px #eee; - padding: 8px 4px; -} -.o-archives.layout-table .even {} -.o-archives.layout-table .even td {} -.o-archives.layout-table .column-ctrl { - text-align: left; - padding: 8px 4px; - font-size: 0.85em; -} -.o-archives.layout-table .column-ctrl.col-title { width: 30% } -.o-archives.layout-table .column-ctrl.col-file {} -.o-archives.layout-table .column-ctrl.col-category { width: 15%; } -.o-archives.layout-table .column-ctrl.col-tag { width: 20%; } -.o-archives.layout-table .o-archives-title { - font-weight: bold; - border: 0; - padding: 0; - line-height: 1.2em; -} -.o-archives.layout-table .o-archives-category { - padding: 0; - margin: 0; - border: 0; - font-weight: normal; -} -.o-archives.layout-table .o-archives-tag { - display: inline-block; - margin-bottom: 3px; -} -.o-archives.layout-table .o-archives-list-item { - padding: 0; -} \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/controllers/.gitkeep b/vendor/built_in_modules/archive/app/controllers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/archive/app/controllers/application_controller.rb b/vendor/built_in_modules/archive/app/controllers/application_controller.rb deleted file mode 100644 index 307a4acd..00000000 --- a/vendor/built_in_modules/archive/app/controllers/application_controller.rb +++ /dev/null @@ -1,23 +0,0 @@ -class ApplicationController < ActionController::Base - protect_from_forgery - before_filter :set_locale - - # Set I18n.locale - def set_locale - # update session if passed - session[:locale] = params[:locale] if params[:locale] - - # set locale based on session or default - begin - # check if locale is valid for non site pages - if !VALID_LOCALES.include?(session[:locale]) - I18n.locale = I18n.default_locale - else - I18n.locale = session[:locale] - end - rescue - I18n.locale = I18n.default_locale - end - end - -end diff --git a/vendor/built_in_modules/archive/app/controllers/panel/archive/back_end/archive_file_categorys_controller.rb b/vendor/built_in_modules/archive/app/controllers/panel/archive/back_end/archive_file_categorys_controller.rb deleted file mode 100644 index 3bb85311..00000000 --- a/vendor/built_in_modules/archive/app/controllers/panel/archive/back_end/archive_file_categorys_controller.rb +++ /dev/null @@ -1,144 +0,0 @@ -class Panel::Archive::BackEnd::ArchiveFileCategorysController < OrbitBackendController - include OrbitControllerLib::DivisionForDisable - - open_for_manager :except => [:index,:get_categorys_json,:get_archive_files_json] - open_for_sub_manager :except => [:index,:get_categorys_json,:get_archive_files_json] - - def index - @archive_file_categorys = get_categories_for_index("ArchiveFileCategory") - # @archive_file_categorys = ArchiveFileCategory.all - @archive_file_category = ArchiveFileCategory.new(:display => 'List') - - @url = panel_archive_back_end_archive_file_categorys_path - - respond_to do |format| - format.html # index.html.erb - format.js - end - end - - def get_categorys_json - categorys = ArchiveFileCategory.all - data = Array.new - - categorys.each do |c| - data << { - category: c.title, - link: "#{url_for( :action => "index", - :controller => "panel/archive/front_end/archive_files", - :format => :rss, - :only_path => false, - :inner=>true, - :category_id => c )}" - } - end - - render :json => JSON.pretty_generate(data) - end - - def get_archive_files_json - archive_file = ArchiveFileCategory.find(params[:archive_file_category_id]).archive_files - p archive_file - data = Array.new - - archive_file.each do |b| - - data << { - title: b.title, - link: "http://#{request.host_with_port}#{panel_archive_front_end_archive_file_path(b, :category_id => b.archive_file_category.id)}", - tag: b.sorted_tags.to_a, - } - end - - render :json => JSON.pretty_generate(data) - end - - # GET /archive_files/1 - # GET /archive_files/1.xml - def show - @archive_file_category = ArchiveFileCategory.find(params[:id]) - - respond_to do |format| - format.html # show.html.erb - format.js - end - end - - # GET /archive_files/new - # GET /archive_files/new.xml - def new - @archive_file_category = ArchiveFileCategory.new(:display => 'List') - - respond_to do |format| - format.html # new.html.erb - format.js - end - end - - # GET /archive_files/1/edit - def edit - @archive_file_category = ArchiveFileCategory.find(params[:id]) - - @url = panel_archive_back_end_archive_file_category_path(@archive_file_category) - - respond_to do |format| - format.html - format.js - end - end - - # POST /archive_files - # POST /archive_files.xml - def create - @archive_file_category = ArchiveFileCategory.new(params[:archive_file_category]) - - respond_to do |format| - if @archive_file_category.save - format.html { redirect_to(panel_archive_back_end_archive_file_categorys_url, :notice => t('archive_file_category.create_archive_file_category_success')) } - format.js - else - format.html { render :action => "new" } - format.js { render action: "new" } - end - end - end - - # PUT /archive_files/1 - # PUT /archive_files/1.xml - def update - @archive_file_category = ArchiveFileCategory.find(params[:id]) - - @url = panel_archive_back_end_archive_file_category_path(@archive_file_category) - - respond_to do |format| - if @archive_file_category.update_attributes(params[:archive_file_category]) - format.html { redirect_to(panel_archive_back_end_archive_file_categorys_url, :notice => t('archive_file_category.update_archive_file_category_success')) } - # format.xml { head :ok } - format.js - else - format.html { render :action => "edit" } - format.js { render :action => "edit" } - end - end - end - - # DELETE /archive_files/1 - # DELETE /archive_files/1.xml - def destroy - @archive_file_category = ArchiveFileCategory.find(params[:id]) - @archive_file_category.disable = @archive_file_category.disable ? false : true - - if @archive_file_category.save! - respond_to do |format| - flash[:notice] = t("update.success_") - # flash[:error] += @archive_file_category.disable ? t(:enable) : t(disable) - format.html { redirect_to(panel_archive_back_end_archive_file_categorys_url) } - # format.xml { head :ok } - format.js - end - else - flash[:error] = t("update.fail") - format.html { render :action => "index" } - end - end -end diff --git a/vendor/built_in_modules/archive/app/controllers/panel/archive/back_end/archive_files_controller.rb b/vendor/built_in_modules/archive/app/controllers/panel/archive/back_end/archive_files_controller.rb deleted file mode 100644 index 5cf588f5..00000000 --- a/vendor/built_in_modules/archive/app/controllers/panel/archive/back_end/archive_files_controller.rb +++ /dev/null @@ -1,162 +0,0 @@ -class Panel::Archive::BackEnd::ArchiveFilesController < OrbitBackendController - # before_filter :for_app_manager,:except => [:index,:show] - # include OrbitControllerLib::DivisionForDisable - - open_for_sub_manager :except => [:index] - - before_filter :only => [ :new, :create, :edit, :update ] do |controller| - @categories = get_categories_for_form - end - - def index - @tags = get_tags - @categories = get_categories_for_index - @statuses = get_statuses - category_ids = @categories.collect{|t| t.id} - - @archive_files = get_sorted_and_filtered("archive_file", :category_id.in => category_ids) - respond_to do |format| - format.html # index.html.erb - format.js { } - format.xml { render :xml => @archive_files } - end - end - - # def index - - # get_categorys("ArchiveFileCategory",params[:archive_file_category_id]) - # @filter = params[:filter] - # new_filter = params[:new_filter] - - # if @filter && params[:clear] - # @filter.delete(params[:type]) - # elsif @filter && new_filter - # if @filter.has_key?(new_filter[:type]) && @filter[new_filter[:type]].include?(new_filter[:id].to_s) - # @filter[new_filter[:type]].delete(new_filter[:id].to_s) - # elsif @filter.has_key?(new_filter[:type]) - # @filter[new_filter[:type]] << new_filter[:id].to_s - # else - # @filter.merge!({new_filter[:type] => [new_filter[:id].to_s]}) - # end - # elsif new_filter - # @filter = {new_filter[:type] => [new_filter[:id].to_s]} - # end - # @archive_filecategories = get_categories_for_index("ArchiveFileCategory") - # @archive_file_category_ids = @archive_file_categories.collect{|t| t.id.to_s} + [nil] - - # @archive_files = (params[:sort] || @filter) ? get_sorted_and_filtered("archive_file",:archive_file_category_id.in => @archive_file_category_ids) : get_viewable("archive_file",:archive_file_category_id.in => @archive_file_category_ids) - - # @tags = get_tags - - # respond_to do |format| - # format.html # index.html.erb - # format.xml { render :xml => @archive_files } - # format.js - # end - # end - - # GET /archive_files/1 - # GET /archive_files/1.xml - def show - @archive_file = ArchiveFile.find(params[:id]) - - respond_to do |format| - format.html # show.html.erb - format.xml { render :xml => @archive_file } - end - end - - # GET /archive_files/new - # GET /archive_files/new.xml - def new - if(session[:in_validate_object].blank?) - @archive_file = ArchiveFile.new - else - @archive_file = session[:in_validate_object] - session[:in_validate_object] = {} - end - - @tags = get_tags - - respond_to do |format| - format.html # new.html.erb - format.xml { render :xml => @archive_file } - end - end - - # GET /archive_files/1/edit - def edit - @archive_file = ArchiveFile.find(params[:id]) - if !current_user.admin? - redirect_to :action => :index - else - @tags = get_tags - end - end - - # POST /archive_files - # POST /archive_files.xml - def create - @archive_file = ArchiveFile.new(params[:archive_file]) - @archive_file.create_user_id = current_user.id - @archive_file.update_user_id = current_user.id - - respond_to do |format| - if @archive_file.save - format.html { redirect_to(panel_archive_back_end_archive_files_url) } - format.xml { render :xml => @archive_file, :status => :created, :location => @archive_file } - else - @tags = get_tags - format.html { render :action => "new" } - format.xml { render :xml => @archive_file.errors, :status => :unprocessable_entity } - end - end - end - - # PUT /archive_files/1 - # PUT /archive_files/1.xml - def update - @archive_file = ArchiveFile.find(params[:id]) - - @archive_file.update_user_id = current_user.id - - params[:archive_file][:tag_ids] ||=[] - - respond_to do |format| - if @archive_file.update_attributes(params[:archive_file]) - format.html { redirect_to(panel_archive_back_end_archive_files_url(:page => params[:page])) } - format.xml { head :ok } - else - format.html { render :action => "edit" } - format.xml { render :xml => @archive_file.errors, :status => :unprocessable_entity } - end - end - end - - # DELETE /archive_files/1 - # DELETE /archive_files/1.xml - def destroy - @archive_file = ArchiveFile.find(params[:id]) - @archive_file.destroy - - respond_to do |format| - format.html { redirect_to(panel_archive_back_end_archive_files_url) } - # format.xml { head :ok } - format.js - end - end - - def delete - if params[:ids] - archive_files = ArchiveFile.any_in(:_id => params[:ids]).destroy_all - end - redirect_to panel_archive_back_end_archive_files_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) - end - - protected - - # def get_categorys(id = nil) - # @archive_file_categorys = (id ? ArchiveFileCategory.find(id).to_a : ArchiveFileCategory.excludes('disabled' => true)) - # end - -end diff --git a/vendor/built_in_modules/archive/app/controllers/panel/archive/front_end/archive_files_controller.rb b/vendor/built_in_modules/archive/app/controllers/panel/archive/front_end/archive_files_controller.rb deleted file mode 100644 index 09ee68bb..00000000 --- a/vendor/built_in_modules/archive/app/controllers/panel/archive/front_end/archive_files_controller.rb +++ /dev/null @@ -1,136 +0,0 @@ -class Panel::Archive::FrontEnd::ArchiveFilesController < OrbitWidgetController - include AdminHelper - - def initialize - super - @app_title = 'archive_files' - end - - def get_search_result - @search = ArchiveFileCategory.solr_search do - fulltext params[:search_query] - with(:frontend_search,true) - end - - search_result = @search.results.collect{|result| result.id} - params[:category_id] = @search.results.collect{|result| result.id} - - @archive_file_categorys = ArchiveFileCategory.any_in(_id:search_result).page( params[:page_main]).per(@page_num) - end - - def index - @item = Page.find(params[:page_id]) - @title = @item.title - @frontend_style = !@item.frontend_style.blank? ? @item.frontend_style : "1" - if !@item.frontend_data_count.blank? - @page_num = @item.frontend_data_count - else - @page_num = 10 - end - - date_now = Time.now - # @archive_file_categorys = ArchiveFileCategory.all - # @archive_files = ArchiveFile.where( :is_hidden => false ).desc(:is_top).page(params[:page]).per(@page_num) - - if !params[:category_id].blank? - @archive_file_categorys = @module_app.categories.enabled.any_in(:_id => params[:category_id]) - @archive_file_category_ids = @module_app.categories.enabled.any_in(:_id => params[:category_id]).collect{|a|a.id} - else - @archive_file_categorys = @module_app.categories.enabled - @archive_file_category_ids = @module_app.categories.enabled.collect{|a|a.id} - end - - if @frontend_style == "1" - - if !params[:category_id].blank? && !params[:tag_id].blank? - @archive_files = ArchiveFile.can_display.where(:category_id.in => @archive_file_category_ids, :tagged_ids.in => params[:tag_id], :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).page( params[:page_main] ).per(@page_num) - # @current_category = ArchiveFileCategory.from_id(params[:category_id]) rescue nil - elsif !params[:category_id].blank? - @archive_files = ArchiveFile.can_display.where(:category_id.in => @archive_file_category_ids, :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).page( params[:page_main] ).per(@page_num) - # @current_category = ArchiveFileCategory.from_id(params[:category_id]) rescue nil - elsif !params[:tag_id].blank? - @archive_files = ArchiveFile.can_display.where(:category_id.in => @archive_file_category_ids,:tagged_ids.in => params[:tag_id], :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).page( params[:page_main] ).per(@page_num) - else - @archive_files = ArchiveFile.can_display.where(:category_id.in => @archive_file_category_ids, :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).page( params[:page_main] ).per(@page_num) - end - - elsif @frontend_style == "2" - - @archive_file_datas = Array.new - - @archive_file_categorys.each do |afcg| - - if !params[:category_id].blank? && !params[:tag_id].blank? - @archive_files = ArchiveFile.can_display.where(:category_id.in => [afcg.id], :tagged_ids.in => params[:tag_id], :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]) - elsif !params[:category_id].blank? - @archive_files = ArchiveFile.can_display.where(:category_id.in => [afcg.id], :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]) - elsif !params[:tag_id].blank? - @archive_files = ArchiveFile.can_display.where(:category_id => afcg.id, :tagged_ids.in => params[:tag_id], :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]) - else - @archive_files = ArchiveFile.can_display.where(:category_id => afcg.id, :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]) - end - - archive_file_datas = Array.new - - @archive_files.each do |af| - - archive_file_multiple_datas = Array.new - - af.archive_file_multiples.asc(:sort_number).each do | afile | - archive_file_multiple_datas << { - "file_title" => (!afile.file_title.blank? ? afile.file_title : t('archive.download') ) , - "url" => afile.file.url, - "icon" => af.get_file_icon(afile.file.url) - } if afile.file.file and afile.choose_lang_display(I18n.locale.to_s) - end - - archive_file_datas << { "title" => af.title, "is_hot" => (!af.is_hot.blank? ? '1' : ''), "archive_file_multiples" => archive_file_multiple_datas } if !af.archive_file_multiples.blank? and !archive_file_multiple_datas.blank? - end - - @archive_file_datas << { "title" => afcg.title, "archive_files" => archive_file_datas } if !@archive_files.blank? - end - - end - # get_categorys - - if params[:sort] - @archive_files = get_sorted_and_filtered('archive_file', nil, @archive_files) - end - end - - def show - @item = Page.find(params[:page_id]) - @title = @item.title - @archive_file = ArchiveFile.find(params[:id]) - get_categorys - end - - protected - - def reload_archive_files - @item = Page.find(params[:page_id]) - @title = @item.title - if @item.frontend_data_count - @page_num = @item.frontend_data_count - else - @page_num = 0 - end - date_now = Time.now - @archive_file_categorys = ArchiveFileCategory.all - # @archive_files = ArchiveFile.where( :is_hidden => false ).desc(:is_top).page(params[:page]).per(@page_num) - - if !params[:category_id].blank? - @archive_files = ArchiveFile.can_display.where(:archive_file_category_id => params[:category_id]).desc( :is_top ).page( params[:page_main] ).per(@page_num) - @current_category = ArchiveFileCategory.from_id(params[:category_id]) rescue nil - elsif !params[:tag_id].blank? - @archive_files = ArchiveFile.can_display.where(:tagged_ids => params[:tag_id]).desc( :is_top ).page( params[:page_main] ).per(@page_num) - else - @archive_files = ArchiveFile.can_display.desc( :is_top ).page( params[:page_main] ).per(@page_num) - end - get_categorys - end - - def get_categorys - @archive_file_categorys = ArchiveFileCategory.excludes('disabled' => true) - end -end diff --git a/vendor/built_in_modules/archive/app/controllers/panel/archive/widget/archive_files_controller.rb b/vendor/built_in_modules/archive/app/controllers/panel/archive/widget/archive_files_controller.rb deleted file mode 100644 index f2939a59..00000000 --- a/vendor/built_in_modules/archive/app/controllers/panel/archive/widget/archive_files_controller.rb +++ /dev/null @@ -1,128 +0,0 @@ -class Panel::Archive::Widget::ArchiveFilesController < OrbitWidgetController - include AdminHelper - - def initialize - super - @app_title = 'archive_files' - end - - def index - - @part = PagePart.find(params[:part_id]) - @title = @part.title_translations[I18n.locale.to_s] - - if @part.widget_data_count - @page_num = @part.widget_data_count - else - @page_num = 4 - end - - if @part.widget_field - @widget_fields = @part.widget_field - else - @widget_fields = [] - end - - @widget_style = @part.widget_style - @widget_style = !@part.widget_style.blank? ? @part.widget_style : "1" - - @category_id = @part.category - - date_now = Time.now - - # if !params[:category_id].blank? - # @archive_files = ArchiveFile.default_sort(params[:sort]).all.can_display.any_in(:category_id => params[:category_id]).merge(ArchiveFileCategory.excludes('disable' => true)).desc( :is_top ).page( params[:page_main] ).per(@page_num) - # @archive_file_categorys = ArchiveFileCategory.any_in(:_id => params[:category_id]).excludes('disable' => true) - # elsif !params[:tag_id].blank? - # @archive_files = ArchiveFile.default_sort(params[:sort]).all.can_display.any_in(:tagged_ids => params[:tag_id]).merge(ArchiveFileCategory.excludes('disable' => true)).desc( :is_top ).page( params[:page_main] ).per(@page_num) - # get_categorys - # else - # @archive_files = ArchiveFile.default_sort(params[:sort]).all.can_display.merge(ArchiveFileCategory.excludes('disable' => true)).desc( :is_top).page( params[:page_main] ).per(@page_num) - # get_categorys - # end - - # if !params[:category_id].blank? && !params[:tag_id].blank? - # @archive_files = ArchiveFile.default_sort(params[:sort]).can_display.where(:category_id.in => params[:category_id], :tagged_ids.in => params[:tag_id]).desc( :is_top ).page( params[:page_main] ).per(@page_num) - # @current_category = ArchiveFileCategory.from_id(params[:category_id]) rescue nil - # elsif !params[:category_id].blank? - # @archive_files = ArchiveFile.default_sort(params[:sort]).can_display.where(:category_id.in => params[:category_id]).desc( :is_top ).page( params[:page_main] ).per(@page_num) - # @current_category = ArchiveFileCategory.from_id(params[:category_id]) rescue nil - # elsif !params[:tag_id].blank? - # @archive_files = ArchiveFile.default_sort(params[:sort]).can_display.where(:tagged_ids.in => params[:tag_id]).desc( :is_top ).page( params[:page_main] ).per(@page_num) - # else - # @archive_files = ArchiveFile.default_sort(params[:sort]).can_display.desc( :is_top ).page( params[:page_main] ).per(@page_num) - # end - - - - if !params[:category_id].blank? - @archive_file_categorys = @module_app.categories.enabled.any_in(:_id => params[:category_id]) - @archive_file_category_ids = @module_app.categories.enabled.any_in(:_id => params[:category_id]).collect{|a|a.id} - else - @archive_file_categorys = @module_app.categories.enabled - @archive_file_category_ids = @module_app.categories.enabled.collect{|a|a.id} - end - - if @widget_style == "1" - - if !params[:category_id].blank? && !params[:tag_id].blank? - @archive_files = ArchiveFile.can_display.where(:category_id.in => @archive_file_category_ids, :tagged_ids.in => params[:tag_id], :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).page( params[:page_main] ).per(@page_num) - elsif !params[:category_id].blank? - @archive_files = ArchiveFile.can_display.where(:category_id.in => @archive_file_category_ids, :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).page( params[:page_main] ).per(@page_num) - elsif !params[:tag_id].blank? - @archive_files = ArchiveFile.can_display.where(:category_id.in => @archive_file_category_ids,:tagged_ids.in => params[:tag_id], :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).page( params[:page_main] ).per(@page_num) - else - @archive_files = ArchiveFile.can_display.where(:category_id.in => @archive_file_category_ids, :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).page( params[:page_main] ).per(@page_num) - end - - elsif @widget_style == "2" - - @archive_file_datas = Array.new - - @archive_file_categorys.each do |afcg| - - if !params[:category_id].blank? && !params[:tag_id].blank? - @archive_files = ArchiveFile.can_display.where(:category_id.in => [afcg.id], :tagged_ids.in => params[:tag_id], :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).limit(@page_num) - elsif !params[:category_id].blank? - @archive_files = ArchiveFile.can_display.where(:category_id.in => [afcg.id], :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).limit(@page_num) - elsif !params[:tag_id].blank? - @archive_files = ArchiveFile.can_display.where(:category_id => afcg.id, :tagged_ids.in => params[:tag_id], :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).limit(@page_num) - else - @archive_files = ArchiveFile.can_display.where(:category_id => afcg.id, :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).limit(@page_num) - end - - archive_file_datas = Array.new - - @archive_files.each do |af| - - archive_file_multiple_datas = Array.new - - af.archive_file_multiples.asc(:sort_number).each do | afile | - archive_file_multiple_datas << { - "file_title" => (!afile.file_title.blank? ? afile.file_title : t('archive.download') ) , - "url" => afile.file.url, - "icon" => af.get_file_icon(afile.file.url) - } if afile.file.file and afile.choose_lang_display(I18n.locale.to_s) - end - - archive_file_datas << { "title" => af.title, "is_hot" => (!af.is_hot.blank? ? '1' : ''), "archive_file_multiples" => archive_file_multiple_datas } if !af.archive_file_multiples.blank? and !archive_file_multiple_datas.blank? - end - - @archive_file_datas << { "title" => afcg.title, "archive_files" => archive_file_datas } if !@archive_files.blank? - - end - - end - - - if params[:sort] - @archive_files = get_sorted_and_filtered('archive_file', nil, @archive_files) - end - - end - - def get_categorys - @archive_file_categorys = ArchiveFileCategory.excludes('disable' => true) - end - -end diff --git a/vendor/built_in_modules/archive/app/helpers/.gitkeep b/vendor/built_in_modules/archive/app/helpers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/archive/app/helpers/panel/archive/back_end/archive_file_categorys_helper.rb b/vendor/built_in_modules/archive/app/helpers/panel/archive/back_end/archive_file_categorys_helper.rb deleted file mode 100644 index d5185ff9..00000000 --- a/vendor/built_in_modules/archive/app/helpers/panel/archive/back_end/archive_file_categorys_helper.rb +++ /dev/null @@ -1,15 +0,0 @@ -module Panel::Archive::BackEnd::ArchiveFileCategorysHelper -include ActionView::Helpers::UrlHelper - - - def show_anc_cate_permission_link(archive_file_category) - type = 'submit' - oa = archive_file_category.get_object_auth_by_title(type) - if oa.nil? - archive_file_category.object_auths.new(title: type ).save - oa = archive_file_category.get_object_auth_by_title(type) - end - link_to t(:category_auth),admin_object_auth_ob_auth_path(oa) - end - -end \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/mailers/.gitkeep b/vendor/built_in_modules/archive/app/mailers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/archive/app/models/.gitkeep b/vendor/built_in_modules/archive/app/models/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/archive/app/models/archive_file.rb b/vendor/built_in_modules/archive/app/models/archive_file.rb deleted file mode 100644 index 26cf91e0..00000000 --- a/vendor/built_in_modules/archive/app/models/archive_file.rb +++ /dev/null @@ -1,81 +0,0 @@ -# encoding: utf-8 -class ArchiveFile - include Mongoid::Document - include Mongoid::Timestamps - include Mongoid::MultiParameterAttributes - include Mongoid::Sortable - include Sunspot::Mongoid2 - - include OrbitCategory::Categorizable - include OrbitModel::LanguageRestrict - include OrbitModel::Status - include OrbitModel::TimeFrame - include OrbitTag::Taggable - - # BelongsToCategory = :archive_file_category - - # PAYMENT_TYPES = @site_valid_locales - - - field :title, localize: true - field :create_user_id - field :update_user_id, :class_name => "User" - - scope :can_display,where(is_hidden: false) - - # belongs_to :archive_file_category - - has_many :archive_file_multiples, :autosave => true, :dependent => :destroy - - accepts_nested_attributes_for :archive_file_multiples, :allow_destroy => true - - validates :title, :at_least_one => true - - after_save :save_archive_file_multiples - - # searchable do - # text :titles do - # title_translations.to_a.collect{|t| t[1]} -# end - # boolean :frontend_search do - # !is_hidden - # end - - # end - - - def self.search( category_id = nil ) - - if category_id.to_s.size > 0 - - find(:all, :conditions => {archive_file_category_id: category_id}).desc( :is_top, :title ) - - else - - find(:all).desc( :is_top, :title) - - end - - end - - - def self.widget_datas - - where( :is_hidden => false ).desc(:is_top, :title) - - end - - - def get_file_icon( file_data ) - file_icon = "#{file_data.split('.')[-1]}".html_safe - end - - def save_archive_file_multiples - self.archive_file_multiples.each do |t| - if t.should_destroy - t.destroy - end - end - end - -end diff --git a/vendor/built_in_modules/archive/app/models/archive_file_category.rb b/vendor/built_in_modules/archive/app/models/archive_file_category.rb deleted file mode 100644 index 97fa3900..00000000 --- a/vendor/built_in_modules/archive/app/models/archive_file_category.rb +++ /dev/null @@ -1,31 +0,0 @@ -# encoding: utf-8 - -class ArchiveFileCategory - include Mongoid::Document - include Mongoid::Timestamps - include OrbitCoreLib::ObjectAuthable - include OrbitCoreLib::ObjectDisable - - APP_NAME = 'Archive' - ObjectAuthTitlesOptions = %W{submit_new fact_check} - AfterObjectAuthUrl = '/panel/archive/back_end/archive_file_categorys' - - field :disable, type: Boolean, :default => false - field :display - field :key - field :title, localize: true - - has_many :archive_files - - validates :title, :at_least_one => true - - - def pp_object - title - end - - def self.from_id(id) - ArchiveFileCategory.find(id) rescue nil - end - -end \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/models/archive_file_multiple.rb b/vendor/built_in_modules/archive/app/models/archive_file_multiple.rb deleted file mode 100644 index d45d34a8..00000000 --- a/vendor/built_in_modules/archive/app/models/archive_file_multiple.rb +++ /dev/null @@ -1,27 +0,0 @@ -class ArchiveFileMultiple - - include Mongoid::Document - include Mongoid::Timestamps - include Mongoid::Sortable - - mount_uploader :file, AssetUploader - - field :file_title, localize: true - # field :description - field :choose_lang, :type => Array, :default => nil - - field :should_destroy, :type => Boolean - - default_scope asc(:sort_number) - - def choose_lang_display(lang) - self.choose_lang.include?(lang) - end - - belongs_to :archive_file - - # has_many :archive_file_multiple_langs, :autosave => true, :dependent => :destroy - - # accepts_nested_attributes_for :archive_file_multiple_langs, :allow_destroy => true - -end diff --git a/vendor/built_in_modules/archive/app/views/.gitkeep b/vendor/built_in_modules/archive/app/views/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/_archive_file_category.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/_archive_file_category.html.erb deleted file mode 100644 index 3c909064..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/_archive_file_category.html.erb +++ /dev/null @@ -1,20 +0,0 @@ - - - - <%= archive_file_category.key %> -
- -
- - <% @site_in_use_locales.each do |locale| %> - <%= archive_file_category.title_translations[locale] rescue nil %> - <% end %> - diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/_form.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/_form.html.erb deleted file mode 100644 index 7363fe68..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/_form.html.erb +++ /dev/null @@ -1,30 +0,0 @@ -<% # encoding: utf-8 %> - -<%= form_for(@archive_file_category, :remote => true, :url => @url) do |f| %> - -

<%= (@archive_file_category.new_record? ? 'Add' : 'Edit') %>

- -
- <%= f.label :key %> - <%= f.text_field :key %> -
- -
- <%= f.fields_for :title_translations do |f| %> - <% @site_in_use_locales.each do |locale| %> -
- <%= label_tag "name-#{locale}", "Name-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %> -
- <%= f.text_field locale, :class =>' input-xxlarge', :value => (@archive_file_category.title_translations[locale] rescue nil) %> -
-
- <% end %> - <% end %> -
- -
- <%= f.submit 'Submit/送出', :class=>'btn btn-primary' %> -
- -<% end %> - \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/create.js.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/create.js.erb deleted file mode 100644 index 250d889b..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/create.js.erb +++ /dev/null @@ -1,2 +0,0 @@ -$('<%= j render :partial => 'archive_file_category', :collection => [@archive_file_category] %>').appendTo('#archive_file_categorys').hide().fadeIn(); -$("#new_archive_file_category")[0].reset(); \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/destroy.js.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/destroy.js.erb deleted file mode 100644 index 79515598..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/destroy.js.erb +++ /dev/null @@ -1 +0,0 @@ -$("#<%= dom_id @archive_file_category %>").find(".archive_toggle").text("<%= show_toggle_archive_btn(@archive_file_category) %> "); \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/edit.js.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/edit.js.erb deleted file mode 100644 index eaff01fa..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/edit.js.erb +++ /dev/null @@ -1 +0,0 @@ -$("#form > form").replaceWith("<%= j render "form" %>"); \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/index.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/index.html.erb deleted file mode 100644 index 9fb62327..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/index.html.erb +++ /dev/null @@ -1,23 +0,0 @@ - - -<%= flash_messages %> - - - - - - <% @site_in_use_locales.each do |locale| %> - - <% end %> - - - - - <%= render :partial => 'archive_file_category', :collection => @archive_file_categorys %> - - -
<%= t('archive_file_category.key') %><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %>
- -
<%= render :partial => "form" %>
- - diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/new.js.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/new.js.erb deleted file mode 100644 index 40061b9f..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/new.js.erb +++ /dev/null @@ -1 +0,0 @@ -$("#form > form").replaceWith("<%= j render "form" %>"); diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/update.js.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/update.js.erb deleted file mode 100644 index 2c5cf21e..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/update.js.erb +++ /dev/null @@ -1,4 +0,0 @@ -$("#<%= dom_id @archive_file_category %>").replaceWith("<%= j render :partial => 'archive_file_category', :collection => [@archive_file_category] %>"); -<% @archive_file_category = ArchiveFileCategory.new(:display => 'List') # reset for new form %> -$(".edit_archive_file_category").replaceWith("<%= j render "form" %>") -$(".new_archive_file_category")[0].reset(); \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_archive_file.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_archive_file.html.erb deleted file mode 100644 index 2f49cf73..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_archive_file.html.erb +++ /dev/null @@ -1,49 +0,0 @@ - - - <% if (archive_file.create_user_id == current_or_guest_user.id) || is_manager? %> - <%= check_box_tag 'to_delete[]', archive_file.id, false, :class => "checkbox_in_list" %> - <% end -%> - - - <%= archive_file.sort_number %> - - -
-
- <% if archive_file.is_top? %> - <%= t(:top) %> - <% end %> - <% if archive_file.is_hot? %> - <%= t(:hot) %> - <% end %> - <% if archive_file.is_hidden? %> - <%= t(:hidden) %> - <% end %> -
-
- - <%= archive_file.archive_file_category.title %> - - <%= link_to archive_file.title, panel_archive_front_end_archive_file_path(archive_file) %> - -
- -
- - - -
-
- <% archive_file.sorted_tags.each do |tag| %> - <%= tag.name %> - <% end %> -
-
- - - diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_clear_filters.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_clear_filters.html.erb deleted file mode 100644 index a15f7993..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_clear_filters.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -
- <%= link_to content_tag(:i, nil, :class => 'icons-cycle') + t(:clear), panel_archive_back_end_archive_files_path(:filter => @filter, :sort => params[:sort], :direction => params[:direction], :clear => true, :type => type), :class => "btn btn-small js_history" %> -
\ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_filter.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_filter.html.erb deleted file mode 100644 index 906db029..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_filter.html.erb +++ /dev/null @@ -1,37 +0,0 @@ - - -<% content_for :page_specific_javascript do %> - <%= javascript_include_tag "sort_header" %> -<% end %> diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_filter_categories.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_filter_categories.html.erb deleted file mode 100644 index bc55aa68..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_filter_categories.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -
- <% @archive_file_categories.each do |category| -%> - <%= link_to category.title, panel_archive_back_end_archive_files_path(:filter => @filter, :new_filter => {:type => 'categories', :id => category.id}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('categories', category.id)}" %> - <% end -%> -
-<%= render :partial => 'clear_filters', :locals => {:type => 'categories'} %> \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_filter_status.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_filter_status.html.erb deleted file mode 100644 index 316d471e..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_filter_status.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -
- <%= link_to t(:top), panel_archive_back_end_archive_files_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_top'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('status', 'is_top')}" %> - <%= link_to t(:hot), panel_archive_back_end_archive_files_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_hot'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('status', 'is_hot')}" %> - <%= link_to t(:hidden), panel_archive_back_end_archive_files_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_hidden'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('status', 'is_hidden')}" unless(is_guest?)%> -
-<%= render :partial => 'clear_filters', :locals => {:type => 'status'} %> \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_filter_tags.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_filter_tags.html.erb deleted file mode 100644 index 743521d9..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_filter_tags.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -
- <% @tags.each do |tag| -%> - <%= link_to tag.name, panel_archive_back_end_archive_files_path(:filter => @filter, :new_filter => {:type => 'tags', :id => tag.id}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('tags', tag.id)}" %> - <% end -%> -
-<%= render :partial => 'clear_filters', :locals => {:type => 'tags'} %> \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form.html.erb deleted file mode 100644 index 1583a0be..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form.html.erb +++ /dev/null @@ -1,198 +0,0 @@ -<% # encoding: utf-8 %> -<% content_for :page_specific_css do %> - <%= stylesheet_link_tag "lib/main-forms" %> - <%= stylesheet_link_tag "lib/fileupload" %> - <%= stylesheet_link_tag "lib/main-list" %> -<% end %> -<% content_for :page_specific_javascript do %> - <%= javascript_include_tag "lib/bootstrap-fileupload" %> - <%= javascript_include_tag "lib/file-type" %> - <%= javascript_include_tag "lib/module-area" %> -<% end %> - - <%= f.error_messages %> - - -
- - - - - - -
- - -
- - -
- -
- <%= f.select :category_id, @categories.collect{|t| [ t.title, t.id ]} %> -
-
- - -
- -
- <%= f.text_field :sort_number %> -
-
- -
- - - <% if show_form_status_field(@archive_file) %> -
- - -
- -
- - - -
-
- -
- <% end %> - - -
- - -
- -
- <% @tags.each do |tag| %> - - <% end %> -
-
- -
- -
- - - - - - -
- - <% @site_in_use_locales.each_with_index do |locale, i| %> - -
"> - - -
- -
- <%= f.fields_for :title_translations do |f| %> - <%= f.text_field locale, class: "input-block-level", placeholder: t(:title), value: (@archive_file.title_translations[locale] rescue nil) %> - <% end %> -
-
- -
- - <% end %> - - -
- -
- - - <% if @archive_file && !@archive_file.archive_file_multiples.blank? %> -
- <% @archive_file.archive_file_multiples.each_with_index do |archive_file_multiple, i| %> - <%= f.fields_for :archive_file_multiples, archive_file_multiple do |f| %> - <%= render :partial => 'form_file', :object => archive_file_multiple, :locals => {:f => f, :i => i} %> - <% end %> - <% end %> -
-
- <% end %> - - -
-
-

- <%= hidden_field_tag 'archive_file_multiple_field_count', @archive_file.archive_file_multiples.count %> - <%= t(:add) %> -

- -
-
-
- -
- - -
- <%= hidden_field_tag 'page', params[:page] if !params[:page].blank? %> - <%= f.submit t('submit'), class: 'btn btn-primary' %> - <%= link_to t('cancel'), get_go_back, :class=>"btn" %> -
- -<% content_for :page_specific_javascript do %> - -<% end %> diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form_file.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form_file.html.erb deleted file mode 100644 index 645c1638..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form_file.html.erb +++ /dev/null @@ -1,66 +0,0 @@ -<% if form_file.new_record? %> -
-<% else %> -
- <% if form_file.file.blank? %> - <%= t(:no_file) %> - <% else %> - <%= link_to content_tag(:i) + form_file.file_identifier, form_file.file.url, {:class => 'file-link file-type', :target => '_blank', :title => form_file.file_identifier} %> - <% end %> -<% end %> -
- - - - <% @site_in_use_locales.each_with_index do |locale, i| %> - <%= locale %>"> - <%= f.fields_for :file_title_translations do |f| %> - <%= f.text_field locale, :class => "input-medium", placeholder: t('file.name'), :value => (form_file.file_title_translations[locale] rescue nil) %> - <% end %> - - <% end %> - - - - - <%= f.text_field :sort_number , :class => "input-mini" %> - - - - - - <%= hidden_field_tag 'archive_file[archive_file_multiples_attributes][0][choose_lang][]', '' %> - - - <% if form_file.new_record? %> - - - - <% else %> - - <%= f.hidden_field :id %> - - <%= f.hidden_field :_destroy, :value => nil, :class => 'should_destroy' %> - - <% end %> -
-
- diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_sort_headers.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_sort_headers.html.erb deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/destroy.js.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/destroy.js.erb deleted file mode 100644 index 7dc62871..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/destroy.js.erb +++ /dev/null @@ -1 +0,0 @@ -$("#<%= dom_id @archive_file %>").remove(); \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/edit.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/edit.html.erb deleted file mode 100644 index 2fae5a9e..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/edit.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -<%= form_for @archive_file, url: panel_archive_back_end_archive_file_path(@archive_file), html: {class: "form-horizontal main-forms previewable"} do |f| %> -
- <%= render partial: 'form', locals: {f: f} %> -
-<% end %> \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/index.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/index.html.erb deleted file mode 100644 index d3395cd2..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/index.html.erb +++ /dev/null @@ -1,54 +0,0 @@ -<% set_default_index do - objects @archive_files - quick_edit_link type: 'edit', - link: 'edit_panel_archive_back_end_archive_file_path' - quick_edit_link type: 'detail' - quick_edit_link type: 'delete', - link: 'panel_archive_back_end_archive_file_path' - field type: 'status', - db_field: @statuses, - translation: 'status', - hide: 'phone', - sort: 'status', - header_class: 'span2' - field type: 'associated', - db_field: 'category', - model_field: 'title', - translation: 'category', - hide: 'phone', - sort: 'category', - header_class: 'span2' - field db_field: 'title', - translation: 'title', - sort: 'title', - display_option: 'link_to value, panel_archive_front_end_archive_file_path(object)', - quick_edit: true, - header_class: 'span5' - field type: 'tags', - hide: 'all', - sort: 'tags' - field type: 'associated', - db_field: 'archive_file_multiples', - translation: 'file_', - display_option: "content_tag(:span, link_to(content_tag(:i) + object.file_identifier, object.file.url, target: '_blank'), class: 'file-type') unless object.file.blank?", - hide: 'all', - header_class: 'span2' - filter_field type: 'array', - values: @statuses, - translation: 'status' - filter_field type: 'objects', - values: @categories, - translation: 'category', - object_field: 'title' - filter_field type: 'objects', - values: @tags, - translation: 'tags', - object_field: 'name' - footer link: 'new_panel_archive_back_end_archive_file_path' -end %> - -<%= render 'admin/default_index/index' %> - -<% content_for :page_specific_javascript do %> - <%= javascript_include_tag "lib/file-type" %> -<% end %> diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/index.js.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/index.js.erb deleted file mode 100644 index f3d30c0b..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/index.js.erb +++ /dev/null @@ -1,7 +0,0 @@ -$("#collapse-status").html("<%= j render 'filter_status' %>"); -$("#collapse-category").html("<%= j render 'filter_categories' %>"); -$("#collapse-tags").html("<%= j render 'filter_tags' %>"); -$("#delete_all").attr("action", "<%= delete_panel_archive_back_end_archive_files_path(:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil, :sort_options => params[:sort_options]) %>"); -$("#sort_headers").html("<%= j render 'sort_headers' %>"); -$("#tbody_archive").html("<%= j render :partial => 'archive_file', :collection => @archive_files %>"); -$("#archive_file_pagination").html("<%= j paginate @archive_files, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>"); \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/new.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/new.html.erb deleted file mode 100644 index b3ea8160..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/new.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -<%= form_for @archive_file, url: panel_archive_back_end_archive_files_path, html: {class: "form-horizontal main-forms previewable"} do |f| %> -
- <%= render partial: 'form', locals: {f: f} %> -
-<% end %> diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/front_end/archive_files/_index.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/front_end/archive_files/_index.html.erb deleted file mode 100644 index 149ee2f3..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/front_end/archive_files/_index.html.erb +++ /dev/null @@ -1,98 +0,0 @@ -<% # encoding: utf-8 %> - -<% if @frontend_style == '1' %> - -
- - - - - - - - - - - - <% @archive_files.each_with_index do |post,i| %> - class="even" <% end %>> - - - - - <% end %> - - -
<%= sortable(:title, t("archive.Title"))%><%= t("archive.Files")%><%= sortable(:archive_file_category, t("archive.Category"))%>
-
<%= post.title %> - <% if !post.is_hot.blank? %><%= t('hot')%><% end %> -
-
-
- <% if !post.archive_file_multiples.blank? %> -
    - <% post.archive_file_multiples.asc(:sort_number).each do | afile | %> - <% if afile.file.file and afile.choose_lang_display(I18n.locale.to_s) %> -
  1. - <%= link_to (!afile.file_title.blank? ? afile.file_title : t('archive.download') ), afile.file.url, {:target => '_blank', :title => afile.file_title, :class => "o-archives-file"} if afile.file.file %> - <%= post.get_file_icon(afile.file.url) %> -
  2. - <% end %> - <% end %> -
- <% end %> -
-
- <%= post.category.title if !post.category.blank? %> -
-
- - <%= paginate @archive_files, :param_name => :page_main, :params => {:inner => 'false'} %> - -<% elsif @frontend_style == '2' %> - -
-
- <% @archive_file_datas.each do |afcpost| %> -
-

<%= afcpost["title"] %>

-
-
-
    - <% afcpost["archive_files"].each do |post| %> -
  • -

    - <%= post["title"] %> - <% if !post["is_hot"].blank? %><%= t('hot')%><% end %> -

    -
    -
      - <% post["archive_file_multiples"].each do | afile | %> -
    1. - <%= link_to afile["file_title"], afile["url"], {:target => '_blank', :title => afile["file_title"], :class => "o-archives-file"} %> - <%= afile["icon"] %> -
    2. - <% end %> -
    -
    -
  • - <% end %> -
-
-
- <% end %> -
-
- -<% end %> - -<%#= stylesheet_link_tag "archive/archives" %> - - - - - - - - - diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/front_end/archive_files/index.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/front_end/archive_files/index.html.erb deleted file mode 100644 index 6667866d..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/front_end/archive_files/index.html.erb +++ /dev/null @@ -1,17 +0,0 @@ -<%#= stylesheet_link_tag "default_widget" %> -<%= javascript_include_tag "mobile/jquery.mu.image.resize.js" %> - -
- <%= render 'index' %> -
- -<%#= stylesheet_link_tag "archive/archives" %> - - - - - - - - - diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/front_end/archive_files/index.js.erb b/vendor/built_in_modules/archive/app/views/panel/archive/front_end/archive_files/index.js.erb deleted file mode 100644 index a0afb16f..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/front_end/archive_files/index.js.erb +++ /dev/null @@ -1 +0,0 @@ -$('#archive_file_widget').html("<%= j render 'index' %>") diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/front_end/archive_files/show.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/front_end/archive_files/show.html.erb deleted file mode 100644 index dfcc34d0..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/front_end/archive_files/show.html.erb +++ /dev/null @@ -1,30 +0,0 @@ - -
-
-
-

<%= @archive_file.archive_file_category.title rescue nil %>

-
-
-
    -
  • -

    <%= @archive_file.title %>

    -
    -
      - <% @archive_file.archive_file_multiples.each do | afile | %> - <% if afile.file.file and afile.choose_lang_display(I18n.locale.to_s) %> -
    1. - <%= link_to (!afile.file_title.blank? ? afile.file_title : t('download_') ), afile.file.url, {:target => '_blank', :title => afile.file_title, :class => "o-archives-file"} if afile.file.file %> - <%= @archive_file.get_file_icon(afile.file.url) %> -
    2. - <% end %> - <% end %> -
    -
    -
  • -
-
-
-
-
- -<%= stylesheet_link_tag "archive/archives" %> \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/_bulletins.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/_bulletins.html.erb deleted file mode 100644 index eb70e2f8..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/_bulletins.html.erb +++ /dev/null @@ -1,10 +0,0 @@ -<% @bulletins.each do |bulletin| %> -
  • - <%= link_to bulletin.title, panel_announcement_front_end_bulletin_path(bulletin, :category_id => bulletin.bulletin_category_id , :tag_id => @selected_tag.id ) %> -
  • -<% end %> - - diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/_index.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/_index.html.erb deleted file mode 100644 index 0752dc18..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/_index.html.erb +++ /dev/null @@ -1,99 +0,0 @@ -<% # encoding: utf-8 %> -<% if @title %> -

    <%= @title %>

    -<% end %> - -<% if @widget_style == '1' %> - -
    - - - - - - - - - - - <% @archive_files.each_with_index do |post,i| %> - class="even" <% end %>> - - - - - <% end %> - - -
    <%= sortable(:title, t("archive.Title"))%><%= t("archive.Files")%><%= sortable(:archive_file_category, t("archive.Category"))%>
    -
    <%= post.title %> - <% if !post.is_hot.blank? %><%= t('hot')%><% end %> -
    -
    -
    - <% if !post.archive_file_multiples.blank? %> -
      - <% post.archive_file_multiples.asc(:_id).each do | afile | %> - <% if afile.file.file and afile.choose_lang_display(I18n.locale.to_s) %> -
    1. - <%= link_to (!afile.file_title.blank? ? afile.file_title : t('archive.download') ), afile.file.url, {:target => '_blank', :title => afile.file_title, :class => "o-archives-file"} if afile.file.file %> - <%= post.get_file_icon(afile.file.url) %> -
    2. - <% end %> - <% end %> -
    - <% end %> -
    -
    - <%= post.category.title if !post.category.blank? %> -
    -
    - -<% elsif @widget_style == '2' %> - -
    -
    - - <% @archive_file_datas.each do |afcpost| %> - -
    -

    <%= afcpost["title"] %>

    -
    -
    -
      - <% afcpost["archive_files"].each do |post| %> -
    • -

      - <%= post["title"] %> - <% if !post["is_hot"].blank? %><%= t('hot')%><% end %> -

      -
      -
        - <% post["archive_file_multiples"].each do | afile | %> -
      1. - <%= link_to afile["file_title"], afile["url"], {:target => '_blank', :title => afile["file_title"], :class => "o-archives-file"} %> - <%= afile["icon"] %> -
      2. - <% end %> -
      -
      -
    • - <% end %> -
    -
    -
    - <% end %> -
    -
    - -<% end %> - -
    -<% if !@archive_files.blank? or !@archive_file_datas.blank? %> - <% if !params[:category_id].blank? %> - <%= link_to t(:more_plus), panel_archive_front_end_archive_files_path(:category_id => @part.category) %> - <% else %> - <%= link_to t(:more_plus), panel_archive_front_end_archive_files_path %> - <% end %> -<% end %> -
    diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/_tag.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/_tag.html.erb deleted file mode 100644 index 6188bfe9..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/_tag.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -
  • - <%= link_to tag.name, panel_announcement_widget_bulletins_and_web_links_path(:id => tag.id), :remote => true, :class => ('active' if tag.eql?(@selected_tag)) %> -
  • \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/_web_links.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/_web_links.html.erb deleted file mode 100644 index a1b8f4db..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/_web_links.html.erb +++ /dev/null @@ -1,10 +0,0 @@ -<% @web_links.each do |web_link| %> -
  • - <%= link_to web_link.title, web_link.url %> -
  • -<% end %> - - \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/archive_search_block.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/archive_search_block.html.erb deleted file mode 100644 index 4475e343..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/archive_search_block.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -<%= form_tag panel_archive_front_end_archive_files_path, method: :get do %> - <%= hidden_field_tag :category_id, params[:category_id] %> - <%= hidden_field_tag :tag_id, params[:tag_id] %> -

    - <%= text_field_tag :search_query, params[:search_query],{:value => (params[:search_query].blank?? '' : params[:search_query]),:placeholder => t("announcement.search") }%> - <%= submit_tag "Search", name: nil %> -

    -<% end %> \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/bulletins_list.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/bulletins_list.html.erb deleted file mode 100644 index a07d1125..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/bulletins_list.html.erb +++ /dev/null @@ -1,31 +0,0 @@ -<% # encoding: utf-8 %> - -<% if @bulletins and !@bulletins.nil? %> - -
    -
      - <% @tags.each do |tag| %> -
    • <%= tag.name %>
    • - <% end %> -
    -
    - -<% @tags.each_with_index do |tag, index| %> -
    -

    <%= t("announcement.bulletins") %>

    -
    prev
    -
    next
    -
      - <% tag.bulletins.each do |post| %> -
    • <%= link_to post.title, panel_announcement_front_end_bulletin_path(post) %>
    • - <% end %> -
    -
    -<% end %> - -<% end %> - - - - - diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/bulletins_side_bar.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/bulletins_side_bar.html.erb deleted file mode 100644 index f5f2077e..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/bulletins_side_bar.html.erb +++ /dev/null @@ -1,23 +0,0 @@ - -
    -

    <%= t(:categories) %>

    -
      - <% @bulletin_categorys.each do |category| %> -
    • - <%= link_to category.title, panel_announcement_front_end_bulletins_path(:category_id => category.id) %> -
    • - <% end %> -
    -
    -
    -

    <%= t(:tag_cloud) %>

    -
    - <% @tags_and_class.each do |tag| %> - <%= link_to tag[0][I18n.locale], panel_announcement_front_end_bulletins_path(:tag_id => tag[0].id, :category_id => params[:category_id]), :class => "#{tag[1]} #{(tag[0].id.to_s.eql?(params[:tag_id]) || tag[0].key.eql?(params[:tag_id])) ? 'active' : nil} " %> - <% end %> -
    -
    - - \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/index.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/index.html.erb deleted file mode 100644 index c01c4637..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/index.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -<%#= stylesheet_link_tag "default_widget" %> -<%= javascript_include_tag "mobile/jquery.mu.image.resize.js" %> - -
    - <%= render 'index' %> -
    - -<%#= stylesheet_link_tag "archive/archives" %> \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/index.js.erb b/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/index.js.erb deleted file mode 100644 index a0afb16f..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/index.js.erb +++ /dev/null @@ -1 +0,0 @@ -$('#archive_file_widget').html("<%= j render 'index' %>") diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/reload_bulletins.js.erb b/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/reload_bulletins.js.erb deleted file mode 100644 index 3ee82c10..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/reload_bulletins.js.erb +++ /dev/null @@ -1 +0,0 @@ -$('#bulletins_web_links_bulletins').html("<%= j render 'bulletins' if @bulletins %>") \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/reload_web_links.js.erb b/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/reload_web_links.js.erb deleted file mode 100644 index d5abd76b..00000000 --- a/vendor/built_in_modules/archive/app/views/panel/archive/widget/archive_files/reload_web_links.js.erb +++ /dev/null @@ -1 +0,0 @@ -$('#bulletins_web_links_web_links').html("<%= j render 'web_links' if @web_links %>") \ No newline at end of file diff --git a/vendor/built_in_modules/archive/archive.gemspec b/vendor/built_in_modules/archive/archive.gemspec deleted file mode 100644 index e807e99c..00000000 --- a/vendor/built_in_modules/archive/archive.gemspec +++ /dev/null @@ -1,23 +0,0 @@ -$:.push File.expand_path("../lib", __FILE__) - -# Maintain your gem's version: -require "archive/version" - -# Describe your gem and declare its dependencies: -Gem::Specification.new do |s| - s.name = "archive" - s.version = Archive::VERSION - s.authors = ["TODO: Your name"] - s.email = ["TODO: Your email"] - s.homepage = "TODO" - s.summary = "TODO: Summary of Archive." - s.description = "TODO: Description of Archive." - - s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"] - s.test_files = Dir["test/**/*"] - - s.add_dependency "rails", "~> 3.1.4" - # s.add_dependency "jquery-rails" - - s.add_development_dependency "sqlite3" -end diff --git a/vendor/built_in_modules/archive/archive.json b/vendor/built_in_modules/archive/archive.json deleted file mode 100644 index 2cc3b8e8..00000000 --- a/vendor/built_in_modules/archive/archive.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "title": "archive", - "version": "0.1", - "organization": "Rulingcom", - "author": "RD dep", - "intro": "Archive", - "update_info": "Some info", - "create_date": "11-11-2011", - "app_pages": ["archive_files"], - "widgets": {"archive_files":[]}, - "enable_frontend": true -} diff --git a/vendor/built_in_modules/archive/config/locales/en.yml b/vendor/built_in_modules/archive/config/locales/en.yml deleted file mode 100644 index 13e9607a..00000000 --- a/vendor/built_in_modules/archive/config/locales/en.yml +++ /dev/null @@ -1,13 +0,0 @@ -en: - - archive: - show_lang: Language - download: Download - archive: Archive - Title: Title - Files: Files - Category: Category - frontend: - archive: Archive Front-end - widget: - index: Archive Widget \ No newline at end of file diff --git a/vendor/built_in_modules/archive/config/locales/zh_tw.yml b/vendor/built_in_modules/archive/config/locales/zh_tw.yml deleted file mode 100644 index d81d1386..00000000 --- a/vendor/built_in_modules/archive/config/locales/zh_tw.yml +++ /dev/null @@ -1,17 +0,0 @@ -zh_tw: - - archive: - show_lang: 呈現語系 - download: 檔案下載 - archive: 檔案室 - Title: 標題 - Files: 檔案 - Category: 類別 - frontend: - archive: 檔案室前台 - widget: - index: 檔案室Widget - mongoid: - attributes: - archive_file: - sort_number: 排序數 diff --git a/vendor/built_in_modules/archive/config/routes.rb b/vendor/built_in_modules/archive/config/routes.rb deleted file mode 100644 index b620dbee..00000000 --- a/vendor/built_in_modules/archive/config/routes.rb +++ /dev/null @@ -1,24 +0,0 @@ -Rails.application.routes.draw do - namespace :panel do - namespace :archive do - namespace :back_end do - resources :archive_files do - collection do - get 'delete' - end - end - resources :archive_file_categorys - resources :tags - end - namespace :front_end do - match "archive_files" => "archive_files#index" - resources :archive_files - end - namespace :widget do - match "index" => "archive_files#index" - match "archive_search_block" => "archive_files#archive_search_block" - end - end - end - match "/appfront/*path" => redirect("/panel/*path") -end \ No newline at end of file diff --git a/vendor/built_in_modules/archive/init.rb b/vendor/built_in_modules/archive/init.rb deleted file mode 100644 index bcb963bb..00000000 --- a/vendor/built_in_modules/archive/init.rb +++ /dev/null @@ -1,84 +0,0 @@ -module Archive - OrbitApp.registration "Archive",:type=> 'ModuleApp' do - module_label 'archive.archive' - base_url File.expand_path File.dirname(__FILE__) - - # personal_plugin :enable => true,:path=>"panel/archive/plugin/profile",:i18n=>'archive.archive' - - version "0.1" - organization "Rulingcom" - author "RD dep" - intro "I am intro" - update_info 'some update_info' - - front_end do - app_page 'archive_files' do - frontend_i18n "archive.frontend.archive" - style ["1","2"] - end - end - - # category ["ArchiveFileCategory"] - - authorizable - categorizable - taggable - - widgets do - # default_widget do - # query 'ArchiveFile.all' - # field :category - # link_field :title,{:method => 'panel_archive_front_end_archive_file_path',:args=>:self} - # link_field :archive_file_category_with_title,{:method => 'panel_archive_front_end_archive_files_path',:args=>{:category_id => [:archive_file_category,:id]}} - # end - - categories_query 'ArchiveFileCategory.all' - tags_query 'ArchiveTag.all' - - customize_widget "index" do - widget_i18n "archive.widget.index" - style ["1","2"] - end - - customize_widget "archive_search_block" do - widget_i18n "announcement.widget.search" - end - - # item "index","announcement.widget.index",:default_template=>true,:fields=>["title","category","postdate"] - # item "bulletins_and_web_links","announcement.widget.bulletins_and_web_links" - end - - - side_bar do - head_label_i18n 'archive.archive',:icon_class=>"icons-archive" - available_for [:admin,:guest,:manager,:sub_manager] - # active_for_controllers ({:private=>['archive_file_categorys','archive_files'],:public=>['panel/archive/back_end/tags']}) - active_for_controllers ({:private=>['archive_file_categorys','archive_files','module_tags', 'categories']}) - active_for_object_auth ['ArchiveFileCategory'] - - head_link_path "panel_archive_back_end_archive_files_path" - - context_link 'all', - :link_path=>"panel_archive_back_end_archive_files_path" , - :priority=>1, - :active_for_action=>{:archive_files=>:index}, - :available_for => [:all] - context_link 'add', - :link_path=>"new_panel_archive_back_end_archive_file_path" , - :priority=>2, - :active_for_action=>{:archive_files=>:new}, - :available_for => [:sub_manager] - context_link 'categories', - :link_path=>"admin_module_app_categories_path(get_module_app)" , - :priority=>3, - :active_for_category => 'Archive', - :available_for => [:manager] - context_link 'tags', - :link_path=>"admin_module_tags_path(module_app_id: get_module_app)" , - :priority=>4, - :active_for_tag => 'Archive', - :available_for => [:manager] - - end - end -end diff --git a/vendor/built_in_modules/archive/lib/archive.rb b/vendor/built_in_modules/archive/lib/archive.rb deleted file mode 100644 index 6401c81e..00000000 --- a/vendor/built_in_modules/archive/lib/archive.rb +++ /dev/null @@ -1,4 +0,0 @@ -require "archive/engine" - -module Archive -end diff --git a/vendor/built_in_modules/archive/lib/archive/engine.rb b/vendor/built_in_modules/archive/lib/archive/engine.rb deleted file mode 100644 index 13c4a73a..00000000 --- a/vendor/built_in_modules/archive/lib/archive/engine.rb +++ /dev/null @@ -1,4 +0,0 @@ -module Archive - class Engine < Rails::Engine - end -end diff --git a/vendor/built_in_modules/archive/lib/archive/version.rb b/vendor/built_in_modules/archive/lib/archive/version.rb deleted file mode 100644 index 052012f6..00000000 --- a/vendor/built_in_modules/archive/lib/archive/version.rb +++ /dev/null @@ -1,3 +0,0 @@ -module Archive - VERSION = "0.0.1" -end diff --git a/vendor/built_in_modules/archive/lib/tasks/archive_tasks.rake b/vendor/built_in_modules/archive/lib/tasks/archive_tasks.rake deleted file mode 100644 index dbf17bdc..00000000 --- a/vendor/built_in_modules/archive/lib/tasks/archive_tasks.rake +++ /dev/null @@ -1,4 +0,0 @@ -# desc "Explaining what the task does" -# task :archive do -# # Task goes here -# end diff --git a/vendor/built_in_modules/archive/script/rails b/vendor/built_in_modules/archive/script/rails deleted file mode 100644 index 23bd81fa..00000000 --- a/vendor/built_in_modules/archive/script/rails +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby.exe -#!/usr/bin/env ruby -# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. - -ENGINE_PATH = File.expand_path('../..', __FILE__) -load File.expand_path('../../test/dummy/script/rails', __FILE__) diff --git a/vendor/built_in_modules/archive/test/archive_test.rb b/vendor/built_in_modules/archive/test/archive_test.rb deleted file mode 100644 index 507b238d..00000000 --- a/vendor/built_in_modules/archive/test/archive_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class ArchiveTest < ActiveSupport::TestCase - test "truth" do - assert_kind_of Module, Archive - end -end diff --git a/vendor/built_in_modules/archive/test/dummy/Rakefile b/vendor/built_in_modules/archive/test/dummy/Rakefile deleted file mode 100644 index 36458522..00000000 --- a/vendor/built_in_modules/archive/test/dummy/Rakefile +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env rake -# Add your own tasks in files placed in lib/tasks ending in .rake, -# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. - -require File.expand_path('../config/application', __FILE__) - -Dummy::Application.load_tasks diff --git a/vendor/built_in_modules/archive/test/dummy/app/assets/javascripts/application.js b/vendor/built_in_modules/archive/test/dummy/app/assets/javascripts/application.js deleted file mode 100644 index 37c7bfcd..00000000 --- a/vendor/built_in_modules/archive/test/dummy/app/assets/javascripts/application.js +++ /dev/null @@ -1,9 +0,0 @@ -// This is a manifest file that'll be compiled into including all the files listed below. -// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically -// be included in the compiled file accessible from http://example.com/assets/application.js -// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -// the compiled file. -// -//= require jquery -//= require jquery_ujs -//= require_tree . diff --git a/vendor/built_in_modules/archive/test/dummy/app/assets/stylesheets/application.css b/vendor/built_in_modules/archive/test/dummy/app/assets/stylesheets/application.css deleted file mode 100644 index fc25b572..00000000 --- a/vendor/built_in_modules/archive/test/dummy/app/assets/stylesheets/application.css +++ /dev/null @@ -1,7 +0,0 @@ -/* - * This is a manifest file that'll automatically include all the stylesheets available in this directory - * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at - * the top of the compiled file, but it's generally better to create a new file per style scope. - *= require_self - *= require_tree . -*/ \ No newline at end of file diff --git a/vendor/built_in_modules/archive/test/dummy/app/controllers/application_controller.rb b/vendor/built_in_modules/archive/test/dummy/app/controllers/application_controller.rb deleted file mode 100644 index e8065d95..00000000 --- a/vendor/built_in_modules/archive/test/dummy/app/controllers/application_controller.rb +++ /dev/null @@ -1,3 +0,0 @@ -class ApplicationController < ActionController::Base - protect_from_forgery -end diff --git a/vendor/built_in_modules/archive/test/dummy/app/helpers/application_helper.rb b/vendor/built_in_modules/archive/test/dummy/app/helpers/application_helper.rb deleted file mode 100644 index de6be794..00000000 --- a/vendor/built_in_modules/archive/test/dummy/app/helpers/application_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module ApplicationHelper -end diff --git a/vendor/built_in_modules/archive/test/dummy/app/mailers/.gitkeep b/vendor/built_in_modules/archive/test/dummy/app/mailers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/archive/test/dummy/app/models/.gitkeep b/vendor/built_in_modules/archive/test/dummy/app/models/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/archive/test/dummy/app/views/layouts/application.html.erb b/vendor/built_in_modules/archive/test/dummy/app/views/layouts/application.html.erb deleted file mode 100644 index 9a8a761b..00000000 --- a/vendor/built_in_modules/archive/test/dummy/app/views/layouts/application.html.erb +++ /dev/null @@ -1,14 +0,0 @@ - - - - Dummy - <%= stylesheet_link_tag "application" %> - <%= javascript_include_tag "application" %> - <%= csrf_meta_tags %> - - - -<%= yield %> - - - diff --git a/vendor/built_in_modules/archive/test/dummy/config.ru b/vendor/built_in_modules/archive/test/dummy/config.ru deleted file mode 100644 index 1989ed8d..00000000 --- a/vendor/built_in_modules/archive/test/dummy/config.ru +++ /dev/null @@ -1,4 +0,0 @@ -# This file is used by Rack-based servers to start the application. - -require ::File.expand_path('../config/environment', __FILE__) -run Dummy::Application diff --git a/vendor/built_in_modules/archive/test/dummy/config/application.rb b/vendor/built_in_modules/archive/test/dummy/config/application.rb deleted file mode 100644 index f73c4f9e..00000000 --- a/vendor/built_in_modules/archive/test/dummy/config/application.rb +++ /dev/null @@ -1,45 +0,0 @@ -require File.expand_path('../boot', __FILE__) - -require 'rails/all' - -Bundler.require -require "archive" - -module Dummy - class Application < Rails::Application - # Settings in config/environments/* take precedence over those specified here. - # Application configuration should go into files in config/initializers - # -- all .rb files in that directory are automatically loaded. - - # Custom directories with classes and modules you want to be autoloadable. - # config.autoload_paths += %W(#{config.root}/extras) - - # Only load the plugins named here, in the order given (default is alphabetical). - # :all can be used as a placeholder for all plugins not explicitly named. - # config.plugins = [ :exception_notification, :ssl_requirement, :all ] - - # Activate observers that should always be running. - # config.active_record.observers = :cacher, :garbage_collector, :forum_observer - - # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. - # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. - # config.time_zone = 'Central Time (US & Canada)' - - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - # config.i18n.default_locale = :de - - # Configure the default encoding used in templates for Ruby 1.9. - config.encoding = "utf-8" - - # Configure sensitive parameters which will be filtered from the log file. - config.filter_parameters += [:password] - - # Enable the asset pipeline - config.assets.enabled = true - - # Version of your assets, change this if you want to expire all your assets - config.assets.version = '1.0' - end -end - diff --git a/vendor/built_in_modules/archive/test/dummy/config/boot.rb b/vendor/built_in_modules/archive/test/dummy/config/boot.rb deleted file mode 100644 index eba06813..00000000 --- a/vendor/built_in_modules/archive/test/dummy/config/boot.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'rubygems' -gemfile = File.expand_path('../../../../Gemfile', __FILE__) - -if File.exist?(gemfile) - ENV['BUNDLE_GEMFILE'] = gemfile - require 'bundler' - Bundler.setup -end - -$:.unshift File.expand_path('../../../../lib', __FILE__) \ No newline at end of file diff --git a/vendor/built_in_modules/archive/test/dummy/config/database.yml b/vendor/built_in_modules/archive/test/dummy/config/database.yml deleted file mode 100644 index 51a4dd45..00000000 --- a/vendor/built_in_modules/archive/test/dummy/config/database.yml +++ /dev/null @@ -1,25 +0,0 @@ -# SQLite version 3.x -# gem install sqlite3 -# -# Ensure the SQLite 3 gem is defined in your Gemfile -# gem 'sqlite3' -development: - adapter: sqlite3 - database: db/development.sqlite3 - pool: 5 - timeout: 5000 - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: - adapter: sqlite3 - database: db/test.sqlite3 - pool: 5 - timeout: 5000 - -production: - adapter: sqlite3 - database: db/production.sqlite3 - pool: 5 - timeout: 5000 diff --git a/vendor/built_in_modules/archive/test/dummy/config/environment.rb b/vendor/built_in_modules/archive/test/dummy/config/environment.rb deleted file mode 100644 index 3da5eb91..00000000 --- a/vendor/built_in_modules/archive/test/dummy/config/environment.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Load the rails application -require File.expand_path('../application', __FILE__) - -# Initialize the rails application -Dummy::Application.initialize! diff --git a/vendor/built_in_modules/archive/test/dummy/config/environments/development.rb b/vendor/built_in_modules/archive/test/dummy/config/environments/development.rb deleted file mode 100644 index 95a50b91..00000000 --- a/vendor/built_in_modules/archive/test/dummy/config/environments/development.rb +++ /dev/null @@ -1,30 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # In the development environment your application's code is reloaded on - # every request. This slows down response time but is perfect for development - # since you don't have to restart the web server when you make code changes. - config.cache_classes = false - - # Log error messages when you accidentally call methods on nil. - config.whiny_nils = true - - # Show full error reports and disable caching - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Don't care if the mailer can't send - config.action_mailer.raise_delivery_errors = false - - # Print deprecation notices to the Rails logger - config.active_support.deprecation = :log - - # Only use best-standards-support built into browsers - config.action_dispatch.best_standards_support = :builtin - - # Do not compress assets - config.assets.compress = false - - # Expands the lines which load the assets - config.assets.debug = true -end diff --git a/vendor/built_in_modules/archive/test/dummy/config/environments/production.rb b/vendor/built_in_modules/archive/test/dummy/config/environments/production.rb deleted file mode 100644 index ca2c5888..00000000 --- a/vendor/built_in_modules/archive/test/dummy/config/environments/production.rb +++ /dev/null @@ -1,60 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # Code is not reloaded between requests - config.cache_classes = true - - # Full error reports are disabled and caching is turned on - config.consider_all_requests_local = false - config.action_controller.perform_caching = true - - # Disable Rails's static asset server (Apache or nginx will already do this) - config.serve_static_assets = false - - # Compress JavaScripts and CSS - config.assets.compress = true - - # Don't fallback to assets pipeline if a precompiled asset is missed - config.assets.compile = false - - # Generate digests for assets URLs - config.assets.digest = true - - # Defaults to Rails.root.join("public/assets") - # config.assets.manifest = YOUR_PATH - - # Specifies the header that your server uses for sending files - # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx - - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true - - # See everything in the log (default is :info) - # config.log_level = :debug - - # Use a different logger for distributed setups - # config.logger = SyslogLogger.new - - # Use a different cache store in production - # config.cache_store = :mem_cache_store - - # Enable serving of images, stylesheets, and JavaScripts from an asset server - # config.action_controller.asset_host = "http://assets.example.com" - - # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) - # config.assets.precompile += %w( search.js ) - - # Disable delivery errors, bad email addresses will be ignored - # config.action_mailer.raise_delivery_errors = false - - # Enable threaded mode - # config.threadsafe! - - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation can not be found) - config.i18n.fallbacks = true - - # Send deprecation notices to registered listeners - config.active_support.deprecation = :notify -end diff --git a/vendor/built_in_modules/archive/test/dummy/config/environments/test.rb b/vendor/built_in_modules/archive/test/dummy/config/environments/test.rb deleted file mode 100644 index 6810c914..00000000 --- a/vendor/built_in_modules/archive/test/dummy/config/environments/test.rb +++ /dev/null @@ -1,39 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # The test environment is used exclusively to run your application's - # test suite. You never need to work with it otherwise. Remember that - # your test database is "scratch space" for the test suite and is wiped - # and recreated between test runs. Don't rely on the data there! - config.cache_classes = true - - # Configure static asset server for tests with Cache-Control for performance - config.serve_static_assets = true - config.static_cache_control = "public, max-age=3600" - - # Log error messages when you accidentally call methods on nil - config.whiny_nils = true - - # Show full error reports and disable caching - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Raise exceptions instead of rendering exception templates - config.action_dispatch.show_exceptions = false - - # Disable request forgery protection in test environment - config.action_controller.allow_forgery_protection = false - - # Tell Action Mailer not to deliver emails to the real world. - # The :test delivery method accumulates sent emails in the - # ActionMailer::Base.deliveries array. - config.action_mailer.delivery_method = :test - - # Use SQL instead of Active Record's schema dumper when creating the test database. - # This is necessary if your schema can't be completely dumped by the schema dumper, - # like if you have constraints or database-specific column types - # config.active_record.schema_format = :sql - - # Print deprecation notices to the stderr - config.active_support.deprecation = :stderr -end diff --git a/vendor/built_in_modules/archive/test/dummy/config/initializers/backtrace_silencers.rb b/vendor/built_in_modules/archive/test/dummy/config/initializers/backtrace_silencers.rb deleted file mode 100644 index 59385cdf..00000000 --- a/vendor/built_in_modules/archive/test/dummy/config/initializers/backtrace_silencers.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. -# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } - -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. -# Rails.backtrace_cleaner.remove_silencers! diff --git a/vendor/built_in_modules/archive/test/dummy/config/initializers/inflections.rb b/vendor/built_in_modules/archive/test/dummy/config/initializers/inflections.rb deleted file mode 100644 index 9e8b0131..00000000 --- a/vendor/built_in_modules/archive/test/dummy/config/initializers/inflections.rb +++ /dev/null @@ -1,10 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new inflection rules using the following format -# (all these examples are active by default): -# ActiveSupport::Inflector.inflections do |inflect| -# inflect.plural /^(ox)$/i, '\1en' -# inflect.singular /^(ox)en/i, '\1' -# inflect.irregular 'person', 'people' -# inflect.uncountable %w( fish sheep ) -# end diff --git a/vendor/built_in_modules/archive/test/dummy/config/initializers/mime_types.rb b/vendor/built_in_modules/archive/test/dummy/config/initializers/mime_types.rb deleted file mode 100644 index 72aca7e4..00000000 --- a/vendor/built_in_modules/archive/test/dummy/config/initializers/mime_types.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new mime types for use in respond_to blocks: -# Mime::Type.register "text/richtext", :rtf -# Mime::Type.register_alias "text/html", :iphone diff --git a/vendor/built_in_modules/archive/test/dummy/config/initializers/secret_token.rb b/vendor/built_in_modules/archive/test/dummy/config/initializers/secret_token.rb deleted file mode 100644 index 32fa02f2..00000000 --- a/vendor/built_in_modules/archive/test/dummy/config/initializers/secret_token.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Your secret key for verifying the integrity of signed cookies. -# If you change this key, all old signed cookies will become invalid! -# Make sure the secret is at least 30 characters and all random, -# no regular words or you'll be exposed to dictionary attacks. -Dummy::Application.config.secret_token = 'aec42790c63fdc0784df1572e74631a6f9c9d16729b813ecbd5f086eaab251cdf0bcba044a78b706d1f45d43c4ec5af5df5cc5ffd2ff7ca64953a5806ce49618' diff --git a/vendor/built_in_modules/archive/test/dummy/config/initializers/session_store.rb b/vendor/built_in_modules/archive/test/dummy/config/initializers/session_store.rb deleted file mode 100644 index 952473ff..00000000 --- a/vendor/built_in_modules/archive/test/dummy/config/initializers/session_store.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Be sure to restart your server when you modify this file. - -Dummy::Application.config.session_store :cookie_store, key: '_dummy_session' - -# Use the database for sessions instead of the cookie-based default, -# which shouldn't be used to store highly confidential information -# (create the session table with "rails generate session_migration") -# Dummy::Application.config.session_store :active_record_store diff --git a/vendor/built_in_modules/archive/test/dummy/config/initializers/wrap_parameters.rb b/vendor/built_in_modules/archive/test/dummy/config/initializers/wrap_parameters.rb deleted file mode 100644 index 999df201..00000000 --- a/vendor/built_in_modules/archive/test/dummy/config/initializers/wrap_parameters.rb +++ /dev/null @@ -1,14 +0,0 @@ -# Be sure to restart your server when you modify this file. -# -# This file contains settings for ActionController::ParamsWrapper which -# is enabled by default. - -# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. -ActiveSupport.on_load(:action_controller) do - wrap_parameters format: [:json] -end - -# Disable root element in JSON by default. -ActiveSupport.on_load(:active_record) do - self.include_root_in_json = false -end diff --git a/vendor/built_in_modules/archive/test/dummy/config/locales/en.yml b/vendor/built_in_modules/archive/test/dummy/config/locales/en.yml deleted file mode 100644 index 179c14ca..00000000 --- a/vendor/built_in_modules/archive/test/dummy/config/locales/en.yml +++ /dev/null @@ -1,5 +0,0 @@ -# Sample localization file for English. Add more files in this directory for other locales. -# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. - -en: - hello: "Hello world" diff --git a/vendor/built_in_modules/archive/test/dummy/config/routes.rb b/vendor/built_in_modules/archive/test/dummy/config/routes.rb deleted file mode 100644 index bb509f27..00000000 --- a/vendor/built_in_modules/archive/test/dummy/config/routes.rb +++ /dev/null @@ -1,58 +0,0 @@ -Dummy::Application.routes.draw do - # The priority is based upon order of creation: - # first created -> highest priority. - - # Sample of regular route: - # match 'products/:id' => 'catalog#view' - # Keep in mind you can assign values other than :controller and :action - - # Sample of named route: - # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase - # This route can be invoked with purchase_url(:id => product.id) - - # Sample resource route (maps HTTP verbs to controller actions automatically): - # resources :products - - # Sample resource route with options: - # resources :products do - # member do - # get 'short' - # post 'toggle' - # end - # - # collection do - # get 'sold' - # end - # end - - # Sample resource route with sub-resources: - # resources :products do - # resources :comments, :sales - # resource :seller - # end - - # Sample resource route with more complex sub-resources - # resources :products do - # resources :comments - # resources :sales do - # get 'recent', :on => :collection - # end - # end - - # Sample resource route within a namespace: - # namespace :admin do - # # Directs /admin/products/* to Admin::ProductsController - # # (app/controllers/admin/products_controller.rb) - # resources :products - # end - - # You can have the root of your site routed with "root" - # just remember to delete public/index.html. - # root :to => 'welcome#index' - - # See how all your routes lay out with "rake routes" - - # This is a legacy wild controller route that's not recommended for RESTful applications. - # Note: This route will make all actions in every controller accessible via GET requests. - # match ':controller(/:action(/:id(.:format)))' -end diff --git a/vendor/built_in_modules/archive/test/dummy/lib/assets/.gitkeep b/vendor/built_in_modules/archive/test/dummy/lib/assets/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/archive/test/dummy/log/.gitkeep b/vendor/built_in_modules/archive/test/dummy/log/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/archive/test/dummy/public/404.html b/vendor/built_in_modules/archive/test/dummy/public/404.html deleted file mode 100644 index 9a48320a..00000000 --- a/vendor/built_in_modules/archive/test/dummy/public/404.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - The page you were looking for doesn't exist (404) - - - - - -
    -

    The page you were looking for doesn't exist.

    -

    You may have mistyped the address or the page may have moved.

    -
    - - diff --git a/vendor/built_in_modules/archive/test/dummy/public/422.html b/vendor/built_in_modules/archive/test/dummy/public/422.html deleted file mode 100644 index 83660ab1..00000000 --- a/vendor/built_in_modules/archive/test/dummy/public/422.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - The change you wanted was rejected (422) - - - - - -
    -

    The change you wanted was rejected.

    -

    Maybe you tried to change something you didn't have access to.

    -
    - - diff --git a/vendor/built_in_modules/archive/test/dummy/public/500.html b/vendor/built_in_modules/archive/test/dummy/public/500.html deleted file mode 100644 index b80307fc..00000000 --- a/vendor/built_in_modules/archive/test/dummy/public/500.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - We're sorry, but something went wrong (500) - - - - - -
    -

    We're sorry, but something went wrong.

    -

    We've been notified about this issue and we'll take a look at it shortly.

    -
    - - diff --git a/vendor/built_in_modules/archive/test/dummy/public/favicon.ico b/vendor/built_in_modules/archive/test/dummy/public/favicon.ico deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/archive/test/dummy/script/rails b/vendor/built_in_modules/archive/test/dummy/script/rails deleted file mode 100644 index 81eab02f..00000000 --- a/vendor/built_in_modules/archive/test/dummy/script/rails +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby.exe -# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. - -APP_PATH = File.expand_path('../../config/application', __FILE__) -require File.expand_path('../../config/boot', __FILE__) -require 'rails/commands' diff --git a/vendor/built_in_modules/archive/test/integration/navigation_test.rb b/vendor/built_in_modules/archive/test/integration/navigation_test.rb deleted file mode 100644 index 97a94c9b..00000000 --- a/vendor/built_in_modules/archive/test/integration/navigation_test.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'test_helper' - -class NavigationTest < ActionDispatch::IntegrationTest - fixtures :all - - # test "the truth" do - # assert true - # end -end - diff --git a/vendor/built_in_modules/archive/test/test_helper.rb b/vendor/built_in_modules/archive/test/test_helper.rb deleted file mode 100644 index dcd3b276..00000000 --- a/vendor/built_in_modules/archive/test/test_helper.rb +++ /dev/null @@ -1,10 +0,0 @@ -# Configure Rails Environment -ENV["RAILS_ENV"] = "test" - -require File.expand_path("../dummy/config/environment.rb", __FILE__) -require "rails/test_help" - -Rails.backtrace_cleaner.remove_silencers! - -# Load support files -Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } diff --git a/vendor/built_in_modules/ask/.gitignore b/vendor/built_in_modules/ask/.gitignore deleted file mode 100644 index 1dfe31e6..00000000 --- a/vendor/built_in_modules/ask/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -.bundle/ -log/*.log -pkg/ -test/dummy/db/*.sqlite3 -test/dummy/log/*.log -test/dummy/tmp/ -test/dummy/.sass-cache diff --git a/vendor/built_in_modules/ask/Gemfile b/vendor/built_in_modules/ask/Gemfile deleted file mode 100644 index 17f7400e..00000000 --- a/vendor/built_in_modules/ask/Gemfile +++ /dev/null @@ -1,17 +0,0 @@ -source "http://rubygems.org" - -# Declare your gem's dependencies in ask.gemspec. -# Bundler will treat runtime dependencies like base dependencies, and -# development dependencies will be added by default to the :development group. -gemspec - -# jquery-rails is used by the dummy application -gem "jquery-rails" - -# Declare any dependencies that are still in development here instead of in -# your gemspec. These might include edge Rails or gems from your path or -# Git. Remember to move these dependencies to your gemspec before releasing -# your gem to rubygems.org. - -# To use debugger -# gem 'debugger' diff --git a/vendor/built_in_modules/ask/MIT-LICENSE b/vendor/built_in_modules/ask/MIT-LICENSE deleted file mode 100644 index 5146945d..00000000 --- a/vendor/built_in_modules/ask/MIT-LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2013 YOURNAME - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/built_in_modules/ask/README.rdoc b/vendor/built_in_modules/ask/README.rdoc deleted file mode 100644 index 9ca9e140..00000000 --- a/vendor/built_in_modules/ask/README.rdoc +++ /dev/null @@ -1,3 +0,0 @@ -= Ask - -This project rocks and uses MIT-LICENSE. \ No newline at end of file diff --git a/vendor/built_in_modules/ask/Rakefile b/vendor/built_in_modules/ask/Rakefile deleted file mode 100644 index fca490ac..00000000 --- a/vendor/built_in_modules/ask/Rakefile +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env rake -begin - require 'bundler/setup' -rescue LoadError - puts 'You must `gem install bundler` and `bundle install` to run rake tasks' -end -begin - require 'rdoc/task' -rescue LoadError - require 'rdoc/rdoc' - require 'rake/rdoctask' - RDoc::Task = Rake::RDocTask -end - -RDoc::Task.new(:rdoc) do |rdoc| - rdoc.rdoc_dir = 'rdoc' - rdoc.title = 'Ask' - rdoc.options << '--line-numbers' - rdoc.rdoc_files.include('README.rdoc') - rdoc.rdoc_files.include('lib/**/*.rb') -end - - - - -Bundler::GemHelper.install_tasks - -require 'rake/testtask' - -Rake::TestTask.new(:test) do |t| - t.libs << 'lib' - t.libs << 'test' - t.pattern = 'test/**/*_test.rb' - t.verbose = false -end - - -task :default => :test diff --git a/vendor/built_in_modules/ask/app/controllers/application_controller.rb b/vendor/built_in_modules/ask/app/controllers/application_controller.rb deleted file mode 100644 index b4ffa3ad..00000000 --- a/vendor/built_in_modules/ask/app/controllers/application_controller.rb +++ /dev/null @@ -1,23 +0,0 @@ -class ApplicationController < ActionController::Base - protect_from_forgery - before_filter :set_locale - - # Set I18n.locale - def set_locale - # update session if passed - session[:locale] = params[:locale] if params[:locale] - - # set locale based on session or default - begin - # check if locale is valid for non site pages - if !VALID_LOCALES.include?(session[:locale]) - I18n.locale = I18n.default_locale - else - I18n.locale = session[:locale] - end - rescue - I18n.locale = I18n.default_locale - end - end - -end diff --git a/vendor/built_in_modules/ask/app/controllers/panel/ask/back_end/ask_acknowledgements_controller.rb b/vendor/built_in_modules/ask/app/controllers/panel/ask/back_end/ask_acknowledgements_controller.rb deleted file mode 100644 index 58f2ef47..00000000 --- a/vendor/built_in_modules/ask/app/controllers/panel/ask/back_end/ask_acknowledgements_controller.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Panel::Ask::BackEnd::AskAcknowledgementsController < OrbitBackendController - include AdminHelper - include OrbitControllerLib::DivisionForDisable - - before_filter :for_app_manager - - def initialize - super - @app_title = 'ask_acknowledgement' - end - - def index - @ask_acknowledgement = AskAcknowledgement.first || AskAcknowledgement.create - @url = panel_ask_back_end_ask_acknowledgement_path(@ask_acknowledgement) - end - - def update - @ask_acknowledgement = AskAcknowledgement.first - @ask_acknowledgement.update_attributes(params[:ask_acknowledgement]) - redirect_to panel_ask_back_end_ask_acknowledgements_path, notice: t('ask.save_success') - end - -end diff --git a/vendor/built_in_modules/ask/app/controllers/panel/ask/back_end/ask_admins_controller.rb b/vendor/built_in_modules/ask/app/controllers/panel/ask/back_end/ask_admins_controller.rb deleted file mode 100644 index b6994da0..00000000 --- a/vendor/built_in_modules/ask/app/controllers/panel/ask/back_end/ask_admins_controller.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Panel::Ask::BackEnd::AskAdminsController < OrbitBackendController - - include AdminHelper - include OrbitControllerLib::DivisionForDisable - - before_filter :for_app_manager - - def initialize - super - @app_title = 'ask_admins' - end - - def index - @ask_admins = AskAdmin.all - @ask_admin = AskAdmin.new - @url = panel_ask_back_end_ask_admins_path - end - - def create - @ask_admin = AskAdmin.new(params[:ask_admin]) - @ask_admin.save - - respond_to do |format| - format.js - end - end - - def edit - @ask_admin = AskAdmin.find(params[:id]) - @url = panel_ask_back_end_ask_admin_path(@ask_admin) - - respond_to do |format| - format.js - end - end - - def update - @ask_admin = AskAdmin.find(params[:id]) - @url = panel_ask_back_end_ask_admin_path(@ask_admin) - @ask_admin.update_attributes(params[:ask_admin]) - - respond_to do |format| - format.js - end - end - - def destroy - @ask_admin = AskAdmin.find(params[:id]) - @ask_admin.destroy - - respond_to do |format| - format.js - end - end - -end diff --git a/vendor/built_in_modules/ask/app/controllers/panel/ask/back_end/ask_categories_controller.rb b/vendor/built_in_modules/ask/app/controllers/panel/ask/back_end/ask_categories_controller.rb deleted file mode 100644 index 2ee4b6a9..00000000 --- a/vendor/built_in_modules/ask/app/controllers/panel/ask/back_end/ask_categories_controller.rb +++ /dev/null @@ -1,57 +0,0 @@ -class Panel::Ask::BackEnd::AskCategoriesController < OrbitBackendController - - include AdminHelper - include OrbitControllerLib::DivisionForDisable - - before_filter :for_app_manager - - def initialize - super - @app_title = 'ask_categories' - end - - def index - @ask_categories = AskCategory.admin_manager_all - @ask_category = AskCategory.new - @url = panel_ask_back_end_ask_categories_path - end - - def create - @ask_category = AskCategory.new(params[:ask_category]) - @ask_category.save! - - respond_to do |format| - format.js - end - end - - def edit - @ask_category = AskCategory.find(params[:id]) - @url = panel_ask_back_end_ask_category_path(@ask_category) - - respond_to do |format| - format.js - end - end - - def update - @ask_category = AskCategory.find(params[:id]) - @url = panel_ask_back_end_ask_category_path(@ask_category) - @ask_category.update_attributes(params[:ask_category]) - - respond_to do |format| - format.js - end - end - - def destroy - @ask_category = AskCategory.find(params[:id]) - @ask_category.disable = !@ask_category.disable - @ask_category.save! - - respond_to do |format| - format.js - end - end - -end diff --git a/vendor/built_in_modules/ask/app/controllers/panel/ask/back_end/ask_questions_controller.rb b/vendor/built_in_modules/ask/app/controllers/panel/ask/back_end/ask_questions_controller.rb deleted file mode 100644 index cf8180c3..00000000 --- a/vendor/built_in_modules/ask/app/controllers/panel/ask/back_end/ask_questions_controller.rb +++ /dev/null @@ -1,85 +0,0 @@ -require 'csv' - -class Panel::Ask::BackEnd::AskQuestionsController < OrbitBackendController - - def initialize - super - @app_title = 'ask_questions' - end - - def index - @ask_questions = AskQuestion.all - - respond_to do |format| - format.html - format.js - end - end - - def edit - @ask_question = AskQuestion.find(params[:id]) - @ask_reply = @ask_question.ask_reply - if @ask_reply - @url = panel_ask_back_end_ask_question_ask_reply_path(@ask_question, @ask_question.ask_reply) - @method = 'put' - else - @ask_reply = AskReply.new - @url = panel_ask_back_end_ask_question_ask_replies_path(@ask_question) - @method = 'post' - end - end - - def destroy - @ask_question = AskQuestion.find(params[:id]) - @ask_question.destroy - - respond_to do |format| - format.js - end - end - - def delete - if params[:ids] - ask_questions = AskQuestion.any_in(:_id => params[:ids]).destroy_all - end - redirect_to panel_ask_back_end_ask_questions_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) - end - - def export - - end - - def do_export - Rails.application.config.mongoid.use_activesupport_time_zone = true - date_start = "#{params[:export]['start(1i)']}-#{params[:export]['start(2i)']}-#{params[:export]['start(3i)']}" - date_end = "#{params[:export]['end(1i)']}-#{params[:export]['end(2i)']}-#{params[:export]['end(3i)']}" - @ask_questions = AskQuestion.includes(:ask_category).includes(:ask_reply).where(:created_at.gte => date_start, :created_at.lte => date_end) - - csv = CSV.generate do |csv| - csv << [ t('category'), - AskQuestion.human_attribute_name(:name), - AskQuestion.human_attribute_name(:identity), - AskQuestion.human_attribute_name(:email), - AskQuestion.human_attribute_name(:phone), - AskQuestion.human_attribute_name(:tax), - AskQuestion.human_attribute_name(:title), - AskQuestion.human_attribute_name(:content), - AskReply.human_attribute_name(:content), - AskReply.human_attribute_name(:comment)] - @ask_questions.each do |ask_question| - ask_question.ask_reply ||= AskReply.new - csv << [ ask_question.ask_category.name, - ask_question.name, - ask_question.identity, - ask_question.email, - ask_question.phone, - ask_question.tax, - ask_question.title, - ask_question.content, - ask_question.ask_reply.content, - ask_question.ask_reply.comment ] - end - end - send_data csv.encode('Big5'), type: 'text/csv', filename: "Questions-#{date_start}-#{date_end}.csv" - end -end diff --git a/vendor/built_in_modules/ask/app/controllers/panel/ask/back_end/ask_replies_controller.rb b/vendor/built_in_modules/ask/app/controllers/panel/ask/back_end/ask_replies_controller.rb deleted file mode 100644 index 86219b7a..00000000 --- a/vendor/built_in_modules/ask/app/controllers/panel/ask/back_end/ask_replies_controller.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Panel::Ask::BackEnd::AskRepliesController < OrbitBackendController - - include AdminHelper - include OrbitControllerLib::DivisionForDisable - - before_filter :for_app_manager - - def initialize - super - @app_title = 'ask_replies' - end - - def create - @ask_question = AskQuestion.find(params[:ask_question_id]) - @ask_question.ask_reply = AskReply.new(params[:ask_reply]) - @ask_question.save - if @ask_question.ask_reply.send_email? - Resque.enqueue(SendAskReplyMail, @ask_reply.ask_question.id) - end - redirect_to panel_ask_back_end_ask_questions_path, notice: t('ask.reply_success') - end - - def update - @ask_reply = AskReply.find(params[:id]) - @ask_reply.update_attributes(params[:ask_reply]) - if @ask_reply.send_email? - Resque.enqueue(SendAskReplyMail, @ask_reply.ask_question.id) - end - redirect_to panel_ask_back_end_ask_questions_path, notice: t('ask.reply_success') - end -end diff --git a/vendor/built_in_modules/ask/app/controllers/panel/ask/front_end/ask_questions_controller.rb b/vendor/built_in_modules/ask/app/controllers/panel/ask/front_end/ask_questions_controller.rb deleted file mode 100644 index 3c945422..00000000 --- a/vendor/built_in_modules/ask/app/controllers/panel/ask/front_end/ask_questions_controller.rb +++ /dev/null @@ -1,52 +0,0 @@ -class Panel::Ask::FrontEnd::AskQuestionsController < OrbitWidgetController - - layout false - - def initialize - super - @app_title = 'ask' - end - - def index - @ask_question = AskQuestion.new - @categories = @module_app.categories.enabled - end - - def create - @ask_question = AskQuestion.new(params[:ask_question]) - if gotcha_valid? && @ask_question.save - @acknowledgement = AskAcknowledgement.last - @ask_acknowledgement = AskAcknowledgement.first || AskAcknowlegement.new - - AskAdmin.all.each do |ask_admin| - AskMailer.notice(ask_admin, @ask_question).deliver - Resque.enqueue(SendAskNoticeMail, ask_admin.id, @ask_question.id) - end - - # Render to create.js.erb - respond_to do |format| - format.js - end - else - # Render to index.js.erb - respond_to do |format| - format.js { render :index } - end - end - end - - - def thank_you - @acknowledgement = AskAcknowledgement.last - @item = Page.find(params[:page_id]) rescue nil - if @item - if @item.frontend_data_count - @page_num = @item.frontend_data_count - else - @page_num = 15 - end - @frontend_style = @item.frontend_style - end - @item = Page.find(params[:page_id]) rescue nil - end -end diff --git a/vendor/built_in_modules/ask/app/mailers/ask_mailer.rb b/vendor/built_in_modules/ask/app/mailers/ask_mailer.rb deleted file mode 100644 index daa121bf..00000000 --- a/vendor/built_in_modules/ask/app/mailers/ask_mailer.rb +++ /dev/null @@ -1,14 +0,0 @@ -class AskMailer < ActionMailer::Base - default from: 'orbit_test@rulingcom.com' - - def reply(ask_question) - @ask_question = ask_question - mail(:to => @ask_question.email, :subject => "#{t('ask.reply')}:#{@ask_question.title}") - end - - def notice(ask_admin, ask_question) - @ask_admin = ask_admin - @ask_question = ask_question - mail(:to => @ask_admin.email, :subject => "#{t('ask.new_question')}:#{@ask_question.title}") - end -end diff --git a/vendor/built_in_modules/ask/app/models/ask_acknowledgement.rb b/vendor/built_in_modules/ask/app/models/ask_acknowledgement.rb deleted file mode 100644 index 6ba7f7bd..00000000 --- a/vendor/built_in_modules/ask/app/models/ask_acknowledgement.rb +++ /dev/null @@ -1,6 +0,0 @@ -class AskAcknowledgement - include Mongoid::Document - include Mongoid::Timestamps - - field :content, type: String -end diff --git a/vendor/built_in_modules/ask/app/models/ask_admin.rb b/vendor/built_in_modules/ask/app/models/ask_admin.rb deleted file mode 100644 index 3d2b6fc5..00000000 --- a/vendor/built_in_modules/ask/app/models/ask_admin.rb +++ /dev/null @@ -1,6 +0,0 @@ -class AskAdmin - include Mongoid::Document - include Mongoid::Timestamps - - field :email, type: String -end diff --git a/vendor/built_in_modules/ask/app/models/ask_category.rb b/vendor/built_in_modules/ask/app/models/ask_category.rb deleted file mode 100644 index 079afbf5..00000000 --- a/vendor/built_in_modules/ask/app/models/ask_category.rb +++ /dev/null @@ -1,10 +0,0 @@ -class AskCategory - include Mongoid::Document - include Mongoid::Timestamps - include OrbitCoreLib::ObjectDisable - - field :name, localize: true - field :key - - has_many :ask_questions -end diff --git a/vendor/built_in_modules/ask/app/models/ask_question.rb b/vendor/built_in_modules/ask/app/models/ask_question.rb deleted file mode 100644 index 28ab66a1..00000000 --- a/vendor/built_in_modules/ask/app/models/ask_question.rb +++ /dev/null @@ -1,24 +0,0 @@ -class AskQuestion - include Mongoid::Document - include ActiveModel::Validations - include ActiveModel::Conversion - extend ActiveModel::Naming - - include OrbitCategory::Categorizable - include OrbitModel::Approval - include Mongoid::Document - include Mongoid::Timestamps - - field :name, type: String - field :identity, type: String - field :email, type: String - field :phone, type: String - field :tax, type: String - field :title, type: String - field :content, type: String - - validates_presence_of :name, :identity, :email, :title, :content - - has_one :ask_reply, dependent: :destroy - -end diff --git a/vendor/built_in_modules/ask/app/models/ask_reply.rb b/vendor/built_in_modules/ask/app/models/ask_reply.rb deleted file mode 100644 index 54112aac..00000000 --- a/vendor/built_in_modules/ask/app/models/ask_reply.rb +++ /dev/null @@ -1,11 +0,0 @@ -class AskReply - include Mongoid::Document - include Mongoid::Timestamps - - field :content, type: String - field :comment, type: String - field :status, type: String - field :send_email, type: Boolean, detault: false - - belongs_to :ask_question -end diff --git a/vendor/built_in_modules/ask/app/views/ask_mailer/notice.html.erb b/vendor/built_in_modules/ask/app/views/ask_mailer/notice.html.erb deleted file mode 100644 index 7841989b..00000000 --- a/vendor/built_in_modules/ask/app/views/ask_mailer/notice.html.erb +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - -

    <%= @ask_question.title %>

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    <%= AskQuestion.human_attribute_name(:name) %>:<%= @ask_question.name %>
    <%= AskQuestion.human_attribute_name(:identity) %>:<%= @ask_question.identity %>
    <%= AskQuestion.human_attribute_name(:email) %>:<%= @ask_question.email %>
    <%= AskQuestion.human_attribute_name(:phone) %>:<%= @ask_question.phone %>
    <%= AskQuestion.human_attribute_name(:tax) %>:<%= @ask_question.tax %>
    <%= AskQuestion.human_attribute_name(:content) %>:<%= @ask_question.content %>
    -

    此為系統自動發信,請勿直接回覆

    - - diff --git a/vendor/built_in_modules/ask/app/views/ask_mailer/reply.html.erb b/vendor/built_in_modules/ask/app/views/ask_mailer/reply.html.erb deleted file mode 100644 index cfe67964..00000000 --- a/vendor/built_in_modules/ask/app/views/ask_mailer/reply.html.erb +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - -

    - <%= @ask_question.content %> -

    -

    此為系統自動發信,請勿直接回覆

    - - diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_acknowledgements/index.html.erb b/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_acknowledgements/index.html.erb deleted file mode 100644 index e1583b34..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_acknowledgements/index.html.erb +++ /dev/null @@ -1,14 +0,0 @@ -
    - <%= form_for @ask_acknowledgement, url: @url, html: { class: 'form-horizontal' } do |f| %> -
    - <%= f.label :content, t('ask.acknowledgement'), class: 'control-label' %> -
    - <%= f.text_area :content, rows: 10 %> -
    -
    -
    - <%= f.submit t('submit'), class: 'btn btn-primary' %> - <%= f.button t('cancel'), type: 'reset', class: 'btn' %> -
    - <% end %> -
    diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_admins/_ask_admin.html.erb b/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_admins/_ask_admin.html.erb deleted file mode 100644 index a0afbe7d..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_admins/_ask_admin.html.erb +++ /dev/null @@ -1,13 +0,0 @@ - - - <%= ask_admin.email %> - <%if at_least_module_manager %> -
    - -
    - <% end -%> - - diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_admins/_form.html.erb b/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_admins/_form.html.erb deleted file mode 100644 index c2cea3fe..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_admins/_form.html.erb +++ /dev/null @@ -1,19 +0,0 @@ -<%= form_for(@ask_admin, :remote => true, :url => @url) do |f| %> - -

    <%= @ask_admin.new_record? ? t(:add) : t(:edit) %>

    - -
    -
    - <%= f.label :email, class: 'control-label' %> -
    - <%= f.text_field :email, class: 'input-xxlarge' %> -
    -
    -
    - -
    - <%= f.submit t(:submit), class: 'btn btn-primary' %> -
    - -<% end %> - diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_admins/create.js.erb b/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_admins/create.js.erb deleted file mode 100644 index ff74c733..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_admins/create.js.erb +++ /dev/null @@ -1,2 +0,0 @@ -$('<%= j render :partial => 'ask_admin', :collection => [@ask_admin] %>').appendTo('#ask-admins').hide().fadeIn(); -$("#new_ask_admin")[0].reset(); diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_admins/destroy.js.erb b/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_admins/destroy.js.erb deleted file mode 100644 index 338cc2fb..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_admins/destroy.js.erb +++ /dev/null @@ -1 +0,0 @@ -$("#<%= dom_id @ask_admin %>").fadeOut(); diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_admins/edit.js.erb b/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_admins/edit.js.erb deleted file mode 100644 index 40061b9f..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_admins/edit.js.erb +++ /dev/null @@ -1 +0,0 @@ -$("#form > form").replaceWith("<%= j render "form" %>"); diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_admins/index.html.erb b/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_admins/index.html.erb deleted file mode 100644 index c73aaea3..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_admins/index.html.erb +++ /dev/null @@ -1,23 +0,0 @@ -<%= flash_messages %> - - - - - <%= render :partial => 'ask_admin', :collection => @ask_admins %> - -
    - -
    <%= render :partial => "form" if at_least_module_manager%>
    - diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_admins/update.js.erb b/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_admins/update.js.erb deleted file mode 100644 index 83abbfa3..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_admins/update.js.erb +++ /dev/null @@ -1,4 +0,0 @@ -$("#<%= dom_id @ask_admin %>").replaceWith("<%= j render :partial => 'ask_admin', :collection => [@ask_admin] %>"); -<% @ask_admin = AskAdmin.new(:display => 'List') # reset for new form %> -$(".edit_ask_admin").replaceWith("<%= j render "form" %>") -$(".new_ask_admin")[0].reset(); diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_categories/_ask_category.html.erb b/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_categories/_ask_category.html.erb deleted file mode 100644 index fd39498b..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_categories/_ask_category.html.erb +++ /dev/null @@ -1,17 +0,0 @@ - - - <%= ask_category.key %> - <%if at_least_module_manager %> -
    - -
    - <% end -%> - - <% @site_in_use_locales.each do |locale| %> - <%= ask_category.name_translations[locale] rescue nil %> - <% end %> - diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_categories/_form.html.erb b/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_categories/_form.html.erb deleted file mode 100644 index ed9f759f..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_categories/_form.html.erb +++ /dev/null @@ -1,28 +0,0 @@ -<%= form_for(@ask_category, :remote => true, :url => @url) do |f| %> - -

    <%= (@ask_category.new_record? ? t(:add) : t(:edit)) %>

    - -
    - <%= f.label :key, t(:key) %> - <%= f.text_field :key %> -
    - -
    - <%= f.fields_for :name_translations do |f| %> - <% @site_in_use_locales.each do |locale| %> -
    - <%= label_tag "name-#{locale}", "#{t(:name)}-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %> -
    - <%= f.text_field locale, :class => 'input-xxlarge', :value => (@ask_category.name_translations[locale] rescue nil) %> -
    -
    - <% end %> - <% end %> -
    - -
    - <%= f.submit t(:submit), :class=>'btn btn-primary' %> -
    - -<% end %> - diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_categories/create.js.erb b/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_categories/create.js.erb deleted file mode 100644 index a60c2c00..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_categories/create.js.erb +++ /dev/null @@ -1,2 +0,0 @@ -$('<%= j render :partial => 'ask_category', :collection => [@ask_category] %>').appendTo('#ask_categories').hide().fadeIn(); -$("#new_ask_category")[0].reset(); diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_categories/destroy.js.erb b/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_categories/destroy.js.erb deleted file mode 100644 index 7e07c1a5..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_categories/destroy.js.erb +++ /dev/null @@ -1 +0,0 @@ -$("#<%= dom_id @ask_category %>").find(".archive_toggle").text("<%= show_toggle_archive_btn(@ask_category) %> "); diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_categories/edit.js.erb b/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_categories/edit.js.erb deleted file mode 100644 index 40061b9f..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_categories/edit.js.erb +++ /dev/null @@ -1 +0,0 @@ -$("#form > form").replaceWith("<%= j render "form" %>"); diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_categories/index.html.erb b/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_categories/index.html.erb deleted file mode 100644 index 1050218f..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_categories/index.html.erb +++ /dev/null @@ -1,34 +0,0 @@ -<%= flash_messages %> - - - - - - - <% @site_in_use_locales.each do |locale| %> - - <% end %> - - - - <%= render :partial => 'ask_category', :collection => @ask_categories %> - -
    - -
    <%= render :partial => "form" if at_least_module_manager%>
    - diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_categories/update.js.erb b/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_categories/update.js.erb deleted file mode 100644 index b0c50362..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_categories/update.js.erb +++ /dev/null @@ -1,4 +0,0 @@ -$("#<%= dom_id @ask_category %>").replaceWith("<%= j render :partial => 'ask_category', :collection => [@ask_category] %>"); -<% @ask_category = QaCategory.new(:display => 'List') # reset for new form %> -$(".edit_ask_category").replaceWith("<%= j render "form" %>") -$(".new_ask_category")[0].reset(); diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_questions/_ask_question.html.erb b/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_questions/_ask_question.html.erb deleted file mode 100644 index 6a13dac0..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_questions/_ask_question.html.erb +++ /dev/null @@ -1,27 +0,0 @@ - - - <%= check_box_tag 'to_delete[]', ask_question.id, false, :class => "checkbox_in_list" %> - - - <%= ask_question.ask_reply ? ask_question.ask_reply.status : t('ask.pending') %> - - - - <%= ask_question.title %> -
    - -
    - - - <%= ask_question.name %> - - - <%= ask_question.created_at.strftime "%Y-%m-%d %H:%M:%S" %> - - - diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_questions/_filter.html.erb b/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_questions/_filter.html.erb deleted file mode 100644 index 54df3c19..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_questions/_filter.html.erb +++ /dev/null @@ -1,11 +0,0 @@ - - -<% content_for :page_specific_javascript do %> - <%= javascript_include_tag 'sort_header' %> -<% end %> diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_questions/_sort_headers.html.erb b/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_questions/_sort_headers.html.erb deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_questions/destroy.js.erb b/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_questions/destroy.js.erb deleted file mode 100644 index ad5be1cf..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_questions/destroy.js.erb +++ /dev/null @@ -1 +0,0 @@ -$("#<%= dom_id @ask_question %>").remove(); diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_questions/edit.html.erb b/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_questions/edit.html.erb deleted file mode 100644 index 7225f69a..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_questions/edit.html.erb +++ /dev/null @@ -1,55 +0,0 @@ -
    - <%= form_for @ask_reply, url: @url, method: @method do |f| %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    <%= AskQuestion.human_attribute_name(:name) %>:<%= @ask_question.name %><%= AskQuestion.human_attribute_name(:identity) %>:<%= @ask_question.identity %><%= AskQuestion.human_attribute_name(:email) %>:<%= @ask_question.email %><%= AskQuestion.human_attribute_name(:phone) %>:<%= @ask_question.phone %><%= AskQuestion.human_attribute_name(:tax) %>:<%= @ask_question.tax %>
    <%= AskQuestion.human_attribute_name(:title) %>:<%= @ask_question.title %>
    <%= AskQuestion.human_attribute_name(:content) %>:
    <%= @ask_question.content %>
    - <%= f.label :content %> -
    <%= f.text_area :content, rows: 10, style: 'width: 500px' %> -
    - <%= f.label :comment %> -
    <%= f.text_field :comment, style: 'width: 500px' %>
    <%= f.label :status %> <%= f.select :status, [ - ['待處理', '待處理'], - ['已處理', '已處理'], - ['轉介其他單位', '轉介其他單位'] - ] %>
    - <%= f.label :send_email %><%= f.radio_button :send_email, 1, checked: @ask_reply.send_email? %><%= t('ask.yes') %> -   -   -   -   - <%= f.radio_button :send_email, 0, checked: !@ask_reply.send_email? %><%= t('ask.no') %> -
    -
    - <%= f.submit t('submit'), class: 'btn btn-primary' %> - <%= f.button t('cancel'), type: 'reset', class: 'btn' %> -
    -
    - <% end %> -
    diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_questions/export.html.erb b/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_questions/export.html.erb deleted file mode 100644 index d5f28ed6..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_questions/export.html.erb +++ /dev/null @@ -1,21 +0,0 @@ -
    - <%= form_tag export_panel_ask_back_end_ask_questions_path, method: 'post' do |f| %> - - - - - - - - - - - - -
    <%= t('date_') %><%= date_select 'export', :start %> <%= t('ask.to') %>
    <%= date_select 'export', :end %>
    -
    - <%= submit_tag t('submit'), class: 'btn btn-primary' %> -
    -
    - <% end %> -
    diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_questions/index.html.erb b/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_questions/index.html.erb deleted file mode 100644 index 66212b20..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_questions/index.html.erb +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - <%= render :partial => 'ask_question', :collection => @ask_questions %> - -
    <%= t('ask.status') %><%= t('ask.question') %><%= t('ask.sender') %><%= t('ask.created_at') %>
    - -
    -
    -
    -
    diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_questions/index.js.erb b/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_questions/index.js.erb deleted file mode 100644 index 85a93de3..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/back_end/ask_questions/index.js.erb +++ /dev/null @@ -1,4 +0,0 @@ -$("#delete_all").attr("action", "<%= delete_panel_ask_back_end_ask_questions_path(:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil, :sort_options => params[:sort_options]) %>"); -$("#sort_headers").html("<%= j render 'sort_headers' %>"); -$("#tbody_surveys").html("<%= j render :partial => 'ask_question', :collection => @ask_questions %>"); -$("#ask_questions_pagination").html("<%= j paginate @ask_questions %>"); diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/front_end/ask_questions/create.js.erb b/vendor/built_in_modules/ask/app/views/panel/ask/front_end/ask_questions/create.js.erb deleted file mode 100644 index b9e03a59..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/front_end/ask_questions/create.js.erb +++ /dev/null @@ -1 +0,0 @@ -window.location.href= "<%= panel_ask_front_end_thank_you_path %>" diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/front_end/ask_questions/index.html.erb b/vendor/built_in_modules/ask/app/views/panel/ask/front_end/ask_questions/index.html.erb deleted file mode 100644 index 30ea643d..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/front_end/ask_questions/index.html.erb +++ /dev/null @@ -1,118 +0,0 @@ - - - - - -
    -
    - <%= form_for @ask_question, url: panel_ask_front_end_ask_questions_path(standalone: true), html: {class: 'form-horizontal'} do |f| %> -
    - <%= f.label :ask_category_id, class: 'control-label required' %> -
    - <%= f.select :category_id, @categories.collect{|t| [ t.title, t.id ]} %> -
    -
    -
    - <%= f.label :name, class: 'control-label required' %> -
    - <%= f.text_field :name %> -
    -
    -
    - <%= f.label :identity, class: 'control-label required' %> -
    - <%= f.select :identity, options_for_select( [t('ask.teacher'), - t('ask.stuff'), - t('ask.student'), - t('ask.schoolfellow'), - t('ask.others')].map{|i| [i, i]} ) %> -
    -
    -
    - <%= f.label :email, class: 'control-label required' %> -
    - <%= f.text_field :email %> -
    -
    -
    - <%= f.label :phone, class: 'control-label' %> -
    - <%= f.text_field :phone %> -
    -
    -
    - <%= f.label :tax, class: 'control-label' %> -
    - <%= f.text_field :tax %> -
    -
    -
    - <%= f.label :title, class: 'control-label required' %> -
    - <%= f.text_field :title %> -
    -
    -
    - <%= f.label :content, class: 'control-label required' %> -
    - <%= f.text_area :content, rows: 8, class: 'input-xlarge' %> -
    -
    -
    -
    - <%= gotcha_error %> - <%= gotcha%> -
    -
    - -
    - <%= f.submit t('submit'), class: 'btn btn-primary', :id => 'button-mail' %> - <%= f.button t('cancel'), type: 'reset', class: 'btn' %> -
    - <% end %> -
    - - \ No newline at end of file diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/front_end/ask_questions/index.js.erb b/vendor/built_in_modules/ask/app/views/panel/ask/front_end/ask_questions/index.js.erb deleted file mode 100644 index bc272ab1..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/front_end/ask_questions/index.js.erb +++ /dev/null @@ -1 +0,0 @@ -window.location.href = "<%= panel_ask_front_end_sorry_path %>"; \ No newline at end of file diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/front_end/ask_questions/sorry.html.erb b/vendor/built_in_modules/ask/app/views/panel/ask/front_end/ask_questions/sorry.html.erb deleted file mode 100644 index 674de72f..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/front_end/ask_questions/sorry.html.erb +++ /dev/null @@ -1 +0,0 @@ -

    <%= t(:ask_fail, :scope => :ask) %> !

    \ No newline at end of file diff --git a/vendor/built_in_modules/ask/app/views/panel/ask/front_end/ask_questions/thank_you.html.erb b/vendor/built_in_modules/ask/app/views/panel/ask/front_end/ask_questions/thank_you.html.erb deleted file mode 100644 index cdcae0b6..00000000 --- a/vendor/built_in_modules/ask/app/views/panel/ask/front_end/ask_questions/thank_you.html.erb +++ /dev/null @@ -1 +0,0 @@ -

    <%= @acknowledgement.content.html_safe%>

    \ No newline at end of file diff --git a/vendor/built_in_modules/ask/ask.gemspec b/vendor/built_in_modules/ask/ask.gemspec deleted file mode 100644 index 2e97ceb6..00000000 --- a/vendor/built_in_modules/ask/ask.gemspec +++ /dev/null @@ -1,22 +0,0 @@ -$:.push File.expand_path("../lib", __FILE__) - -# Maintain your gem's version: -require "ask/version" - -# Describe your gem and declare its dependencies: -Gem::Specification.new do |s| - s.name = "ask" - s.version = Ask::VERSION - s.authors = ["TODO: Your name"] - s.email = ["TODO: Your email"] - s.homepage = "TODO" - s.summary = "TODO: Summary of Ask." - s.description = "TODO: Description of Ask." - - s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"] - s.test_files = Dir["test/**/*"] - - s.add_dependency "rails", "~> 3.2.13" - - s.add_development_dependency "sqlite3" -end diff --git a/vendor/built_in_modules/ask/ask.json b/vendor/built_in_modules/ask/ask.json deleted file mode 100644 index 4c97d7b3..00000000 --- a/vendor/built_in_modules/ask/ask.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "title": "ask", - "version": "0.1", - "organization": "Rulingcom", - "author": "RD dep", - "intro": "ask", - "update_info": "Some info", - "create_date": "05-23-2013", - "widgets": ["index"], - "category": ["gallery_categories"], - "enable_frontend": true -} diff --git a/vendor/built_in_modules/ask/config/locales/en.yml b/vendor/built_in_modules/ask/config/locales/en.yml deleted file mode 100644 index a4aeacae..00000000 --- a/vendor/built_in_modules/ask/config/locales/en.yml +++ /dev/null @@ -1,24 +0,0 @@ -en: - ask: - ask: Ask - export: Export - reply: Reply - reply_success: Reply success - to: To - widget: - index: Form - save_success: Successfully saved - teacher: Teacher - stuff: Stuff - student: Student - schoolfellow: Schoolfellow - others: Others - acknowledgement: Acknowledgement - admin: Administrator - new_question: New question - pending: Pending - mongoid: - attributes: - ask_question: - ask_category_id: Ask Category - diff --git a/vendor/built_in_modules/ask/config/locales/zh_tw.yml b/vendor/built_in_modules/ask/config/locales/zh_tw.yml deleted file mode 100644 index 0b8109b1..00000000 --- a/vendor/built_in_modules/ask/config/locales/zh_tw.yml +++ /dev/null @@ -1,42 +0,0 @@ -zh_tw: - recaptcha: - errors: - verification_failed: 驗證碼錯誤 - ask: - ask: 發問 - export: 匯出 - reply: 回覆 - reply_success: 回覆成功 - to: 至 - yes: 是 - no: 否 - widget: - index: 表單 - save_success: 儲存成功 - teacher: 教師 - stuff: 職員 - student: 學生 - schoolfellow: 校友 - others: 其他 - acknowledgement: 感謝詞 - admin: 管理者 - new_question: 新的發問 - pending: 待處理 - mongoid: - attributes: - ask_question: - ask_category_id: 諮詢類別 - name: 姓名 - identity: 身份 - email: Email - phone: 聯絡電話 - tax: 傳真 - title: 主旨 - content: 內容 - created_at: 日期 - ask_reply: - content: 回覆 - comment: 備註 - status: 狀態 - send_email: 是否回信 - diff --git a/vendor/built_in_modules/ask/config/routes.rb b/vendor/built_in_modules/ask/config/routes.rb deleted file mode 100644 index df2ffe95..00000000 --- a/vendor/built_in_modules/ask/config/routes.rb +++ /dev/null @@ -1,29 +0,0 @@ -Rails.application.routes.draw do - - namespace :panel do - namespace :ask do - namespace :back_end do - resources :ask_questions do - collection do - get 'delete' - get 'export' - post 'export', to: 'ask_questions#do_export' - end - resources :ask_replies - end - - resources :ask_categories - resources :ask_acknowledgements - resources :ask_admins - end - - namespace :front_end do - match "ask_questions/thank_you" => "ask_questions#thank_you", :as => 'thank_you' - match "ask_questions/sorry" => "ask_questions#sorry", :as => 'sorry' - resources :ask_questions - end - - end - end - -end diff --git a/vendor/built_in_modules/ask/init.rb b/vendor/built_in_modules/ask/init.rb deleted file mode 100644 index f66c9802..00000000 --- a/vendor/built_in_modules/ask/init.rb +++ /dev/null @@ -1,59 +0,0 @@ -module Ask - OrbitApp.registration "Ask",:type=> 'ModuleApp' do - module_label 'ask.ask' - base_url File.expand_path File.dirname(__FILE__) - # personal_plugin :enable => true,:path=>"panel/faq/plugin/profile",:i18n=>'admin.faq' - - version "0.1" - organization "Rulingcom" - author "RD dep" - intro "I am intro" - update_info 'some update_info' - - front_end do - app_page 'ask_questions' do - frontend_i18n 'ask.ask' - end - app_page 'thank_you' do - frontend_i18n "ask.thank_you" - end - end - - widgets do - default_widget do - end - categories_query 'Category.all' - end - - authorizable - approvable - categorizable - - side_bar do - head_label_i18n 'ask.ask', icon_class: 'icons-light-bulb' - available_for [:admin,:manager,:sub_manager] - active_for_controllers ({:private=>['ask_questions', 'ask_admins', 'ask_ackowledgements']}) - active_for_controllers({ private: ['ask_questions'] }) - head_link_path "panel_ask_back_end_ask_questions_path" - - context_link 'announcement.categories', - :link_path=>"admin_module_app_categories_path(get_module_app)" , - :priority=>3, - :active_for_category => 'Ask', - :available_for => [:admin] - - context_link 'ask.acknowledgement', link_path: 'panel_ask_back_end_ask_acknowledgements_path', - priority: 1, - available_for: [:all] - - context_link 'ask.admin', link_path: 'panel_ask_back_end_ask_admins_path', - priority: 1, - available_for: [:all] - - context_link 'ask.export', link_path: 'export_panel_ask_back_end_ask_questions_path', - priority: 1, - available_for: [:all] - end - - end -end diff --git a/vendor/built_in_modules/ask/lib/ask.rb b/vendor/built_in_modules/ask/lib/ask.rb deleted file mode 100644 index f476a553..00000000 --- a/vendor/built_in_modules/ask/lib/ask.rb +++ /dev/null @@ -1,2 +0,0 @@ -module Ask -end diff --git a/vendor/built_in_modules/ask/lib/ask/version.rb b/vendor/built_in_modules/ask/lib/ask/version.rb deleted file mode 100644 index a87c4ade..00000000 --- a/vendor/built_in_modules/ask/lib/ask/version.rb +++ /dev/null @@ -1,3 +0,0 @@ -module Ask - VERSION = "0.0.1" -end diff --git a/vendor/built_in_modules/ask/lib/tasks/ask_tasks.rake b/vendor/built_in_modules/ask/lib/tasks/ask_tasks.rake deleted file mode 100644 index 441822cd..00000000 --- a/vendor/built_in_modules/ask/lib/tasks/ask_tasks.rake +++ /dev/null @@ -1,4 +0,0 @@ -# desc "Explaining what the task does" -# task :ask do -# # Task goes here -# end diff --git a/vendor/built_in_modules/ask/test/ask_test.rb b/vendor/built_in_modules/ask/test/ask_test.rb deleted file mode 100644 index a8cfba54..00000000 --- a/vendor/built_in_modules/ask/test/ask_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class AskTest < ActiveSupport::TestCase - test "truth" do - assert_kind_of Module, Ask - end -end diff --git a/vendor/built_in_modules/ask/test/dummy/README.rdoc b/vendor/built_in_modules/ask/test/dummy/README.rdoc deleted file mode 100644 index 3e1c15c8..00000000 --- a/vendor/built_in_modules/ask/test/dummy/README.rdoc +++ /dev/null @@ -1,261 +0,0 @@ -== Welcome to Rails - -Rails is a web-application framework that includes everything needed to create -database-backed web applications according to the Model-View-Control pattern. - -This pattern splits the view (also called the presentation) into "dumb" -templates that are primarily responsible for inserting pre-built data in between -HTML tags. The model contains the "smart" domain objects (such as Account, -Product, Person, Post) that holds all the business logic and knows how to -persist themselves to a database. The controller handles the incoming requests -(such as Save New Account, Update Product, Show Post) by manipulating the model -and directing data to the view. - -In Rails, the model is handled by what's called an object-relational mapping -layer entitled Active Record. This layer allows you to present the data from -database rows as objects and embellish these data objects with business logic -methods. You can read more about Active Record in -link:files/vendor/rails/activerecord/README.html. - -The controller and view are handled by the Action Pack, which handles both -layers by its two parts: Action View and Action Controller. These two layers -are bundled in a single package due to their heavy interdependence. This is -unlike the relationship between the Active Record and Action Pack that is much -more separate. Each of these packages can be used independently outside of -Rails. You can read more about Action Pack in -link:files/vendor/rails/actionpack/README.html. - - -== Getting Started - -1. At the command prompt, create a new Rails application: - rails new myapp (where myapp is the application name) - -2. Change directory to myapp and start the web server: - cd myapp; rails server (run with --help for options) - -3. Go to http://localhost:3000/ and you'll see: - "Welcome aboard: You're riding Ruby on Rails!" - -4. Follow the guidelines to start developing your application. You can find -the following resources handy: - -* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html -* Ruby on Rails Tutorial Book: http://www.railstutorial.org/ - - -== Debugging Rails - -Sometimes your application goes wrong. Fortunately there are a lot of tools that -will help you debug it and get it back on the rails. - -First area to check is the application log files. Have "tail -f" commands -running on the server.log and development.log. Rails will automatically display -debugging and runtime information to these files. Debugging info will also be -shown in the browser on requests from 127.0.0.1. - -You can also log your own messages directly into the log file from your code -using the Ruby logger class from inside your controllers. Example: - - class WeblogController < ActionController::Base - def destroy - @weblog = Weblog.find(params[:id]) - @weblog.destroy - logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!") - end - end - -The result will be a message in your log file along the lines of: - - Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1! - -More information on how to use the logger is at http://www.ruby-doc.org/core/ - -Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are -several books available online as well: - -* Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe) -* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide) - -These two books will bring you up to speed on the Ruby language and also on -programming in general. - - -== Debugger - -Debugger support is available through the debugger command when you start your -Mongrel or WEBrick server with --debugger. This means that you can break out of -execution at any point in the code, investigate and change the model, and then, -resume execution! You need to install ruby-debug to run the server in debugging -mode. With gems, use sudo gem install ruby-debug. Example: - - class WeblogController < ActionController::Base - def index - @posts = Post.all - debugger - end - end - -So the controller will accept the action, run the first line, then present you -with a IRB prompt in the server window. Here you can do things like: - - >> @posts.inspect - => "[#nil, "body"=>nil, "id"=>"1"}>, - #"Rails", "body"=>"Only ten..", "id"=>"2"}>]" - >> @posts.first.title = "hello from a debugger" - => "hello from a debugger" - -...and even better, you can examine how your runtime objects actually work: - - >> f = @posts.first - => #nil, "body"=>nil, "id"=>"1"}> - >> f. - Display all 152 possibilities? (y or n) - -Finally, when you're ready to resume execution, you can enter "cont". - - -== Console - -The console is a Ruby shell, which allows you to interact with your -application's domain model. Here you'll have all parts of the application -configured, just like it is when the application is running. You can inspect -domain models, change values, and save to the database. Starting the script -without arguments will launch it in the development environment. - -To start the console, run rails console from the application -directory. - -Options: - -* Passing the -s, --sandbox argument will rollback any modifications - made to the database. -* Passing an environment name as an argument will load the corresponding - environment. Example: rails console production. - -To reload your controllers and models after launching the console run -reload! - -More information about irb can be found at: -link:http://www.rubycentral.org/pickaxe/irb.html - - -== dbconsole - -You can go to the command line of your database directly through rails -dbconsole. You would be connected to the database with the credentials -defined in database.yml. Starting the script without arguments will connect you -to the development database. Passing an argument will connect you to a different -database, like rails dbconsole production. Currently works for MySQL, -PostgreSQL and SQLite 3. - -== Description of Contents - -The default directory structure of a generated Ruby on Rails application: - - |-- app - | |-- assets - | | |-- images - | | |-- javascripts - | | `-- stylesheets - | |-- controllers - | |-- helpers - | |-- mailers - | |-- models - | `-- views - | `-- layouts - |-- config - | |-- environments - | |-- initializers - | `-- locales - |-- db - |-- doc - |-- lib - | |-- assets - | `-- tasks - |-- log - |-- public - |-- script - |-- test - | |-- fixtures - | |-- functional - | |-- integration - | |-- performance - | `-- unit - |-- tmp - | `-- cache - | `-- assets - `-- vendor - |-- assets - | |-- javascripts - | `-- stylesheets - `-- plugins - -app - Holds all the code that's specific to this particular application. - -app/assets - Contains subdirectories for images, stylesheets, and JavaScript files. - -app/controllers - Holds controllers that should be named like weblogs_controller.rb for - automated URL mapping. All controllers should descend from - ApplicationController which itself descends from ActionController::Base. - -app/models - Holds models that should be named like post.rb. Models descend from - ActiveRecord::Base by default. - -app/views - Holds the template files for the view that should be named like - weblogs/index.html.erb for the WeblogsController#index action. All views use - eRuby syntax by default. - -app/views/layouts - Holds the template files for layouts to be used with views. This models the - common header/footer method of wrapping views. In your views, define a layout - using the layout :default and create a file named default.html.erb. - Inside default.html.erb, call <% yield %> to render the view using this - layout. - -app/helpers - Holds view helpers that should be named like weblogs_helper.rb. These are - generated for you automatically when using generators for controllers. - Helpers can be used to wrap functionality for your views into methods. - -config - Configuration files for the Rails environment, the routing map, the database, - and other dependencies. - -db - Contains the database schema in schema.rb. db/migrate contains all the - sequence of Migrations for your schema. - -doc - This directory is where your application documentation will be stored when - generated using rake doc:app - -lib - Application specific libraries. Basically, any kind of custom code that - doesn't belong under controllers, models, or helpers. This directory is in - the load path. - -public - The directory available for the web server. Also contains the dispatchers and the - default HTML files. This should be set as the DOCUMENT_ROOT of your web - server. - -script - Helper scripts for automation and generation. - -test - Unit and functional tests along with fixtures. When using the rails generate - command, template test files will be generated for you and placed in this - directory. - -vendor - External libraries that the application depends on. Also includes the plugins - subdirectory. If the app has frozen rails, those gems also go here, under - vendor/rails/. This directory is in the load path. diff --git a/vendor/built_in_modules/ask/test/dummy/Rakefile b/vendor/built_in_modules/ask/test/dummy/Rakefile deleted file mode 100644 index 36458522..00000000 --- a/vendor/built_in_modules/ask/test/dummy/Rakefile +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env rake -# Add your own tasks in files placed in lib/tasks ending in .rake, -# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. - -require File.expand_path('../config/application', __FILE__) - -Dummy::Application.load_tasks diff --git a/vendor/built_in_modules/ask/test/dummy/app/assets/javascripts/application.js b/vendor/built_in_modules/ask/test/dummy/app/assets/javascripts/application.js deleted file mode 100644 index 9097d830..00000000 --- a/vendor/built_in_modules/ask/test/dummy/app/assets/javascripts/application.js +++ /dev/null @@ -1,15 +0,0 @@ -// This is a manifest file that'll be compiled into application.js, which will include all the files -// listed below. -// -// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, -// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. -// -// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -// the compiled file. -// -// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD -// GO AFTER THE REQUIRES BELOW. -// -//= require jquery -//= require jquery_ujs -//= require_tree . diff --git a/vendor/built_in_modules/ask/test/dummy/app/assets/stylesheets/application.css b/vendor/built_in_modules/ask/test/dummy/app/assets/stylesheets/application.css deleted file mode 100644 index 3192ec89..00000000 --- a/vendor/built_in_modules/ask/test/dummy/app/assets/stylesheets/application.css +++ /dev/null @@ -1,13 +0,0 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, - * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the top of the - * compiled file, but it's generally better to create a new file per style scope. - * - *= require_self - *= require_tree . - */ diff --git a/vendor/built_in_modules/ask/test/dummy/app/controllers/application_controller.rb b/vendor/built_in_modules/ask/test/dummy/app/controllers/application_controller.rb deleted file mode 100644 index e8065d95..00000000 --- a/vendor/built_in_modules/ask/test/dummy/app/controllers/application_controller.rb +++ /dev/null @@ -1,3 +0,0 @@ -class ApplicationController < ActionController::Base - protect_from_forgery -end diff --git a/vendor/built_in_modules/ask/test/dummy/app/helpers/application_helper.rb b/vendor/built_in_modules/ask/test/dummy/app/helpers/application_helper.rb deleted file mode 100644 index de6be794..00000000 --- a/vendor/built_in_modules/ask/test/dummy/app/helpers/application_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module ApplicationHelper -end diff --git a/vendor/built_in_modules/ask/test/dummy/app/mailers/.gitkeep b/vendor/built_in_modules/ask/test/dummy/app/mailers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/ask/test/dummy/app/models/.gitkeep b/vendor/built_in_modules/ask/test/dummy/app/models/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/ask/test/dummy/app/views/layouts/application.html.erb b/vendor/built_in_modules/ask/test/dummy/app/views/layouts/application.html.erb deleted file mode 100644 index 4cab2684..00000000 --- a/vendor/built_in_modules/ask/test/dummy/app/views/layouts/application.html.erb +++ /dev/null @@ -1,14 +0,0 @@ - - - - Dummy - <%= stylesheet_link_tag "application", :media => "all" %> - <%= javascript_include_tag "application" %> - <%= csrf_meta_tags %> - - - -<%= yield %> - - - diff --git a/vendor/built_in_modules/ask/test/dummy/config.ru b/vendor/built_in_modules/ask/test/dummy/config.ru deleted file mode 100644 index 1989ed8d..00000000 --- a/vendor/built_in_modules/ask/test/dummy/config.ru +++ /dev/null @@ -1,4 +0,0 @@ -# This file is used by Rack-based servers to start the application. - -require ::File.expand_path('../config/environment', __FILE__) -run Dummy::Application diff --git a/vendor/built_in_modules/ask/test/dummy/config/application.rb b/vendor/built_in_modules/ask/test/dummy/config/application.rb deleted file mode 100644 index 19760aa6..00000000 --- a/vendor/built_in_modules/ask/test/dummy/config/application.rb +++ /dev/null @@ -1,59 +0,0 @@ -require File.expand_path('../boot', __FILE__) - -require 'rails/all' - -Bundler.require(*Rails.groups) -require "ask" - -module Dummy - class Application < Rails::Application - # Settings in config/environments/* take precedence over those specified here. - # Application configuration should go into files in config/initializers - # -- all .rb files in that directory are automatically loaded. - - # Custom directories with classes and modules you want to be autoloadable. - # config.autoload_paths += %W(#{config.root}/extras) - - # Only load the plugins named here, in the order given (default is alphabetical). - # :all can be used as a placeholder for all plugins not explicitly named. - # config.plugins = [ :exception_notification, :ssl_requirement, :all ] - - # Activate observers that should always be running. - # config.active_record.observers = :cacher, :garbage_collector, :forum_observer - - # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. - # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. - # config.time_zone = 'Central Time (US & Canada)' - - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - # config.i18n.default_locale = :de - - # Configure the default encoding used in templates for Ruby 1.9. - config.encoding = "utf-8" - - # Configure sensitive parameters which will be filtered from the log file. - config.filter_parameters += [:password] - - # Enable escaping HTML in JSON. - config.active_support.escape_html_entities_in_json = true - - # Use SQL instead of Active Record's schema dumper when creating the database. - # This is necessary if your schema can't be completely dumped by the schema dumper, - # like if you have constraints or database-specific column types - # config.active_record.schema_format = :sql - - # Enforce whitelist mode for mass assignment. - # This will create an empty whitelist of attributes available for mass-assignment for all models - # in your app. As such, your models will need to explicitly whitelist or blacklist accessible - # parameters by using an attr_accessible or attr_protected declaration. - config.active_record.whitelist_attributes = true - - # Enable the asset pipeline - config.assets.enabled = true - - # Version of your assets, change this if you want to expire all your assets - config.assets.version = '1.0' - end -end - diff --git a/vendor/built_in_modules/ask/test/dummy/config/boot.rb b/vendor/built_in_modules/ask/test/dummy/config/boot.rb deleted file mode 100644 index eba06813..00000000 --- a/vendor/built_in_modules/ask/test/dummy/config/boot.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'rubygems' -gemfile = File.expand_path('../../../../Gemfile', __FILE__) - -if File.exist?(gemfile) - ENV['BUNDLE_GEMFILE'] = gemfile - require 'bundler' - Bundler.setup -end - -$:.unshift File.expand_path('../../../../lib', __FILE__) \ No newline at end of file diff --git a/vendor/built_in_modules/ask/test/dummy/config/database.yml b/vendor/built_in_modules/ask/test/dummy/config/database.yml deleted file mode 100644 index 51a4dd45..00000000 --- a/vendor/built_in_modules/ask/test/dummy/config/database.yml +++ /dev/null @@ -1,25 +0,0 @@ -# SQLite version 3.x -# gem install sqlite3 -# -# Ensure the SQLite 3 gem is defined in your Gemfile -# gem 'sqlite3' -development: - adapter: sqlite3 - database: db/development.sqlite3 - pool: 5 - timeout: 5000 - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: - adapter: sqlite3 - database: db/test.sqlite3 - pool: 5 - timeout: 5000 - -production: - adapter: sqlite3 - database: db/production.sqlite3 - pool: 5 - timeout: 5000 diff --git a/vendor/built_in_modules/ask/test/dummy/config/environment.rb b/vendor/built_in_modules/ask/test/dummy/config/environment.rb deleted file mode 100644 index 3da5eb91..00000000 --- a/vendor/built_in_modules/ask/test/dummy/config/environment.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Load the rails application -require File.expand_path('../application', __FILE__) - -# Initialize the rails application -Dummy::Application.initialize! diff --git a/vendor/built_in_modules/ask/test/dummy/config/environments/development.rb b/vendor/built_in_modules/ask/test/dummy/config/environments/development.rb deleted file mode 100644 index 82c74d15..00000000 --- a/vendor/built_in_modules/ask/test/dummy/config/environments/development.rb +++ /dev/null @@ -1,37 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # In the development environment your application's code is reloaded on - # every request. This slows down response time but is perfect for development - # since you don't have to restart the web server when you make code changes. - config.cache_classes = false - - # Log error messages when you accidentally call methods on nil. - config.whiny_nils = true - - # Show full error reports and disable caching - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Don't care if the mailer can't send - config.action_mailer.raise_delivery_errors = false - - # Print deprecation notices to the Rails logger - config.active_support.deprecation = :log - - # Only use best-standards-support built into browsers - config.action_dispatch.best_standards_support = :builtin - - # Raise exception on mass assignment protection for Active Record models - config.active_record.mass_assignment_sanitizer = :strict - - # Log the query plan for queries taking more than this (works - # with SQLite, MySQL, and PostgreSQL) - config.active_record.auto_explain_threshold_in_seconds = 0.5 - - # Do not compress assets - config.assets.compress = false - - # Expands the lines which load the assets - config.assets.debug = true -end diff --git a/vendor/built_in_modules/ask/test/dummy/config/environments/production.rb b/vendor/built_in_modules/ask/test/dummy/config/environments/production.rb deleted file mode 100644 index bdac56a7..00000000 --- a/vendor/built_in_modules/ask/test/dummy/config/environments/production.rb +++ /dev/null @@ -1,67 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # Code is not reloaded between requests - config.cache_classes = true - - # Full error reports are disabled and caching is turned on - config.consider_all_requests_local = false - config.action_controller.perform_caching = true - - # Disable Rails's static asset server (Apache or nginx will already do this) - config.serve_static_assets = false - - # Compress JavaScripts and CSS - config.assets.compress = true - - # Don't fallback to assets pipeline if a precompiled asset is missed - config.assets.compile = false - - # Generate digests for assets URLs - config.assets.digest = true - - # Defaults to nil and saved in location specified by config.assets.prefix - # config.assets.manifest = YOUR_PATH - - # Specifies the header that your server uses for sending files - # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx - - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true - - # See everything in the log (default is :info) - # config.log_level = :debug - - # Prepend all log lines with the following tags - # config.log_tags = [ :subdomain, :uuid ] - - # Use a different logger for distributed setups - # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) - - # Use a different cache store in production - # config.cache_store = :mem_cache_store - - # Enable serving of images, stylesheets, and JavaScripts from an asset server - # config.action_controller.asset_host = "http://assets.example.com" - - # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) - # config.assets.precompile += %w( search.js ) - - # Disable delivery errors, bad email addresses will be ignored - # config.action_mailer.raise_delivery_errors = false - - # Enable threaded mode - # config.threadsafe! - - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation can not be found) - config.i18n.fallbacks = true - - # Send deprecation notices to registered listeners - config.active_support.deprecation = :notify - - # Log the query plan for queries taking more than this (works - # with SQLite, MySQL, and PostgreSQL) - # config.active_record.auto_explain_threshold_in_seconds = 0.5 -end diff --git a/vendor/built_in_modules/ask/test/dummy/config/environments/test.rb b/vendor/built_in_modules/ask/test/dummy/config/environments/test.rb deleted file mode 100644 index f1a48141..00000000 --- a/vendor/built_in_modules/ask/test/dummy/config/environments/test.rb +++ /dev/null @@ -1,37 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # The test environment is used exclusively to run your application's - # test suite. You never need to work with it otherwise. Remember that - # your test database is "scratch space" for the test suite and is wiped - # and recreated between test runs. Don't rely on the data there! - config.cache_classes = true - - # Configure static asset server for tests with Cache-Control for performance - config.serve_static_assets = true - config.static_cache_control = "public, max-age=3600" - - # Log error messages when you accidentally call methods on nil - config.whiny_nils = true - - # Show full error reports and disable caching - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Raise exceptions instead of rendering exception templates - config.action_dispatch.show_exceptions = false - - # Disable request forgery protection in test environment - config.action_controller.allow_forgery_protection = false - - # Tell Action Mailer not to deliver emails to the real world. - # The :test delivery method accumulates sent emails in the - # ActionMailer::Base.deliveries array. - config.action_mailer.delivery_method = :test - - # Raise exception on mass assignment protection for Active Record models - config.active_record.mass_assignment_sanitizer = :strict - - # Print deprecation notices to the stderr - config.active_support.deprecation = :stderr -end diff --git a/vendor/built_in_modules/ask/test/dummy/config/initializers/backtrace_silencers.rb b/vendor/built_in_modules/ask/test/dummy/config/initializers/backtrace_silencers.rb deleted file mode 100644 index 59385cdf..00000000 --- a/vendor/built_in_modules/ask/test/dummy/config/initializers/backtrace_silencers.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. -# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } - -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. -# Rails.backtrace_cleaner.remove_silencers! diff --git a/vendor/built_in_modules/ask/test/dummy/config/initializers/inflections.rb b/vendor/built_in_modules/ask/test/dummy/config/initializers/inflections.rb deleted file mode 100644 index 5d8d9be2..00000000 --- a/vendor/built_in_modules/ask/test/dummy/config/initializers/inflections.rb +++ /dev/null @@ -1,15 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new inflection rules using the following format -# (all these examples are active by default): -# ActiveSupport::Inflector.inflections do |inflect| -# inflect.plural /^(ox)$/i, '\1en' -# inflect.singular /^(ox)en/i, '\1' -# inflect.irregular 'person', 'people' -# inflect.uncountable %w( fish sheep ) -# end -# -# These inflection rules are supported but not enabled by default: -# ActiveSupport::Inflector.inflections do |inflect| -# inflect.acronym 'RESTful' -# end diff --git a/vendor/built_in_modules/ask/test/dummy/config/initializers/mime_types.rb b/vendor/built_in_modules/ask/test/dummy/config/initializers/mime_types.rb deleted file mode 100644 index 72aca7e4..00000000 --- a/vendor/built_in_modules/ask/test/dummy/config/initializers/mime_types.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new mime types for use in respond_to blocks: -# Mime::Type.register "text/richtext", :rtf -# Mime::Type.register_alias "text/html", :iphone diff --git a/vendor/built_in_modules/ask/test/dummy/config/initializers/secret_token.rb b/vendor/built_in_modules/ask/test/dummy/config/initializers/secret_token.rb deleted file mode 100644 index 2abed8fc..00000000 --- a/vendor/built_in_modules/ask/test/dummy/config/initializers/secret_token.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Your secret key for verifying the integrity of signed cookies. -# If you change this key, all old signed cookies will become invalid! -# Make sure the secret is at least 30 characters and all random, -# no regular words or you'll be exposed to dictionary attacks. -Dummy::Application.config.secret_token = 'c2f0ab1b796bcc227c8362aa2a68743c5108cb3fb412182b158e8b23126b17536fd7ed2b294f92907928f510a08d83176b2efbe34611851b412515ab1fa3d90b' diff --git a/vendor/built_in_modules/ask/test/dummy/config/initializers/session_store.rb b/vendor/built_in_modules/ask/test/dummy/config/initializers/session_store.rb deleted file mode 100644 index 952473ff..00000000 --- a/vendor/built_in_modules/ask/test/dummy/config/initializers/session_store.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Be sure to restart your server when you modify this file. - -Dummy::Application.config.session_store :cookie_store, key: '_dummy_session' - -# Use the database for sessions instead of the cookie-based default, -# which shouldn't be used to store highly confidential information -# (create the session table with "rails generate session_migration") -# Dummy::Application.config.session_store :active_record_store diff --git a/vendor/built_in_modules/ask/test/dummy/config/initializers/wrap_parameters.rb b/vendor/built_in_modules/ask/test/dummy/config/initializers/wrap_parameters.rb deleted file mode 100644 index 999df201..00000000 --- a/vendor/built_in_modules/ask/test/dummy/config/initializers/wrap_parameters.rb +++ /dev/null @@ -1,14 +0,0 @@ -# Be sure to restart your server when you modify this file. -# -# This file contains settings for ActionController::ParamsWrapper which -# is enabled by default. - -# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. -ActiveSupport.on_load(:action_controller) do - wrap_parameters format: [:json] -end - -# Disable root element in JSON by default. -ActiveSupport.on_load(:active_record) do - self.include_root_in_json = false -end diff --git a/vendor/built_in_modules/ask/test/dummy/config/locales/en.yml b/vendor/built_in_modules/ask/test/dummy/config/locales/en.yml deleted file mode 100644 index 179c14ca..00000000 --- a/vendor/built_in_modules/ask/test/dummy/config/locales/en.yml +++ /dev/null @@ -1,5 +0,0 @@ -# Sample localization file for English. Add more files in this directory for other locales. -# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. - -en: - hello: "Hello world" diff --git a/vendor/built_in_modules/ask/test/dummy/config/routes.rb b/vendor/built_in_modules/ask/test/dummy/config/routes.rb deleted file mode 100644 index eb8579be..00000000 --- a/vendor/built_in_modules/ask/test/dummy/config/routes.rb +++ /dev/null @@ -1,58 +0,0 @@ -Dummy::Application.routes.draw do - # The priority is based upon order of creation: - # first created -> highest priority. - - # Sample of regular route: - # match 'products/:id' => 'catalog#view' - # Keep in mind you can assign values other than :controller and :action - - # Sample of named route: - # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase - # This route can be invoked with purchase_url(:id => product.id) - - # Sample resource route (maps HTTP verbs to controller actions automatically): - # resources :products - - # Sample resource route with options: - # resources :products do - # member do - # get 'short' - # post 'toggle' - # end - # - # collection do - # get 'sold' - # end - # end - - # Sample resource route with sub-resources: - # resources :products do - # resources :comments, :sales - # resource :seller - # end - - # Sample resource route with more complex sub-resources - # resources :products do - # resources :comments - # resources :sales do - # get 'recent', :on => :collection - # end - # end - - # Sample resource route within a namespace: - # namespace :admin do - # # Directs /admin/products/* to Admin::ProductsController - # # (app/controllers/admin/products_controller.rb) - # resources :products - # end - - # You can have the root of your site routed with "root" - # just remember to delete public/index.html. - # root :to => 'welcome#index' - - # See how all your routes lay out with "rake routes" - - # This is a legacy wild controller route that's not recommended for RESTful applications. - # Note: This route will make all actions in every controller accessible via GET requests. - # match ':controller(/:action(/:id))(.:format)' -end diff --git a/vendor/built_in_modules/ask/test/dummy/lib/assets/.gitkeep b/vendor/built_in_modules/ask/test/dummy/lib/assets/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/ask/test/dummy/log/.gitkeep b/vendor/built_in_modules/ask/test/dummy/log/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/ask/test/dummy/public/404.html b/vendor/built_in_modules/ask/test/dummy/public/404.html deleted file mode 100644 index 9a48320a..00000000 --- a/vendor/built_in_modules/ask/test/dummy/public/404.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - The page you were looking for doesn't exist (404) - - - - - -
    -

    The page you were looking for doesn't exist.

    -

    You may have mistyped the address or the page may have moved.

    -
    - - diff --git a/vendor/built_in_modules/ask/test/dummy/public/422.html b/vendor/built_in_modules/ask/test/dummy/public/422.html deleted file mode 100644 index 83660ab1..00000000 --- a/vendor/built_in_modules/ask/test/dummy/public/422.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - The change you wanted was rejected (422) - - - - - -
    -

    The change you wanted was rejected.

    -

    Maybe you tried to change something you didn't have access to.

    -
    - - diff --git a/vendor/built_in_modules/ask/test/dummy/public/500.html b/vendor/built_in_modules/ask/test/dummy/public/500.html deleted file mode 100644 index f3648a0d..00000000 --- a/vendor/built_in_modules/ask/test/dummy/public/500.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - We're sorry, but something went wrong (500) - - - - - -
    -

    We're sorry, but something went wrong.

    -
    - - diff --git a/vendor/built_in_modules/ask/test/dummy/public/favicon.ico b/vendor/built_in_modules/ask/test/dummy/public/favicon.ico deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/ask/test/dummy/script/rails b/vendor/built_in_modules/ask/test/dummy/script/rails deleted file mode 100755 index f8da2cff..00000000 --- a/vendor/built_in_modules/ask/test/dummy/script/rails +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby -# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. - -APP_PATH = File.expand_path('../../config/application', __FILE__) -require File.expand_path('../../config/boot', __FILE__) -require 'rails/commands' diff --git a/vendor/built_in_modules/ask/test/test_helper.rb b/vendor/built_in_modules/ask/test/test_helper.rb deleted file mode 100644 index 1e26a313..00000000 --- a/vendor/built_in_modules/ask/test/test_helper.rb +++ /dev/null @@ -1,15 +0,0 @@ -# Configure Rails Environment -ENV["RAILS_ENV"] = "test" - -require File.expand_path("../dummy/config/environment.rb", __FILE__) -require "rails/test_help" - -Rails.backtrace_cleaner.remove_silencers! - -# Load support files -Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } - -# Load fixtures from the engine -if ActiveSupport::TestCase.method_defined?(:fixture_path=) - ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__) -end diff --git a/vendor/built_in_modules/calendar_new/.gitignore b/vendor/built_in_modules/calendar_new/.gitignore deleted file mode 100644 index 1463de6d..00000000 --- a/vendor/built_in_modules/calendar_new/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.bundle/ -log/*.log -pkg/ -test/dummy/db/*.sqlite3 -test/dummy/log/*.log -test/dummy/tmp/ \ No newline at end of file diff --git a/vendor/built_in_modules/calendar_new/Gemfile b/vendor/built_in_modules/calendar_new/Gemfile deleted file mode 100644 index e64f2d30..00000000 --- a/vendor/built_in_modules/calendar_new/Gemfile +++ /dev/null @@ -1,18 +0,0 @@ -source "http://rubygems.org" - -# Declare your gem's dependencies in calendar.gemspec. -# Bundler will treat runtime dependencies like base dependencies, and -# development dependencies will be added by default to the :development group. -gemspec - -# jquery-rails is used by the dummy application -gem "jquery-rails" - -# Declare any dependencies that are still in development here instead of in -# your gemspec. These might include edge Rails or gems from your path or -# Git. Remember to move these dependencies to your gemspec before releasing -# your gem to rubygems.org. - -# To use debugger -# gem 'ruby-debug19', :require => 'ruby-debug' -gem "time_difference" diff --git a/vendor/built_in_modules/calendar_new/MIT-LICENSE b/vendor/built_in_modules/calendar_new/MIT-LICENSE deleted file mode 100644 index 406f17b7..00000000 --- a/vendor/built_in_modules/calendar_new/MIT-LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2012 YOURNAME - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/built_in_modules/calendar_new/README.rdoc b/vendor/built_in_modules/calendar_new/README.rdoc deleted file mode 100644 index 86e63591..00000000 --- a/vendor/built_in_modules/calendar_new/README.rdoc +++ /dev/null @@ -1,3 +0,0 @@ -= Calendar - -This project rocks and uses MIT-LICENSE. \ No newline at end of file diff --git a/vendor/built_in_modules/calendar_new/Rakefile b/vendor/built_in_modules/calendar_new/Rakefile deleted file mode 100644 index 1c2d1ab6..00000000 --- a/vendor/built_in_modules/calendar_new/Rakefile +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env rake -begin - require 'bundler/setup' -rescue LoadError - puts 'You must `gem install bundler` and `bundle install` to run rake tasks' -end -begin - require 'rdoc/task' -rescue LoadError - require 'rdoc/rdoc' - require 'rake/rdoctask' - RDoc::Task = Rake::RDocTask -end - -RDoc::Task.new(:rdoc) do |rdoc| - rdoc.rdoc_dir = 'rdoc' - rdoc.title = 'Calendar' - rdoc.options << '--line-numbers' - rdoc.rdoc_files.include('README.rdoc') - rdoc.rdoc_files.include('lib/**/*.rb') -end - -APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__) -load 'rails/tasks/engine.rake' - - -Bundler::GemHelper.install_tasks - -require 'rake/testtask' - -Rake::TestTask.new(:test) do |t| - t.libs << 'lib' - t.libs << 'test' - t.pattern = 'test/**/*_test.rb' - t.verbose = false -end - - -task :default => :test diff --git a/vendor/built_in_modules/calendar_new/app/assets/images/animated-overlay.gif b/vendor/built_in_modules/calendar_new/app/assets/images/animated-overlay.gif deleted file mode 100644 index d441f75e..00000000 Binary files a/vendor/built_in_modules/calendar_new/app/assets/images/animated-overlay.gif and /dev/null differ diff --git a/vendor/built_in_modules/calendar_new/app/assets/images/calendar/.gitkeep b/vendor/built_in_modules/calendar_new/app/assets/images/calendar/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/calendar_new/app/assets/images/ui-bg_flat_0_aaaaaa_40x100.png b/vendor/built_in_modules/calendar_new/app/assets/images/ui-bg_flat_0_aaaaaa_40x100.png deleted file mode 100644 index c06ecaa0..00000000 Binary files a/vendor/built_in_modules/calendar_new/app/assets/images/ui-bg_flat_0_aaaaaa_40x100.png and /dev/null differ diff --git a/vendor/built_in_modules/calendar_new/app/assets/images/ui-bg_flat_75_ffffff_40x100.png b/vendor/built_in_modules/calendar_new/app/assets/images/ui-bg_flat_75_ffffff_40x100.png deleted file mode 100644 index db28c757..00000000 Binary files a/vendor/built_in_modules/calendar_new/app/assets/images/ui-bg_flat_75_ffffff_40x100.png and /dev/null differ diff --git a/vendor/built_in_modules/calendar_new/app/assets/images/ui-bg_glass_55_fbf9ee_1x400.png b/vendor/built_in_modules/calendar_new/app/assets/images/ui-bg_glass_55_fbf9ee_1x400.png deleted file mode 100644 index 137b9d25..00000000 Binary files a/vendor/built_in_modules/calendar_new/app/assets/images/ui-bg_glass_55_fbf9ee_1x400.png and /dev/null differ diff --git a/vendor/built_in_modules/calendar_new/app/assets/images/ui-bg_glass_65_ffffff_1x400.png b/vendor/built_in_modules/calendar_new/app/assets/images/ui-bg_glass_65_ffffff_1x400.png deleted file mode 100644 index 0dc2feb7..00000000 Binary files a/vendor/built_in_modules/calendar_new/app/assets/images/ui-bg_glass_65_ffffff_1x400.png and /dev/null differ diff --git a/vendor/built_in_modules/calendar_new/app/assets/images/ui-bg_glass_75_dadada_1x400.png b/vendor/built_in_modules/calendar_new/app/assets/images/ui-bg_glass_75_dadada_1x400.png deleted file mode 100644 index c6b94b66..00000000 Binary files a/vendor/built_in_modules/calendar_new/app/assets/images/ui-bg_glass_75_dadada_1x400.png and /dev/null differ diff --git a/vendor/built_in_modules/calendar_new/app/assets/images/ui-bg_glass_75_e6e6e6_1x400.png b/vendor/built_in_modules/calendar_new/app/assets/images/ui-bg_glass_75_e6e6e6_1x400.png deleted file mode 100644 index d99dd512..00000000 Binary files a/vendor/built_in_modules/calendar_new/app/assets/images/ui-bg_glass_75_e6e6e6_1x400.png and /dev/null differ diff --git a/vendor/built_in_modules/calendar_new/app/assets/images/ui-bg_glass_95_fef1ec_1x400.png b/vendor/built_in_modules/calendar_new/app/assets/images/ui-bg_glass_95_fef1ec_1x400.png deleted file mode 100644 index 8e408340..00000000 Binary files a/vendor/built_in_modules/calendar_new/app/assets/images/ui-bg_glass_95_fef1ec_1x400.png and /dev/null differ diff --git a/vendor/built_in_modules/calendar_new/app/assets/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/vendor/built_in_modules/calendar_new/app/assets/images/ui-bg_highlight-soft_75_cccccc_1x100.png deleted file mode 100644 index 4359bc3a..00000000 Binary files a/vendor/built_in_modules/calendar_new/app/assets/images/ui-bg_highlight-soft_75_cccccc_1x100.png and /dev/null differ diff --git a/vendor/built_in_modules/calendar_new/app/assets/images/ui-icons_222222_256x240.png b/vendor/built_in_modules/calendar_new/app/assets/images/ui-icons_222222_256x240.png deleted file mode 100644 index 43bf16eb..00000000 Binary files a/vendor/built_in_modules/calendar_new/app/assets/images/ui-icons_222222_256x240.png and /dev/null differ diff --git a/vendor/built_in_modules/calendar_new/app/assets/images/ui-icons_2e83ff_256x240.png b/vendor/built_in_modules/calendar_new/app/assets/images/ui-icons_2e83ff_256x240.png deleted file mode 100644 index 4af37636..00000000 Binary files a/vendor/built_in_modules/calendar_new/app/assets/images/ui-icons_2e83ff_256x240.png and /dev/null differ diff --git a/vendor/built_in_modules/calendar_new/app/assets/images/ui-icons_454545_256x240.png b/vendor/built_in_modules/calendar_new/app/assets/images/ui-icons_454545_256x240.png deleted file mode 100644 index 77628c6a..00000000 Binary files a/vendor/built_in_modules/calendar_new/app/assets/images/ui-icons_454545_256x240.png and /dev/null differ diff --git a/vendor/built_in_modules/calendar_new/app/assets/images/ui-icons_888888_256x240.png b/vendor/built_in_modules/calendar_new/app/assets/images/ui-icons_888888_256x240.png deleted file mode 100644 index dac466fd..00000000 Binary files a/vendor/built_in_modules/calendar_new/app/assets/images/ui-icons_888888_256x240.png and /dev/null differ diff --git a/vendor/built_in_modules/calendar_new/app/assets/images/ui-icons_cd0a0a_256x240.png b/vendor/built_in_modules/calendar_new/app/assets/images/ui-icons_cd0a0a_256x240.png deleted file mode 100644 index 61827f01..00000000 Binary files a/vendor/built_in_modules/calendar_new/app/assets/images/ui-icons_cd0a0a_256x240.png and /dev/null differ diff --git a/vendor/built_in_modules/calendar_new/app/assets/javascripts/bootstrap-datetimepicker.js b/vendor/built_in_modules/calendar_new/app/assets/javascripts/bootstrap-datetimepicker.js deleted file mode 100644 index d15823a5..00000000 --- a/vendor/built_in_modules/calendar_new/app/assets/javascripts/bootstrap-datetimepicker.js +++ /dev/null @@ -1,1284 +0,0 @@ -/** - * @license - * ========================================================= - * bootstrap-datetimepicker.js - * http://www.eyecon.ro/bootstrap-datepicker - * ========================================================= - * Copyright 2012 Stefan Petre - * - * Contributions: - * - Andrew Rowls - * - Thiago de Arruda - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================= - */ - -(function($) { - - // Picker object - var smartPhone = (window.orientation != undefined); - var DateTimePicker = function(element, options) { - this.id = dpgId++; - this.init(element, options); - }; - - DateTimePicker.prototype = { - constructor: DateTimePicker, - - init: function(element, options) { - var icon; - if (!(options.pickTime || options.pickDate)) - throw new Error('Must choose at least one picker'); - this.options = options; - this.$element = $(element); - this.language = options.language in dates ? options.language : 'en' - this.pickDate = options.pickDate; - this.pickTime = options.pickTime; - this.isInput = this.$element.is('input'); - // this.component = this.$element.is('.input-prepend') ? this.$element.find('.iconbtn') : false; - this.component = this.$element.is('.input-append') ? this.$element.find('.iconbtn') : false; - this.clearDate = this.$element.is('.input-append') ? this.$element.find('.clearDate') : false; - this.format = options.format; - if (!this.format) { - if (this.isInput) this.format = this.$element.data('format'); - else this.format = this.$element.find('input').data('format'); - if (!this.format) this.format = 'MM/dd/yyyy'; - } - this._compileFormat(); - if (this.component) { - icon = this.component.find('i'); - } - if (this.pickTime) { - if (icon && icon.length) this.timeIcon = icon.data('time-icon'); - if (!this.timeIcon) this.timeIcon = 'icon-time'; - icon.addClass(this.timeIcon); - } - if (this.pickDate) { - if (icon && icon.length) this.dateIcon = icon.data('date-icon'); - if (!this.dateIcon) this.dateIcon = 'icon-calendar'; - icon.removeClass(this.timeIcon); - icon.addClass(this.dateIcon); - } - this.widget = $(getTemplate(this.format, this.timeIcon, options.pickDate, options.pickTime, options.pick12HourFormat)).appendTo('body'); - this.minViewMode = options.minViewMode||this.$element.data('date-minviewmode')||0; - if (typeof this.minViewMode === 'string') { - switch (this.minViewMode) { - case 'months': - this.minViewMode = 1; - break; - case 'years': - this.minViewMode = 2; - break; - default: - this.minViewMode = 0; - break; - } - } - this.viewMode = options.viewMode||this.$element.data('date-viewmode')||0; - if (typeof this.viewMode === 'string') { - switch (this.viewMode) { - case 'months': - this.viewMode = 1; - break; - case 'years': - this.viewMode = 2; - break; - default: - this.viewMode = 0; - break; - } - } - this.startViewMode = this.viewMode; - this.weekStart = options.weekStart||this.$element.data('date-weekstart')||0; - this.weekEnd = this.weekStart === 0 ? 6 : this.weekStart - 1; - this.fillDow(); - this.fillMonths(); - this.fillHours(); - this.fillMinutes(); - this.fillSeconds(); - this.update(); - this.showMode(); - this._attachDatePickerEvents(); - }, - - show: function(e) { - this.widget.show(); - this.height = this.component ? this.component.outerHeight() : this.$element.outerHeight(); - this.width = this.component ? this.component.outerWidth() : this.$element.outerWidth(); - this.place(this.options.place); - this.$element.trigger({ - type: 'show', - date: this._date - }); - this._attachDatePickerGlobalEvents(); - if (e) { - e.stopPropagation(); - e.preventDefault(); - } - }, - - hide: function() { - // Ignore event if in the middle of a picker transition - var collapse = this.widget.find('.collapse') - for (var i = 0; i < collapse.length; i++) { - var collapseData = collapse.eq(i).data('collapse'); - if (collapseData && collapseData.transitioning) - return; - } - this.widget.hide(); - this.viewMode = this.startViewMode; - this.showMode(); - // this.set(); - this.$element.trigger({ - type: 'hide', - date: this._date - }); - this.actions.showPicker.call(this); - this._detachDatePickerGlobalEvents(); - }, - - set: function() { - var formatted = ''; - if (!this._unset) formatted = this.formatDate(this._date); - if (!this.isInput) { - if (this.component){ - var input = this.$element.find('input'); - input.val(formatted); - this._resetMaskPos(input); - } - this.$element.data('date', formatted); - } else { - this.$element.val(formatted); - this._resetMaskPos(this.$element); - } - }, - - setValue: function(newDate) { - if (!newDate) { - this._unset = true; - } else { - this._unset = false; - } - if (typeof newDate === 'string') { - this._date = this.parseDate(newDate); - } else { - this._date = new Date(newDate); - } - this.set(); - this.viewDate = UTCDate(this._date.getUTCFullYear(), this._date.getUTCMonth(), 1, 0, 0, 0, 0); - this.fillDate(); - this.fillTime(); - }, - - getDate: function() { - if (this._unset) return null; - return new Date(this._date.valueOf()); - }, - - setDate: function(date) { - if (!date) this.setValue(null); - else this.setValue(date.valueOf()); - }, - - getLocalDate: function() { - if (this._unset) return null; - var d = this._date; - return new Date(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), - d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), d.getUTCMilliseconds()); - }, - - setLocalDate: function(localDate) { - if (!localDate) this.setValue(null); - else - this.setValue(Date.UTC( - localDate.getFullYear(), - localDate.getMonth(), - localDate.getDate(), - localDate.getHours(), - localDate.getMinutes(), - localDate.getSeconds(), - localDate.getMilliseconds())); - }, - - place: function(pos){ - var offset = this.component ? this.component.offset() : this.$element.offset(), - input = this.$element.find('input'), - widget_height = this.widget.height(); - - if(pos === "bottom"){ - this.widget.css({ - top: offset.top + this.height, - left: offset.left - input.outerWidth() - this.width, - }); - }else if(pos === "top"){ - this.widget.css({ - top: offset.top - 13 - widget_height, - left: offset.left - input.outerWidth() - this.width, - }); - } - }, - - notifyChange: function(){ - this.$element.trigger({ - type: 'changeDate', - date: this.getDate(), - localDate: this.getLocalDate() - }); - }, - - update: function(newDate){ - var dateStr = newDate; - if (!dateStr) { - if (this.isInput) { - dateStr = this.$element.val(); - } else { - dateStr = this.$element.find('input').val(); - } - if (!dateStr) { - var tmp = new Date() - this._date = UTCDate(tmp.getFullYear(), - tmp.getMonth(), - tmp.getDate(), - tmp.getHours(), - tmp.getMinutes(), - tmp.getSeconds(), - tmp.getMilliseconds()) - } else { - this._date = this.parseDate(dateStr); - } - } - this.viewDate = UTCDate(this._date.getUTCFullYear(), this._date.getUTCMonth(), 1, 0, 0, 0, 0); - this.fillDate(); - this.fillTime(); - }, - - fillDow: function() { - var dowCnt = this.weekStart; - var html = ''; - while (dowCnt < this.weekStart + 7) { - html += '' + dates[this.language].daysMin[(dowCnt++) % 7] + ''; - } - html += ''; - this.widget.find('.datepicker-days thead').append(html); - }, - - fillMonths: function() { - var html = ''; - var i = 0 - while (i < 12) { - html += '' + dates[this.language].monthsShort[i++] + ''; - } - this.widget.find('.datepicker-months td').append(html); - }, - - fillDate: function() { - var year = this.viewDate.getUTCFullYear(); - var month = this.viewDate.getUTCMonth(); - var currentDate = UTCDate( - this._date.getUTCFullYear(), - this._date.getUTCMonth(), - this._date.getUTCDate(), - 0, 0, 0, 0 - ); - this.widget.find('.datepicker-days th:eq(1)').text( - dates[this.language].months[month] + ' ' + year); - var prevMonth = UTCDate(year, month-1, 28, 0, 0, 0, 0); - var day = DPGlobal.getDaysInMonth( - prevMonth.getUTCFullYear(), prevMonth.getUTCMonth()); - prevMonth.setUTCDate(day); - prevMonth.setUTCDate(day - (prevMonth.getUTCDay() - this.weekStart + 7) % 7); - var nextMonth = new Date(prevMonth.valueOf()); - nextMonth.setUTCDate(nextMonth.getUTCDate() + 42); - nextMonth = nextMonth.valueOf(); - var html = []; - var clsName; - while (prevMonth.valueOf() < nextMonth) { - if (prevMonth.getUTCDay() === this.weekStart) { - html.push(''); - } - clsName = ''; - if (prevMonth.getUTCFullYear() < year || - (prevMonth.getUTCFullYear() == year && - prevMonth.getUTCMonth() < month)) { - clsName += ' old'; - } else if (prevMonth.getUTCFullYear() > year || - (prevMonth.getUTCFullYear() == year && - prevMonth.getUTCMonth() > month)) { - clsName += ' new'; - } - if (prevMonth.valueOf() === currentDate.valueOf()) { - clsName += ' active'; - } - html.push('' + prevMonth.getUTCDate() + ''); - if (prevMonth.getUTCDay() === this.weekEnd) { - html.push(''); - } - prevMonth.setUTCDate(prevMonth.getUTCDate() + 1); - } - this.widget.find('.datepicker-days tbody').empty().append(html.join('')); - var currentYear = this._date.getUTCFullYear(); - - var months = this.widget.find('.datepicker-months').find( - 'th:eq(1)').text(year).end().find('span').removeClass('active'); - if (currentYear === year) { - months.eq(this._date.getUTCMonth()).addClass('active'); - } - - html = ''; - year = parseInt(year/10, 10) * 10; - var yearCont = this.widget.find('.datepicker-years').find( - 'th:eq(1)').text(year + '-' + (year + 9)).end().find('td'); - year -= 1; - for (var i = -1; i < 11; i++) { - html += '' + year + ''; - year += 1; - } - yearCont.html(html); - }, - - fillHours: function() { - var table = this.widget.find( - '.timepicker .timepicker-hours table'); - table.parent().hide(); - var html = ''; - if (this.options.pick12HourFormat) { - var current = 1; - for (var i = 0; i < 3; i += 1) { - html += ''; - for (var j = 0; j < 4; j += 1) { - var c = current.toString(); - html += '' + padLeft(c, 2, '0') + ''; - current++; - } - html += '' - } - } else { - var current = 0; - for (var i = 0; i < 6; i += 1) { - html += ''; - for (var j = 0; j < 4; j += 1) { - var c = current.toString(); - html += '' + padLeft(c, 2, '0') + ''; - current++; - } - html += '' - } - } - table.html(html); - }, - - fillMinutes: function() { - var table = this.widget.find( - '.timepicker .timepicker-minutes table'); - table.parent().hide(); - var html = ''; - var current = 0; - for (var i = 0; i < 3; i++) { - html += ''; - for (var j = 0; j < 4; j += 1) { - var c = current.toString(); - html += '' + padLeft(c, 2, '0') + ''; - current += 5; - } - html += ''; - } - table.html(html); - }, - - fillSeconds: function() { - var table = this.widget.find( - '.timepicker .timepicker-seconds table'); - table.parent().hide(); - var html = ''; - var current = 0; - for (var i = 0; i < 5; i++) { - html += ''; - for (var j = 0; j < 4; j += 1) { - var c = current.toString(); - html += '' + padLeft(c, 2, '0') + ''; - current += 3; - } - html += ''; - } - table.html(html); - }, - - fillTime: function() { - if (!this._date) - return; - var timeComponents = this.widget.find('.timepicker span[data-time-component]'); - var table = timeComponents.closest('table'); - var is12HourFormat = this.options.pick12HourFormat; - var hour = this._date.getUTCHours(); - var period = 'AM'; - if (is12HourFormat) { - if (hour >= 12) period = 'PM'; - if (hour === 0) hour = 12; - else if (hour != 12) hour = hour % 12; - this.widget.find( - '.timepicker [data-action=togglePeriod]').text(period); - } - hour = padLeft(hour.toString(), 2, '0'); - var minute = padLeft(this._date.getUTCMinutes().toString(), 2, '0'); - var second = padLeft(this._date.getUTCSeconds().toString(), 2, '0'); - timeComponents.filter('[data-time-component=hours]').text(hour); - timeComponents.filter('[data-time-component=minutes]').text(minute); - timeComponents.filter('[data-time-component=seconds]').text(second); - }, - - click: function(e) { - e.stopPropagation(); - e.preventDefault(); - var target = $(e.target).closest('span, td, th'); - if (target.length === 1) { - switch(target[0].nodeName.toLowerCase()) { - case 'th': - switch(target[0].className) { - case 'switch': - this.showMode(1); - break; - case 'prev': - case 'next': - var vd = this.viewDate; - var navFnc; - var step; - if(this.format == 'yyyy') { - navFnc = YGlobal.modes[this.viewMode].navFnc - step = YGlobal.modes[this.viewMode].navStep - } else if(this.format == 'yyyy/MM') { - navFnc = YMGlobal.modes[this.viewMode].navFnc - step = YMGlobal.modes[this.viewMode].navStep - } else { - navFnc = DPGlobal.modes[this.viewMode].navFnc - step = DPGlobal.modes[this.viewMode].navStep - }; - if (target[0].className === 'prev') step = step * -1; - vd['set' + navFnc](vd['get' + navFnc]() + step); - this.fillDate(); - this.set(); - break; - } - break; - case 'span': - if (target.is('.month')) { - var month = target.parent().find('span').index(target); - this.viewDate.setUTCMonth(month); - } else { - var year = parseInt(target.text(), 10) || 0; - this.viewDate.setUTCFullYear(year); - } - // if (this.viewMode !== 0) { - this._date = UTCDate( - this.viewDate.getUTCFullYear(), - this.viewDate.getUTCMonth(), - this.viewDate.getUTCDate(), - this._date.getUTCHours(), - this._date.getUTCMinutes(), - this._date.getUTCSeconds(), - this._date.getUTCMilliseconds() - ); - this.notifyChange(); - // } - this.showMode(-1); - this.fillDate(); - this.set(); - break; - case 'td': - if (target.is('.day')) { - var day = parseInt(target.text(), 10) || 1; - var month = this.viewDate.getUTCMonth(); - var year = this.viewDate.getUTCFullYear(); - if (target.is('.old')) { - if (month === 0) { - month = 11; - year -= 1; - } else { - month -= 1; - } - } else if (target.is('.new')) { - if (month == 11) { - month = 0; - year += 1; - } else { - month += 1; - } - } - this._date = UTCDate( - year, month, day, - this._date.getUTCHours(), - this._date.getUTCMinutes(), - this._date.getUTCSeconds(), - this._date.getUTCMilliseconds() - ); - this.viewDate = UTCDate( - year, month, Math.min(28, day) , 0, 0, 0, 0); - this.fillDate(); - this.set(); - this.notifyChange(); - // this.widget.hide(); - } - break; - } - } - }, - - actions: { - incrementHours: function(e) { - this._date.setUTCHours(this._date.getUTCHours() + 1); - }, - - incrementMinutes: function(e) { - this._date.setUTCMinutes(this._date.getUTCMinutes() + 1); - }, - - // incrementSeconds: function(e) { - // this._date.setUTCSeconds(this._date.getUTCSeconds() + 1); - // }, - - decrementHours: function(e) { - this._date.setUTCHours(this._date.getUTCHours() - 1); - }, - - decrementMinutes: function(e) { - this._date.setUTCMinutes(this._date.getUTCMinutes() - 1); - }, - - // decrementSeconds: function(e) { - // this._date.setUTCSeconds(this._date.getUTCSeconds() - 1); - // }, - - togglePeriod: function(e) { - var hour = this._date.getUTCHours(); - if (hour >= 12) hour -= 12; - else hour += 12; - this._date.setUTCHours(hour); - }, - - showPicker: function() { - this.widget.find('.timepicker > div:not(.timepicker-picker)').hide(); - this.widget.find('.timepicker .timepicker-picker').show(); - }, - - showHours: function() { - this.widget.find('.timepicker .timepicker-picker').hide(); - this.widget.find('.timepicker .timepicker-hours').show(); - }, - - showMinutes: function() { - this.widget.find('.timepicker .timepicker-picker').hide(); - this.widget.find('.timepicker .timepicker-minutes').show(); - }, - - // showSeconds: function() { - // this.widget.find('.timepicker .timepicker-picker').hide(); - // this.widget.find('.timepicker .timepicker-seconds').show(); - // }, - - selectHour: function(e) { - var tgt = $(e.target); - var value = parseInt(tgt.text(), 10); - if (this.options.pick12HourFormat) { - var current = this._date.getUTCHours(); - if (current >= 12) { - if (value != 12) value = (value + 12) % 24; - } else { - if (value === 12) value = 0; - else value = value % 12; - } - } - this._date.setUTCHours(value); - this.actions.showPicker.call(this); - }, - - selectMinute: function(e) { - var tgt = $(e.target); - var value = parseInt(tgt.text(), 10); - this._date.setUTCMinutes(value); - this.actions.showPicker.call(this); - }, - - // selectSecond: function(e) { - // var tgt = $(e.target); - // var value = parseInt(tgt.text(), 10); - // this._date.setUTCSeconds(value); - // this.actions.showPicker.call(this); - // } - }, - - doAction: function(e) { - e.stopPropagation(); - e.preventDefault(); - if (!this._date) this._date = UTCDate(1970, 0, 0, 0, 0, 0, 0); - var action = $(e.currentTarget).data('action'); - var rv = this.actions[action].apply(this, arguments); - this.set(); - this.fillTime(); - this.notifyChange(); - return rv; - }, - - stopEvent: function(e) { - e.stopPropagation(); - e.preventDefault(); - }, - - // part of the following code was taken from - // http://cloud.github.com/downloads/digitalBush/jquery.maskedinput/jquery.maskedinput-1.3.js - keydown: function(e) { - var self = this, k = e.which, input = $(e.target); - if (k == 8 || k == 46) { - // backspace and delete cause the maskPosition - // to be recalculated - setTimeout(function() { - self._resetMaskPos(input); - }); - } - }, - - keypress: function(e) { - var k = e.which; - if (k == 8 || k == 46) { - // For those browsers which will trigger - // keypress on backspace/delete - return; - } - var input = $(e.target); - var c = String.fromCharCode(k); - var val = input.val() || ''; - val += c; - var mask = this._mask[this._maskPos]; - if (!mask) { - return false; - } - if (mask.end != val.length) { - return; - } - if (!mask.pattern.test(val.slice(mask.start))) { - val = val.slice(0, val.length - 1); - while ((mask = this._mask[this._maskPos]) && mask.character) { - val += mask.character; - // advance mask position past static - // part - this._maskPos++; - } - val += c; - if (mask.end != val.length) { - input.val(val); - return false; - } else { - if (!mask.pattern.test(val.slice(mask.start))) { - input.val(val.slice(0, mask.start)); - return false; - } else { - input.val(val); - this._maskPos++; - return false; - } - } - } else { - this._maskPos++; - } - }, - - change: function(e) { - var input = $(e.target); - var val = input.val(); - if (this._formatPattern.test(val)) { - this.update(); - this.setValue(this._date.getTime()); - this.notifyChange(); - this.set(); - } else if (val && val.trim()) { - this.setValue(this._date.getTime()); - if (this._date) this.set(); - else input.val(''); - } else { - if (this._date) { - this.setValue(null); - // unset the date when the input is - // erased - this.notifyChange(); - } - } - this._resetMaskPos(input); - }, - - clear: function(e) { - if (this.isInput) this.$element.val(null); - else this.$element.find('input').val(null); - }, - - showMode: function(dir) { - if (dir) { - if(this.format == 'yyyy') { - this.viewMode = Math.max(this.minViewMode, Math.min(0, this.viewMode + dir)); - } else if(this.format == 'yyyy/MM') { - this.viewMode = Math.max(this.minViewMode, Math.min(1, this.viewMode + dir)); - } else { - this.viewMode = Math.max(this.minViewMode, Math.min(2, this.viewMode + dir)); - } - } - var clsName = null; - if(this.format == 'yyyy') { - clsName = '.datepicker-'+YGlobal.modes[this.viewMode].clsName - } else if(this.format == 'yyyy/MM') { - clsName = '.datepicker-'+YMGlobal.modes[this.viewMode].clsName - } else { - clsName = '.datepicker-'+DPGlobal.modes[this.viewMode].clsName - }; - this.widget.find('.datepicker > div').hide().filter(clsName).show(); - }, - - destroy: function() { - this._detachDatePickerEvents(); - this._detachDatePickerGlobalEvents(); - this.widget.remove(); - this.$element.removeData('datetimepicker'); - this.component.removeData('datetimepicker'); - }, - - formatDate: function(d) { - return this.format.replace(formatReplacer, function(match) { - var methodName, property, rv, len = match.length; - if (match === 'ms') - len = 1; - property = dateFormatComponents[match].property - if (property === 'Hours12') { - rv = d.getUTCHours(); - if (rv === 0) rv = 12; - else if (rv !== 12) rv = rv % 12; - } else if (property === 'Period12') { - if (d.getUTCHours() >= 12) return 'PM'; - else return 'AM'; - } else { - methodName = 'get' + property; - rv = d[methodName](); - } - if (methodName === 'getUTCMonth') rv = rv + 1; - if (methodName === 'getUTCYear') rv = rv + 1900 - 2000; - return padLeft(rv.toString(), len, '0'); - }); - }, - - parseDate: function(str) { - var match, i, property, methodName, value, parsed = {}; - if (!(match = this._formatPattern.exec(str))) - return null; - for (i = 1; i < match.length; i++) { - property = this._propertiesByIndex[i]; - if (!property) - continue; - value = match[i]; - if (/^\d+$/.test(value)) - value = parseInt(value, 10); - parsed[property] = value; - } - return this._finishParsingDate(parsed); - }, - - _resetMaskPos: function(input) { - var val = input.val(); - for (var i = 0; i < this._mask.length; i++) { - if (this._mask[i].end > val.length) { - // If the mask has ended then jump to - // the next - this._maskPos = i; - break; - } else if (this._mask[i].end === val.length) { - this._maskPos = i + 1; - break; - } - } - }, - - _finishParsingDate: function(parsed) { - var year, month, date, hours, minutes, seconds, milliseconds; - year = parsed.UTCFullYear; - if (parsed.UTCYear) year = 2000 + parsed.UTCYear; - if (!year) year = 1970; - if (parsed.UTCMonth) month = parsed.UTCMonth - 1; - else month = 0; - date = parsed.UTCDate || 1; - hours = parsed.UTCHours || 0; - minutes = parsed.UTCMinutes || 0; - seconds = parsed.UTCSeconds || 0; - milliseconds = parsed.UTCMilliseconds || 0; - if (parsed.Hours12) { - hours = parsed.Hours12; - } - if (parsed.Period12) { - if (/pm/i.test(parsed.Period12)) { - if (hours != 12) hours = (hours + 12) % 24; - } else { - hours = hours % 12; - } - } - return UTCDate(year, month, date, hours, minutes, seconds, milliseconds); - }, - - _compileFormat: function () { - var match, component, components = [], mask = [], - str = this.format, propertiesByIndex = {}, i = 0, pos = 0; - while (match = formatComponent.exec(str)) { - component = match[0]; - if (component in dateFormatComponents) { - i++; - propertiesByIndex[i] = dateFormatComponents[component].property; - components.push('\\s*' + dateFormatComponents[component].getPattern( - this) + '\\s*'); - mask.push({ - pattern: new RegExp(dateFormatComponents[component].getPattern( - this)), - property: dateFormatComponents[component].property, - start: pos, - end: pos += component.length - }); - } - else { - components.push(escapeRegExp(component)); - mask.push({ - pattern: new RegExp(escapeRegExp(component)), - character: component, - start: pos, - end: ++pos - }); - } - str = str.slice(component.length); - } - this._mask = mask; - this._maskPos = 0; - this._formatPattern = new RegExp( - '^\\s*' + components.join('') + '\\s*$'); - this._propertiesByIndex = propertiesByIndex; - }, - - _attachDatePickerEvents: function() { - var self = this; - // this handles date picker clicks - this.widget.on('click', '.datepicker *', $.proxy(this.click, this)); - // this handles time picker clicks - this.widget.on('click', '[data-action]', $.proxy(this.doAction, this)); - this.widget.on('mousedown', $.proxy(this.stopEvent, this)); - this.clearDate.on('click', $.proxy(this.clear, this)); - if (this.pickDate && this.pickTime) { - this.widget.on('click.togglePicker', '.accordion-toggle', function(e) { - e.stopPropagation(); - var $this = $(this); - var $parent = $this.closest('ul'); - var expanded = $parent.find('.collapse.in'); - var closed = $parent.find('.collapse:not(.in)'); - - if (expanded && expanded.length) { - var collapseData = expanded.data('collapse'); - if (collapseData && collapseData.transitioning) return; - expanded.collapse('hide'); - closed.collapse('show') - $this.find('i').toggleClass(self.timeIcon + ' ' + self.dateIcon); - self.$element.find('.iconbtn i').toggleClass(self.timeIcon + ' ' + self.dateIcon); - } - }); - } - if (this.isInput) { - this.$element.on({ - 'focus': $.proxy(this.show, this), - 'blur': $.proxy(this.hide, this), - 'change': $.proxy(this.change, this), - }); - if (this.options.maskInput) { - this.$element.on({ - 'keydown': $.proxy(this.keydown, this), - 'keypress': $.proxy(this.keypress, this) - }); - } - } else { - this.$element.on({ - 'focus': $.proxy(this.show, this), - 'blur': $.proxy(this.hide, this), - 'change': $.proxy(this.change, this), - }, 'input'); - if (this.options.maskInput) { - this.$element.on({ - 'keydown': $.proxy(this.keydown, this), - 'keypress': $.proxy(this.keypress, this) - }, 'input'); - } - if (this.component){ - this.component.on('click', $.proxy(this.show, this)); - } else { - this.$element.on('click', $.proxy(this.show, this)); - } - } - }, - - _attachDatePickerGlobalEvents: function() { - $(window).on( - 'resize.datetimepicker' + this.id, $.proxy(this.place, this)); - if (!this.isInput) { - $(document).on( - 'mousedown.datetimepicker' + this.id, $.proxy(this.hide, this)); - } - }, - - _detachDatePickerEvents: function() { - this.widget.off('click', '.datepicker *', this.click); - this.widget.off('click', '[data-action]'); - this.widget.off('mousedown', this.stopEvent); - if (this.pickDate && this.pickTime) { - this.widget.off('click.togglePicker'); - } - if (this.isInput) { - this.$element.off({ - 'focus': this.show, - 'change': this.change, - }); - if (this.options.maskInput) { - this.$element.off({ - 'keydown': this.keydown, - 'keypress': this.keypress - }); - } - } else { - this.$element.off({ - 'change': this.change, - }, 'input'); - if (this.options.maskInput) { - this.$element.off({ - 'keydown': this.keydown, - 'keypress': this.keypress - }, 'input'); - } - if (this.component){ - this.component.off('click', this.show); - } else { - this.$element.off('click', this.show); - } - } - }, - - _detachDatePickerGlobalEvents: function () { - $(window).off('resize.datetimepicker' + this.id); - if (!this.isInput) { - $(document).off('mousedown.datetimepicker' + this.id); - } - } - }; - - $.fn.datetimepicker = function ( option, val ) { - return this.each(function () { - var $this = $(this), - data = $this.data('datetimepicker'), - options = typeof option === 'object' && option; - if (!data) { - $this.data('datetimepicker', (data = new DateTimePicker( - this, $.extend({}, $.fn.datetimepicker.defaults,options)))); - } - if (typeof option === 'string') data[option](val); - }); - }; - - $.fn.datetimepicker.defaults = { - maskInput: true, - pickDate: true, - pickTime: true, - pick12HourFormat: false, - place: "bottom" - }; - $.fn.datetimepicker.Constructor = DateTimePicker; - var dpgId = 0; - var dates = $.fn.datetimepicker.dates = { - en: { - days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", - "Friday", "Saturday", "Sunday"], - daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], - daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"], - months: ["January", "February", "March", "April", "May", "June", - "July", "August", "September", "October", "November", "December"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", - "Aug", "Sep", "Oct", "Nov", "Dec"] - } - }; - - var dateFormatComponents = { - dd: {property: 'UTCDate', getPattern: function() { return '(0?[1-9]|[1-2][0-9]|3[0-1])\\b';}}, - MM: {property: 'UTCMonth', getPattern: function() {return '(0?[1-9]|1[0-2])\\b';}}, - yy: {property: 'UTCYear', getPattern: function() {return '(\\d{2})\\b'}}, - yyyy: {property: 'UTCFullYear', getPattern: function() {return '(\\d{4})\\b';}}, - hh: {property: 'UTCHours', getPattern: function() {return '(0?[0-9]|1[0-9]|2[0-3])\\b';}}, - mm: {property: 'UTCMinutes', getPattern: function() {return '(0?[0-9]|[1-5][0-9])\\b';}}, - ss: {property: 'UTCSeconds', getPattern: function() {return '(0?[0-9]|[1-5][0-9])\\b';}}, - ms: {property: 'UTCMilliseconds', getPattern: function() {return '([0-9]{1,3})\\b';}}, - HH: {property: 'Hours12', getPattern: function() {return '(0?[1-9]|1[0-2])\\b';}}, - PP: {property: 'Period12', getPattern: function() {return '(AM|PM|am|pm|Am|aM|Pm|pM)\\b';}} - }; - - var keys = []; - for (var k in dateFormatComponents) keys.push(k); - keys[keys.length - 1] += '\\b'; - keys.push('.'); - - var formatComponent = new RegExp(keys.join('\\b|')); - keys.pop(); - var formatReplacer = new RegExp(keys.join('\\b|'), 'g'); - - function escapeRegExp(str) { - // http://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex - return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); - } - - function padLeft(s, l, c) { - if (l < s.length) return s; - else return Array(l - s.length + 1).join(c || ' ') + s; - } - - function getTemplate(format, timeIcon, pickDate, pickTime, is12Hours) { - if (pickDate && pickTime) { - return ( - '' - ); - } else if (pickTime) { - return ( - '' - ); - } else { - if(format == 'yyyy') { - return( - '' - ) - } else if(format == 'yyyy/MM') { - return ( - '' - ); - } else { - return ( - '' - ); - } - } - } - - function UTCDate() { - return new Date(Date.UTC.apply(Date, arguments)); - } - - var DPGlobal = { - modes: [ - { - clsName: 'days', - navFnc: 'UTCMonth', - navStep: 1 - }, - { - clsName: 'months', - navFnc: 'UTCFullYear', - navStep: 1 - }, - { - clsName: 'years', - navFnc: 'UTCFullYear', - navStep: 10 - } - ], - isLeapYear: function (year) { - return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0)) - }, - getDaysInMonth: function (year, month) { - return [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month] - }, - headTemplate: - '' + - '' + - '‹' + - '' + - '›' + - '' + - '', - contTemplate: '' - }; - var YMGlobal = { - modes: [ - { - clsName: 'months', - navFnc: 'UTCFullYear', - navStep: 1 - }, - { - clsName: 'years', - navFnc: 'UTCFullYear', - navStep: 10 - } - ], - isLeapYear: function (year) { - return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0)) - }, - getDaysInMonth: function (year, month) { - return [31, (YMGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month] - }, - headTemplate: - '' + - '' + - '‹' + - '' + - '›' + - '' + - '', - contTemplate: '' - }; - var YGlobal = { - modes: [ - { - clsName: 'years', - navFnc: 'UTCFullYear', - navStep: 10 - } - ], - isLeapYear: function (year) { - return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0)) - }, - headTemplate: - '' + - '' + - '‹' + - '' + - '›' + - '' + - '', - contTemplate: '' - }; - DPGlobal.template = - '
    ' + - '' + - DPGlobal.headTemplate + - '' + - '
    ' + - '
    ' + - '
    ' + - '' + - DPGlobal.headTemplate + - DPGlobal.contTemplate+ - '
    '+ - '
    '+ - '
    '+ - ''+ - DPGlobal.headTemplate+ - DPGlobal.contTemplate+ - '
    '+ - '
    '; - YMGlobal.template = - '
    ' + - '' + - DPGlobal.headTemplate + - DPGlobal.contTemplate+ - '
    '+ - '
    '+ - '
    '+ - ''+ - DPGlobal.headTemplate+ - DPGlobal.contTemplate+ - '
    '+ - '
    '; - YGlobal.template = - '
    '+ - ''+ - DPGlobal.headTemplate+ - DPGlobal.contTemplate+ - '
    '+ - '
    '; - var TPGlobal = { - hourTemplate: '', - minuteTemplate: '', - // secondTemplate: '', - }; - TPGlobal.getTemplate = function(is12Hours) { - return ( - '
    ' + - '' + - '' + - '' + - '' + - '' + - // '' + - // '' + - // (is12Hours ? '' : '') + - '' + - '' + - ' ' + - '' + - ' ' + - // '' + - // '' + - (is12Hours ? - '' + - '' : '') + - '' + - '' + - '' + - '' + - '' + - // '' + - // '' + - // (is12Hours ? '' : '') + - '' + - '
    ' + TPGlobal.hourTemplate + ':' + TPGlobal.minuteTemplate + ':' + TPGlobal.secondTemplate + '' + - '' + - '
    ' + - '
    ' + - '
    ' + - '' + - '
    '+ - '
    '+ - '
    ' + - '' + - '
    '+ - // '
    '+ - // '
    ' + - // '' + - // '
    '+ - '
    ' - ); - } - - -})(window.jQuery) diff --git a/vendor/built_in_modules/calendar_new/app/assets/javascripts/calendar.js b/vendor/built_in_modules/calendar_new/app/assets/javascripts/calendar.js deleted file mode 100644 index 526bec39..00000000 --- a/vendor/built_in_modules/calendar_new/app/assets/javascripts/calendar.js +++ /dev/null @@ -1,688 +0,0 @@ -var Calendar = function(dom){ - - c = this; - this.create_event_btn = $("#create_event_btn"); - this.event_create_space = $("#event_create_space"); - this.title = $("#current_title"); - this.calendar = $(dom); - this.nextBtn = $("#next_month_btn"); - this.prevBtn = $("#prev_month_btn"); - this.todayBtn = $("#today_btn"); - this.modeBtns = $(".calendar_mode button"); - this.refreshBtn = $("#refresh_btn"); - this.dialog = new EventDialog(c); - this.loading = $('#calendar-loading'); - this.success_event = null; - this.agenda_space = $("#calendar_agenda"); - this.currentView = "month"; - this.navigation = $("#navigation"); - this.rangeSelection = $("#range_selection"); - var agendaView = new AgendaView(c); - var loadeventsonviewchange = false; - - this.initialize = function(){ - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); - var change_event = function(_event, delta) { - _event.end = (_event.end ? _event.end : _event.start); - var s = $.fullCalendar.parseDate(c.calendar.find(".fc-view table tbody td:first").data("date")); - var e = $.fullCalendar.parseDate(c.calendar.find(".fc-view table tbody td:first").data("date")); - $.ajax({ - url: "/panel/calendar_new/back_end/events/"+_event.id+'.json', - data: {event:{id:_event.id,start:_event.start,end: _event.end,_s:Math.round(+s / 1000), _e:Math.round(+e / 1000)}}, - type: 'put' , - datatype: 'JSON', - error: function(jqXHR, textStatus, errorThrown) {}, - success: function(data) { - console.log('event was success updated'); - } - }); - } - var success_event = function(data,allDay,type){ - c.event_create_space.html(data).show(); - var dtpick = $('.datetimepick'); - var pickers = new Array(); - var checked = ($("#all_day_check").is(":checked") ? true : false); - var checked_function = function(c){ - if(c){ - for(i in pickers){ - var input = pickers[i].find("input"); - input.val(input.val().split(" ")[0]); - } - }else{ - for(i in pickers){ - var d = new Date(); - var input = pickers[i].find("input"); - if(input.val()) - input.val(input.val() + " " + d.getHours() + ":" + d.getMinutes()); - } - } - } - var repeat_function = function(){ - if(c.event_create_space.find("#event_period").val() == c.event_create_space.find("#event_period option:eq(0)").val()){ - c.event_create_space.find("#event_frequency").attr("disabled","disabled"); - }else{ - c.event_create_space.find("#event_frequency").removeAttr("disabled"); - } - } - dtpick.each(function() { - var $data = $(this).data(); - var options = { - format: $data.dateFormat, - pickTime: $data.picktime, - language: $data.language, - place: "top" - } - pickers.push( - $(this).datetimepicker(options) - ); - }); - $("a.btn-close").one("click",function(){ - c.event_create_space.html("").hide(); - return false; - }); - $("#all_day_check").click(function(){ - if($(this).is(":checked")){ - checked = true; - }else{ - checked = false; - } - checked_function(checked); - }); - $("#recurring_checkbox").click(function(){ - if($(this).is(":checked")) - $("#recurring_panel").show(); - else - $("#recurring_panel").hide(); - - }) - $('form[data-remote]').bind("ajax:success",function(evt, data, status){ - c.event_create_space.html("").hide(); - if(type == "new") - c.renderEvent(data); - if(type == "edit") - c.calendar.fullCalendar("refetchEvents"); - }); - c.event_create_space.find("#event_period").change(function(){ - repeat_function(); - }) - for(i in pickers){ - pickers[i].on("changeDate",function(e){ - if(checked){ - var input = $(this).find("input"); - input.val(input.val().split(" ")[0]); - } - }) - } - repeat_function(); - if(allDay) - checked_function(checked); - } - c.success_event = success_event; - var dview = (c.currentView == "agenda" ? "month" : c.currentView); - c.calendar.fullCalendar({ - editable: true, - selectable: true, - events: "/panel/calendar_new/back_end/events/", - eventResize: change_event, - eventDrop: change_event , - header: false, - default: dview, - height: $("body").height() - 141, - loading: function(bool) { - if (bool) c.loading.css("left",($(window).width()/2 - 60) + "px").show(); - else c.loading.hide(); - }, - windowResize : function(view){ - view.setHeight($("body").height() - 141); - c.calendar.fullCalendar("refetchEvents"); - }, - viewDisplay: function(view) { - c.title.html(view.title); - }, - eventClick: function(calEvent, e, view) { - c.dialog.dismiss(); - c.dialog.inflate(calEvent); - c.dialog.show({"x":e.originalEvent.clientX,"y":e.originalEvent.clientY}); - }, - select : function(startDate, endDate, allDay, jsEvent, view){ - var start = new Date(startDate), - end = new Date(endDate), - startString = start.getFullYear() + "/"+ (start.getMonth() + 1 > 9 ? start.getMonth() + 1 : "0" + (start.getMonth() + 1)) + "/" + (start.getDate() > 9 ? start.getDate() : "0" + start.getDate()), - endString = end.getFullYear() + "/" + (end.getMonth() + 1 > 9 ? end.getMonth() + 1 : "0" + (end.getMonth() + 1)) + "/" + (end.getDate() > 9 ? end.getDate() : "0" + end.getDate()); - - if(!allDay){ - startString += " " + (start.getHours() > 9 ? start.getHours() : "0" + start.getHours()) + ":" + (start.getMinutes() > 9 ? start.getMinutes() : "0" + start.getMinutes()); - endString += " " + (end.getHours() > 9 ? end.getHours() : "0" + end.getHours()) + ":" + (end.getMinutes() > 9 ? end.getMinutes() : "0" + end.getMinutes()); - }else{ - startString += " " + start.getHours() + ":" + start.getMinutes(); - endString += " " + end.getMinutes() + ":" + end.getMinutes(); - } - - $.ajax({ - type : "get", - url : c.create_event_btn.attr("href"), - data : {"startDate":startString,"endDate":endString,"allDay":allDay}, - success : function(data){ - success_event(data,allDay,"new"); - } - }) - } - }); - c.create_event_btn.click(function(){ - if(!c.isFormVisible()){ - - $.ajax({ - type : "get", - url : $(this).attr("href"), - success : function(data){ - success_event(data,false,"new"); - } - }) - } - return false; - }); - c.nextBtn.click(function(){ - c.dialog.dismiss(); - c.calendar.fullCalendar('next'); - }); - c.prevBtn.click(function(){ - c.dialog.dismiss(); - c.calendar.fullCalendar('prev'); - }); - c.todayBtn.click(function(){ - c.dialog.dismiss(); - c.calendar.fullCalendar('today'); - }); - c.modeBtns.click(function(){ - c.dialog.dismiss(); - toggleViews($(this).data("mode")); - }); - c.refreshBtn.click(function(){ - c.dialog.dismiss(); - if(c.currentView == "agenda") - agendaView.refresh(); - else - c.calendar.fullCalendar("refetchEvents"); - }); - - var toggleViews = function(view){ - c.modeBtns.removeClass("active"); - c.modeBtns.each(function(){ - if ($(this).data("mode") == view) - $(this).addClass("active"); - }) - if(view != "agenda"){ - if(c.currentView == "agenda"){ - $("#sec1").addClass("span3").removeClass("span7"); - $("#sec2").show(); - $("#sec3").addClass("span4").removeClass("span5"); - agendaView.hide(); - } - c.calendar.fullCalendar('changeView',view); - }else{ - $("#sec1").addClass("span7").removeClass("span3"); - $("#sec2").hide(); - $("#sec3").addClass("span5").removeClass("span4"); - agendaView.inflate(); - } - c.currentView = view; - if(loadeventsonviewchange){ - c.calendar.fullCalendar("refetchEvents"); - loadeventsonviewchange = false; - } - } - if(c.currentView == "agenda"){toggleViews("agenda");loadeventsonviewchange = true;} - $(document).on("DOMMouseScroll mousewheel", function(e){ - if(c.calendar.fullCalendar("getView").name == "month"){ - if(!c.isFormVisible()){ - c.dialog.dismiss(); - if(/Firefox/i.test(navigator.userAgent)){ - if(e.originalEvent.detail == 1){ - c.calendar.fullCalendar('next'); - }else if(e.originalEvent.detail == -1){ - c.calendar.fullCalendar('prev'); - } - }else{ - if(e.originalEvent.wheelDelta /120 > 0) - c.calendar.fullCalendar('prev'); - else - c.calendar.fullCalendar('next'); - } - } - } - }); - - } - - this.isFormVisible = function(){ - return (c.event_create_space.html() == "" ? false : true); - } - - this.renderEvent = function(eventStick){ - if(eventStick.recurring == true) - c.calendar.fullCalendar("refetchEvents"); - else - c.calendar.fullCalendar("renderEvent",eventStick); - } - - this.updateEvent = function(eventStick){ - c.calendar.fullCalendar("updateEvent",eventStick); - } - - this.deleteEvent = function(delete_url,_id){ - $.ajax({ - type : "delete", - url : delete_url, - success : function(){ - c.calendar.fullCalendar("removeEvents",[_id]); - c.dialog.dismiss(); - } - }) - } - - this.editEvent = function(edit_url,allDay){ - console.log(edit_url); - $.ajax({ - type : "get", - url : edit_url, - success : function(data){ - c.success_event(data,allDay,"edit"); - c.dialog.dismiss(); - } - }) - } - - $(document).ready(function() { - c.initialize(); - }); -} - -var EventDialog = function(calendar,event){ - _t = this; - var event_quick_view = null; - var template = ""; - var _this_event = null; - this.inflate = function(_event){ - if(!_event) throw new UserException("EventStick can't be null!"); - _this_event = _event; - var start_time = "", - end_time = "", - time_string = null; - - if(_event.allDay){ - start_time = (/00:00:00/i.test(_event._start.toLocaleString()) ? $.fullCalendar.formatDate(_event._start,"ddd MMM dd, yyyy") : $.fullCalendar.formatDate(_event._start,"ddd MMM dd, yyyy hh:mm")); - if(_event._end) - end_time = (/00:00:00/i.test(_event._end.toLocaleString()) ? $.fullCalendar.formatDate(_event._end,"ddd MMM dd, yyyy") : $.fullCalendar.formatDate(_event._end,"ddd MMM dd, yyyy hh:mm")); - time_string = (_event._start === _event._end || !_event._end ? start_time : start_time + " - " + end_time); - }else{ - var reg = new RegExp(/ [0-9][0-9]:[0-9][0-9]:[0-9][0-9]/), - stime = _event._start.toLocaleString().match(reg).toString(), - etime = _event._end.toLocaleString().match(reg).toString(); - - start_time = _event._start.toLocaleString().replace(stime,","); - end_time = _event._end.toLocaleString().replace(etime,","); - - stime = stime.substr(0,stime.length - 3); - etime = etime.substr(0,etime.length - 3); - - time_string = (start_time === end_time ? start_time + " " + stime + " - " + etime : start_time + " " + stime + " - " + end_time + " " +etime ); - } - event_quick_view = $(''); - template = ''; - } - - this.show = function(pos){ - if(pos){ - var pos = getPosition(pos); - event_quick_view.css({"left":pos.x+"px","top":pos.y+"px"}); - } - event_quick_view.html(template).appendTo("body").show(); - event_quick_view.find(".event-close-btn").one("click",function(){_t.dismiss();}); - event_quick_view.find("a.delete").one("click",function(){calendar.deleteEvent(_this_event.delete_url,_this_event._id);return false;}); - event_quick_view.find("a.edit").one("click",function(){calendar.editEvent(_this_event.edit_url,_this_event.allDay);return false;}); - } - - this.dismiss = function(){ - if(event_quick_view) - event_quick_view.remove(); - } - - var getPosition = function(pos){ - var x = pos.x, - y = pos.y, - winheight = $(window).height(); - if((x + event_quick_view.width()) > $(window).width()){ - x = x - event_quick_view.width(); - } - if((y + event_quick_view.height()) > winheight){ - y = y - event_quick_view.height(); - } - return {"x":x,"y":y}; - } - - if(event) - _t.inflate(event); -} - -var UserException = function(message) { - this.message = message; - this.name = "UserException"; - this.toString = function(){ - return this.message; - } -} - -var AgendaView = function(calendar){ - var av = this; - var _calendar = calendar; - var agenda_space = _calendar.agenda_space; - var today = new Date(); - var minDifference = 6; - var start_month = today.getMonth(); - var start_year = today.getFullYear(); - var end_month = ((start_month + minDifference) > 11 ? (start_month + minDifference) - 11 : start_month + minDifference); - var end_year = ((start_month + minDifference) > 11 ? start_year+1 : start_year); - var monthNames = ['January','February','March','April','May','June','July','August','September','October','November','December']; - var month_template = '

    SunMonTueWedThuFriSat
    '; - - var event_list_template = '
    No events for this month.
    '; - - var head_template = '
    '; - - var event_template = "
    "; - - var cache = false; - var show_event_clicked = false; - - this.refresh = function(){ - av.inflate(true); - } - - this.inflate = function(forceInflation){ - loading(true); - _calendar.calendar.hide(); - _calendar.navigation.hide(); - - if(!forceInflation){ - if(cache){ - av.show(); - loading(false); - return; - } - } - - agenda_space.empty(); - if(!show_event_clicked){ - _calendar.rangeSelection.empty(); - _calendar.rangeSelection.append(renderHead().html()).show(); - _calendar.rangeSelection.find("button#show_events").click(function(){ - show_event_clicked = true; - start_month = parseInt($("select[name=start_month]").val()); - end_month = parseInt($("select[name=end_month]").val()); - start_year = parseInt($("select[name=start_year]").val()); - end_year = parseInt($("select[name=end_year]").val()); - av.inflate(true); - }) - } - show_event_clicked = false; - eventsManager(); - var s = start_month, - e = end_month - y = start_year; - e = (e > s && start_year == end_year? e : e + 11); - if(end_year > start_year) - e = e + ((end_year - start_year -1) * 12); - else e--; - for(var i = s;i <= e+1; i++){ - var m = new Month(s,y); - s++; - if(s > 11){ - s = 0; - y++; - } - if(e == 0) - agenda_space.text("Invalid Range of Dates.") - else - agenda_space.append(m.monthDom); - } - - loading(false); - } - - this.hide = function(){ - cache = true; - _calendar.rangeSelection.hide(); - agenda_space.hide(); - _calendar.navigation.show(); - _calendar.calendar.show(); - } - - this.show = function(){ - _calendar.rangeSelection.show(); - agenda_space.show(); - } - var copyObject = function(x){ - return x.clone(); - } - var eventsManager = function(){ - var url = "/panel/calendar_new/back_end/events/agenda", - sd = new Date(start_year,start_month,1), - ed = new Date(end_year,end_month+1,0); - $.ajax({ - type : "get", - url : url, - data : {"agenda_start":sd.toLocaleString(),"agenda_end":ed.toLocaleString()}, - success : function(events){ - $.each(events,function(i,e){ - var ed = eventDom(e), - s = new Date(e.start), - e = new Date(e.end), - e_m = ((e.getMonth() > s.getMonth() || s.getMonth() == e.getMonth()) && s.getFullYear() == e.getFullYear() ? e.getMonth() : e.getMonth() + 12) - s_m = s.getMonth(), - s_y = s.getFullYear(); - if(e.getFullYear() > s.getFullYear()) - e_m = e_m + ((e.getFullYear() - s.getFullYear() -1) * 12); - for(var i = s_m; i < e_m + 1; i++){ - var temp_ed = copyObject(ed); - var list = agenda_space.find("div[data-month="+s_m+"][data-year="+s_y+"] table.event_list tbody"); - list.append(temp_ed); - s_m++; - if(s_m > 11){ - s_m = 0; - s_y++; - } - } - if(s.getDate() == e.getDate() && s.getMonth() == s.getMonth() && e.getFullYear() == e.getFullYear()){ - var td = agenda_space.find("td[data-date-node="+s.getDate()+"-"+s.getMonth()+"-"+s.getFullYear()+"]"); - td.addClass("has_event"); - }else{ - var timeDiff = Math.abs(e.getTime() - s.getTime()), - diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24)), - c_m = s.getMonth(), - c_d = s.getDate(), - c_y = s.getFullYear(), - end_of_c_month = new Date(s.getFullYear(),s.getMonth()+1,0).getDate(); - - for(var i = 0; i <= diffDays; i++){ - var td = agenda_space.find("td[data-date-node="+c_d+"-"+c_m+"-"+c_y+"]"); - td.addClass("has_event"); - c_d++; - if(c_d > end_of_c_month){ - c_d = 1; - c_m++; - if(c_m > 11){ - c_m = 0; - c_y++; - } - } - } - } - }) - agenda_space.find("table.event_list tbody").each(function(){ - if($(this).find("tr").length > 1) - $(this).find("td.no_events").parent().remove(); - }) - } - }) - var eventDom = function(event){ - var e_t = $(event_template), - s = new Date(event.start), - e = new Date(event.end), - dateFormat = ""; - if(s.getDate() == e.getDate() && s.getMonth() == s.getMonth() && e.getFullYear() == e.getFullYear()) - dateFormat = $.fullCalendar.formatDate(s, "ddd dd"); - else - dateFormat = $.fullCalendar.formatDates(s, e, "ddd dd, MMM - {ddd dd, MMM}"); - e_t.find("th").text(dateFormat); - e_t.find("td.event_time").text((event.allDay ? "All Day" : $.fullCalendar.formatDate(s, "hh:mm"))); - e_t.find("div.event").text(event.title).css("color",event.color); - return e_t; - } - - } - - var loading = function(bool) { - if (bool) _calendar.loading.css("left",($(window).width()/2 - 60) + "px").show(); - else _calendar.loading.hide(); - } - - var renderHead = function(){ - var head = $(head_template); - var start_month_select = head.find("select[name=start_month]"); - for(var i = 0; i < 12; i++){ - var option = $(""); - if(i == start_month) - option.attr("selected","selected"); - start_month_select.append(option); - } - var end_month_select = head.find("select[name=end_month]"); - for(var i = 0; i < 12; i++){ - var option = $(""); - if(i == end_month) - option.attr("selected","selected"); - end_month_select.append(option); - } - - var start_year_select = head.find("select[name=start_year]"); - var y = start_year - 5; - for(var i = 0; i < 10; i++){ - var option = $(""); - if(y == start_year) - option.attr("selected","selected"); - start_year_select.append(option); - y++; - } - var end_year_select = head.find("select[name=end_year]"); - y = start_year - 5; - for(var i = 0; i < 10; i++){ - var option = $(""); - if(y == end_year) - option.attr("selected","selected"); - end_year_select.append(option); - y++; - } - return head; - } - - var Month = function(month,year){ - _this = this; - this.monthDom = $("
    "); - var template = $(month_template); - var list_template = $(event_list_template); - var firstDay = new Date(year,month,1); - var lastDay = new Date(year,month+1,0); - - var last_inserted_date = 1; - - var renderMonth = function(){ - for(var i = 0; i < 5; i++){ - var tr = null; - if(i == 0) - tr = makeRow("first"); - else if(i == 4){ - tr = makeRow("last"); - }else{ - tr = makeRow("middle"); - } - template.find("table.table tbody").append(tr); - template.find("h4").text(monthNames[firstDay.getMonth()] + " - " + firstDay.getFullYear()); - } - _this.monthDom.append(template); - _this.monthDom.append(list_template); - } - - var makeRow = function(position){ - var row = $(""); - switch (position){ - case "first": - for(var i = 0;i < 7;i++){ - var td = $(""); - if(i >= firstDay.getDay()){ - td.text(last_inserted_date); - td.attr("data-date-node",last_inserted_date+"-"+firstDay.getMonth()+"-"+firstDay.getFullYear()); - last_inserted_date++; - } - row.append(td); - } - break; - case "middle": - for(var i = 0;i < 7;i++){ - var td = $(""); - td.text(last_inserted_date); - td.attr("data-date-node",last_inserted_date+"-"+firstDay.getMonth()+"-"+firstDay.getFullYear()); - last_inserted_date++; - row.append(td); - } - break; - case "last": - for(var i = 0;i < 7;i++){ - var td = $(""); - if(i <= lastDay.getDay()){ - td.text(last_inserted_date); - td.attr("data-date-node",last_inserted_date+"-"+firstDay.getMonth()+"-"+firstDay.getFullYear()); - last_inserted_date++; - } - row.append(td); - } - break; - } - return row; - } - - renderMonth(); - } - -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/built_in_modules/calendar_new/app/assets/javascripts/calendar/.gitkeep b/vendor/built_in_modules/calendar_new/app/assets/javascripts/calendar/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/calendar_new/app/assets/javascripts/calendar/application.js b/vendor/built_in_modules/calendar_new/app/assets/javascripts/calendar/application.js deleted file mode 100644 index 00811612..00000000 --- a/vendor/built_in_modules/calendar_new/app/assets/javascripts/calendar/application.js +++ /dev/null @@ -1,42 +0,0 @@ -//= require_tree . -//= require fullcalendar - -$(document).ready(function() { - - - var date = new Date(); - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); - change_event = function(_event, delta) { - console.log("evento" + _event.id); - $.ajax({ - url: "events/"+_event.id+'.json', - data: {event:{id:_event.id,start:_event.start,end: _event.end}}, - method: 'PUT' , - datatype: 'JSON', - error: function(jqXHR, textStatus, errorThrown) { - console.log(textStatus); - }, - success: function(data) { - console.log('event was success updated'); - } - }); - } - $('#calendar').fullCalendar({ - header: { - left: 'prev,next today', - center: 'title', - right: 'month,agendaWeek,agendaDay' - }, - editable: true, - events: "events/", - eventResize: change_event, - eventDrop: change_event , - - loading: function(bool) { - if (bool) $('#loading').show(); - else $('#loading').hide(); - } - }); -}); diff --git a/vendor/built_in_modules/calendar_new/app/assets/javascripts/date.time.picker.js b/vendor/built_in_modules/calendar_new/app/assets/javascripts/date.time.picker.js deleted file mode 100644 index 0308b3e8..00000000 --- a/vendor/built_in_modules/calendar_new/app/assets/javascripts/date.time.picker.js +++ /dev/null @@ -1,17 +0,0 @@ -!function ($) { - $.fn.datetimepick = function() { - var $this = this, - $data = $this.data(); - $this.datetimepicker({ - format: $data.dateFormat, - pickTime: $data.picktime, - language: $data.language, - }); - } -}(window.jQuery); - -$(function(){ - $('.datetimepick').each(function() { - $(this).datetimepick(); - }); -}); \ No newline at end of file diff --git a/vendor/built_in_modules/calendar_new/app/assets/javascripts/fullcalendar.js b/vendor/built_in_modules/calendar_new/app/assets/javascripts/fullcalendar.js deleted file mode 100644 index e514e6ea..00000000 --- a/vendor/built_in_modules/calendar_new/app/assets/javascripts/fullcalendar.js +++ /dev/null @@ -1,5380 +0,0 @@ -/*! - * FullCalendar v1.6.1 - * Docs & License: http://arshaw.com/fullcalendar/ - * (c) 2013 Adam Shaw - */ - -/* - * Use fullcalendar.css for basic styling. - * For event drag & drop, requires jQuery UI draggable. - * For event resizing, requires jQuery UI resizable. - */ - -(function($, undefined) { - - -;; - -var defaults = { - - // display - defaultView: 'month', - aspectRatio: 1.35, - header: { - left: 'title', - center: '', - right: 'today prev,next' - }, - weekends: true, - weekNumbers: false, - weekNumberCalculation: 'iso', - weekNumberTitle: 'W', - - // editing - //editable: false, - //disableDragging: false, - //disableResizing: false, - - allDayDefault: true, - ignoreTimezone: true, - - // event ajax - lazyFetching: true, - startParam: 'start', - endParam: 'end', - - // time formats - titleFormat: { - month: 'MMMM yyyy', - week: "MMM d[ yyyy]{ '—'[ MMM] d yyyy}", - day: 'dddd, MMM d, yyyy' - }, - columnFormat: { - month: 'ddd', - week: 'ddd M/d', - day: 'dddd M/d' - }, - timeFormat: { // for event elements - '': 'h(:mm)t' // default - }, - - // locale - isRTL: false, - firstDay: 0, - monthNames: ['January','February','March','April','May','June','July','August','September','October','November','December'], - monthNamesShort: ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'], - dayNames: ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'], - dayNamesShort: ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'], - buttonText: { - prev: "", - next: "", - prevYear: "«", - nextYear: "»", - today: 'today', - month: 'month', - week: 'week', - day: 'day' - }, - - // jquery-ui theming - theme: false, - buttonIcons: { - prev: 'circle-triangle-w', - next: 'circle-triangle-e' - }, - - //selectable: false, - unselectAuto: true, - - dropAccept: '*' - -}; - -// right-to-left defaults -var rtlDefaults = { - header: { - left: 'next,prev today', - center: '', - right: 'title' - }, - buttonText: { - prev: "", - next: "", - prevYear: "»", - nextYear: "«" - }, - buttonIcons: { - prev: 'circle-triangle-e', - next: 'circle-triangle-w' - } -}; - - - -;; - -var fc = $.fullCalendar = { version: "1.6.1" }; -var fcViews = fc.views = {}; - - -$.fn.fullCalendar = function(options) { - - - // method calling - if (typeof options == 'string') { - var args = Array.prototype.slice.call(arguments, 1); - var res; - this.each(function() { - var calendar = $.data(this, 'fullCalendar'); - if (calendar && $.isFunction(calendar[options])) { - var r = calendar[options].apply(calendar, args); - if (res === undefined) { - res = r; - } - if (options == 'destroy') { - $.removeData(this, 'fullCalendar'); - } - } - }); - if (res !== undefined) { - return res; - } - return this; - } - - - // would like to have this logic in EventManager, but needs to happen before options are recursively extended - var eventSources = options.eventSources || []; - delete options.eventSources; - if (options.events) { - eventSources.push(options.events); - delete options.events; - } - - - options = $.extend(true, {}, - defaults, - (options.isRTL || options.isRTL===undefined && defaults.isRTL) ? rtlDefaults : {}, - options - ); - - - this.each(function(i, _element) { - var element = $(_element); - var calendar = new Calendar(element, options, eventSources); - element.data('fullCalendar', calendar); // TODO: look into memory leak implications - calendar.render(); - }); - - - return this; - -}; - - -// function for adding/overriding defaults -function setDefaults(d) { - $.extend(true, defaults, d); -} - - - -;; - - -function Calendar(element, options, eventSources) { - var t = this; - - - // exports - t.options = options; - t.render = render; - t.destroy = destroy; - t.refetchEvents = refetchEvents; - t.reportEvents = reportEvents; - t.reportEventChange = reportEventChange; - t.rerenderEvents = rerenderEvents; - t.changeView = changeView; - t.select = select; - t.unselect = unselect; - t.prev = prev; - t.next = next; - t.prevYear = prevYear; - t.nextYear = nextYear; - t.today = today; - t.gotoDate = gotoDate; - t.incrementDate = incrementDate; - t.formatDate = function(format, date) { return formatDate(format, date, options) }; - t.formatDates = function(format, date1, date2) { return formatDates(format, date1, date2, options) }; - t.getDate = getDate; - t.getView = getView; - t.option = option; - t.trigger = trigger; - - - // imports - EventManager.call(t, options, eventSources); - var isFetchNeeded = t.isFetchNeeded; - var fetchEvents = t.fetchEvents; - - - // locals - var _element = element[0]; - var header; - var headerElement; - var content; - var tm; // for making theme classes - var currentView; - var viewInstances = {}; - var elementOuterWidth; - var suggestedViewHeight; - var absoluteViewElement; - var resizeUID = 0; - var ignoreWindowResize = 0; - var date = new Date(); - var events = []; - var _dragElement; - - - - /* Main Rendering - -----------------------------------------------------------------------------*/ - - - setYMD(date, options.year, options.month, options.date); - - - function render(inc) { - if (!content) { - initialRender(); - }else{ - calcSize(); - markSizesDirty(); - markEventsDirty(); - renderView(inc); - } - } - - - function initialRender() { - tm = options.theme ? 'ui' : 'fc'; - element.addClass('fc'); - if (options.isRTL) { - element.addClass('fc-rtl'); - } - else { - element.addClass('fc-ltr'); - } - if (options.theme) { - element.addClass('ui-widget'); - } - content = $("
    ") - .prependTo(element); - header = new Header(t, options); - headerElement = header.render(); - if (headerElement) { - element.prepend(headerElement); - } - changeView(options.defaultView); - $(window).resize(windowResize); - // needed for IE in a 0x0 iframe, b/c when it is resized, never triggers a windowResize - if (!bodyVisible()) { - lateRender(); - } - } - - - // called when we know the calendar couldn't be rendered when it was initialized, - // but we think it's ready now - function lateRender() { - setTimeout(function() { // IE7 needs this so dimensions are calculated correctly - if (!currentView.start && bodyVisible()) { // !currentView.start makes sure this never happens more than once - renderView(); - } - },0); - } - - - function destroy() { - $(window).unbind('resize', windowResize); - header.destroy(); - content.remove(); - element.removeClass('fc fc-rtl ui-widget'); - } - - - - function elementVisible() { - return _element.offsetWidth !== 0; - } - - - function bodyVisible() { - return $('body')[0].offsetWidth !== 0; - } - - - - /* View Rendering - -----------------------------------------------------------------------------*/ - - // TODO: improve view switching (still weird transition in IE, and FF has whiteout problem) - - function changeView(newViewName) { - if (!currentView || newViewName != currentView.name) { - ignoreWindowResize++; // because setMinHeight might change the height before render (and subsequently setSize) is reached - - unselect(); - - var oldView = currentView; - var newViewElement; - - if (oldView) { - (oldView.beforeHide || noop)(); // called before changing min-height. if called after, scroll state is reset (in Opera) - setMinHeight(content, content.height()); - oldView.element.hide(); - }else{ - setMinHeight(content, 1); // needs to be 1 (not 0) for IE7, or else view dimensions miscalculated - } - content.css('overflow', 'hidden'); - - currentView = viewInstances[newViewName]; - if (currentView) { - currentView.element.show(); - }else{ - currentView = viewInstances[newViewName] = new fcViews[newViewName]( - newViewElement = absoluteViewElement = - $("
    ") - .appendTo(content), - t // the calendar object - ); - } - - if (oldView) { - header.deactivateButton(oldView.name); - } - header.activateButton(newViewName); - - renderView(); // after height has been set, will make absoluteViewElement's position=relative, then set to null - - content.css('overflow', ''); - if (oldView) { - setMinHeight(content, 1); - } - - if (!newViewElement) { - (currentView.afterShow || noop)(); // called after setting min-height/overflow, so in final scroll state (for Opera) - } - - ignoreWindowResize--; - } - } - - - - function renderView(inc) { - if (elementVisible()) { - ignoreWindowResize++; // because renderEvents might temporarily change the height before setSize is reached - - unselect(); - - if (suggestedViewHeight === undefined) { - calcSize(); - } - - var forceEventRender = false; - if (!currentView.start || inc || date < currentView.start || date >= currentView.end) { - // view must render an entire new date range (and refetch/render events) - currentView.render(date, inc || 0); // responsible for clearing events - setSize(true); - forceEventRender = true; - } - else if (currentView.sizeDirty) { - // view must resize (and rerender events) - currentView.clearEvents(); - setSize(); - forceEventRender = true; - } - else if (currentView.eventsDirty) { - currentView.clearEvents(); - forceEventRender = true; - } - currentView.sizeDirty = false; - currentView.eventsDirty = false; - updateEvents(forceEventRender); - - elementOuterWidth = element.outerWidth(); - - header.updateTitle(currentView.title); - var today = new Date(); - if (today >= currentView.start && today < currentView.end) { - header.disableButton('today'); - }else{ - header.enableButton('today'); - } - - ignoreWindowResize--; - currentView.trigger('viewDisplay', _element); - } - } - - - - /* Resizing - -----------------------------------------------------------------------------*/ - - - function updateSize() { - markSizesDirty(); - if (elementVisible()) { - calcSize(); - setSize(); - unselect(); - currentView.clearEvents(); - currentView.renderEvents(events); - currentView.sizeDirty = false; - } - } - - - function markSizesDirty() { - $.each(viewInstances, function(i, inst) { - inst.sizeDirty = true; - }); - } - - - function calcSize() { - if (options.contentHeight) { - suggestedViewHeight = options.contentHeight; - } - else if (options.height) { - suggestedViewHeight = options.height - (headerElement ? headerElement.height() : 0) - vsides(content); - } - else { - suggestedViewHeight = Math.round(content.width() / Math.max(options.aspectRatio, .5)); - } - } - - - function setSize(dateChanged) { // todo: dateChanged? - ignoreWindowResize++; - currentView.setHeight(suggestedViewHeight, dateChanged); - if (absoluteViewElement) { - absoluteViewElement.css('position', 'relative'); - absoluteViewElement = null; - } - currentView.setWidth(content.width(), dateChanged); - ignoreWindowResize--; - } - - - function windowResize() { - if (!ignoreWindowResize) { - if (currentView.start) { // view has already been rendered - var uid = ++resizeUID; - setTimeout(function() { // add a delay - if (uid == resizeUID && !ignoreWindowResize && elementVisible()) { - if (elementOuterWidth != (elementOuterWidth = element.outerWidth())) { - ignoreWindowResize++; // in case the windowResize callback changes the height - updateSize(); - currentView.trigger('windowResize', _element); - ignoreWindowResize--; - } - } - }, 200); - }else{ - // calendar must have been initialized in a 0x0 iframe that has just been resized - lateRender(); - } - } - } - - - - /* Event Fetching/Rendering - -----------------------------------------------------------------------------*/ - - - // fetches events if necessary, rerenders events if necessary (or if forced) - function updateEvents(forceRender) { - if (!options.lazyFetching || isFetchNeeded(currentView.visStart, currentView.visEnd)) { - refetchEvents(); - } - else if (forceRender) { - rerenderEvents(); - } - } - - - function refetchEvents() { - fetchEvents(currentView.visStart, currentView.visEnd); // will call reportEvents - } - - - // called when event data arrives - function reportEvents(_events) { - events = _events; - rerenderEvents(); - } - - - // called when a single event's data has been changed - function reportEventChange(eventID) { - rerenderEvents(eventID); - } - - - // attempts to rerenderEvents - function rerenderEvents(modifiedEventID) { - markEventsDirty(); - if (elementVisible()) { - currentView.clearEvents(); - currentView.renderEvents(events, modifiedEventID); - currentView.eventsDirty = false; - } - } - - - function markEventsDirty() { - $.each(viewInstances, function(i, inst) { - inst.eventsDirty = true; - }); - } - - - - /* Selection - -----------------------------------------------------------------------------*/ - - - function select(start, end, allDay) { - currentView.select(start, end, allDay===undefined ? true : allDay); - } - - - function unselect() { // safe to be called before renderView - if (currentView) { - currentView.unselect(); - } - } - - - - /* Date - -----------------------------------------------------------------------------*/ - - - function prev() { - renderView(-1); - } - - - function next() { - renderView(1); - } - - - function prevYear() { - addYears(date, -1); - renderView(); - } - - - function nextYear() { - addYears(date, 1); - renderView(); - } - - - function today() { - date = new Date(); - renderView(); - } - - - function gotoDate(year, month, dateOfMonth) { - if (year instanceof Date) { - date = cloneDate(year); // provided 1 argument, a Date - }else{ - setYMD(date, year, month, dateOfMonth); - } - renderView(); - } - - - function incrementDate(years, months, days) { - if (years !== undefined) { - addYears(date, years); - } - if (months !== undefined) { - addMonths(date, months); - } - if (days !== undefined) { - addDays(date, days); - } - renderView(); - } - - - function getDate() { - return cloneDate(date); - } - - - - /* Misc - -----------------------------------------------------------------------------*/ - - - function getView() { - return currentView; - } - - - function option(name, value) { - if (value === undefined) { - return options[name]; - } - if (name == 'height' || name == 'contentHeight' || name == 'aspectRatio') { - options[name] = value; - updateSize(); - } - } - - - function trigger(name, thisObj) { - if (options[name]) { - return options[name].apply( - thisObj || _element, - Array.prototype.slice.call(arguments, 2) - ); - } - } - - - - /* External Dragging - ------------------------------------------------------------------------*/ - - if (options.droppable) { - $(document) - .bind('dragstart', function(ev, ui) { - var _e = ev.target; - var e = $(_e); - if (!e.parents('.fc').length) { // not already inside a calendar - var accept = options.dropAccept; - if ($.isFunction(accept) ? accept.call(_e, e) : e.is(accept)) { - _dragElement = _e; - currentView.dragStart(_dragElement, ev, ui); - } - } - }) - .bind('dragstop', function(ev, ui) { - if (_dragElement) { - currentView.dragStop(_dragElement, ev, ui); - _dragElement = null; - } - }); - } - - -} - -;; - -function Header(calendar, options) { - var t = this; - - - // exports - t.render = render; - t.destroy = destroy; - t.updateTitle = updateTitle; - t.activateButton = activateButton; - t.deactivateButton = deactivateButton; - t.disableButton = disableButton; - t.enableButton = enableButton; - - - // locals - var element = $([]); - var tm; - - - - function render() { - tm = options.theme ? 'ui' : 'fc'; - var sections = options.header; - if (sections) { - element = $("") - .append( - $("") - .append(renderSection('left')) - .append(renderSection('center')) - .append(renderSection('right')) - ); - return element; - } - } - - - function destroy() { - element.remove(); - } - - - function renderSection(position) { - var e = $("" + - ""; - - if (showWeekNumbers) { - s += ""; - } - - for (i=0; i"; // fc- needed for setDayID - } - s += - "" + - "" + - "" + - "" + - "" + - ""; - for (i=0; i" + // fc- needed for setDayID - "
    " + - "
    " + - "
     
    " + - "
    " + - "
    " + - ""; - } - s += - "
    " + - "" + - "" + - "
    "); - var buttonStr = options.header[position]; - if (buttonStr) { - $.each(buttonStr.split(' '), function(i) { - if (i > 0) { - e.append(""); - } - var prevButton; - $.each(this.split(','), function(j, buttonName) { - console.log(buttonName); - if (buttonName == 'title') { - e.append("

     

    "); - if (prevButton) { - prevButton.addClass(tm + '-corner-right'); - } - prevButton = null; - }else{ - var buttonClick; - if (calendar[buttonName]) { - buttonClick = calendar[buttonName]; // calendar method - } - else if (fcViews[buttonName]) { - buttonClick = function() { - button.removeClass(tm + '-state-hover'); // forget why - calendar.changeView(buttonName); - }; - } - if (buttonClick) { - var icon = options.theme ? smartProperty(options.buttonIcons, buttonName) : null; // why are we using smartProperty here? - var text = smartProperty(options.buttonText, buttonName); // why are we using smartProperty here? - var button = $( - "" + - (icon ? - "" + - "" + - "" : - text - ) + - "" - ) - .click(function() { - if (!button.hasClass(tm + '-state-disabled')) { - buttonClick(); - } - }) - .mousedown(function() { - button - .not('.' + tm + '-state-active') - .not('.' + tm + '-state-disabled') - .addClass(tm + '-state-down'); - }) - .mouseup(function() { - button.removeClass(tm + '-state-down'); - }) - .hover( - function() { - button - .not('.' + tm + '-state-active') - .not('.' + tm + '-state-disabled') - .addClass(tm + '-state-hover'); - }, - function() { - button - .removeClass(tm + '-state-hover') - .removeClass(tm + '-state-down'); - } - ) - .appendTo(e); - disableTextSelection(button); - if (!prevButton) { - button.addClass(tm + '-corner-left'); - } - prevButton = button; - } - } - }); - if (prevButton) { - prevButton.addClass(tm + '-corner-right'); - } - }); - } - return e; - } - - - function updateTitle(html) { - element.find('h2') - .html(html); - } - - - function activateButton(buttonName) { - element.find('span.fc-button-' + buttonName) - .addClass(tm + '-state-active'); - } - - - function deactivateButton(buttonName) { - element.find('span.fc-button-' + buttonName) - .removeClass(tm + '-state-active'); - } - - - function disableButton(buttonName) { - element.find('span.fc-button-' + buttonName) - .addClass(tm + '-state-disabled'); - } - - - function enableButton(buttonName) { - element.find('span.fc-button-' + buttonName) - .removeClass(tm + '-state-disabled'); - } - - -} - -;; - -fc.sourceNormalizers = []; -fc.sourceFetchers = []; - -var ajaxDefaults = { - dataType: 'json', - cache: false -}; - -var eventGUID = 1; - - -function EventManager(options, _sources) { - var t = this; - - - // exports - t.isFetchNeeded = isFetchNeeded; - t.fetchEvents = fetchEvents; - t.addEventSource = addEventSource; - t.removeEventSource = removeEventSource; - t.updateEvent = updateEvent; - t.renderEvent = renderEvent; - t.removeEvents = removeEvents; - t.clientEvents = clientEvents; - t.normalizeEvent = normalizeEvent; - - - // imports - var trigger = t.trigger; - var getView = t.getView; - var reportEvents = t.reportEvents; - - - // locals - var stickySource = { events: [] }; - var sources = [ stickySource ]; - var rangeStart, rangeEnd; - var currentFetchID = 0; - var pendingSourceCnt = 0; - var loadingLevel = 0; - var cache = []; - - - for (var i=0; i<_sources.length; i++) { - _addEventSource(_sources[i]); - } - - - - /* Fetching - -----------------------------------------------------------------------------*/ - - - function isFetchNeeded(start, end) { - return !rangeStart || start < rangeStart || end > rangeEnd; - } - - - function fetchEvents(start, end) { - rangeStart = start; - rangeEnd = end; - cache = []; - var fetchID = ++currentFetchID; - var len = sources.length; - pendingSourceCnt = len; - for (var i=0; i)), return null instead - return null; -} - - -function parseISO8601(s, ignoreTimezone) { // ignoreTimezone defaults to false - // derived from http://delete.me.uk/2005/03/iso8601.html - // TODO: for a know glitch/feature, read tests/issue_206_parseDate_dst.html - var m = s.match(/^([0-9]{4})(-([0-9]{2})(-([0-9]{2})([T ]([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?(Z|(([-+])([0-9]{2})(:?([0-9]{2}))?))?)?)?)?$/); - if (!m) { - return null; - } - var date = new Date(m[1], 0, 1); - if (ignoreTimezone || !m[13]) { - var check = new Date(m[1], 0, 1, 9, 0); - if (m[3]) { - date.setMonth(m[3] - 1); - check.setMonth(m[3] - 1); - } - if (m[5]) { - date.setDate(m[5]); - check.setDate(m[5]); - } - fixDate(date, check); - if (m[7]) { - date.setHours(m[7]); - } - if (m[8]) { - date.setMinutes(m[8]); - } - if (m[10]) { - date.setSeconds(m[10]); - } - if (m[12]) { - date.setMilliseconds(Number("0." + m[12]) * 1000); - } - fixDate(date, check); - }else{ - date.setUTCFullYear( - m[1], - m[3] ? m[3] - 1 : 0, - m[5] || 1 - ); - date.setUTCHours( - m[7] || 0, - m[8] || 0, - m[10] || 0, - m[12] ? Number("0." + m[12]) * 1000 : 0 - ); - if (m[14]) { - var offset = Number(m[16]) * 60 + (m[18] ? Number(m[18]) : 0); - offset *= m[15] == '-' ? 1 : -1; - date = new Date(+date + (offset * 60 * 1000)); - } - } - return date; -} - - -function parseTime(s) { // returns minutes since start of day - if (typeof s == 'number') { // an hour - return s * 60; - } - if (typeof s == 'object') { // a Date object - return s.getHours() * 60 + s.getMinutes(); - } - var m = s.match(/(\d+)(?::(\d+))?\s*(\w+)?/); - if (m) { - var h = parseInt(m[1], 10); - if (m[3]) { - h %= 12; - if (m[3].toLowerCase().charAt(0) == 'p') { - h += 12; - } - } - return h * 60 + (m[2] ? parseInt(m[2], 10) : 0); - } -} - - - -/* Date Formatting ------------------------------------------------------------------------------*/ -// TODO: use same function formatDate(date, [date2], format, [options]) - - -function formatDate(date, format, options) { - return formatDates(date, null, format, options); -} - - -function formatDates(date1, date2, format, options) { - options = options || defaults; - var date = date1, - otherDate = date2, - i, len = format.length, c, - i2, formatter, - res = ''; - for (i=0; ii; i2--) { - if (formatter = dateFormatters[format.substring(i, i2)]) { - if (date) { - res += formatter(date, options); - } - i = i2 - 1; - break; - } - } - if (i2 == i) { - if (date) { - res += c; - } - } - } - } - return res; -}; - - -var dateFormatters = { - s : function(d) { return d.getSeconds() }, - ss : function(d) { return zeroPad(d.getSeconds()) }, - m : function(d) { return d.getMinutes() }, - mm : function(d) { return zeroPad(d.getMinutes()) }, - h : function(d) { return d.getHours() % 12 || 12 }, - hh : function(d) { return zeroPad(d.getHours() % 12 || 12) }, - H : function(d) { return d.getHours() }, - HH : function(d) { return zeroPad(d.getHours()) }, - d : function(d) { return d.getDate() }, - dd : function(d) { return zeroPad(d.getDate()) }, - ddd : function(d,o) { return o.dayNamesShort[d.getDay()] }, - dddd: function(d,o) { return o.dayNames[d.getDay()] }, - M : function(d) { return d.getMonth() + 1 }, - MM : function(d) { return zeroPad(d.getMonth() + 1) }, - MMM : function(d,o) { return o.monthNamesShort[d.getMonth()] }, - MMMM: function(d,o) { return o.monthNames[d.getMonth()] }, - yy : function(d) { return (d.getFullYear()+'').substring(2) }, - yyyy: function(d) { return d.getFullYear() }, - t : function(d) { return d.getHours() < 12 ? 'a' : 'p' }, - tt : function(d) { return d.getHours() < 12 ? 'am' : 'pm' }, - T : function(d) { return d.getHours() < 12 ? 'A' : 'P' }, - TT : function(d) { return d.getHours() < 12 ? 'AM' : 'PM' }, - u : function(d) { return formatDate(d, "yyyy-MM-dd'T'HH:mm:ss'Z'") }, - S : function(d) { - var date = d.getDate(); - if (date > 10 && date < 20) { - return 'th'; - } - return ['st', 'nd', 'rd'][date%10-1] || 'th'; - }, - w : function(d, o) { // local - return o.weekNumberCalculation(d); - }, - W : function(d) { // ISO - return iso8601Week(d); - } -}; -fc.dateFormatters = dateFormatters; - - -/* thanks jQuery UI (https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.datepicker.js) - * - * Set as calculateWeek to determine the week of the year based on the ISO 8601 definition. - * @param date Date - the date to get the week for - * @return number - the number of the week within the year that contains this date - */ -function iso8601Week(date) { - var time; - var checkDate = new Date(date.getTime()); - - // Find Thursday of this week starting on Monday - checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7)); - - time = checkDate.getTime(); - checkDate.setMonth(0); // Compare with Jan 1 - checkDate.setDate(1); - return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1; -} - - -;; - -fc.applyAll = applyAll; - - -/* Event Date Math ------------------------------------------------------------------------------*/ - - -function exclEndDay(event) { - if (event.end) { - return _exclEndDay(event.end, event.allDay); - }else{ - return addDays(cloneDate(event.start), 1); - } -} - - -function _exclEndDay(end, allDay) { - end = cloneDate(end); - return allDay || end.getHours() || end.getMinutes() ? addDays(end, 1) : clearTime(end); -} - - -function segCmp(a, b) { - return (b.msLength - a.msLength) * 100 + (a.event.start - b.event.start); -} - - -function segsCollide(seg1, seg2) { - return seg1.end > seg2.start && seg1.start < seg2.end; -} - - - -/* Event Sorting ------------------------------------------------------------------------------*/ - - -// event rendering utilities -function sliceSegs(events, visEventEnds, start, end) { - var segs = [], - i, len=events.length, event, - eventStart, eventEnd, - segStart, segEnd, - isStart, isEnd; - for (i=0; i start && eventStart < end) { - if (eventStart < start) { - segStart = cloneDate(start); - isStart = false; - }else{ - segStart = eventStart; - isStart = true; - } - if (eventEnd > end) { - segEnd = cloneDate(end); - isEnd = false; - }else{ - segEnd = eventEnd; - isEnd = true; - } - segs.push({ - event: event, - start: segStart, - end: segEnd, - isStart: isStart, - isEnd: isEnd, - msLength: segEnd - segStart - }); - } - } - return segs.sort(segCmp); -} - - -// event rendering calculation utilities -function stackSegs(segs) { - var levels = [], - i, len = segs.length, seg, - j, collide, k; - for (i=0; i=0; i--) { - res = obj[parts[i].toLowerCase()]; - if (res !== undefined) { - return res; - } - } - return obj['']; -} - - -function htmlEscape(s) { - return s.replace(/&/g, '&') - .replace(//g, '>') - .replace(/'/g, ''') - .replace(/"/g, '"') - .replace(/\n/g, '
    '); -} - - -function cssKey(_element) { - return _element.id + '/' + _element.className + '/' + _element.style.cssText.replace(/(^|;)\s*(top|left|width|height)\s*:[^;]*/ig, ''); -} - - -function disableTextSelection(element) { - element - .attr('unselectable', 'on') - .css('MozUserSelect', 'none') - .bind('selectstart.ui', function() { return false; }); -} - - -/* -function enableTextSelection(element) { - element - .attr('unselectable', 'off') - .css('MozUserSelect', '') - .unbind('selectstart.ui'); -} -*/ - - -function markFirstLast(e) { - e.children() - .removeClass('fc-first fc-last') - .filter(':first-child') - .addClass('fc-first') - .end() - .filter(':last-child') - .addClass('fc-last'); -} - - -function setDayID(cell, date) { - cell.each(function(i, _cell) { - _cell.className = _cell.className.replace(/^fc-\w*/, 'fc-' + dayIDs[date.getDay()]); - // TODO: make a way that doesn't rely on order of classes - }); -} - - -function getSkinCss(event, opt) { - var source = event.source || {}; - var eventColor = event.color; - var sourceColor = source.color; - var optionColor = opt('eventColor'); - var backgroundColor = - event.backgroundColor || - eventColor || - source.backgroundColor || - sourceColor || - opt('eventBackgroundColor') || - optionColor || - event.color; - var borderColor = - event.borderColor || - eventColor || - source.borderColor || - sourceColor || - opt('eventBorderColor') || - optionColor; - var textColor = - event.textColor || - source.textColor || - opt('eventTextColor'); - var statements = []; - if (backgroundColor) { - statements.push('background-color:' + backgroundColor); - } - if (borderColor) { - statements.push('border-color:' + borderColor); - } - if (textColor) { - statements.push('color:' + textColor); - } - return statements.join(';'); -} - - -function applyAll(functions, thisObj, args) { - if ($.isFunction(functions)) { - functions = [ functions ]; - } - if (functions) { - var i; - var ret; - for (i=0; i") - .appendTo(element); - } - - - - function buildTable(showNumbers) { - var html = ''; - var i, j; - var headerClass = tm + "-widget-header"; - var contentClass = tm + "-widget-content"; - var month = t.start.getMonth(); - var today = clearTime(new Date()); - var cellDate; // not to be confused with local function. TODO: better names - var cellClasses; - var cell; - - html += "" + - "" + - ""; - - if (showWeekNumbers) { - html += "" + - "" + - ""; - - for (i=0; i" + - "
    " + - ""; - } - - for (j=0; j" + - "
    "; - if (showNumbers) { - html += "
    " + cellDate.getDate() + "
    "; - } - html += "
    " + - "
     
    " + - "
    " + - "
    " + - ""; - } - - html += ""; - } - html += "
    " + - "
    "; - } - - for (i=0; i"; - } - - html += "
    "; - - lockHeight(); // the unlock happens later, in setHeight()... - if (table) { - table.remove(); - } - table = $(html).appendTo(element); - - head = table.find('thead'); - headCells = head.find('.fc-day-header'); - body = table.find('tbody'); - bodyRows = body.find('tr'); - bodyCells = body.find('.fc-day'); - bodyFirstCells = bodyRows.find('td:first-child'); - bodyCellTopInners = bodyRows.eq(0).find('.fc-day-content > div'); - - markFirstLast(head.add(head.find('tr'))); // marks first+last tr/th's - markFirstLast(bodyRows); // marks first+last td's - bodyRows.eq(0).addClass('fc-first'); - bodyRows.filter(':last').addClass('fc-last'); - - if (showWeekNumbers) { - head.find('.fc-week-number').text(weekNumberTitle); - } - - headCells.each(function(i, _cell) { - var date = indexDate(i); - $(_cell).text(formatDate(date, colFormat)); - }); - - if (showWeekNumbers) { - body.find('.fc-week-number > div').each(function(i, _cell) { - var weekStart = _cellDate(i, 0); - $(_cell).text(formatDate(weekStart, weekNumberFormat)); - }); - } - - bodyCells.each(function(i, _cell) { - var date = indexDate(i); - trigger('dayRender', t, date, $(_cell)); - }); - - dayBind(bodyCells); - } - - - - function setHeight(height) { - viewHeight = height; - - var bodyHeight = viewHeight - head.height(); - var rowHeight; - var rowHeightLast; - var cell; - - if (opt('weekMode') == 'variable') { - rowHeight = rowHeightLast = Math.floor(bodyHeight / (rowCnt==1 ? 2 : 6)); - }else{ - rowHeight = Math.floor(bodyHeight / rowCnt); - rowHeightLast = bodyHeight - rowHeight * (rowCnt-1); - } - - bodyFirstCells.each(function(i, _cell) { - if (i < rowCnt) { - cell = $(_cell); - setMinHeight( - cell.find('> div'), - (i==rowCnt-1 ? rowHeightLast : rowHeight) - vsides(cell) - ); - } - }); - - unlockHeight(); - } - - - function setWidth(width) { - viewWidth = width; - colContentPositions.clear(); - - weekNumberWidth = 0; - if (showWeekNumbers) { - weekNumberWidth = head.find('th.fc-week-number').outerWidth(); - } - - colWidth = Math.floor((viewWidth - weekNumberWidth) / colCnt); - setOuterWidth(headCells.slice(0, -1), colWidth); - } - - - - /* Day clicking and binding - -----------------------------------------------------------*/ - - - function dayBind(days) { - days.click(dayClick) - .mousedown(daySelectionMousedown); - } - - - function dayClick(ev) { - if (!opt('selectable')) { // if selectable, SelectionManager will worry about dayClick - var date = parseISO8601($(this).data('date')); - trigger('dayClick', this, date, true, ev); - } - } - - - - /* Semi-transparent Overlay Helpers - ------------------------------------------------------*/ - - - function renderDayOverlay(overlayStart, overlayEnd, refreshCoordinateGrid) { // overlayEnd is exclusive - if (refreshCoordinateGrid) { - coordinateGrid.build(); - } - var rowStart = cloneDate(t.visStart); - var rowEnd = addDays(cloneDate(rowStart), colCnt); - for (var i=0; i" + - "
    "; - } - else { - s += "  
      
    "; - dayTable = $(s).appendTo(element); - dayHead = dayTable.find('thead'); - dayHeadCells = dayHead.find('th').slice(1, -1); - dayBody = dayTable.find('tbody'); - dayBodyCells = dayBody.find('td').slice(0, -1); - dayBodyCellInners = dayBodyCells.find('div.fc-day-content div'); - dayBodyFirstCell = dayBodyCells.eq(0); - dayBodyFirstCellStretcher = dayBodyFirstCell.find('> div'); - - markFirstLast(dayHead.add(dayHead.find('tr'))); - markFirstLast(dayBody.add(dayBody.find('tr'))); - - axisFirstCells = dayHead.find('th:first'); - gutterCells = dayTable.find('.fc-agenda-gutter'); - - slotLayer = - $("
    ") - .appendTo(element); - - if (opt('allDaySlot')) { - - daySegmentContainer = - $("
    ") - .appendTo(slotLayer); - - s = - "" + - "" + - "" + - "" + - "" + - "" + - "
    " + opt('allDayText') + "" + - "
    " + - "
     
    "; - allDayTable = $(s).appendTo(slotLayer); - allDayRow = allDayTable.find('tr'); - - dayBind(allDayRow.find('td')); - - axisFirstCells = axisFirstCells.add(allDayTable.find('th:first')); - gutterCells = gutterCells.add(allDayTable.find('th.fc-agenda-gutter')); - - slotLayer.append( - "
    " + - "
    " + - "
    " - ); - - }else{ - - daySegmentContainer = $([]); // in jQuery 1.4, we can just do $() - - } - - slotScroller = - $("
    ") - .appendTo(slotLayer); - - slotContent = - $("
    ") - .appendTo(slotScroller); - - slotSegmentContainer = - $("
    ") - .appendTo(slotContent); - - s = - "" + - ""; - d = zeroDate(); - maxd = addMinutes(cloneDate(d), maxMinute); - addMinutes(d, minMinute); - slotCnt = 0; - for (i=0; d < maxd; i++) { - minutes = d.getMinutes(); - s += - "" + - "" + - "" + - ""; - addMinutes(d, opt('slotMinutes')); - slotCnt++; - } - s += - "" + - "
    " + - ((!slotNormal || !minutes) ? formatDate(d, opt('axisFormat')) : ' ') + - "" + - "
     
    " + - "
    "; - slotTable = $(s).appendTo(slotContent); - slotTableFirstInner = slotTable.find('div:first'); - - slotBind(slotTable.find('td')); - - axisFirstCells = axisFirstCells.add(slotTable.find('th:first')); - } - - - - function updateCells() { - var i; - var headCell; - var bodyCell; - var date; - var today = clearTime(new Date()); - - if (showWeekNumbers) { - var weekText = formatDate(colDate(0), weekNumberFormat); - if (rtl) { - weekText = weekText + weekNumberTitle; - } - else { - weekText = weekNumberTitle + weekText; - } - dayHead.find('.fc-week-number').text(weekText); - } - - for (i=0; i= 0) { - addMinutes(d, minMinute + slotIndex * snapMinutes); - } - return d; - } - - - function colDate(col) { // returns dates with 00:00:00 - return addDays(cloneDate(t.visStart), col*dis+dit); - } - - - function cellIsAllDay(cell) { - return opt('allDaySlot') && !cell.row; - } - - - function dayOfWeekCol(dayOfWeek) { - return ((dayOfWeek - Math.max(firstDay, nwe) + colCnt) % colCnt)*dis+dit; - } - - - - - // get the Y coordinate of the given time on the given day (both Date objects) - function timePosition(day, time) { // both date objects. day holds 00:00 of current day - day = cloneDate(day, true); - if (time < addMinutes(cloneDate(day), minMinute)) { - return 0; - } - if (time >= addMinutes(cloneDate(day), maxMinute)) { - return slotTable.height(); - } - var slotMinutes = opt('slotMinutes'), - minutes = time.getHours()*60 + time.getMinutes() - minMinute, - slotI = Math.floor(minutes / slotMinutes), - slotTop = slotTopCache[slotI]; - if (slotTop === undefined) { - slotTop = slotTopCache[slotI] = slotTable.find('tr:eq(' + slotI + ') td div')[0].offsetTop; //.position().top; // need this optimization??? - } - return Math.max(0, Math.round( - slotTop - 1 + slotHeight * ((minutes % slotMinutes) / slotMinutes) - )); - } - - - function allDayBounds() { - return { - left: axisWidth, - right: viewWidth - gutterWidth - } - } - - - function getAllDayRow(index) { - return allDayRow; - } - - - function defaultEventEnd(event) { - var start = cloneDate(event.start); - if (event.allDay) { - return start; - } - return addMinutes(start, opt('defaultEventMinutes')); - } - - - - /* Selection - ---------------------------------------------------------------------------------*/ - - - function defaultSelectionEnd(startDate, allDay) { - if (allDay) { - return cloneDate(startDate); - } - return addMinutes(cloneDate(startDate), opt('slotMinutes')); - } - - - function renderSelection(startDate, endDate, allDay) { // only for all-day - if (allDay) { - if (opt('allDaySlot')) { - renderDayOverlay(startDate, addDays(cloneDate(endDate), 1), true); - } - }else{ - renderSlotSelection(startDate, endDate); - } - } - - - function renderSlotSelection(startDate, endDate) { - var helperOption = opt('selectHelper'); - coordinateGrid.build(); - if (helperOption) { - var col = dayDiff(startDate, t.visStart) * dis + dit; - if (col >= 0 && col < colCnt) { // only works when times are on same day - var rect = coordinateGrid.rect(0, col, 0, col, slotContent); // only for horizontal coords - var top = timePosition(startDate, startDate); - var bottom = timePosition(startDate, endDate); - if (bottom > top) { // protect against selections that are entirely before or after visible range - rect.top = top; - rect.height = bottom - top; - rect.left += 2; - rect.width -= 5; - if ($.isFunction(helperOption)) { - var helperRes = helperOption(startDate, endDate); - if (helperRes) { - rect.position = 'absolute'; - rect.zIndex = 8; - selectionHelper = $(helperRes) - .css(rect) - .appendTo(slotContent); - } - }else{ - rect.isStart = true; // conside rect a "seg" now - rect.isEnd = true; // - selectionHelper = $(slotSegHtml( - { - title: '', - start: startDate, - end: endDate, - className: ['fc-select-helper'], - editable: false - }, - rect - )); - selectionHelper.css('opacity', opt('dragOpacity')); - } - if (selectionHelper) { - slotBind(selectionHelper); - slotContent.append(selectionHelper); - setOuterWidth(selectionHelper, rect.width, true); // needs to be after appended - setOuterHeight(selectionHelper, rect.height, true); - } - } - } - }else{ - renderSlotOverlay(startDate, endDate); - } - } - - - function clearSelection() { - clearOverlays(); - if (selectionHelper) { - selectionHelper.remove(); - selectionHelper = null; - } - } - - - function slotSelectionMousedown(ev) { - if (ev.which == 1 && opt('selectable')) { // ev.which==1 means left mouse button - unselect(ev); - var dates; - hoverListener.start(function(cell, origCell) { - clearSelection(); - if (cell && cell.col == origCell.col && !cellIsAllDay(cell)) { - var d1 = cellDate(origCell); - var d2 = cellDate(cell); - dates = [ - d1, - addMinutes(cloneDate(d1), snapMinutes), // calculate minutes depending on selection slot minutes - d2, - addMinutes(cloneDate(d2), snapMinutes) - ].sort(cmp); - renderSlotSelection(dates[0], dates[3]); - }else{ - dates = null; - } - }, ev); - $(document).one('mouseup', function(ev) { - hoverListener.stop(); - if (dates) { - if (+dates[0] == +dates[1]) { - reportDayClick(dates[0], false, ev); - } - reportSelection(dates[0], dates[3], false, ev); - } - }); - } - } - - - function reportDayClick(date, allDay, ev) { - trigger('dayClick', dayBodyCells[dayOfWeekCol(date.getDay())], date, allDay, ev); - } - - - - /* External Dragging - --------------------------------------------------------------------------------*/ - - - function dragStart(_dragElement, ev, ui) { - hoverListener.start(function(cell) { - clearOverlays(); - if (cell) { - if (cellIsAllDay(cell)) { - renderCellOverlay(cell.row, cell.col, cell.row, cell.col); - }else{ - var d1 = cellDate(cell); - var d2 = addMinutes(cloneDate(d1), opt('defaultEventMinutes')); - renderSlotOverlay(d1, d2); - } - } - }, ev); - } - - - function dragStop(_dragElement, ev, ui) { - var cell = hoverListener.stop(); - clearOverlays(); - if (cell) { - trigger('drop', _dragElement, cellDate(cell), cellIsAllDay(cell), ev, ui); - } - } - - -} - -;; - -function AgendaEventRenderer() { - var t = this; - - - // exports - t.renderEvents = renderEvents; - t.compileDaySegs = compileDaySegs; // for DayEventRenderer - t.clearEvents = clearEvents; - t.slotSegHtml = slotSegHtml; - t.bindDaySeg = bindDaySeg; - - - // imports - DayEventRenderer.call(t); - var opt = t.opt; - var trigger = t.trigger; - //var setOverflowHidden = t.setOverflowHidden; - var isEventDraggable = t.isEventDraggable; - var isEventResizable = t.isEventResizable; - var eventEnd = t.eventEnd; - var reportEvents = t.reportEvents; - var reportEventClear = t.reportEventClear; - var eventElementHandlers = t.eventElementHandlers; - var setHeight = t.setHeight; - var getDaySegmentContainer = t.getDaySegmentContainer; - var getSlotSegmentContainer = t.getSlotSegmentContainer; - var getHoverListener = t.getHoverListener; - var getMaxMinute = t.getMaxMinute; - var getMinMinute = t.getMinMinute; - var timePosition = t.timePosition; - var colContentLeft = t.colContentLeft; - var colContentRight = t.colContentRight; - var renderDaySegs = t.renderDaySegs; - var resizableDayEvent = t.resizableDayEvent; // TODO: streamline binding architecture - var getColCnt = t.getColCnt; - var getColWidth = t.getColWidth; - var getSnapHeight = t.getSnapHeight; - var getSnapMinutes = t.getSnapMinutes; - var getBodyContent = t.getBodyContent; - var reportEventElement = t.reportEventElement; - var showEvents = t.showEvents; - var hideEvents = t.hideEvents; - var eventDrop = t.eventDrop; - var eventResize = t.eventResize; - var renderDayOverlay = t.renderDayOverlay; - var clearOverlays = t.clearOverlays; - var calendar = t.calendar; - var formatDate = calendar.formatDate; - var formatDates = calendar.formatDates; - - - - /* Rendering - ----------------------------------------------------------------------------*/ - - - function renderEvents(events, modifiedEventId) { - reportEvents(events); - var i, len=events.length, - dayEvents=[], - slotEvents=[]; - for (i=0; i" + - "
    " + - "
    " + - htmlEscape(formatDates(event.start, event.end, opt('timeFormat'))) + - "
    " + - "
    " + - htmlEscape(event.title) + - "
    " + - "
    " + - "
    "; - if (seg.isEnd && isEventResizable(event)) { - html += - "
    =
    "; - } - html += - ""; - return html; - } - - - function bindDaySeg(event, eventElement, seg) { - if (isEventDraggable(event)) { - draggableDayEvent(event, eventElement, seg.isStart); - } - if (seg.isEnd && isEventResizable(event)) { - resizableDayEvent(event, eventElement, seg); - } - eventElementHandlers(event, eventElement); - // needs to be after, because resizableDayEvent might stopImmediatePropagation on click - } - - - function bindSlotSeg(event, eventElement, seg) { - var timeElement = eventElement.find('div.fc-event-time'); - if (isEventDraggable(event)) { - draggableSlotEvent(event, eventElement, timeElement); - } - if (seg.isEnd && isEventResizable(event)) { - resizableSlotEvent(event, eventElement, timeElement); - } - eventElementHandlers(event, eventElement); - } - - - - /* Dragging - -----------------------------------------------------------------------------------*/ - - - // when event starts out FULL-DAY - - function draggableDayEvent(event, eventElement, isStart) { - var origWidth; - var revert; - var allDay=true; - var dayDelta; - var dis = opt('isRTL') ? -1 : 1; - var hoverListener = getHoverListener(); - var colWidth = getColWidth(); - var snapHeight = getSnapHeight(); - var snapMinutes = getSnapMinutes(); - var minMinute = getMinMinute(); - eventElement.draggable({ - zIndex: 9, - opacity: opt('dragOpacity', 'month'), // use whatever the month view was using - revertDuration: opt('dragRevertDuration'), - start: function(ev, ui) { - trigger('eventDragStart', eventElement, event, ev, ui); - hideEvents(event, eventElement); - origWidth = eventElement.width(); - hoverListener.start(function(cell, origCell, rowDelta, colDelta) { - clearOverlays(); - if (cell) { - //setOverflowHidden(true); - revert = false; - dayDelta = colDelta * dis; - if (!cell.row) { - // on full-days - renderDayOverlay( - addDays(cloneDate(event.start), dayDelta), - addDays(exclEndDay(event), dayDelta) - ); - resetElement(); - }else{ - // mouse is over bottom slots - if (isStart) { - if (allDay) { - // convert event to temporary slot-event - eventElement.width(colWidth - 10); // don't use entire width - setOuterHeight( - eventElement, - snapHeight * Math.round( - (event.end ? ((event.end - event.start) / MINUTE_MS) : opt('defaultEventMinutes')) / - snapMinutes - ) - ); - eventElement.draggable('option', 'grid', [colWidth, 1]); - allDay = false; - } - }else{ - revert = true; - } - } - revert = revert || (allDay && !dayDelta); - }else{ - resetElement(); - //setOverflowHidden(false); - revert = true; - } - eventElement.draggable('option', 'revert', revert); - }, ev, 'drag'); - }, - stop: function(ev, ui) { - hoverListener.stop(); - clearOverlays(); - trigger('eventDragStop', eventElement, event, ev, ui); - if (revert) { - // hasn't moved or is out of bounds (draggable has already reverted) - resetElement(); - eventElement.css('filter', ''); // clear IE opacity side-effects - showEvents(event, eventElement); - }else{ - // changed! - var minuteDelta = 0; - if (!allDay) { - minuteDelta = Math.round((eventElement.offset().top - getBodyContent().offset().top) / snapHeight) - * snapMinutes - + minMinute - - (event.start.getHours() * 60 + event.start.getMinutes()); - } - eventDrop(this, event, dayDelta, minuteDelta, allDay, ev, ui); - } - //setOverflowHidden(false); - } - }); - function resetElement() { - if (!allDay) { - eventElement - .width(origWidth) - .height('') - .draggable('option', 'grid', null); - allDay = true; - } - } - } - - - // when event starts out IN TIMESLOTS - - function draggableSlotEvent(event, eventElement, timeElement) { - var origPosition; - var allDay=false; - var dayDelta; - var minuteDelta; - var prevMinuteDelta; - var dis = opt('isRTL') ? -1 : 1; - var hoverListener = getHoverListener(); - var colCnt = getColCnt(); - var colWidth = getColWidth(); - var snapHeight = getSnapHeight(); - var snapMinutes = getSnapMinutes(); - eventElement.draggable({ - zIndex: 9, - scroll: false, - grid: [colWidth, snapHeight], - axis: colCnt==1 ? 'y' : false, - opacity: opt('dragOpacity'), - revertDuration: opt('dragRevertDuration'), - start: function(ev, ui) { - trigger('eventDragStart', eventElement, event, ev, ui); - hideEvents(event, eventElement); - origPosition = eventElement.position(); - minuteDelta = prevMinuteDelta = 0; - hoverListener.start(function(cell, origCell, rowDelta, colDelta) { - eventElement.draggable('option', 'revert', !cell); - clearOverlays(); - if (cell) { - dayDelta = colDelta * dis; - if (opt('allDaySlot') && !cell.row) { - // over full days - if (!allDay) { - // convert to temporary all-day event - allDay = true; - timeElement.hide(); - eventElement.draggable('option', 'grid', null); - } - renderDayOverlay( - addDays(cloneDate(event.start), dayDelta), - addDays(exclEndDay(event), dayDelta) - ); - }else{ - // on slots - resetElement(); - } - } - }, ev, 'drag'); - }, - drag: function(ev, ui) { - minuteDelta = Math.round((ui.position.top - origPosition.top) / snapHeight) * snapMinutes; - if (minuteDelta != prevMinuteDelta) { - if (!allDay) { - updateTimeText(minuteDelta); - } - prevMinuteDelta = minuteDelta; - } - }, - stop: function(ev, ui) { - var cell = hoverListener.stop(); - clearOverlays(); - trigger('eventDragStop', eventElement, event, ev, ui); - if (cell && (dayDelta || minuteDelta || allDay)) { - // changed! - eventDrop(this, event, dayDelta, allDay ? 0 : minuteDelta, allDay, ev, ui); - }else{ - // either no change or out-of-bounds (draggable has already reverted) - resetElement(); - eventElement.css('filter', ''); // clear IE opacity side-effects - eventElement.css(origPosition); // sometimes fast drags make event revert to wrong position - updateTimeText(0); - showEvents(event, eventElement); - } - } - }); - function updateTimeText(minuteDelta) { - var newStart = addMinutes(cloneDate(event.start), minuteDelta); - var newEnd; - if (event.end) { - newEnd = addMinutes(cloneDate(event.end), minuteDelta); - } - timeElement.text(formatDates(newStart, newEnd, opt('timeFormat'))); - } - function resetElement() { - // convert back to original slot-event - if (allDay) { - timeElement.css('display', ''); // show() was causing display=inline - eventElement.draggable('option', 'grid', [colWidth, snapHeight]); - allDay = false; - } - } - } - - - - /* Resizing - --------------------------------------------------------------------------------------*/ - - - function resizableSlotEvent(event, eventElement, timeElement) { - var snapDelta, prevSnapDelta; - var snapHeight = getSnapHeight(); - var snapMinutes = getSnapMinutes(); - eventElement.resizable({ - handles: { - s: '.ui-resizable-handle' - }, - grid: snapHeight, - start: function(ev, ui) { - snapDelta = prevSnapDelta = 0; - hideEvents(event, eventElement); - eventElement.css('z-index', 9); - trigger('eventResizeStart', this, event, ev, ui); - }, - resize: function(ev, ui) { - // don't rely on ui.size.height, doesn't take grid into account - snapDelta = Math.round((Math.max(snapHeight, eventElement.height()) - ui.originalSize.height) / snapHeight); - if (snapDelta != prevSnapDelta) { - timeElement.text( - formatDates( - event.start, - (!snapDelta && !event.end) ? null : // no change, so don't display time range - addMinutes(eventEnd(event), snapMinutes*snapDelta), - opt('timeFormat') - ) - ); - prevSnapDelta = snapDelta; - } - }, - stop: function(ev, ui) { - trigger('eventResizeStop', this, event, ev, ui); - if (snapDelta) { - eventResize(this, event, 0, snapMinutes*snapDelta, ev, ui); - }else{ - eventElement.css('z-index', 8); - showEvents(event, eventElement); - // BUG: if event was really short, need to put title back in span - } - } - }); - } - - -} - - -function countForwardSegs(levels) { - var i, j, k, level, segForward, segBack; - for (i=levels.length-1; i>0; i--) { - level = levels[i]; - for (j=0; j"); - var elements; - var segmentContainer = getDaySegmentContainer(); - var i; - var segCnt = segs.length; - var element; - tempContainer[0].innerHTML = daySegHTML(segs); // faster than .html() - elements = tempContainer.children(); - segmentContainer.append(elements); - daySegElementResolve(segs, elements); - daySegCalcHSides(segs); - daySegSetWidths(segs); - daySegCalcHeights(segs); - daySegSetTops(segs, getRowTops(getRowDivs())); - elements = []; - for (i=0; i" + - "
    "; - if (!event.allDay && seg.isStart) { - html += - "" + - htmlEscape(formatDates(event.start, event.end, opt('timeFormat'))) + - ""; - } - html += - "" + htmlEscape(event.title) + "" + - "
    "; - if (seg.isEnd && isEventResizable(event)) { - html += - "
    " + - "   " + // makes hit area a lot better for IE6/7 - "
    "; - } - html += - ""; - seg.left = left; - seg.outerWidth = right - left; - seg.startCol = leftCol; - seg.endCol = rightCol + 1; // needs to be exclusive - } - return html; - } - - - function daySegElementResolve(segs, elements) { // sets seg.element - var i; - var segCnt = segs.length; - var seg; - var event; - var element; - var triggerRes; - for (i=0; i div'); // optimal selector? - } - return rowDivs; - } - - - function getRowTops(rowDivs) { - var i; - var rowCnt = rowDivs.length; - var tops = []; - for (i=0; i selection for IE - element - .mousedown(function(ev) { // prevent native selection for others - ev.preventDefault(); - }) - .click(function(ev) { - if (isResizing) { - ev.preventDefault(); // prevent link from being visited (only method that worked in IE6) - ev.stopImmediatePropagation(); // prevent fullcalendar eventClick handler from being called - // (eventElementHandlers needs to be bound after resizableDayEvent) - } - }); - - handle.mousedown(function(ev) { - if (ev.which != 1) { - return; // needs to be left mouse button - } - isResizing = true; - var hoverListener = t.getHoverListener(); - var rowCnt = getRowCnt(); - var colCnt = getColCnt(); - var dis = rtl ? -1 : 1; - var dit = rtl ? colCnt-1 : 0; - var elementTop = element.css('top'); - var dayDelta; - var helpers; - var eventCopy = $.extend({}, event); - var minCell = dateCell(event.start); - clearSelection(); - $('body') - .css('cursor', direction + '-resize') - .one('mouseup', mouseup); - trigger('eventResizeStart', this, event, ev); - hoverListener.start(function(cell, origCell) { - if (cell) { - var r = Math.max(minCell.row, cell.row); - var c = cell.col; - if (rowCnt == 1) { - r = 0; // hack for all-day area in agenda views - } - if (r == minCell.row) { - if (rtl) { - c = Math.min(minCell.col, c); - }else{ - c = Math.max(minCell.col, c); - } - } - dayDelta = (r*7 + c*dis+dit) - (origCell.row*7 + origCell.col*dis+dit); - var newEnd = addDays(eventEnd(event), dayDelta, true); - if (dayDelta) { - eventCopy.end = newEnd; - var oldHelpers = helpers; - helpers = renderTempDaySegs(compileDaySegs([eventCopy]), seg.row, elementTop); - helpers.find('*').css('cursor', direction + '-resize'); - if (oldHelpers) { - oldHelpers.remove(); - } - hideEvents(event); - }else{ - if (helpers) { - showEvents(event); - helpers.remove(); - helpers = null; - } - } - clearOverlays(); - renderDayOverlay(event.start, addDays(cloneDate(newEnd), 1)); // coordinate grid already rebuild at hoverListener.start - } - }, ev); - - function mouseup(ev) { - trigger('eventResizeStop', this, event, ev); - $('body').css('cursor', ''); - hoverListener.stop(); - clearOverlays(); - if (dayDelta) { - eventResize(this, event, dayDelta, 0, ev); - // event redraw will clear helpers - } - // otherwise, the drag handler already restored the old events - - setTimeout(function() { // make this happen after the element's click event - isResizing = false; - },0); - } - - }); - } - - -} - -;; - -//BUG: unselect needs to be triggered when events are dragged+dropped - -function SelectionManager() { - var t = this; - - - // exports - t.select = select; - t.unselect = unselect; - t.reportSelection = reportSelection; - t.daySelectionMousedown = daySelectionMousedown; - - - // imports - var opt = t.opt; - var trigger = t.trigger; - var defaultSelectionEnd = t.defaultSelectionEnd; - var renderSelection = t.renderSelection; - var clearSelection = t.clearSelection; - - - // locals - var selected = false; - - - - // unselectAuto - if (opt('selectable') && opt('unselectAuto')) { - $(document).mousedown(function(ev) { - var ignore = opt('unselectCancel'); - if (ignore) { - if ($(ev.target).parents(ignore).length) { // could be optimized to stop after first match - return; - } - } - unselect(ev); - }); - } - - - function select(startDate, endDate, allDay) { - unselect(); - if (!endDate) { - endDate = defaultSelectionEnd(startDate, allDay); - } - renderSelection(startDate, endDate, allDay); - reportSelection(startDate, endDate, allDay); - } - - - function unselect(ev) { - if (selected) { - selected = false; - clearSelection(); - trigger('unselect', null, ev); - } - } - - - function reportSelection(startDate, endDate, allDay, ev) { - selected = true; - trigger('select', null, startDate, endDate, allDay, ev); - } - - - function daySelectionMousedown(ev) { // not really a generic manager method, oh well - var cellDate = t.cellDate; - var cellIsAllDay = t.cellIsAllDay; - var hoverListener = t.getHoverListener(); - var reportDayClick = t.reportDayClick; // this is hacky and sort of weird - if (ev.which == 1 && opt('selectable')) { // which==1 means left mouse button - unselect(ev); - var _mousedownElement = this; - var dates; - hoverListener.start(function(cell, origCell) { // TODO: maybe put cellDate/cellIsAllDay info in cell - clearSelection(); - if (cell && cellIsAllDay(cell)) { - dates = [ cellDate(origCell), cellDate(cell) ].sort(cmp); - renderSelection(dates[0], dates[1], true); - }else{ - dates = null; - } - }, ev); - $(document).one('mouseup', function(ev) { - hoverListener.stop(); - if (dates) { - if (+dates[0] == +dates[1]) { - reportDayClick(dates[0], true, ev); - } - reportSelection(dates[0], dates[1], true, ev); - } - }); - } - } - - -} - -;; - -function OverlayManager() { - var t = this; - - - // exports - t.renderOverlay = renderOverlay; - t.clearOverlays = clearOverlays; - - - // locals - var usedOverlays = []; - var unusedOverlays = []; - - - function renderOverlay(rect, parent) { - var e = unusedOverlays.shift(); - if (!e) { - e = $("
    "); - } - if (e[0].parentNode != parent[0]) { - e.appendTo(parent); - } - usedOverlays.push(e.css(rect).show()); - return e; - } - - - function clearOverlays() { - var e; - while (e = usedOverlays.shift()) { - unusedOverlays.push(e.hide().unbind()); - } - } - - -} - -;; - -function CoordinateGrid(buildFunc) { - - var t = this; - var rows; - var cols; - - - t.build = function() { - rows = []; - cols = []; - buildFunc(rows, cols); - }; - - - t.cell = function(x, y) { - var rowCnt = rows.length; - var colCnt = cols.length; - var i, r=-1, c=-1; - for (i=0; i= rows[i][0] && y < rows[i][1]) { - r = i; - break; - } - } - for (i=0; i= cols[i][0] && x < cols[i][1]) { - c = i; - break; - } - } - return (r>=0 && c>=0) ? { row:r, col:c } : null; - }; - - - t.rect = function(row0, col0, row1, col1, originElement) { // row1,col1 is inclusive - var origin = originElement.offset(); - return { - top: rows[row0][0] - origin.top, - left: cols[col0][0] - origin.left, - width: cols[col1][1] - cols[col0][0], - height: rows[row1][1] - rows[row0][0] - }; - }; - -} - -;; - -function HoverListener(coordinateGrid) { - - - var t = this; - var bindType; - var change; - var firstCell; - var cell; - - - t.start = function(_change, ev, _bindType) { - change = _change; - firstCell = cell = null; - coordinateGrid.build(); - mouse(ev); - bindType = _bindType || 'mousemove'; - $(document).bind(bindType, mouse); - }; - - - function mouse(ev) { - _fixUIEvent(ev); // see below - var newCell = coordinateGrid.cell(ev.pageX, ev.pageY); - if (!newCell != !cell || newCell && (newCell.row != cell.row || newCell.col != cell.col)) { - if (newCell) { - if (!firstCell) { - firstCell = newCell; - } - change(newCell, firstCell, newCell.row-firstCell.row, newCell.col-firstCell.col); - }else{ - change(newCell, firstCell); - } - cell = newCell; - } - } - - - t.stop = function() { - $(document).unbind(bindType, mouse); - return cell; - }; - - -} - - - -// this fix was only necessary for jQuery UI 1.8.16 (and jQuery 1.7 or 1.7.1) -// upgrading to jQuery UI 1.8.17 (and using either jQuery 1.7 or 1.7.1) fixed the problem -// but keep this in here for 1.8.16 users -// and maybe remove it down the line - -function _fixUIEvent(event) { // for issue 1168 - if (event.pageX === undefined) { - event.pageX = event.originalEvent.pageX; - event.pageY = event.originalEvent.pageY; - } -} -;; - -function HorizontalPositionCache(getElement) { - - var t = this, - elements = {}, - lefts = {}, - rights = {}; - - function e(i) { - return elements[i] = elements[i] || getElement(i); - } - - t.left = function(i) { - return lefts[i] = lefts[i] === undefined ? e(i).position().left : lefts[i]; - }; - - t.right = function(i) { - return rights[i] = rights[i] === undefined ? t.left(i) + e(i).width() : rights[i]; - }; - - t.clear = function() { - elements = {}; - lefts = {}; - rights = {}; - }; - -} - -;; - -})(jQuery); \ No newline at end of file diff --git a/vendor/built_in_modules/calendar_new/app/assets/javascripts/fullcalendar.min.js b/vendor/built_in_modules/calendar_new/app/assets/javascripts/fullcalendar.min.js deleted file mode 100644 index c3e0834a..00000000 --- a/vendor/built_in_modules/calendar_new/app/assets/javascripts/fullcalendar.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * FullCalendar v1.6.1 - * Docs & License: http://arshaw.com/fullcalendar/ - * (c) 2013 Adam Shaw - */ -(function(t,e){function n(e){t.extend(!0,ye,e)}function r(n,r,l){function u(t){G?(S(),C(),R(),b(t)):f()}function f(){K=r.theme?"ui":"fc",n.addClass("fc"),r.isRTL?n.addClass("fc-rtl"):n.addClass("fc-ltr"),r.theme&&n.addClass("ui-widget"),G=t("
    ").prependTo(n),$=new a(Z,r),Q=$.render(),Q&&n.prepend(Q),y(r.defaultView),t(window).resize(x),m()||v()}function v(){setTimeout(function(){!te.start&&m()&&b()},0)}function h(){t(window).unbind("resize",x),$.destroy(),G.remove(),n.removeClass("fc fc-rtl ui-widget")}function g(){return 0!==se.offsetWidth}function m(){return 0!==t("body")[0].offsetWidth}function y(e){if(!te||e!=te.name){ue++,W();var n,r=te;r?((r.beforeHide||I)(),q(G,G.height()),r.element.hide()):q(G,1),G.css("overflow","hidden"),te=ce[e],te?te.element.show():te=ce[e]=new De[e](n=re=t("
    ").appendTo(G),Z),r&&$.deactivateButton(r.name),$.activateButton(e),b(),G.css("overflow",""),r&&q(G,1),n||(te.afterShow||I)(),ue--}}function b(t){if(g()){ue++,W(),ne===e&&S();var r=!1;!te.start||t||te.start>fe||fe>=te.end?(te.render(fe,t||0),E(!0),r=!0):te.sizeDirty?(te.clearEvents(),E(),r=!0):te.eventsDirty&&(te.clearEvents(),r=!0),te.sizeDirty=!1,te.eventsDirty=!1,T(r),ee=n.outerWidth(),$.updateTitle(te.title);var a=new Date;a>=te.start&&te.end>a?$.disableButton("today"):$.enableButton("today"),ue--,te.trigger("viewDisplay",se)}}function M(){C(),g()&&(S(),E(),W(),te.clearEvents(),te.renderEvents(de),te.sizeDirty=!1)}function C(){t.each(ce,function(t,e){e.sizeDirty=!0})}function S(){ne=r.contentHeight?r.contentHeight:r.height?r.height-(Q?Q.height():0)-L(G):Math.round(G.width()/Math.max(r.aspectRatio,.5))}function E(t){ue++,te.setHeight(ne,t),re&&(re.css("position","relative"),re=null),te.setWidth(G.width(),t),ue--}function x(){if(!ue)if(te.start){var t=++le;setTimeout(function(){t==le&&!ue&&g()&&ee!=(ee=n.outerWidth())&&(ue++,M(),te.trigger("windowResize",se),ue--)},200)}else v()}function T(t){!r.lazyFetching||oe(te.visStart,te.visEnd)?k():t&&F()}function k(){ie(te.visStart,te.visEnd)}function H(t){de=t,F()}function z(t){F(t)}function F(t){R(),g()&&(te.clearEvents(),te.renderEvents(de,t),te.eventsDirty=!1)}function R(){t.each(ce,function(t,e){e.eventsDirty=!0})}function N(t,n,r){te.select(t,n,r===e?!0:r)}function W(){te&&te.unselect()}function A(){b(-1)}function _(){b(1)}function O(){i(fe,-1),b()}function B(){i(fe,1),b()}function Y(){fe=new Date,b()}function j(t,e,n){t instanceof Date?fe=d(t):p(fe,t,e,n),b()}function P(t,n,r){t!==e&&i(fe,t),n!==e&&s(fe,n),r!==e&&c(fe,r),b()}function J(){return d(fe)}function V(){return te}function X(t,n){return n===e?r[t]:(("height"==t||"contentHeight"==t||"aspectRatio"==t)&&(r[t]=n,M()),e)}function U(t,n){return r[t]?r[t].apply(n||se,Array.prototype.slice.call(arguments,2)):e}var Z=this;Z.options=r,Z.render=u,Z.destroy=h,Z.refetchEvents=k,Z.reportEvents=H,Z.reportEventChange=z,Z.rerenderEvents=F,Z.changeView=y,Z.select=N,Z.unselect=W,Z.prev=A,Z.next=_,Z.prevYear=O,Z.nextYear=B,Z.today=Y,Z.gotoDate=j,Z.incrementDate=P,Z.formatDate=function(t,e){return w(t,e,r)},Z.formatDates=function(t,e,n){return D(t,e,n,r)},Z.getDate=J,Z.getView=V,Z.option=X,Z.trigger=U,o.call(Z,r,l);var $,Q,G,K,te,ee,ne,re,ae,oe=Z.isFetchNeeded,ie=Z.fetchEvents,se=n[0],ce={},le=0,ue=0,fe=new Date,de=[];p(fe,r.year,r.month,r.date),r.droppable&&t(document).bind("dragstart",function(e,n){var a=e.target,o=t(a);if(!o.parents(".fc").length){var i=r.dropAccept;(t.isFunction(i)?i.call(a,o):o.is(i))&&(ae=a,te.dragStart(ae,e,n))}}).bind("dragstop",function(t,e){ae&&(te.dragStop(ae,t,e),ae=null)})}function a(n,r){function a(){v=r.theme?"ui":"fc";var n=r.header;return n?h=t("").append(t("").append(i("left")).append(i("center")).append(i("right"))):e}function o(){h.remove()}function i(e){var a=t(" - <% @site_valid_locales.each_with_index do |locale, i| %> - - <% end %> - - \ No newline at end of file diff --git a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/event_categories/_form.html.erb b/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/event_categories/_form.html.erb deleted file mode 100644 index e89f6050..00000000 --- a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/event_categories/_form.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -<%= flash_messages %> -<%= f.error_messages %> -<%= label_tag("color", t("calendar.color")) %> -
    - <%= f.text_field :custom_value, id: "color", :class => "color-picker miniColors input-small", :size => "7", :maxlength => "7", :autocomplete=>"off",:value=>"9100FF" %> -
    -<%= f.fields_for :title_translations do |f| %> - <% @site_valid_locales.each do |locale| %> - <%= label_tag "name-#{locale}", "#{t(:name)} (#{I18nVariable.from_locale(locale)})" %> - <%= f.text_field locale, :class => 'input-large', :value => (@category.title_translations[locale] rescue ''), placeholder: t(:name), id: locale %> - <% end %> -<% end %> diff --git a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/event_categories/create.js.erb b/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/event_categories/create.js.erb deleted file mode 100644 index a07068ca..00000000 --- a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/event_categories/create.js.erb +++ /dev/null @@ -1,14 +0,0 @@ -$("#event_create").empty().hide(); -$("#create_event_btn").removeClass("active"); -$(".destroy").remove(); -switch (c.view){ - case "week": - c.loadWeekView(c.cur_week,c.cur_year); - break; - case "month": - c.loadMonthView(c.cur_month,c.cur_year); - break; - case "day": - c.loadDayView(c.cur_date,c.cur_month,c.cur_year); - break; -} diff --git a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/event_categories/edit.html.erb b/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/event_categories/edit.html.erb deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/event_categories/index.html.erb b/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/event_categories/index.html.erb deleted file mode 100644 index 8a7842b8..00000000 --- a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/event_categories/index.html.erb +++ /dev/null @@ -1,65 +0,0 @@ -<%= stylesheet_link_tag "jquery.miniColors" %> - -<%= javascript_include_tag "jquery.miniColors.min" %> - -<%= javascript_include_tag "admin/categories" %> - -
    -
    "),o=r.header[e];return o&&t.each(o.split(" "),function(e){e>0&&a.append("");var o;t.each(this.split(","),function(e,i){if("title"==i)a.append("

     

    "),o&&o.addClass(v+"-corner-right"),o=null;else{var s;if(n[i]?s=n[i]:De[i]&&(s=function(){u.removeClass(v+"-state-hover"),n.changeView(i)}),s){var c=r.theme?J(r.buttonIcons,i):null,l=J(r.buttonText,i),u=t(""+(c?""+"":l)+"").click(function(){u.hasClass(v+"-state-disabled")||s()}).mousedown(function(){u.not("."+v+"-state-active").not("."+v+"-state-disabled").addClass(v+"-state-down")}).mouseup(function(){u.removeClass(v+"-state-down")}).hover(function(){u.not("."+v+"-state-active").not("."+v+"-state-disabled").addClass(v+"-state-hover")},function(){u.removeClass(v+"-state-hover").removeClass(v+"-state-down")}).appendTo(a);U(u),o||u.addClass(v+"-corner-left"),o=u}}}),o&&o.addClass(v+"-corner-right")}),a}function s(t){h.find("h2").html(t)}function c(t){h.find("span.fc-button-"+t).addClass(v+"-state-active")}function l(t){h.find("span.fc-button-"+t).removeClass(v+"-state-active")}function u(t){h.find("span.fc-button-"+t).addClass(v+"-state-disabled")}function f(t){h.find("span.fc-button-"+t).removeClass(v+"-state-disabled")}var d=this;d.render=a,d.destroy=o,d.updateTitle=s,d.activateButton=c,d.deactivateButton=l,d.disableButton=u,d.enableButton=f;var v,h=t([])}function o(n,r){function a(t,e){return!S||S>t||e>E}function o(t,e){S=t,E=e,W=[];var n=++F,r=z.length;R=r;for(var a=0;r>a;a++)i(z[a],n)}function i(e,r){s(e,function(a){if(r==F){if(a){n.eventDataTransform&&(a=t.map(a,n.eventDataTransform)),e.eventDataTransform&&(a=t.map(a,e.eventDataTransform));for(var o=0;a.length>o;o++)a[o].source=e,b(a[o]);W=W.concat(a)}R--,R||k(W)}})}function s(r,a){var o,i,c=we.sourceFetchers;for(o=0;c.length>o;o++){if(i=c[o](r,S,E,a),i===!0)return;if("object"==typeof i)return s(i,a),e}var l=r.events;if(l)t.isFunction(l)?(p(),l(d(S),d(E),function(t){a(t),y()})):t.isArray(l)?a(l):a();else{var u=r.url;if(u){var f=r.success,v=r.error,h=r.complete,g=t.extend({},r.data||{}),m=K(r.startParam,n.startParam),b=K(r.endParam,n.endParam);m&&(g[m]=Math.round(+S/1e3)),b&&(g[b]=Math.round(+E/1e3)),p(),t.ajax(t.extend({},Me,r,{data:g,success:function(e){e=e||[];var n=G(f,this,arguments);t.isArray(n)&&(e=n),a(e)},error:function(){G(v,this,arguments),a()},complete:function(){G(h,this,arguments),y()}}))}else a()}}function c(t){t=l(t),t&&(R++,i(t,F))}function l(n){return t.isFunction(n)||t.isArray(n)?n={events:n}:"string"==typeof n&&(n={url:n}),"object"==typeof n?(w(n),z.push(n),n):e}function u(e){z=t.grep(z,function(t){return!D(t,e)}),W=t.grep(W,function(t){return!D(t.source,e)}),k(W)}function f(t){var e,n,r=W.length,a=T().defaultEventEnd,o=t.start-t._start,i=t.end?t.end-(t._end||a(t)):0;for(e=0;r>e;e++)n=W[e],n._id==t._id&&n!=t&&(n.start=new Date(+n.start+o),n.end=t.end?n.end?new Date(+n.end+i):new Date(+a(n)+i):null,n.title=t.title,n.url=t.url,n.allDay=t.allDay,n.className=t.className,n.editable=t.editable,n.color=t.color,n.backgroudColor=t.backgroudColor,n.borderColor=t.borderColor,n.textColor=t.textColor,b(n));b(t),k(W)}function v(t,e){b(t),t.source||(e&&(H.events.push(t),t.source=H),W.push(t)),k(W)}function h(e){if(e){if(!t.isFunction(e)){var n=e+"";e=function(t){return t._id==n}}W=t.grep(W,e,!0);for(var r=0;z.length>r;r++)t.isArray(z[r].events)&&(z[r].events=t.grep(z[r].events,e,!0))}else{W=[];for(var r=0;z.length>r;r++)t.isArray(z[r].events)&&(z[r].events=[])}k(W)}function g(e){return t.isFunction(e)?t.grep(W,e):e?(e+="",t.grep(W,function(t){return t._id==e})):W}function p(){N++||x("loading",null,!0)}function y(){--N||x("loading",null,!1)}function b(t){var r=t.source||{},a=K(r.ignoreTimezone,n.ignoreTimezone);t._id=t._id||(t.id===e?"_fc"+Ce++:t.id+""),t.date&&(t.start||(t.start=t.date),delete t.date),t._start=d(t.start=m(t.start,a)),t.end=m(t.end,a),t.end&&t.end<=t.start&&(t.end=null),t._end=t.end?d(t.end):null,t.allDay===e&&(t.allDay=K(r.allDayDefault,n.allDayDefault)),t.className?"string"==typeof t.className&&(t.className=t.className.split(/\s+/)):t.className=[]}function w(t){t.className?"string"==typeof t.className&&(t.className=t.className.split(/\s+/)):t.className=[];for(var e=we.sourceNormalizers,n=0;e.length>n;n++)e[n](t)}function D(t,e){return t&&e&&M(t)==M(e)}function M(t){return("object"==typeof t?t.events||t.url:"")||t}var C=this;C.isFetchNeeded=a,C.fetchEvents=o,C.addEventSource=c,C.removeEventSource=u,C.updateEvent=f,C.renderEvent=v,C.removeEvents=h,C.clientEvents=g,C.normalizeEvent=b;for(var S,E,x=C.trigger,T=C.getView,k=C.reportEvents,H={events:[]},z=[H],F=0,R=0,N=0,W=[],A=0;r.length>A;A++)l(r[A])}function i(t,e,n){return t.setFullYear(t.getFullYear()+e),n||f(t),t}function s(t,e,n){if(+t){var r=t.getMonth()+e,a=d(t);for(a.setDate(1),a.setMonth(r),t.setMonth(r),n||f(t);t.getMonth()!=a.getMonth();)t.setDate(t.getDate()+(a>t?1:-1))}return t}function c(t,e,n){if(+t){var r=t.getDate()+e,a=d(t);a.setHours(9),a.setDate(r),t.setDate(r),n||f(t),l(t,a)}return t}function l(t,e){if(+t)for(;t.getDate()!=e.getDate();)t.setTime(+t+(e>t?1:-1)*xe)}function u(t,e){return t.setMinutes(t.getMinutes()+e),t}function f(t){return t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),t}function d(t,e){return e?f(new Date(+t)):new Date(+t)}function v(){var t,e=0;do t=new Date(1970,e++,1);while(t.getHours());return t}function h(t,e,n){for(e=e||1;!t.getDay()||n&&1==t.getDay()||!n&&6==t.getDay();)c(t,e);return t}function g(t,e){return Math.round((d(t,!0)-d(e,!0))/Ee)}function p(t,n,r,a){n!==e&&n!=t.getFullYear()&&(t.setDate(1),t.setMonth(0),t.setFullYear(n)),r!==e&&r!=t.getMonth()&&(t.setDate(1),t.setMonth(r)),a!==e&&t.setDate(a)}function m(t,n){return"object"==typeof t?t:"number"==typeof t?new Date(1e3*t):"string"==typeof t?t.match(/^\d+(\.\d+)?$/)?new Date(1e3*parseFloat(t)):(n===e&&(n=!0),y(t,n)||(t?new Date(t):null)):null}function y(t,e){var n=t.match(/^([0-9]{4})(-([0-9]{2})(-([0-9]{2})([T ]([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?(Z|(([-+])([0-9]{2})(:?([0-9]{2}))?))?)?)?)?$/);if(!n)return null;var r=new Date(n[1],0,1);if(e||!n[13]){var a=new Date(n[1],0,1,9,0);n[3]&&(r.setMonth(n[3]-1),a.setMonth(n[3]-1)),n[5]&&(r.setDate(n[5]),a.setDate(n[5])),l(r,a),n[7]&&r.setHours(n[7]),n[8]&&r.setMinutes(n[8]),n[10]&&r.setSeconds(n[10]),n[12]&&r.setMilliseconds(1e3*Number("0."+n[12])),l(r,a)}else if(r.setUTCFullYear(n[1],n[3]?n[3]-1:0,n[5]||1),r.setUTCHours(n[7]||0,n[8]||0,n[10]||0,n[12]?1e3*Number("0."+n[12]):0),n[14]){var o=60*Number(n[16])+(n[18]?Number(n[18]):0);o*="-"==n[15]?1:-1,r=new Date(+r+1e3*60*o)}return r}function b(t){if("number"==typeof t)return 60*t;if("object"==typeof t)return 60*t.getHours()+t.getMinutes();var e=t.match(/(\d+)(?::(\d+))?\s*(\w+)?/);if(e){var n=parseInt(e[1],10);return e[3]&&(n%=12,"p"==e[3].toLowerCase().charAt(0)&&(n+=12)),60*n+(e[2]?parseInt(e[2],10):0)}}function w(t,e,n){return D(t,null,e,n)}function D(t,e,n,r){r=r||ye;var a,o,i,s,c=t,l=e,u=n.length,f="";for(a=0;u>a;a++)if(o=n.charAt(a),"'"==o){for(i=a+1;u>i;i++)if("'"==n.charAt(i)){c&&(f+=i==a+1?"'":n.substring(a+1,i),a=i);break}}else if("("==o){for(i=a+1;u>i;i++)if(")"==n.charAt(i)){var d=w(c,n.substring(a+1,i),r);parseInt(d.replace(/\D/,""),10)&&(f+=d),a=i;break}}else if("["==o){for(i=a+1;u>i;i++)if("]"==n.charAt(i)){var v=n.substring(a+1,i),d=w(c,v,r);d!=w(l,v,r)&&(f+=d),a=i;break}}else if("{"==o)c=e,l=t;else if("}"==o)c=t,l=e;else{for(i=u;i>a;i--)if(s=ke[n.substring(a,i)]){c&&(f+=s(c,r)),a=i-1;break}i==a&&c&&(f+=o)}return f}function M(t){var e,n=new Date(t.getTime());return n.setDate(n.getDate()+4-(n.getDay()||7)),e=n.getTime(),n.setMonth(0),n.setDate(1),Math.floor(Math.round((e-n)/864e5)/7)+1}function C(t){return t.end?S(t.end,t.allDay):c(d(t.start),1)}function S(t,e){return t=d(t),e||t.getHours()||t.getMinutes()?c(t,1):f(t)}function E(t,e){return 100*(e.msLength-t.msLength)+(t.event.start-e.event.start)}function x(t,e){return t.end>e.start&&t.starta;a++)o=t[a],i=o.start,s=e[a],s>n&&r>i&&(n>i?(c=d(n),u=!1):(c=i,u=!0),s>r?(l=d(r),f=!1):(l=s,f=!0),v.push({event:o,start:c,end:l,isStart:u,isEnd:f,msLength:l-c}));return v.sort(E)}function k(t){var e,n,r,a,o,i=[],s=t.length;for(e=0;s>e;e++){for(n=t[e],r=0;;){if(a=!1,i[r])for(o=0;i[r].length>o;o++)if(x(i[r][o],n)){a=!0;break}if(!a)break;r++}i[r]?i[r].push(n):i[r]=[n]}return i}function H(n,r,a){n.unbind("mouseover").mouseover(function(n){for(var o,i,s,c=n.target;c!=this;)o=c,c=c.parentNode;(i=o._fci)!==e&&(o._fci=e,s=r[i],a(s.event,s.element,s),t(n.target).trigger(n)),n.stopPropagation()})}function z(e,n,r){for(var a,o=0;e.length>o;o++)a=t(e[o]),a.width(Math.max(0,n-R(a,r)))}function F(e,n,r){for(var a,o=0;e.length>o;o++)a=t(e[o]),a.height(Math.max(0,n-L(a,r)))}function R(t,e){return N(t)+A(t)+(e?W(t):0)}function N(e){return(parseFloat(t.css(e[0],"paddingLeft",!0))||0)+(parseFloat(t.css(e[0],"paddingRight",!0))||0)}function W(e){return(parseFloat(t.css(e[0],"marginLeft",!0))||0)+(parseFloat(t.css(e[0],"marginRight",!0))||0)}function A(e){return(parseFloat(t.css(e[0],"borderLeftWidth",!0))||0)+(parseFloat(t.css(e[0],"borderRightWidth",!0))||0)}function L(t,e){return _(t)+B(t)+(e?O(t):0)}function _(e){return(parseFloat(t.css(e[0],"paddingTop",!0))||0)+(parseFloat(t.css(e[0],"paddingBottom",!0))||0)}function O(e){return(parseFloat(t.css(e[0],"marginTop",!0))||0)+(parseFloat(t.css(e[0],"marginBottom",!0))||0)}function B(e){return(parseFloat(t.css(e[0],"borderTopWidth",!0))||0)+(parseFloat(t.css(e[0],"borderBottomWidth",!0))||0)}function q(t,e){e="number"==typeof e?e+"px":e,t.each(function(t,n){n.style.cssText+=";min-height:"+e+";_height:"+e})}function I(){}function Y(t,e){return t-e}function j(t){return Math.max.apply(Math,t)}function P(t){return(10>t?"0":"")+t}function J(t,n){if(t[n]!==e)return t[n];for(var r,a=n.split(/(?=[A-Z])/),o=a.length-1;o>=0;o--)if(r=t[a[o].toLowerCase()],r!==e)return r;return t[""]}function V(t){return t.replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\n/g,"
    ")}function X(t){return t.id+"/"+t.className+"/"+t.style.cssText.replace(/(^|;)\s*(top|left|width|height)\s*:[^;]*/gi,"")}function U(t){t.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return!1})}function Z(t){t.children().removeClass("fc-first fc-last").filter(":first-child").addClass("fc-first").end().filter(":last-child").addClass("fc-last")}function $(t,e){t.each(function(t,n){n.className=n.className.replace(/^fc-\w*/,"fc-"+Se[e.getDay()])})}function Q(t,e){var n=t.source||{},r=t.color,a=n.color,o=e("eventColor"),i=t.backgroundColor||r||n.backgroundColor||a||e("eventBackgroundColor")||o,s=t.borderColor||r||n.borderColor||a||e("eventBorderColor")||o,c=t.textColor||n.textColor||e("eventTextColor"),l=[];return i&&l.push("background-color:"+i),s&&l.push("border-color:"+s),c&&l.push("color:"+c),l.join(";")}function G(e,n,r){if(t.isFunction(e)&&(e=[e]),e){var a,o;for(a=0;e.length>a;a++)o=e[a].apply(n,r)||o;return o}}function K(){for(var t=0;arguments.length>t;t++)if(arguments[t]!==e)return arguments[t]}function te(t,e){function n(t,e){e&&(s(t,e),t.setDate(1));var n=d(t,!0);n.setDate(1);var l=s(d(n),1),u=d(n),f=d(l),v=a("firstDay"),g=a("weekends")?0:1;g&&(h(u),h(f,-1,!0)),c(u,-((u.getDay()-Math.max(v,g)+7)%7)),c(f,(7-f.getDay()+Math.max(v,g))%7);var p=Math.round((f-u)/(7*Ee));"fixed"==a("weekMode")&&(c(f,7*(6-p)),p=6),r.title=i(n,a("titleFormat")),r.start=n,r.end=l,r.visStart=u,r.visEnd=f,o(p,g?5:7,!0)}var r=this;r.render=n,re.call(r,t,e,"month");var a=r.opt,o=r.renderBasic,i=e.formatDate}function ee(t,e){function n(t,e){e&&c(t,7*e);var n=c(d(t),-((t.getDay()-a("firstDay")+7)%7)),s=c(d(n),7),l=d(n),u=d(s),f=a("weekends");f||(h(l),h(u,-1,!0)),r.title=i(l,c(d(u),-1),a("titleFormat")),r.start=n,r.end=s,r.visStart=l,r.visEnd=u,o(1,f?7:5,!1)}var r=this;r.render=n,re.call(r,t,e,"basicWeek");var a=r.opt,o=r.renderBasic,i=e.formatDates}function ne(t,e){function n(t,e){e&&(c(t,e),a("weekends")||h(t,0>e?-1:1)),r.title=i(t,a("titleFormat")),r.start=r.visStart=d(t,!0),r.end=r.visEnd=c(d(r.start),1),o(1,1,!1)}var r=this;r.render=n,re.call(r,t,e,"basicDay");var a=r.opt,o=r.renderBasic,i=e.formatDate}function re(e,n,r){function a(t,e,n){ne=t,re=e,o();var r=!P;r?i():Te(),s(n)}function o(){ce=Ee("isRTL"),ce?(le=-1,fe=re-1):(le=1,fe=0),pe=Ee("firstDay"),ye=Ee("weekends")?0:1,be=Ee("theme")?"ui":"fc",we=Ee("columnFormat"),De=Ee("weekNumbers"),Me=Ee("weekNumberTitle"),Ce="iso"!=Ee("weekNumberCalculation")?"w":"W"}function i(){Q=t("
    ").appendTo(e)}function s(n){var r,a,o,i,s="",c=be+"-widget-header",l=be+"-widget-content",u=B.start.getMonth(),d=f(new Date);for(s+="",De&&(s+="",r=0;ne>r;r++){for(s+="",De&&(s+=""),a=0;re>a;a++)o=F(r,a),i=["fc-day","fc-"+Se[o.getDay()],l],o.getMonth()!=u&&i.push("fc-other-month"),+o==+d&&(i.push("fc-today"),i.push(be+"-state-highlight")),s+="";s+=""}s+="
    "),r=0;re>r;r++)o=F(0,r),s+="";for(s+="
    "+"
    "+"
    "+"
    ",n&&(s+="
    "+o.getDate()+"
    "),s+="
     
    ",_(),I&&I.remove(),I=t(s).appendTo(e),Y=I.find("thead"),j=Y.find(".fc-day-header"),P=I.find("tbody"),J=P.find("tr"),V=P.find(".fc-day"),X=J.find("td:first-child"),$=J.eq(0).find(".fc-day-content > div"),Z(Y.add(Y.find("tr"))),Z(J),J.eq(0).addClass("fc-first"),J.filter(":last").addClass("fc-last"),De&&Y.find(".fc-week-number").text(Me),j.each(function(e,n){var r=R(e);t(n).text(Fe(r,we))}),De&&P.find(".fc-week-number > div").each(function(e,n){var r=F(e,0);t(n).text(Fe(r,Ce))}),V.each(function(e,n){var r=R(e);xe("dayRender",B,r,t(n))}),v(V)}function l(e){K=e;var n,r,a,o=K-Y.height();"variable"==Ee("weekMode")?n=r=Math.floor(o/(1==ne?2:6)):(n=Math.floor(o/ne),r=o-n*(ne-1)),X.each(function(e,o){ne>e&&(a=t(o),q(a.find("> div"),(e==ne-1?r:n)-L(a)))}),O()}function u(t){G=t,se.clear(),ee=0,De&&(ee=Y.find("th.fc-week-number").outerWidth()),te=Math.floor((G-ee)/re),z(j.slice(0,-1),te)}function v(t){t.click(h).mousedown(ze)}function h(e){if(!Ee("selectable")){var n=y(t(this).data("date"));xe("dayClick",this,n,!0,e)}}function p(t,e,n){n&&oe.build();for(var r=d(B.visStart),a=c(d(r),re),o=0;ne>o;o++){var i=new Date(Math.max(r,t)),s=new Date(Math.min(a,e));if(s>i){var l,u;ce?(l=g(s,r)*le+fe+1,u=g(i,r)*le+fe+1):(l=g(i,r),u=g(s,r)),v(m(o,l,o,u-1))}c(r,7),c(a,7)}}function m(t,n,r,a){var o=oe.rect(t,n,r,a,e);return ke(o,e)}function b(t){return d(t)}function w(t,e){p(t,c(d(e),1),!0)}function D(){He()}function M(t,e,n){var r=k(t),a=V[r.row*re+r.col];xe("dayClick",a,t,e,n)}function C(t,e){ie.start(function(t){He(),t&&m(t.row,t.col,t.row,t.col)},e)}function S(t,e,n){var r=ie.stop();if(He(),r){var a=H(r);xe("drop",t,a,!0,e,n)}}function E(t){return d(t.start)}function x(t){return se.left(t)}function T(t){return se.right(t)}function k(t){return{row:Math.floor(g(t,B.visStart)/7),col:N(t.getDay())}}function H(t){return F(t.row,t.col)}function F(t,e){return c(d(B.visStart),7*t+e*le+fe)}function R(t){return F(Math.floor(t/re),t%re)}function N(t){return(t-Math.max(pe,ye)+re)%re*le+fe}function W(t){return J.eq(t)}function A(){var t=0;return De&&(t+=ee),{left:t,right:G}}function _(){q(e,e.height())}function O(){q(e,1)}var B=this;B.renderBasic=a,B.setHeight=l,B.setWidth=u,B.renderDayOverlay=p,B.defaultSelectionEnd=b,B.renderSelection=w,B.clearSelection=D,B.reportDayClick=M,B.dragStart=C,B.dragStop=S,B.defaultEventEnd=E,B.getHoverListener=function(){return ie},B.colContentLeft=x,B.colContentRight=T,B.dayOfWeekCol=N,B.dateCell=k,B.cellDate=H,B.cellIsAllDay=function(){return!0},B.allDayRow=W,B.allDayBounds=A,B.getRowCnt=function(){return ne},B.getColCnt=function(){return re},B.getColWidth=function(){return te},B.getDaySegmentContainer=function(){return Q},ue.call(B,e,n,r),ve.call(B),de.call(B),ae.call(B);var I,Y,j,P,J,V,X,$,Q,G,K,te,ee,ne,re,oe,ie,se,ce,le,fe,pe,ye,be,we,De,Me,Ce,Ee=B.opt,xe=B.trigger,Te=B.clearEvents,ke=B.renderOverlay,He=B.clearOverlays,ze=B.daySelectionMousedown,Fe=n.formatDate;U(e.addClass("fc-grid")),oe=new he(function(e,n){var r,a,o;j.each(function(e,i){r=t(i),a=r.offset().left,e&&(o[1]=a),o=[a],n[e]=o}),o[1]=a+r.outerWidth(),J.each(function(n,i){ne>n&&(r=t(i),a=r.offset().top,n&&(o[1]=a),o=[a],e[n]=o)}),o[1]=a+r.outerHeight()}),ie=new ge(oe),se=new me(function(t){return $.eq(t)})}function ae(){function e(t,e){v(t),x(r(t),e),l("eventAfterAllRender")}function n(){h(),b().empty()}function r(e){var n,r,a,o,s,l,u=S(),f=E(),v=d(i.visStart),h=c(d(v),f),g=t.map(e,C),p=[];for(n=0;u>n;n++){for(r=k(T(e,g,v,h)),a=0;r.length>a;a++)for(o=r[a],s=0;o.length>s;s++)l=o[s],l.row=n,l.level=a,p.push(l);c(v,7),c(h,7)}return p}function a(t,e,n){u(t)&&o(t,e),n.isEnd&&f(t)&&H(t,e,n),g(t,e)}function o(t,e){var n,r=w();e.draggable({zIndex:9,delay:50,opacity:s("dragOpacity"),revertDuration:s("dragRevertDuration"),start:function(a,o){l("eventDragStart",e,t,a,o),m(t,e),r.start(function(r,a,o,i){e.draggable("option","revert",!r||!o&&!i),M(),r?(n=7*o+i*(s("isRTL")?-1:1),D(c(d(t.start),n),c(C(t),n))):n=0},a,"drag")},stop:function(a,o){r.stop(),M(),l("eventDragStop",e,t,a,o),n?y(this,t,n,0,t.allDay,a,o):(e.css("filter",""),p(t,e))}})}var i=this;i.renderEvents=e,i.compileDaySegs=r,i.clearEvents=n,i.bindDaySeg=a,fe.call(i);var s=i.opt,l=i.trigger,u=i.isEventDraggable,f=i.isEventResizable,v=i.reportEvents,h=i.reportEventClear,g=i.eventElementHandlers,p=i.showEvents,m=i.hideEvents,y=i.eventDrop,b=i.getDaySegmentContainer,w=i.getHoverListener,D=i.renderDayOverlay,M=i.clearOverlays,S=i.getRowCnt,E=i.getColCnt,x=i.renderDaySegs,H=i.resizableDayEvent}function oe(t,e){function n(t,e){e&&c(t,7*e);var n=c(d(t),-((t.getDay()-a("firstDay")+7)%7)),s=c(d(n),7),l=d(n),u=d(s),f=a("weekends");f||(h(l),h(u,-1,!0)),r.title=i(l,c(d(u),-1),a("titleFormat")),r.start=n,r.end=s,r.visStart=l,r.visEnd=u,o(f?7:5)}var r=this;r.render=n,se.call(r,t,e,"agendaWeek");var a=r.opt,o=r.renderAgenda,i=e.formatDates}function ie(t,e){function n(t,e){e&&(c(t,e),a("weekends")||h(t,0>e?-1:1));var n=d(t,!0),s=c(d(n),1);r.title=i(t,a("titleFormat")),r.start=r.visStart=n,r.end=r.visEnd=s,o(1)}var r=this;r.render=n,se.call(r,t,e,"agendaDay");var a=r.opt,o=r.renderAgenda,i=e.formatDate}function se(n,r,a){function o(t){Le=t,i(),te?nn():s(),l()}function i(){Ye=tn("theme")?"ui":"fc",Pe=tn("weekends")?0:1,je=tn("firstDay"),(Je=tn("isRTL"))?(Ve=-1,Xe=Le-1):(Ve=1,Xe=0),Ue=b(tn("minTime")),Ze=b(tn("maxTime")),$e=tn("columnFormat"),Qe=tn("weekNumbers"),Ge=tn("weekNumberTitle"),Ke="iso"!=tn("weekNumberCalculation")?"w":"W",Ne=tn("snapMinutes")||tn("slotMinutes")}function s(){var e,r,a,o,i,s=Ye+"-widget-header",c=Ye+"-widget-content",l=0==tn("slotMinutes")%15;for(e="",e+=Qe?"",r=0;Le>r;r++)e+=""+""+""+""+""+"",r=0;Le>r;r++)e+="";for(e+=""+""+""+"
    ":" ";for(e+=" 
     "+"
    "+"
    "+"
     
    "+"
    "+"
    "+"
     
    ",te=t(e).appendTo(n),ee=te.find("thead"),ne=ee.find("th").slice(1,-1),re=te.find("tbody"),ae=re.find("td").slice(0,-1),oe=ae.find("div.fc-day-content div"),ie=ae.eq(0),se=ie.find("> div"),Z(ee.add(ee.find("tr"))),Z(re.add(re.find("tr"))),Se=ee.find("th:first"),Ee=te.find(".fc-agenda-gutter"),le=t("
    ").appendTo(n),tn("allDaySlot")?(fe=t("
    ").appendTo(le),e=""+""+""+""+"
    "+tn("allDayText")+""+"
    "+"
     
    ",pe=t(e).appendTo(le),ye=pe.find("tr"),D(ye.find("td")),Se=Se.add(pe.find("th:first")),Ee=Ee.add(pe.find("th.fc-agenda-gutter")),le.append("
    "+"
    "+"
    ")):fe=t([]),be=t("
    ").appendTo(le),we=t("
    ").appendTo(be),De=t("
    ").appendTo(we),e="",a=v(),o=u(d(a),Ze),u(a,Ue),_e=0,r=0;o>a;r++)i=a.getMinutes(),e+=""+""+""+"",u(a,tn("slotMinutes")),_e++;e+="
    "+(l&&i?" ":un(a,tn("axisFormat")))+""+"
     
    "+"
    ",Me=t(e).appendTo(we),Ce=Me.find("div:first"),M(Me.find("td")),Se=Se.add(Me.find("th:first"))}function l(){var t,e,n,r,a=f(new Date);if(Qe){var o=un(N(0),Ke);Je?o+=Ge:o=Ge+o,ee.find(".fc-week-number").text(o)}for(t=0;Le>t;t++)r=N(t),e=ne.eq(t),e.html(un(r,$e)),n=ae.eq(t),+r==+a?n.addClass(Ye+"-state-highlight fc-today"):n.removeClass(Ye+"-state-highlight fc-today"),$(e.add(n),r)}function h(t,n){t===e&&(t=ke),ke=t,fn={};var r=re.position().top,a=be.position().top,o=Math.min(t-r,Me.height()+a+1);se.height(o-L(ie)),le.css("top",r),be.height(o-a-1),Re=Ce.height()+1,We=tn("slotMinutes")/Ne,Ae=Re/We,n&&m()}function p(e){Te=e,qe.clear(),He=0,z(Se.width("").each(function(e,n){He=Math.max(He,t(n).outerWidth())}),He);var n=be[0].clientWidth;Fe=be.width()-n,Fe?(z(Ee,Fe),Ee.show().prev().removeClass("fc-last")):Ee.hide().prev().addClass("fc-last"),ze=Math.floor((n-He)/Le),z(ne.slice(0,-1),ze)}function m(){function t(){be.scrollTop(r)}var e=v(),n=d(e);n.setHours(tn("firstHour"));var r=_(e,n)+1;t(),setTimeout(t,0)}function y(){Ie=be.scrollTop()}function w(){be.scrollTop(Ie)}function D(t){t.click(C).mousedown(cn)}function M(t){t.click(C).mousedown(V)}function C(t){if(!tn("selectable")){var e=Math.min(Le-1,Math.floor((t.pageX-te.offset().left-He)/ze)),n=N(e),r=this.parentNode.className.match(/fc-slot(\d+)/);if(r){var a=parseInt(r[1])*tn("slotMinutes"),o=Math.floor(a/60);n.setHours(o),n.setMinutes(a%60+Ue),en("dayClick",ae[e],n,!1,t)}else en("dayClick",ae[e],n,!0,t)}}function S(t,e,n){n&&Oe.build();var r,a,o=d(K.visStart);Je?(r=g(e,o)*Ve+Xe+1,a=g(t,o)*Ve+Xe+1):(r=g(t,o),a=g(e,o)),r=Math.max(0,r),a=Math.min(Le,a),a>r&&D(E(0,r,0,a-1))}function E(t,e,n,r){var a=Oe.rect(t,e,n,r,le);return rn(a,le)}function x(t,e){for(var n=d(K.visStart),r=c(d(n),1),a=0;Le>a;a++){var o=new Date(Math.max(n,t)),i=new Date(Math.min(r,e));if(i>o){var s=a*Ve+Xe,l=Oe.rect(0,s,0,s,we),u=_(n,o),f=_(n,i);l.top=u,l.height=f-u,M(rn(l,we))}c(n,1),c(r,1)}}function T(t){return qe.left(t)}function k(t){return qe.right(t)}function H(t){return{row:Math.floor(g(t,K.visStart)/7),col:A(t.getDay())}}function R(t){var e=N(t.col),n=t.row;return tn("allDaySlot")&&n--,n>=0&&u(e,Ue+n*Ne),e}function N(t){return c(d(K.visStart),t*Ve+Xe)}function W(t){return tn("allDaySlot")&&!t.row}function A(t){return(t-Math.max(je,Pe)+Le)%Le*Ve+Xe}function _(t,n){if(t=d(t,!0),u(d(t),Ue)>n)return 0;if(n>=u(d(t),Ze))return Me.height();var r=tn("slotMinutes"),a=60*n.getHours()+n.getMinutes()-Ue,o=Math.floor(a/r),i=fn[o];return i===e&&(i=fn[o]=Me.find("tr:eq("+o+") td div")[0].offsetTop),Math.max(0,Math.round(i-1+Re*(a%r/r)))}function O(){return{left:He,right:Te-Fe}}function B(){return ye}function q(t){var e=d(t.start);return t.allDay?e:u(e,tn("defaultEventMinutes"))}function I(t,e){return e?d(t):u(d(t),tn("slotMinutes"))}function j(t,e,n){n?tn("allDaySlot")&&S(t,c(d(e),1),!0):P(t,e)}function P(e,n){var r=tn("selectHelper");if(Oe.build(),r){var a=g(e,K.visStart)*Ve+Xe;if(a>=0&&Le>a){var o=Oe.rect(0,a,0,a,we),i=_(e,e),s=_(e,n);if(s>i){if(o.top=i,o.height=s-i,o.left+=2,o.width-=5,t.isFunction(r)){var c=r(e,n);c&&(o.position="absolute",o.zIndex=8,xe=t(c).css(o).appendTo(we))}else o.isStart=!0,o.isEnd=!0,xe=t(ln({title:"",start:e,end:n,className:["fc-select-helper"],editable:!1},o)),xe.css("opacity",tn("dragOpacity"));xe&&(M(xe),we.append(xe),z(xe,o.width,!0),F(xe,o.height,!0))}}}else x(e,n)}function J(){an(),xe&&(xe.remove(),xe=null)}function V(e){if(1==e.which&&tn("selectable")){sn(e);var n;Be.start(function(t,e){if(J(),t&&t.col==e.col&&!W(t)){var r=R(e),a=R(t);n=[r,u(d(r),Ne),a,u(d(a),Ne)].sort(Y),P(n[0],n[3])}else n=null},e),t(document).one("mouseup",function(t){Be.stop(),n&&(+n[0]==+n[1]&&X(n[0],!1,t),on(n[0],n[3],!1,t))})}}function X(t,e,n){en("dayClick",ae[A(t.getDay())],t,e,n)}function Q(t,e){Be.start(function(t){if(an(),t)if(W(t))E(t.row,t.col,t.row,t.col);else{var e=R(t),n=u(d(e),tn("defaultEventMinutes"));x(e,n)}},e)}function G(t,e,n){var r=Be.stop();an(),r&&en("drop",t,R(r),W(r),e,n)}var K=this;K.renderAgenda=o,K.setWidth=p,K.setHeight=h,K.beforeHide=y,K.afterShow=w,K.defaultEventEnd=q,K.timePosition=_,K.dayOfWeekCol=A,K.dateCell=H,K.cellDate=R,K.cellIsAllDay=W,K.allDayRow=B,K.allDayBounds=O,K.getHoverListener=function(){return Be},K.colContentLeft=T,K.colContentRight=k,K.getDaySegmentContainer=function(){return fe},K.getSlotSegmentContainer=function(){return De},K.getMinMinute=function(){return Ue},K.getMaxMinute=function(){return Ze},K.getBodyContent=function(){return we},K.getRowCnt=function(){return 1},K.getColCnt=function(){return Le},K.getColWidth=function(){return ze},K.getSnapHeight=function(){return Ae},K.getSnapMinutes=function(){return Ne},K.defaultSelectionEnd=I,K.renderDayOverlay=S,K.renderSelection=j,K.clearSelection=J,K.reportDayClick=X,K.dragStart=Q,K.dragStop=G,ue.call(K,n,r,a),ve.call(K),de.call(K),ce.call(K);var te,ee,ne,re,ae,oe,ie,se,le,fe,pe,ye,be,we,De,Me,Ce,Se,Ee,xe,Te,ke,He,ze,Fe,Re,Ne,We,Ae,Le,_e,Oe,Be,qe,Ie,Ye,je,Pe,Je,Ve,Xe,Ue,Ze,$e,Qe,Ge,Ke,tn=K.opt,en=K.trigger,nn=K.clearEvents,rn=K.renderOverlay,an=K.clearOverlays,on=K.reportSelection,sn=K.unselect,cn=K.daySelectionMousedown,ln=K.slotSegHtml,un=r.formatDate,fn={};U(n.addClass("fc-agenda")),Oe=new he(function(e,n){function r(t){return Math.max(c,Math.min(l,t))}var a,o,i;ne.each(function(e,r){a=t(r),o=a.offset().left,e&&(i[1]=o),i=[o],n[e]=i}),i[1]=o+a.outerWidth(),tn("allDaySlot")&&(a=ye,o=a.offset().top,e[0]=[o,o+a.outerHeight()]);for(var s=we.offset().top,c=be.offset().top,l=c+be.outerHeight(),u=0;_e*We>u;u++)e.push([r(s+Ae*u),r(s+Ae*(u+1))])}),Be=new ge(Oe),qe=new me(function(t){return oe.eq(t)})}function ce(){function n(t,e){S(t);var n,r=t.length,i=[],c=[];for(n=0;r>n;n++)t[n].allDay?i.push(t[n]):c.push(t[n]);y("allDaySlot")&&(Y(a(i),e),z()),s(o(c),e),b("eventAfterAllRender")}function r(){E(),N().empty(),W().empty()}function a(e){var n,r,a,o,i=k(T(e,t.map(e,C),m.visStart,m.visEnd)),s=i.length,c=[];for(n=0;s>n;n++)for(r=i[n],a=0;r.length>a;a++)o=r[a],o.row=0,o.level=n,c.push(o);return c}function o(e){var n,r,a,o,s,l,f=P(),v=O(),h=_(),g=u(d(m.visStart),v),p=t.map(e,i),y=[];for(n=0;f>n;n++){for(r=k(T(e,p,g,u(d(g),h-v))),le(r),a=0;r.length>a;a++)for(o=r[a],s=0;o.length>s;s++)l=o[s],l.col=n,l.level=a,y.push(l);c(g,1,!0)}return y}function i(t){return t.end?d(t.end):u(d(t.start),y("defaultEventMinutes"))}function s(n,r){var a,o,i,s,c,u,f,d,h,g,p,m,w,D,M,C,S,E,x,T,k,z,F=n.length,N="",A={},_={},O=W(),Y=P();for((T=y("isRTL"))?(k=-1,z=Y-1):(k=1,z=0),a=0;F>a;a++)o=n[a],i=o.event,s=B(o.start,o.start),c=B(o.start,o.end),u=o.col,f=o.level,d=o.forward||0,h=q(u*k+z),g=I(u*k+z)-h,g=Math.min(g-6,.95*g),p=f?g/(f+d+1):d?2*(g/(d+1)-6):g,m=h+g/(f+d+1)*f*k+(T?g-p:0),o.top=s,o.left=m,o.outerWidth=p,o.outerHeight=c-s,N+=l(i,o); -for(O[0].innerHTML=N,w=O.children(),a=0;F>a;a++)o=n[a],i=o.event,D=t(w[a]),M=b("eventRender",i,i,D),M===!1?D.remove():(M&&M!==!0&&(D.remove(),D=t(M).css({position:"absolute",top:o.top,left:o.left}).appendTo(O)),o.element=D,i._id===r?v(i,D,o):D[0]._fci=a,G(i,D));for(H(O,n,v),a=0;F>a;a++)o=n[a],(D=o.element)&&(S=A[C=o.key=X(D[0])],o.vsides=S===e?A[C]=L(D,!0):S,S=_[C],o.hsides=S===e?_[C]=R(D,!0):S,E=D.find(".fc-event-title"),E.length&&(o.contentTop=E[0].offsetTop));for(a=0;F>a;a++)o=n[a],(D=o.element)&&(D[0].style.width=Math.max(0,o.outerWidth-o.hsides)+"px",x=Math.max(0,o.outerHeight-o.vsides),D[0].style.height=x+"px",i=o.event,o.contentTop!==e&&10>x-o.contentTop&&(D.find("div.fc-event-time").text(ie(i.start,y("timeFormat"))+" - "+i.title),D.find("div.fc-event-title").remove()),b("eventAfterRender",i,i,D))}function l(t,e){var n="<",r=t.url,a=Q(t,y),o=["fc-event","fc-event-vert"];return w(t)&&o.push("fc-event-draggable"),e.isStart&&o.push("fc-event-start"),e.isEnd&&o.push("fc-event-end"),o=o.concat(t.className),t.source&&(o=o.concat(t.source.className||[])),n+=r?"a href='"+V(t.url)+"'":"div",n+=" class='"+o.join(" ")+"'"+" style='position:absolute;z-index:8;top:"+e.top+"px;left:"+e.left+"px;"+a+"'"+">"+"
    "+"
    "+V(se(t.start,t.end,y("timeFormat")))+"
    "+"
    "+V(t.title)+"
    "+"
    "+"
    ",e.isEnd&&D(t)&&(n+="
    =
    "),n+=""}function f(t,e,n){w(t)&&h(t,e,n.isStart),n.isEnd&&D(t)&&j(t,e,n),x(t,e)}function v(t,e,n){var r=e.find("div.fc-event-time");w(t)&&g(t,e,r),n.isEnd&&D(t)&&p(t,e,r),x(t,e)}function h(t,e,n){function r(){s||(e.width(a).height("").draggable("option","grid",null),s=!0)}var a,o,i,s=!0,l=y("isRTL")?-1:1,u=A(),f=J(),v=U(),h=Z(),g=O();e.draggable({zIndex:9,opacity:y("dragOpacity","month"),revertDuration:y("dragRevertDuration"),start:function(g,p){b("eventDragStart",e,t,g,p),te(t,e),a=e.width(),u.start(function(a,u,g,p){ae(),a?(o=!1,i=p*l,a.row?n?s&&(e.width(f-10),F(e,v*Math.round((t.end?(t.end-t.start)/Te:y("defaultEventMinutes"))/h)),e.draggable("option","grid",[f,1]),s=!1):o=!0:(re(c(d(t.start),i),c(C(t),i)),r()),o=o||s&&!i):(r(),o=!0),e.draggable("option","revert",o)},g,"drag")},stop:function(n,a){if(u.stop(),ae(),b("eventDragStop",e,t,n,a),o)r(),e.css("filter",""),K(t,e);else{var c=0;s||(c=Math.round((e.offset().top-$().offset().top)/v)*h+g-(60*t.start.getHours()+t.start.getMinutes())),ee(this,t,i,c,s,n,a)}}})}function g(t,e,n){function r(e){var r,a=u(d(t.start),e);t.end&&(r=u(d(t.end),e)),n.text(se(a,r,y("timeFormat")))}function a(){f&&(n.css("display",""),e.draggable("option","grid",[p,m]),f=!1)}var o,i,s,l,f=!1,v=y("isRTL")?-1:1,h=A(),g=P(),p=J(),m=U(),w=Z();e.draggable({zIndex:9,scroll:!1,grid:[p,m],axis:1==g?"y":!1,opacity:y("dragOpacity"),revertDuration:y("dragRevertDuration"),start:function(r,u){b("eventDragStart",e,t,r,u),te(t,e),o=e.position(),s=l=0,h.start(function(r,o,s,l){e.draggable("option","revert",!r),ae(),r&&(i=l*v,y("allDaySlot")&&!r.row?(f||(f=!0,n.hide(),e.draggable("option","grid",null)),re(c(d(t.start),i),c(C(t),i))):a())},r,"drag")},drag:function(t,e){s=Math.round((e.position.top-o.top)/m)*w,s!=l&&(f||r(s),l=s)},stop:function(n,c){var l=h.stop();ae(),b("eventDragStop",e,t,n,c),l&&(i||s||f)?ee(this,t,i,f?0:s,f,n,c):(a(),e.css("filter",""),e.css(o),r(0),K(t,e))}})}function p(t,e,n){var r,a,o=U(),i=Z();e.resizable({handles:{s:".ui-resizable-handle"},grid:o,start:function(n,o){r=a=0,te(t,e),e.css("z-index",9),b("eventResizeStart",this,t,n,o)},resize:function(s,c){r=Math.round((Math.max(o,e.height())-c.originalSize.height)/o),r!=a&&(n.text(se(t.start,r||t.end?u(M(t),i*r):null,y("timeFormat"))),a=r)},stop:function(n,a){b("eventResizeStop",this,t,n,a),r?ne(this,t,0,i*r,n,a):(e.css("z-index",8),K(t,e))}})}var m=this;m.renderEvents=n,m.compileDaySegs=a,m.clearEvents=r,m.slotSegHtml=l,m.bindDaySeg=f,fe.call(m);var y=m.opt,b=m.trigger,w=m.isEventDraggable,D=m.isEventResizable,M=m.eventEnd,S=m.reportEvents,E=m.reportEventClear,x=m.eventElementHandlers,z=m.setHeight,N=m.getDaySegmentContainer,W=m.getSlotSegmentContainer,A=m.getHoverListener,_=m.getMaxMinute,O=m.getMinMinute,B=m.timePosition,q=m.colContentLeft,I=m.colContentRight,Y=m.renderDaySegs,j=m.resizableDayEvent,P=m.getColCnt,J=m.getColWidth,U=m.getSnapHeight,Z=m.getSnapMinutes,$=m.getBodyContent,G=m.reportEventElement,K=m.showEvents,te=m.hideEvents,ee=m.eventDrop,ne=m.eventResize,re=m.renderDayOverlay,ae=m.clearOverlays,oe=m.calendar,ie=oe.formatDate,se=oe.formatDates}function le(t){var e,n,r,a,o,i;for(e=t.length-1;e>0;e--)for(a=t[e],n=0;a.length>n;n++)for(o=a[n],r=0;t[e-1].length>r;r++)i=t[e-1][r],x(o,i)&&(i.forward=Math.max(i.forward||0,(o.forward||0)+1))}function ue(t,n,r){function a(t,e){var n=F[t];return"object"==typeof n?J(n,e||r):n}function o(t,e){return n.trigger.apply(n,[t,e||S].concat(Array.prototype.slice.call(arguments,2),[S]))}function i(t){return l(t)&&!a("disableDragging")}function s(t){return l(t)&&!a("disableResizing")}function l(t){return K(t.editable,(t.source||{}).editable,a("editable"))}function f(t){k={};var e,n,r=t.length;for(e=0;r>e;e++)n=t[e],k[n._id]?k[n._id].push(n):k[n._id]=[n]}function v(t){return t.end?d(t.end):E(t)}function h(t,e){H.push(e),z[t._id]?z[t._id].push(e):z[t._id]=[e]}function g(){H=[],z={}}function p(t,n){n.click(function(r){return n.hasClass("ui-draggable-dragging")||n.hasClass("ui-resizable-resizing")?e:o("eventClick",this,t,r)}).hover(function(e){o("eventMouseover",this,t,e)},function(e){o("eventMouseout",this,t,e)})}function m(t,e){b(t,e,"show")}function y(t,e){b(t,e,"hide")}function b(t,e,n){var r,a=z[t._id],o=a.length;for(r=0;o>r;r++)e&&a[r][0]==e[0]||a[r][n]()}function w(t,e,n,r,a,i,s){var c=e.allDay,l=e._id;M(k[l],n,r,a),o("eventDrop",t,e,n,r,a,function(){M(k[l],-n,-r,c),T(l)},i,s),T(l)}function D(t,e,n,r,a,i){var s=e._id;C(k[s],n,r),o("eventResize",t,e,n,r,function(){C(k[s],-n,-r),T(s)},a,i),T(s)}function M(t,n,r,a){r=r||0;for(var o,i=t.length,s=0;i>s;s++)o=t[s],a!==e&&(o.allDay=a),u(c(o.start,n,!0),r),o.end&&(o.end=u(c(o.end,n,!0),r)),x(o,F)}function C(t,e,n){n=n||0;for(var r,a=t.length,o=0;a>o;o++)r=t[o],r.end=u(c(v(r),e,!0),n),x(r,F)}var S=this;S.element=t,S.calendar=n,S.name=r,S.opt=a,S.trigger=o,S.isEventDraggable=i,S.isEventResizable=s,S.reportEvents=f,S.eventEnd=v,S.reportEventElement=h,S.reportEventClear=g,S.eventElementHandlers=p,S.showEvents=m,S.hideEvents=y,S.eventDrop=w,S.eventResize=D;var E=S.defaultEventEnd,x=n.normalizeEvent,T=n.reportEventChange,k={},H=[],z={},F=n.options}function fe(){function n(t,e){var n,r,c,d,p,m,y,b,w=B(),D=T(),M=k(),C=0,S=t.length;for(w[0].innerHTML=a(t),o(t,w.children()),i(t),s(t,w,e),l(t),u(t),f(t),n=v(),r=0;D>r;r++){for(c=0,d=[],p=0;M>p;p++)d[p]=0;for(;S>C&&(m=t[C]).row==r;){for(y=j(d.slice(m.startCol,m.endCol)),m.top=y,y+=m.outerHeight,b=m.startCol;m.endCol>b;b++)d[b]=y;C++}n[r].height(j(d))}g(t,h(n))}function r(e,n,r){var i,s,c,d=t("
    "),p=B(),m=e.length;for(d[0].innerHTML=a(e),i=d.children(),p.append(i),o(e,i),l(e),u(e),f(e),g(e,h(v())),i=[],s=0;m>s;s++)c=e[s].element,c&&(e[s].row===n&&c.css("top",r),i.push(c[0]));return t(i)}function a(t){var e,n,r,a,o,i,s,c,l,u,f=y("isRTL"),d=t.length,v=F(),h=v.left,g=v.right,p="";for(e=0;d>e;e++)n=t[e],r=n.event,o=["fc-event","fc-event-hori"],w(r)&&o.push("fc-event-draggable"),n.isStart&&o.push("fc-event-start"),n.isEnd&&o.push("fc-event-end"),f?(i=A(n.end.getDay()-1),s=A(n.start.getDay()),c=n.isEnd?N(i):h,l=n.isStart?W(s):g):(i=A(n.start.getDay()),s=A(n.end.getDay()-1),c=n.isStart?N(i):h,l=n.isEnd?W(s):g),o=o.concat(r.className),r.source&&(o=o.concat(r.source.className||[])),a=r.url,u=Q(r,y),p+=a?""+"
    ",!r.allDay&&n.isStart&&(p+=""+V(I(r.start,r.end,y("timeFormat")))+""),p+=""+V(r.title)+""+"
    ",n.isEnd&&D(r)&&(p+="
    "+"   "+"
    "),p+="",n.left=c,n.outerWidth=l-c,n.startCol=i,n.endCol=s+1;return p}function o(e,n){var r,a,o,i,s,c=e.length;for(r=0;c>r;r++)a=e[r],o=a.event,i=t(n[r]),s=b("eventRender",o,o,i),s===!1?i.remove():(s&&s!==!0&&(s=t(s).css({position:"absolute",left:a.left}),i.replaceWith(s),i=s),a.element=i)}function i(t){var e,n,r,a=t.length;for(e=0;a>e;e++)n=t[e],r=n.element,r&&C(n.event,r)}function s(t,e,n){var r,a,o,i,s=t.length;for(r=0;s>r;r++)a=t[r],o=a.element,o&&(i=a.event,i._id===n?q(i,o,a):o[0]._fci=r);H(e,t,q)}function l(t){var n,r,a,o,i,s=t.length,c={};for(n=0;s>n;n++)r=t[n],a=r.element,a&&(o=r.key=X(a[0]),i=c[o],i===e&&(i=c[o]=R(a,!0)),r.hsides=i)}function u(t){var e,n,r,a=t.length;for(e=0;a>e;e++)n=t[e],r=n.element,r&&(r[0].style.width=Math.max(0,n.outerWidth-n.hsides)+"px")}function f(t){var n,r,a,o,i,s=t.length,c={};for(n=0;s>n;n++)r=t[n],a=r.element,a&&(o=r.key,i=c[o],i===e&&(i=c[o]=O(a)),r.outerHeight=a[0].offsetHeight+i)}function v(){var t,e=T(),n=[];for(t=0;e>t;t++)n[t]=z(t).find("div.fc-day-content > div");return n}function h(t){var e,n=t.length,r=[];for(e=0;n>e;e++)r[e]=t[e][0].offsetTop;return r}function g(t,e){var n,r,a,o,i=t.length;for(n=0;i>n;n++)r=t[n],a=r.element,a&&(a[0].style.top=e[r.row]+(r.top||0)+"px",o=r.event,b("eventAfterRender",o,o,a))}function p(e,n,a){var o=y("isRTL"),i=o?"w":"e",s=n.find(".ui-resizable-"+i),l=!1;U(n),n.mousedown(function(t){t.preventDefault()}).click(function(t){l&&(t.preventDefault(),t.stopImmediatePropagation())}),s.mousedown(function(s){function u(n){b("eventResizeStop",this,e,n),t("body").css("cursor",""),h.stop(),P(),f&&x(this,e,f,0,n),setTimeout(function(){l=!1},0)}if(1==s.which){l=!0;var f,v,h=m.getHoverListener(),g=T(),p=k(),y=o?-1:1,w=o?p-1:0,D=n.css("top"),C=t.extend({},e),H=L(e.start);J(),t("body").css("cursor",i+"-resize").one("mouseup",u),b("eventResizeStart",this,e,s),h.start(function(t,n){if(t){var s=Math.max(H.row,t.row),l=t.col;1==g&&(s=0),s==H.row&&(l=o?Math.min(H.col,l):Math.max(H.col,l)),f=7*s+l*y+w-(7*n.row+n.col*y+w);var u=c(M(e),f,!0);if(f){C.end=u;var h=v;v=r(_([C]),a.row,D),v.find("*").css("cursor",i+"-resize"),h&&h.remove(),E(e)}else v&&(S(e),v.remove(),v=null);P(),Y(e.start,c(d(u),1))}},s)}})}var m=this;m.renderDaySegs=n,m.resizableDayEvent=p;var y=m.opt,b=m.trigger,w=m.isEventDraggable,D=m.isEventResizable,M=m.eventEnd,C=m.reportEventElement,S=m.showEvents,E=m.hideEvents,x=m.eventResize,T=m.getRowCnt,k=m.getColCnt;m.getColWidth;var z=m.allDayRow,F=m.allDayBounds,N=m.colContentLeft,W=m.colContentRight,A=m.dayOfWeekCol,L=m.dateCell,_=m.compileDaySegs,B=m.getDaySegmentContainer,q=m.bindDaySeg,I=m.calendar.formatDates,Y=m.renderDayOverlay,P=m.clearOverlays,J=m.clearSelection}function de(){function e(t,e,a){n(),e||(e=c(t,a)),l(t,e,a),r(t,e,a)}function n(t){f&&(f=!1,u(),s("unselect",null,t))}function r(t,e,n,r){f=!0,s("select",null,t,e,n,r)}function a(e){var a=o.cellDate,s=o.cellIsAllDay,c=o.getHoverListener(),f=o.reportDayClick;if(1==e.which&&i("selectable")){n(e);var d;c.start(function(t,e){u(),t&&s(t)?(d=[a(e),a(t)].sort(Y),l(d[0],d[1],!0)):d=null},e),t(document).one("mouseup",function(t){c.stop(),d&&(+d[0]==+d[1]&&f(d[0],!0,t),r(d[0],d[1],!0,t))})}}var o=this;o.select=e,o.unselect=n,o.reportSelection=r,o.daySelectionMousedown=a;var i=o.opt,s=o.trigger,c=o.defaultSelectionEnd,l=o.renderSelection,u=o.clearSelection,f=!1;i("selectable")&&i("unselectAuto")&&t(document).mousedown(function(e){var r=i("unselectCancel");r&&t(e.target).parents(r).length||n(e)})}function ve(){function e(e,n){var r=o.shift();return r||(r=t("
    ")),r[0].parentNode!=n[0]&&r.appendTo(n),a.push(r.css(e).show()),r}function n(){for(var t;t=a.shift();)o.push(t.hide().unbind())}var r=this;r.renderOverlay=e,r.clearOverlays=n;var a=[],o=[]}function he(t){var e,n,r=this;r.build=function(){e=[],n=[],t(e,n)},r.cell=function(t,r){var a,o=e.length,i=n.length,s=-1,c=-1;for(a=0;o>a;a++)if(r>=e[a][0]&&e[a][1]>r){s=a;break}for(a=0;i>a;a++)if(t>=n[a][0]&&n[a][1]>t){c=a;break}return s>=0&&c>=0?{row:s,col:c}:null},r.rect=function(t,r,a,o,i){var s=i.offset();return{top:e[t][0]-s.top,left:n[r][0]-s.left,width:n[o][1]-n[r][0],height:e[a][1]-e[t][0]}}}function ge(e){function n(t){pe(t);var n=e.cell(t.pageX,t.pageY);(!n!=!i||n&&(n.row!=i.row||n.col!=i.col))&&(n?(o||(o=n),a(n,o,n.row-o.row,n.col-o.col)):a(n,o),i=n)}var r,a,o,i,s=this;s.start=function(s,c,l){a=s,o=i=null,e.build(),n(c),r=l||"mousemove",t(document).bind(r,n)},s.stop=function(){return t(document).unbind(r,n),i}}function pe(t){t.pageX===e&&(t.pageX=t.originalEvent.pageX,t.pageY=t.originalEvent.pageY)}function me(t){function n(e){return a[e]=a[e]||t(e)}var r=this,a={},o={},i={};r.left=function(t){return o[t]=o[t]===e?n(t).position().left:o[t]},r.right=function(t){return i[t]=i[t]===e?r.left(t)+n(t).width():i[t]},r.clear=function(){a={},o={},i={}}}var ye={defaultView:"month",aspectRatio:1.35,header:{left:"title",center:"",right:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"iso",weekNumberTitle:"W",allDayDefault:!0,ignoreTimezone:!0,lazyFetching:!0,startParam:"start",endParam:"end",titleFormat:{month:"MMMM yyyy",week:"MMM d[ yyyy]{ '—'[ MMM] d yyyy}",day:"dddd, MMM d, yyyy"},columnFormat:{month:"ddd",week:"ddd M/d",day:"dddd M/d"},timeFormat:{"":"h(:mm)t"},isRTL:!1,firstDay:0,monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],buttonText:{prev:"",next:"",prevYear:"«",nextYear:"»",today:"today",month:"month",week:"week",day:"day"},theme:!1,buttonIcons:{prev:"circle-triangle-w",next:"circle-triangle-e"},unselectAuto:!0,dropAccept:"*"},be={header:{left:"next,prev today",center:"",right:"title"},buttonText:{prev:"",next:"",prevYear:"»",nextYear:"«"},buttonIcons:{prev:"circle-triangle-e",next:"circle-triangle-w"}},we=t.fullCalendar={version:"1.6.1"},De=we.views={};t.fn.fullCalendar=function(n){if("string"==typeof n){var a,o=Array.prototype.slice.call(arguments,1);return this.each(function(){var r=t.data(this,"fullCalendar");if(r&&t.isFunction(r[n])){var i=r[n].apply(r,o);a===e&&(a=i),"destroy"==n&&t.removeData(this,"fullCalendar")}}),a!==e?a:this}var i=n.eventSources||[];return delete n.eventSources,n.events&&(i.push(n.events),delete n.events),n=t.extend(!0,{},ye,n.isRTL||n.isRTL===e&&ye.isRTL?be:{},n),this.each(function(e,a){var o=t(a),s=new r(o,n,i);o.data("fullCalendar",s),s.render()}),this},we.sourceNormalizers=[],we.sourceFetchers=[];var Me={dataType:"json",cache:!1},Ce=1;we.addDays=c,we.cloneDate=d,we.parseDate=m,we.parseISO8601=y,we.parseTime=b,we.formatDate=w,we.formatDates=D;var Se=["sun","mon","tue","wed","thu","fri","sat"],Ee=864e5,xe=36e5,Te=6e4,ke={s:function(t){return t.getSeconds()},ss:function(t){return P(t.getSeconds())},m:function(t){return t.getMinutes()},mm:function(t){return P(t.getMinutes())},h:function(t){return t.getHours()%12||12},hh:function(t){return P(t.getHours()%12||12)},H:function(t){return t.getHours()},HH:function(t){return P(t.getHours())},d:function(t){return t.getDate()},dd:function(t){return P(t.getDate())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return t.getMonth()+1},MM:function(t){return P(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},yy:function(t){return(t.getFullYear()+"").substring(2)},yyyy:function(t){return t.getFullYear()},t:function(t){return 12>t.getHours()?"a":"p"},tt:function(t){return 12>t.getHours()?"am":"pm"},T:function(t){return 12>t.getHours()?"A":"P"},TT:function(t){return 12>t.getHours()?"AM":"PM"},u:function(t){return w(t,"yyyy-MM-dd'T'HH:mm:ss'Z'")},S:function(t){var e=t.getDate();return e>10&&20>e?"th":["st","nd","rd"][e%10-1]||"th"},w:function(t,e){return e.weekNumberCalculation(t)},W:function(t){return M(t)}};we.dateFormatters=ke,we.applyAll=G,De.month=te,De.basicWeek=ee,De.basicDay=ne,n({weekMode:"fixed"}),De.agendaWeek=oe,De.agendaDay=ie,n({allDaySlot:!0,allDayText:"all-day",firstHour:6,slotMinutes:30,defaultEventMinutes:120,axisFormat:"h(:mm)tt",timeFormat:{agenda:"h:mm{ - h:mm}"},dragOpacity:{agenda:.5},minTime:0,maxTime:24})})(jQuery); \ No newline at end of file diff --git a/vendor/built_in_modules/calendar_new/app/assets/stylesheets/calendar.css b/vendor/built_in_modules/calendar_new/app/assets/stylesheets/calendar.css deleted file mode 100644 index 128559bc..00000000 --- a/vendor/built_in_modules/calendar_new/app/assets/stylesheets/calendar.css +++ /dev/null @@ -1,394 +0,0 @@ -/* orbit calendar */ -#orbit_calendar { - padding: 10px 8px; - min-width: 960px; - transition: all 0.3s ease; - -webkit-transition: all 0.3s ease; - -moz-transition: all 0.3s ease; -} -.calendar_color_tag { - display: inline-block; - width: 18px; - height: 18px; - margin-right: 4px; - vertical-align: bottom; -} -.current_day_title { - text-align: center; - line-height: 28px; -} -.calendar_mode { - z-index: 2; -} -.mode_switch { - text-transform: capitalize; -} -.today { - background-color: #D9EDF7; -} -.event { - font-size: 12px; - border-radius: 3px; - cursor: pointer; - padding: 1px 3px; - font-weight: bold; - box-shadow: inset 0 0 1px black; - -webkit-box-shadow: inset 0 0 1px black; - -moz-box-shadow: inset 0 0 1px black; -} -.modal-body { - max-height: 515px; -} -.event_list_wrapper { - position: relative; -} -.event_list .cell { - height: 39px; - border: solid 1px #ddd; - border-top: 0; -} -.event_list .divide { - height: 19px; - margin-bottom: 18px; - border-bottom: solid 1px #eee; -} -.event_list .day_time { - height: 31px; - border-bottom: solid 1px #ddd; - border-left: solid 1px #ddd; - text-align: right; - padding: 4px; -} -.event dl, .event dt, .event dd { - margin: 0; - padding: 0; -} -.event dl { - padding: 3px; -} -.event dt { - font-size: 11px; - font-weight: normal; - line-height: 12px; -} -#calendar_day .event_holder { - width: 100%; - /*height: 100%;*/ - position: absolute; - top: 0; - z-index: 1; -} -.event_holder .inner { - position: relative; - margin: 0 16px 0 2px; -} -.event_holder .event { - padding: 0px; - position: absolute; - width: 100%; -} -.event_holder .event.half { - -} -.event_holder .event.over { - border: solid 1px #fff; -} -/* month view */ -#calendar_month { - border-bottom: solid 1px #ddd; -} -#calendar_month .month_row { - position: relative; - border: solid 1px #ddd; - border-bottom: 0; - height: 60px; - overflow: hidden; -} -#calendar_month .month_row .table { - table-layout: fixed; - margin-bottom: 0; - width: 100%; - position: absolute; -} -#calendar_month .month_row .table td { - border: 0; - border-left: solid 1px #ddd; - padding: 2px 4px 0 4px; -} -#calendar_month .month_row .table td:first-child { - border-left: 0; -} -#calendar_month .month_row.header { - height: 28px; - border: 0; -} -#calendar_month .month_row.header th { - font-size: 12px; - padding: 4px; - border: 0; -} -#calendar_month .month_row .month_table { - height: 100%; -} -#calendar_month .month_row .month_date { - color: #666; - font-size: 11px; - cursor: pointer; -} -#calendar_month .month_row .month_date td { - border-left: 0 -} -#calendar_month .month_row .month_date .day_title:hover { - text-decoration: underline; -} -#calendar_month .month_row td.today { - border-bottom: solid 1px #fff; - border-top: solid 1px #fff; -} -#calendar_month .month_row .event { - margin: 0 -2px; - position: relative; - color: #000; -} -#calendar_month .month_row .month_date .event:hover { - text-decoration: none !important; -} -#calendar_month .month_row td.disable { - background-color: #f6f6f6; - color: #ccc; - border-left: solid 1px #ddd; -} -#calendar_month .event.single { - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} - -/* agenda view */ -#calendar_agenda { - margin-top: 20px; -} -#calendar_agenda .table { - margin-bottom: 0; -} -#calendar_agenda .tiny_calendar { - border: solid 1px #eee; -} -#calendar_agenda .tiny_calendar .table th { - border-top: 0; -} -#calendar_agenda .tiny_calendar .table td { - text-align: center; -} -#calendar_agenda .event { - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} -#calendar_agenda .row-fluid { - margin-top: 20px; - padding-top: 20px; - border-top: dashed 1px #ddd; -} -#calendar_agenda .row-fluid:first-child { - border-top: 0; - padding-top: 0; - margin-top: 0; -} -#calendar_agenda .table.event_list .span2, #calendar_agenda .table.event_list thead th { - min-height: 0 !important; - height: 0 !important; - line-height: 0; - padding: 0; -} -.event_time { - font-family: Tahoma, sans-serif; -} -.has_event { - background-color: #08c; - color: #fff; -} - -/* day view */ -#calendar_day .header { - margin-bottom: 10px; -} -#calendar_day .header th { - text-align: center; -} -#calendar_day td { - border: 0; -} -#calendar_day .event { - margin-bottom: 2px; -} -#calendar_day .all_day_event { - background: #eee; - border: solid 1px #ddd; -} -#calendar_day .event_list .table { - border-top: solid 1px #ddd; -} -#calendar_day .event_list td { - padding: 0; -} - -/* week view */ -#calendar_week { - -} -#calendar_week .cell_wrapper { - position: absolute; - width: 100%; -} -#calendar_week td { - padding: 0; -} -#calendar_week .table { - margin-bottom: 0; -} -#calendar_week .header { - margin-bottom: 12px; - border-top: 0; - table-layout: fixed; -} -#calendar_week .header th { - text-align: center; - font-size: 12px; -} -#calendar_week .header td { - border: solid 1px #ddd; - /*background-color: #eee;*/ -} -#calendar_week .week_day { - padding: 0 2px; - border: solid 1px #ddd; -} -#calendar_week .header .week_day { - padding: 2px 4px 0px 2px; -} -#calendar_week .event_list .event { - position: absolute; - width: 100%; - margin-bottom: 2px; -} -#calendar_week .cell_map { - margin-bottom: 18px; -} -#calendar_week .cell_map td { - border-top: 0; - border-bottom: 0; -} -#calendar_week .cell_map tr:first-child td { - border-top: solid 1px #ddd; -} -#calendar_week .event_holder .inner { - margin: 0 8px 0 0; -} -#calendar_week .all_day_event_holder { - position: relative; - width: 100%; - table-layout: fixed; -} -#calendar_week .all_day_event_holder td { - border: 0; - background-color: transparent; -} -#calendar_week .all_day_event { - background: #eee; -} - - - -/* calendars(category) */ -.calendars_color_tag { - width: 20px; - height: 20px; - display: inline-block; - border-radius: 3px; - box-shadow: inset 0 -1px 0 rgba(0,0,0,0.2); -} - -/* Event Controller */ -.event_controller { - width: 350px; -} -.event_controller .row-fluid { - margin-bottom: 6px; -} -.event_controller .row-fluid .control-label { - line-height: 30px; -} - -.close { - border: 0; - background: none; -} - -/* miniColors tweak */ -.miniColors-trigger { - width: 20px; - height: 20px; - margin-bottom: 10px; - margin-left: 10px; - border-color: #f1f1f1; -} -.miniColors-selector { - float: none; - margin: 4px 0 0 0; -} - -/* category edit */ -.edit_cal { - margin: -8px; - background-color: whitesmoke; -} - -.edit_cal .table td, .edit_cal .table { - border: 0 !important; - background-color: transparent !important; - margin: 0 !important; -} -.main-list td { - border-top: solid 1px #ddd; -} - -/* create / edit event panel */ -#tags_panel { - top: auto; - bottom: 34px; - width: 258px; - height: 170px; - padding: 8px 0; - overflow: hidden; - position: absolute; - clear: none; -} -#tags_panel .viewport { - height: 170px; -} -#tags_panel .scrollbar { - top: 8px; -} -#tags_list { - padding: 8px; -} -.bootstrap-datetimepicker-widget.dropdown-menu { - z-index: 1051; -} -#main-wrap{ - padding-bottom: 0; -} -.fc-other-month{ - background-color: #F6F6F6; -} - -#calendar-loading{ - display: none; - background-color: red; - padding: 0 5px; - position: absolute; - top: 31px; - width: 60px; - z-index: 10; -} \ No newline at end of file diff --git a/vendor/built_in_modules/calendar_new/app/assets/stylesheets/calendar/.gitkeep b/vendor/built_in_modules/calendar_new/app/assets/stylesheets/calendar/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/calendar_new/app/assets/stylesheets/cals.css b/vendor/built_in_modules/calendar_new/app/assets/stylesheets/cals.css deleted file mode 100644 index f07975b5..00000000 --- a/vendor/built_in_modules/calendar_new/app/assets/stylesheets/cals.css +++ /dev/null @@ -1,8 +0,0 @@ -/* - *This is a manifest file that'll automatically include all the stylesheets available in this directory - *and any sub-directories. You're free to add application-wide styles to this file and they'll appear at - *the top of the compiled file, but it's generally better to create a new file per style scope. - *= font-awesome - *= calendar - *= bootstrap-responsive -*/ \ No newline at end of file diff --git a/vendor/built_in_modules/calendar_new/app/assets/stylesheets/fullcalendar.css b/vendor/built_in_modules/calendar_new/app/assets/stylesheets/fullcalendar.css deleted file mode 100644 index acae725d..00000000 --- a/vendor/built_in_modules/calendar_new/app/assets/stylesheets/fullcalendar.css +++ /dev/null @@ -1,579 +0,0 @@ -/*! - * FullCalendar v1.6.1 Stylesheet - * Docs & License: http://arshaw.com/fullcalendar/ - * (c) 2013 Adam Shaw - */ - - -.fc { - direction: ltr; - text-align: left; - } - -.fc table { - border-collapse: collapse; - border-spacing: 0; - } - -html .fc, -.fc table { - font-size: 1em; - } - -.fc td, -.fc th { - padding: 0; - vertical-align: top; - } - - - -/* Header -------------------------------------------------------------------------*/ - -.fc-header td { - white-space: nowrap; - } - -.fc-header-left { - width: 25%; - text-align: left; - } - -.fc-header-center { - text-align: center; - } - -.fc-header-right { - width: 25%; - text-align: right; - } - -.fc-header-title { - display: inline-block; - vertical-align: top; - } - -.fc-header-title h2 { - margin-top: 0; - white-space: nowrap; - } - -.fc .fc-header-space { - padding-left: 10px; - } - -.fc-header .fc-button { - margin-bottom: 1em; - vertical-align: top; - } - -/* buttons edges butting together */ - -.fc-header .fc-button { - margin-right: -1px; - } - -.fc-header .fc-corner-right, /* non-theme */ -.fc-header .ui-corner-right { /* theme */ - margin-right: 0; /* back to normal */ - } - -/* button layering (for border precedence) */ - -.fc-header .fc-state-hover, -.fc-header .ui-state-hover { - z-index: 2; - } - -.fc-header .fc-state-down { - z-index: 3; - } - -.fc-header .fc-state-active, -.fc-header .ui-state-active { - z-index: 4; - } - - - -/* Content -------------------------------------------------------------------------*/ - -.fc-content { - clear: both; - } - -.fc-view { - width: 100%; /* needed for view switching (when view is absolute) */ - overflow: hidden; - } - - - -/* Cell Styles -------------------------------------------------------------------------*/ - -.fc-widget-header, /*
    , usually */ -.fc-widget-content { /* , usually */ - border: 1px solid #ddd; - } - -.fc-state-highlight { /* today cell */ /* TODO: add .fc-today to */ - background: #fcf8e3; - } - -.fc-cell-overlay { /* semi-transparent rectangle while dragging */ - background: #bce8f1; - opacity: .3; - filter: alpha(opacity=30); /* for IE */ - } - - - -/* Buttons -------------------------------------------------------------------------*/ - -.fc-button { - position: relative; - display: inline-block; - padding: 0 .6em; - overflow: hidden; - height: 1.9em; - line-height: 1.9em; - white-space: nowrap; - cursor: pointer; - } - -.fc-state-default { /* non-theme */ - border: 1px solid; - } - -.fc-state-default.fc-corner-left { /* non-theme */ - border-top-left-radius: 4px; - border-bottom-left-radius: 4px; - } - -.fc-state-default.fc-corner-right { /* non-theme */ - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; - } - -/* - Our default prev/next buttons use HTML entities like ‹ › « » - and we'll try to make them look good cross-browser. -*/ - -.fc-text-arrow { - margin: 0 .1em; - font-size: 2em; - font-family: "Courier New", Courier, monospace; - vertical-align: baseline; /* for IE7 */ - } - -.fc-button-prev .fc-text-arrow, -.fc-button-next .fc-text-arrow { /* for ‹ › */ - font-weight: bold; - } - -/* icon (for jquery ui) */ - -.fc-button .fc-icon-wrap { - position: relative; - float: left; - top: 50%; - } - -.fc-button .ui-icon { - position: relative; - float: left; - margin-top: -50%; - *margin-top: 0; - *top: -50%; - } - -/* - button states - borrowed from twitter bootstrap (http://twitter.github.com/bootstrap/) -*/ - -.fc-state-default { - background-color: #f5f5f5; - background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); - background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); - background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); - background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); - background-repeat: repeat-x; - border-color: #e6e6e6 #e6e6e6 #bfbfbf; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - color: #333; - text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); - } - -.fc-state-hover, -.fc-state-down, -.fc-state-active, -.fc-state-disabled { - color: #333333; - background-color: #e6e6e6; - } - -.fc-state-hover { - color: #333333; - text-decoration: none; - background-position: 0 -15px; - -webkit-transition: background-position 0.1s linear; - -moz-transition: background-position 0.1s linear; - -o-transition: background-position 0.1s linear; - transition: background-position 0.1s linear; - } - -.fc-state-down, -.fc-state-active { - background-color: #cccccc; - background-image: none; - outline: 0; - box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); - } - -.fc-state-disabled { - cursor: default; - background-image: none; - opacity: 0.65; - filter: alpha(opacity=65); - box-shadow: none; - } - - - -/* Global Event Styles -------------------------------------------------------------------------*/ - -.fc-event { - border: 1px solid #3a87ad; /* default BORDER color */ - background-color: #3a87ad; /* default BACKGROUND color */ - color: #fff; /* default TEXT color */ - font-size: .85em; - cursor: default; - } - -a.fc-event { - text-decoration: none; - } - -a.fc-event, -.fc-event-draggable { - cursor: pointer; - } - -.fc-rtl .fc-event { - text-align: right; - } - -.fc-event-inner { - width: 100%; - height: 100%; - overflow: hidden; - } - -.fc-event-time, -.fc-event-title { - padding: 0 1px; - } - -.fc .ui-resizable-handle { - display: block; - position: absolute; - z-index: 99999; - overflow: hidden; /* hacky spaces (IE6/7) */ - font-size: 300%; /* */ - line-height: 50%; /* */ - } - - - -/* Horizontal Events -------------------------------------------------------------------------*/ - -.fc-event-hori { - border-width: 1px 0; - margin-bottom: 1px; - } - -.fc-ltr .fc-event-hori.fc-event-start, -.fc-rtl .fc-event-hori.fc-event-end { - border-left-width: 1px; - border-top-left-radius: 3px; - border-bottom-left-radius: 3px; - } - -.fc-ltr .fc-event-hori.fc-event-end, -.fc-rtl .fc-event-hori.fc-event-start { - border-right-width: 1px; - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; - } - -/* resizable */ - -.fc-event-hori .ui-resizable-e { - top: 0 !important; /* importants override pre jquery ui 1.7 styles */ - right: -3px !important; - width: 7px !important; - height: 100% !important; - cursor: e-resize; - } - -.fc-event-hori .ui-resizable-w { - top: 0 !important; - left: -3px !important; - width: 7px !important; - height: 100% !important; - cursor: w-resize; - } - -.fc-event-hori .ui-resizable-handle { - _padding-bottom: 14px; /* IE6 had 0 height */ - } - - - -/* Reusable Separate-border Table -------------------------------------------------------------*/ - -table.fc-border-separate { - border-collapse: separate; - } - -.fc-border-separate th, -.fc-border-separate td { - border-width: 1px 0 0 1px; - } - -.fc-border-separate th.fc-last, -.fc-border-separate td.fc-last { - border-right-width: 1px; - } - -.fc-border-separate tr.fc-last th, -.fc-border-separate tr.fc-last td { - border-bottom-width: 1px; - } - -.fc-border-separate tbody tr.fc-first td, -.fc-border-separate tbody tr.fc-first th { - border-top-width: 0; - } - - - -/* Month View, Basic Week View, Basic Day View -------------------------------------------------------------------------*/ - -.fc-grid th { - text-align: center; - } - -.fc .fc-week-number { - width: 22px; - text-align: center; - } - -.fc .fc-week-number div { - padding: 0 2px; - } - -.fc-grid .fc-day-number { - float: right; - padding: 0 2px; - } - -.fc-grid .fc-other-month .fc-day-number { - opacity: 0.3; - filter: alpha(opacity=30); /* for IE */ - /* opacity with small font can sometimes look too faded - might want to set the 'color' property instead - making day-numbers bold also fixes the problem */ - } - -.fc-grid .fc-day-content { - clear: both; - padding: 2px 2px 1px; /* distance between events and day edges */ - } - -/* event styles */ - -.fc-grid .fc-event-time { - font-weight: bold; - } - -/* right-to-left */ - -.fc-rtl .fc-grid .fc-day-number { - float: left; - } - -.fc-rtl .fc-grid .fc-event-time { - float: right; - } - - - -/* Agenda Week View, Agenda Day View -------------------------------------------------------------------------*/ - -.fc-agenda table { - border-collapse: separate; - } - -.fc-agenda-days th { - text-align: center; - } - -.fc-agenda .fc-agenda-axis { - width: 50px; - padding: 0 4px; - vertical-align: middle; - text-align: right; - white-space: nowrap; - font-weight: normal; - } - -.fc-agenda .fc-week-number { - font-weight: bold; - } - -.fc-agenda .fc-day-content { - padding: 2px 2px 1px; - } - -/* make axis border take precedence */ - -.fc-agenda-days .fc-agenda-axis { - border-right-width: 1px; - } - -.fc-agenda-days .fc-col0 { - border-left-width: 0; - } - -/* all-day area */ - -.fc-agenda-allday th { - border-width: 0 1px; - } - -.fc-agenda-allday .fc-day-content { - min-height: 34px; /* TODO: doesnt work well in quirksmode */ - _height: 34px; - } - -/* divider (between all-day and slots) */ - -.fc-agenda-divider-inner { - height: 2px; - overflow: hidden; - } - -.fc-widget-header .fc-agenda-divider-inner { - background: #eee; - } - -/* slot rows */ - -.fc-agenda-slots th { - border-width: 1px 1px 0; - } - -.fc-agenda-slots td { - border-width: 1px 0 0; - background: none; - } - -.fc-agenda-slots td div { - height: 20px; - } - -.fc-agenda-slots tr.fc-slot0 th, -.fc-agenda-slots tr.fc-slot0 td { - border-top-width: 0; - } - -.fc-agenda-slots tr.fc-minor th, -.fc-agenda-slots tr.fc-minor td { - border-top-style: dotted; - } - -.fc-agenda-slots tr.fc-minor th.ui-widget-header { - *border-top-style: solid; /* doesn't work with background in IE6/7 */ - } - - - -/* Vertical Events -------------------------------------------------------------------------*/ - -.fc-event-vert { - border-width: 0 1px; - } - -.fc-event-vert.fc-event-start { - border-top-width: 1px; - border-top-left-radius: 3px; - border-top-right-radius: 3px; - } - -.fc-event-vert.fc-event-end { - border-bottom-width: 1px; - border-bottom-left-radius: 3px; - border-bottom-right-radius: 3px; - } - -.fc-event-vert .fc-event-time { - white-space: nowrap; - font-size: 10px; - } - -.fc-event-vert .fc-event-inner { - position: relative; - z-index: 2; - } - -.fc-event-vert .fc-event-bg { /* makes the event lighter w/ a semi-transparent overlay */ - position: absolute; - z-index: 1; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: #fff; - opacity: .25; - filter: alpha(opacity=25); - } - -.fc .ui-draggable-dragging .fc-event-bg, /* TODO: something nicer like .fc-opacity */ -.fc-select-helper .fc-event-bg { - display: none\9; /* for IE6/7/8. nested opacity filters while dragging don't work */ - } - -/* resizable */ - -.fc-event-vert .ui-resizable-s { - bottom: 0 !important; /* importants override pre jquery ui 1.7 styles */ - width: 100% !important; - height: 8px !important; - overflow: hidden !important; - line-height: 8px !important; - font-size: 11px !important; - font-family: monospace; - text-align: center; - cursor: s-resize; - } - -.fc-agenda .ui-resizable-resizing { /* TODO: better selector */ - _overflow: hidden; - } - - diff --git a/vendor/built_in_modules/calendar_new/app/assets/stylesheets/fullcalendar.print.css b/vendor/built_in_modules/calendar_new/app/assets/stylesheets/fullcalendar.print.css deleted file mode 100644 index 227b80e0..00000000 --- a/vendor/built_in_modules/calendar_new/app/assets/stylesheets/fullcalendar.print.css +++ /dev/null @@ -1,61 +0,0 @@ -/* - * FullCalendar v1.5.4 Print Stylesheet - * - * Include this stylesheet on your page to get a more printer-friendly calendar. - * When including this stylesheet, use the media='print' attribute of the tag. - * Make sure to include this stylesheet IN ADDITION to the regular fullcalendar.css. - * - * Copyright (c) 2011 Adam Shaw - * Dual licensed under the MIT and GPL licenses, located in - * MIT-LICENSE.txt and GPL-LICENSE.txt respectively. - * - * Date: Tue Sep 4 23:38:33 2012 -0700 - * - */ - - - /* Events ------------------------------------------------------*/ - -.fc-event-skin { - background: none !important; - color: #000 !important; - } - -/* horizontal events */ - -.fc-event-hori { - border-width: 0 0 1px 0 !important; - border-bottom-style: dotted !important; - border-bottom-color: #000 !important; - padding: 1px 0 0 0 !important; - } - -.fc-event-hori .fc-event-inner { - border-width: 0 !important; - padding: 0 1px !important; - } - -/* vertical events */ - -.fc-event-vert { - border-width: 0 0 0 1px !important; - border-left-style: dotted !important; - border-left-color: #000 !important; - padding: 0 1px 0 0 !important; - } - -.fc-event-vert .fc-event-inner { - border-width: 0 !important; - padding: 1px 0 !important; - } - -.fc-event-bg { - display: none !important; - } - -.fc-event .ui-resizable-handle { - display: none !important; - } - - diff --git a/vendor/built_in_modules/calendar_new/app/controllers/.gitkeep b/vendor/built_in_modules/calendar_new/app/controllers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/calendar_new/app/controllers/panel/calendar_new/back_end/event_categories_controller.rb b/vendor/built_in_modules/calendar_new/app/controllers/panel/calendar_new/back_end/event_categories_controller.rb deleted file mode 100644 index d7da4816..00000000 --- a/vendor/built_in_modules/calendar_new/app/controllers/panel/calendar_new/back_end/event_categories_controller.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Panel::CalendarNew::BackEnd::EventCategoriesController < OrbitBackendController - include AdminHelper - - # GET /events - # GET /events.json - def index - @module_app_id = @module_app.id rescue nil - - @categories = get_categories_for_index - @categories = @categories.page(params[:page]).per(10) - respond_to do |format| - format.html # index.html.erb - format.json { render json: @categories } - end - end - - def list - @module_app_id = @module_app.id rescue nil - - @categories = get_categories_for_index - @categories = @categories.page(params[:page]).per(10) - render :layout => false - end - -end \ No newline at end of file diff --git a/vendor/built_in_modules/calendar_new/app/controllers/panel/calendar_new/back_end/events_controller.rb b/vendor/built_in_modules/calendar_new/app/controllers/panel/calendar_new/back_end/events_controller.rb deleted file mode 100644 index 1cb702b2..00000000 --- a/vendor/built_in_modules/calendar_new/app/controllers/panel/calendar_new/back_end/events_controller.rb +++ /dev/null @@ -1,125 +0,0 @@ -class Panel::CalendarNew::BackEnd::EventsController < OrbitBackendController - open_for_visitor :only => [:index, :show] - # GET /events - # GET /events.json - - def index - - if params[:start].present? && params[:end].present? - sdt = Time.at(params[:start].to_i) - edt = Time.at(params[:end].to_i) - @monthly_events = Event.monthly_event(sdt,edt) - @re = Event.recurring_event(sdt,edt) - @events = @monthly_events.inject(@re, :<<) - end - respond_to do |format| - format.html # index.html.erb - format.json { render json: @events } - end - end - - # GET /events/1 - # GET /events/1.json - def show - @event = Event.find(params[:id]) - - respond_to do |format| - format.html # show.html.erb - format.json { render json: @event } - end - end - - def agenda - agenda_start = Date.parse(params[:agenda_start]) - agenda_end = Date.parse(params[:agenda_end]) - @events = Event.agenda_events(agenda_start,agenda_end) - render :json=>@events.to_json - end - - # GET /events/new - # GET /events/new.json - def new - @event = Event.new - @categories = get_categories_for_index - @end_d_t = "" - @start_d_t = "" - @all_day = false; - @recurring = false; - if params - case params[:allDay] - when "true" - @all_day = true - when "false" - @all_day = false - case params[:recurring] - when "true" - @recurring = true - when "false" - @recurring = false - end - end - @end_d_t = params[:endDate] - @start_d_t = params[:startDate] - end - render :layout => false - - end - - # GET /events/1/edit - def edit - @event = Event.find(params[:id]) - @categories = get_categories_for_index - @end_d_t = @event.end.strftime("%Y/%m/%d %H:%M").to_s - @start_d_t = @event.start.strftime("%Y/%m/%d %H:%M").to_s - @all_day = @event.all_day - @recurring = @event.recurring - render :layout => false - end - - # POST /events - # POST /events.json - def create - @event = Event.new(params[:event]) - - if @event.present? && @event.save - render json: @event.to_json - else - respond_to do |format| - format.html { render action: "new" } - format.json { render json: @event.errors, status: :unprocessable_entity } - end - end - end - - # PUT /events/1 - # PUT /events/1.json - def update - @event = Event.find(params[:id]) - - - if @event.update_attributes(params[:event]) - render json: @event.to_json - else - respond_to do |format| - format.html { render action: "edit" } - format.json { render json: @event.errors, status: :unprocessable_entity } - #format.js - end - end - end - - # DELETE /events/1 - # DELETE /events/1.json - def destroy - @event = Event.find(params[:id]) - @event.destroy - render :json => {"success"=>true}.to_json - # respond_to do |format| - # format.html { redirect_to events } - # format.json { head :no_content } - # end - end - -end - - diff --git a/vendor/built_in_modules/calendar_new/app/controllers/panel/calendar_new/front_end/events_controller.rb b/vendor/built_in_modules/calendar_new/app/controllers/panel/calendar_new/front_end/events_controller.rb deleted file mode 100644 index 6e82688d..00000000 --- a/vendor/built_in_modules/calendar_new/app/controllers/panel/calendar_new/front_end/events_controller.rb +++ /dev/null @@ -1,45 +0,0 @@ -class Panel::CalendarNew::FrontEnd::EventsController < OrbitWidgetController - # GET /events - # GET /events.json - def initialize - super - @app_title = 'calendar' - end - - def index - @item = Page.find(params[:page_id]) - @title = @item.title - if !@item.frontend_data_count.blank? - @page_num = @item.frontend_data_count - else - @page_num = 10 - end - - if params[:start].present? && params[:end].present? - sdt = Time.at(params[:start].to_i) - edt = Time.at(params[:end].to_i) - @monthly_events = Event.monthly_event(sdt,edt) - @re = Event.recurring_event(sdt,edt) - @events = @monthly_events.inject(@re, :<<) - end - respond_to do |format| - format.html # index.html.erb - format.json { render json: @events } - end - end - def show - @event = Event.find(params[:id]) - - respond_to do |format| - format.html # show.html.erb - format.json { render json: @event } - end - end - - def agenda - agenda_start = Date.parse(params[:agenda_start]) - agenda_end = Date.parse(params[:agenda_end]) - @events = Event.agenda_events(agenda_start,agenda_end) - render :json=>@events.to_json - end -end \ No newline at end of file diff --git a/vendor/built_in_modules/calendar_new/app/helpers/.gitkeep b/vendor/built_in_modules/calendar_new/app/helpers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/calendar_new/app/mailers/.gitkeep b/vendor/built_in_modules/calendar_new/app/mailers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/calendar_new/app/models/.gitkeep b/vendor/built_in_modules/calendar_new/app/models/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/calendar_new/app/models/event.rb b/vendor/built_in_modules/calendar_new/app/models/event.rb deleted file mode 100644 index 2fefe7b4..00000000 --- a/vendor/built_in_modules/calendar_new/app/models/event.rb +++ /dev/null @@ -1,114 +0,0 @@ -require 'time' -require 'date' - -class Event - include Mongoid::Document - include Mongoid::Timestamps - include OrbitCategory::Categorizable - include Mongoid::MultiParameterAttributes - - field :title - field :note - field :start, type: DateTime - field :end, type: DateTime - field :all_day, type: Boolean - field :recurring, type: Boolean - field :frequency - field :period - - attr_accessor :agenda_start, :agenda_end, :get_agenda_events - - - validates_presence_of :title, :message => "Please fill the title of the Event" - - def self.format_date(date_time) - Time.at(date_time.to_i).to_formatted_s(:db) - end - - REPEATS = [ - "Daily" , - "Weekly" , - "Monthly" , - "Yearly" - ] - - def as_json(options = {}) - { - :id => self.id, - :title => self.title, - :note => self.note || "", - :start => self.start.rfc822, - :end => self.end.rfc822, - :allDay => self.all_day, - :recurring => self.recurring, - :calendar => self.category_id, - :color => Category.find(self.category_id).custom_value, - :edit_url => Rails.application.routes.url_helpers.edit_panel_calendar_new_back_end_event_path(self.id), - :delete_url => Rails.application.routes.url_helpers.panel_calendar_new_back_end_event_path(self.id) - } - - end - - def self.monthly_event(start_date,end_date) - self.any_of(:start.gte => start_date, :end.gte => start_date).and(:start.lte => end_date).asc(:start) - end - - def self.recurring_event(start_date,end_date) - @recurring_events = self.where(:recurring => true) - @recurring = [] - @recurring_events.each do |re| - case re.period - when 'Daily' - if (start_date..end_date).cover?(re.start) - @i = TimeDifference.between(re.start,end_date).in_days.to_i - (1..@i).each do |i| - @start_date = re.start + i - @recurring << {:id => re.id, :title=>re.title, :note=>re.note, :start=>@start_date, :end => @start_date, :allDay => re.all_day, :recurring => re.recurring, :calendar => re.category_id.to_s, :color => Category.find(re.category_id).custom_value, :edit_url => Rails.application.routes.url_helpers.edit_panel_calendar_new_back_end_event_path(re.id), :delete_url => Rails.application.routes.url_helpers.panel_calendar_new_back_end_event_path(re.id)} - end - elsif re.start < start_date - @i = TimeDifference.between(start_date,end_date).in_days.to_i - (0..@i-1).each do |i| - @start_date = start_date.to_date + i - @recurring << {:id => re.id, :title=>re.title, :note=>re.note, :start=>@start_date, :end => @start_date, :allDay => re.all_day, :recurring => re.recurring, :calendar => re.category_id.to_s, :color => Category.find(re.category_id).custom_value, :edit_url => Rails.application.routes.url_helpers.edit_panel_calendar_new_back_end_event_path(re.id), :delete_url => Rails.application.routes.url_helpers.panel_calendar_new_back_end_event_path(re.id)} - end - end - when "Weekly" - @start_date = re.start - @end_date = re.end - @i = TimeDifference.between(re.start,end_date).in_weeks.to_i - (1..@i).each do |i| - @start_date += (7*re.frequency.to_i) - @end_date += (7*re.frequency.to_i) - - @recurring << {:id => re.id, :title=>re.title, :note=>re.note, :start=>@start_date, :end => @end_date, :allDay => re.all_day, :recurring => re.recurring, :calendar => re.category_id.to_s, :color => Category.find(re.category_id).custom_value, :edit_url => Rails.application.routes.url_helpers.edit_panel_calendar_new_back_end_event_path(re.id), :delete_url => Rails.application.routes.url_helpers.panel_calendar_new_back_end_event_path(re.id)} - end - when "Monthly" - if !(start_date..end_date).cover?(re.start) - sd = re.start - ed = re.end - @i = TimeDifference.between(re.start,end_date).in_months.to_i - @start_date = sd - sd = sd >> @i*re.frequency.to_i - ed = ed >> @i*re.frequency.to_i - @recurring << {:id => re.id, :title=>re.title, :note=>re.note, :start=>sd, :end => ed, :allDay => re.all_day, :recurring => re.recurring, :calendar => re.category_id.to_s, :color => Category.find(re.category_id).custom_value, :edit_url => Rails.application.routes.url_helpers.edit_panel_calendar_new_back_end_event_path(re.id), :delete_url => Rails.application.routes.url_helpers.panel_calendar_new_back_end_event_path(re.id)} - end - when "Yearly" - if !(start_date..end_date).cover?(re.start) - sd = re.start - ed = re.end - @i = TimeDifference.between(re.start,end_date).in_years.to_i - @start_date = sd - sd = sd >> 12 * @i*re.frequency.to_i - ed = ed >> 12 * @i*re.frequency.to_i - @recurring << {:id => re.id, :title=>re.title, :note=>re.note, :start=>sd, :end => ed, :allDay => re.all_day, :recurring => re.recurring, :calendar => re.category_id.to_s, :color => Category.find(re.category_id).custom_value, :edit_url => Rails.application.routes.url_helpers.edit_panel_calendar_new_back_end_event_path(re.id), :delete_url => Rails.application.routes.url_helpers.panel_calendar_new_back_end_event_path(re.id)} - end - end - end - - @recurring - end - - def self.agenda_events(agenda_start, agenda_end) - @all_events = self.any_of(:start.gte => agenda_start, :end.gte => agenda_start).and(:start.lte => agenda_end).asc(:start) - end -end \ No newline at end of file diff --git a/vendor/built_in_modules/calendar_new/app/models/event_category.rb b/vendor/built_in_modules/calendar_new/app/models/event_category.rb deleted file mode 100644 index afd388cb..00000000 --- a/vendor/built_in_modules/calendar_new/app/models/event_category.rb +++ /dev/null @@ -1,11 +0,0 @@ -class EventCategory - include Mongoid::Document - include Mongoid::Timestamps - include OrbitCategory::Categorizable - - field :name, localize: true - field :color - - has_many :events, :dependent => :destroy - validates_presence_of :name, :message => "Please fill the name of the Category" -end \ No newline at end of file diff --git a/vendor/built_in_modules/calendar_new/app/views/.gitkeep b/vendor/built_in_modules/calendar_new/app/views/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/event_categories/_category.html.erb b/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/event_categories/_category.html.erb deleted file mode 100644 index 096260c6..00000000 --- a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/event_categories/_category.html.erb +++ /dev/null @@ -1,21 +0,0 @@ -
    - <%= category.title_translations[locale] %> - <% if i == 0 %> -
    - -
    - <% end %> -
    <%= category.custom_value %>
    - - - <% @site_valid_locales.each_with_index do |locale, i| %> - - <% end %> - - - - - <%= render partial: 'category', collection: @categories %> - -
    <%= t(:_locale, :locale => locale) %><%= t('event_category.color') %>
    - -
    -
    - <%= link_to content_tag(:i, nil, class: "icons-plus") + " " + t(:add), '#', class: "btn btn-primary open-slide", data: {title: t(:add_category), id: 'new', module: @module_app_id.to_s } %> -
    - -
    -
    -
    - -
    -
    -
    - <%= form_for :category, url: nil, html:{:id=>"color"}, remote: true do |f| %> -
    - <%= render :partial => "form", :locals => { :f => f } %> -
    - <%= t(:cancel) %> - <%= f.submit t(:submit), class: 'btn btn-primary btn-small' %> -
    -
    - <% end %> -
    -
    -
    -
    - \ No newline at end of file diff --git a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/event_categories/list.html.erb b/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/event_categories/list.html.erb deleted file mode 100644 index cc2cce17..00000000 --- a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/event_categories/list.html.erb +++ /dev/null @@ -1,21 +0,0 @@ - - - - <% @site_valid_locales.each_with_index do |locale, i| %> - - <% end %> - - - - - <%= render partial: 'category', collection: @categories %> - -
    <%= t(:_locale, :locale => locale) %><%= t('event_category.color') %>
    -
    -
    - <%= link_to content_tag(:i, nil, class: "icons-plus") + " " + t(:add), '#', class: "btn btn-primary open-slide", data: {title: t(:add_category), id: 'new', module: @module_app_id.to_s } %> -
    - -
    \ No newline at end of file diff --git a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/event_categories/new.html.erb b/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/event_categories/new.html.erb deleted file mode 100644 index 4b31db2b..00000000 --- a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/event_categories/new.html.erb +++ /dev/null @@ -1,35 +0,0 @@ -<%= stylesheet_link_tag "jquery.miniColors" %> -<%= javascript_include_tag "jquery.miniColors.min" %> -
    -<%= form_for @event_category, :url=> panel_calendar_new_back_end_event_categories_path(@event_category) do |f| %> -

    Add

    -
    -
    - <%= label_tag("color", t("calendar.color")) %> - <%= f.text_field :color, :class => "color-picker miniColors span5", :size => "7", :maxlength => "7", :autocomplete=>"off",:value=>"9100FF" %> -
    -
    - -
    - <%= f.fields_for :name_translations do |name| %> - <% @site_valid_locales.each_with_index do |locale, i| %> -
    - <%= label_tag(locale, t("calendar.name")+"-"+I18nVariable.from_locale(locale)) %> -
    - <%= name.text_field locale, :class => "input-xxlarge", :size=>"30" %> -
    -
    - <% end %> - <% end %> -
    -
    - <%= f.submit t("calendar.save"), :class=>"btn btn-primary" %> -
    - -<% end %> -
    - \ No newline at end of file diff --git a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/event_categories/show.html.erb b/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/event_categories/show.html.erb deleted file mode 100644 index 4af386ef..00000000 --- a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/event_categories/show.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<%=@event_category.name%> - -<%=@event_category.color%> \ No newline at end of file diff --git a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/event_categories/update.js.erb b/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/event_categories/update.js.erb deleted file mode 100644 index 8875d214..00000000 --- a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/event_categories/update.js.erb +++ /dev/null @@ -1,15 +0,0 @@ -$("#event_create").empty().hide(); -$("#create_event_btn").removeClass("active"); -$(".destroy").remove(); -$("#create_event_btn").show(); -switch (c.view){ - case "week": - c.loadWeekView(c.cur_week,c.cur_year); - break; - case "month": - c.loadMonthView(c.cur_month,c.cur_year); - break; - case "day": - c.loadDayView(c.cur_date,c.cur_month,c.cur_year); - break; -} diff --git a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/events/_form.html.erb b/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/events/_form.html.erb deleted file mode 100644 index 2403c17c..00000000 --- a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/events/_form.html.erb +++ /dev/null @@ -1,80 +0,0 @@ - - <% if @event.errors.any? %> -
    -

    <%= pluralize(@event.errors.count, "error") %> prohibited this event from being saved:

    - -
      - <% @event.errors.full_messages.each do |msg| %> -
    • <%= msg %>
    • - <% end %> -
    -
    - <% end %> -
    - <%= f.label :title, :class=>"control-label span3" %> - <%= f.text_field :title %> -
    -
    - <%= f.label :note, :class=>"control-label span3" %> - <%= f.text_area :note, :rows => 3 %> -
    -
    - -
    - -
    - <%= f.label :start, :class=>"control-label span3" %> - <%#= f.datetime_select :start %> -
    - <%= f.text_field :start, :class => "input-large", :placeholder => 'YYYY/MM/DD',:value => @start_d_t %> - - - - - - -
    -
    -
    - <%= f.label :end, :class=>"control-label span3" %> - <%#= f.datetime_select :end %> -
    - <%= f.text_field :end, :class => "input-large", :placeholder => 'YYYY/MM/DD', :value => @end_d_t %> - - - - - - - - -
    -
    -
    - <%= f.label "Calendar", :class=>"control-label span3" %> - <%= f.select :category_id, @categories.collect{|t| [ t.title, t.id ]} %> -
    -
    - -
    -
    > -
    - <%=f.label :period, "Repeats",:class=>"control-label span3" %> - <%=f.select :period, Event::REPEATS,{},:class=>"span5" %> -
    -
    - <%=f.label :frequency, "Every",:class=>"control-label span3" %> - <%=f.select :frequency, (1..30).to_a,{},:class=>"span2" %> -
    -
    - -
    -
    - <% if action_name == "edit" %> - <%= f.submit t("calendar.save"), :class=>"btn btn-primary" %> - <% else %> - <%= f.submit t(:create_), :class=>"btn btn-primary" %> - <% end %> - Cancel -
    -
    diff --git a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/events/create.js.erb b/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/events/create.js.erb deleted file mode 100644 index a07068ca..00000000 --- a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/events/create.js.erb +++ /dev/null @@ -1,14 +0,0 @@ -$("#event_create").empty().hide(); -$("#create_event_btn").removeClass("active"); -$(".destroy").remove(); -switch (c.view){ - case "week": - c.loadWeekView(c.cur_week,c.cur_year); - break; - case "month": - c.loadMonthView(c.cur_month,c.cur_year); - break; - case "day": - c.loadDayView(c.cur_date,c.cur_month,c.cur_year); - break; -} diff --git a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/events/edit.html.erb b/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/events/edit.html.erb deleted file mode 100644 index 16731abd..00000000 --- a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/events/edit.html.erb +++ /dev/null @@ -1,7 +0,0 @@ - \ No newline at end of file diff --git a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/events/index.html.erb b/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/events/index.html.erb deleted file mode 100644 index 77e50d89..00000000 --- a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/events/index.html.erb +++ /dev/null @@ -1,65 +0,0 @@ - -<%= javascript_include_tag 'fullcalendar' %> -<%= javascript_include_tag 'calendar' %> -<%= javascript_include_tag 'bootstrap-datetimepicker' %> - -<%= stylesheet_link_tag "fullcalendar"%> -<%= stylesheet_link_tag "calendar"%> - -
    -
    -
    - - -
    -
    -

    -
    -
    -
    -
    - - - - -
    -
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    - - -
    Loading...
    -
    -
    -
    -
    -<%if is_manager?%> -
    - <%= link_to "Add", new_panel_calendar_new_back_end_event_path, :class => "btn btn-primary pull-right", :id=>"create_event_btn", :ref=>"add-btn" %> -
    -
    -
    - - -<%end%> \ No newline at end of file diff --git a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/events/new.html.erb b/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/events/new.html.erb deleted file mode 100644 index f2cb6d37..00000000 --- a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/events/new.html.erb +++ /dev/null @@ -1,7 +0,0 @@ - \ No newline at end of file diff --git a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/events/show.html.erb b/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/events/show.html.erb deleted file mode 100644 index 93cc245e..00000000 --- a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/events/show.html.erb +++ /dev/null @@ -1,20 +0,0 @@ - - -<%if user_signed_in? && is_manager?%> - -<% end %> diff --git a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/events/update.js.erb b/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/events/update.js.erb deleted file mode 100644 index 8875d214..00000000 --- a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/back_end/events/update.js.erb +++ /dev/null @@ -1,15 +0,0 @@ -$("#event_create").empty().hide(); -$("#create_event_btn").removeClass("active"); -$(".destroy").remove(); -$("#create_event_btn").show(); -switch (c.view){ - case "week": - c.loadWeekView(c.cur_week,c.cur_year); - break; - case "month": - c.loadMonthView(c.cur_month,c.cur_year); - break; - case "day": - c.loadDayView(c.cur_date,c.cur_month,c.cur_year); - break; -} diff --git a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/front_end/events/index.html.erb b/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/front_end/events/index.html.erb deleted file mode 100644 index 6ee5af25..00000000 --- a/vendor/built_in_modules/calendar_new/app/views/panel/calendar_new/front_end/events/index.html.erb +++ /dev/null @@ -1,54 +0,0 @@ - -<%= javascript_include_tag 'fullcalendar' %> -<%= javascript_include_tag 'calendar' %> -<%= javascript_include_tag 'bootstrap-datetimepicker' %> - -<%= stylesheet_link_tag "fullcalendar"%> -<%= stylesheet_link_tag "calendar"%> - -
    -
    -
    - - -
    -
    -

    -
    -
    -
    -
    - - - - -
    -
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    - - -
    Loading...
    - - diff --git a/vendor/built_in_modules/calendar_new/calendar_new.gemspec b/vendor/built_in_modules/calendar_new/calendar_new.gemspec deleted file mode 100644 index af481eb1..00000000 --- a/vendor/built_in_modules/calendar_new/calendar_new.gemspec +++ /dev/null @@ -1,23 +0,0 @@ -$:.push File.expand_path("../lib", __FILE__) - -# Maintain your gem's version: -require "calendar/version" - -# Describe your gem and declare its dependencies: -Gem::Specification.new do |s| - s.name = "calendar_new" - s.version = CalendarNew::VERSION - s.authors = ["TODO: Your name"] - s.email = ["TODO: Your email"] - s.homepage = "TODO" - s.summary = "TODO: Summary of Calendar." - s.description = "TODO: Description of Calendar." - - s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"] - s.test_files = Dir["test/**/*"] - - s.add_dependency "rails", "~> 3.1.4" - # s.add_dependency "jquery-rails" - - s.add_development_dependency "sqlite3" -end diff --git a/vendor/built_in_modules/calendar_new/calendar_new.json b/vendor/built_in_modules/calendar_new/calendar_new.json deleted file mode 100644 index b97430a8..00000000 --- a/vendor/built_in_modules/calendar_new/calendar_new.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "title": "calendar_new", - "version": "0.1", - "organization": "Rulingcom", - "author": "Visual dep", - "intro": "A simple and amazing calendar", - "update_info": "Some info", - "create_date": "11-08-2012", - "app_pages": ["calendar"], - "widgets": [], - "category": [], - "widget_fields":[], - "enable_frontend": true -} \ No newline at end of file diff --git a/vendor/built_in_modules/calendar_new/config/locales/en.yml b/vendor/built_in_modules/calendar_new/config/locales/en.yml deleted file mode 100644 index 52e9b16d..00000000 --- a/vendor/built_in_modules/calendar_new/config/locales/en.yml +++ /dev/null @@ -1,11 +0,0 @@ -en: - calendar: - all: All - calendar: Calendar - calendars: Calendars - color: Color - name: Name - save: Save - select_calendar: "Select Calendar" - categories: Categories - new_category: New Category diff --git a/vendor/built_in_modules/calendar_new/config/locales/zh_tw.yml b/vendor/built_in_modules/calendar_new/config/locales/zh_tw.yml deleted file mode 100644 index 7a4217ec..00000000 --- a/vendor/built_in_modules/calendar_new/config/locales/zh_tw.yml +++ /dev/null @@ -1,9 +0,0 @@ -zh_tw: - calendar: - calendar: 行事曆 - calendars: 我的行事曆 - color: 顏色 - name: 名稱 - save: 儲存 - select_calendar: 選取行事曆 - categories: 類別 \ No newline at end of file diff --git a/vendor/built_in_modules/calendar_new/config/routes.rb b/vendor/built_in_modules/calendar_new/config/routes.rb deleted file mode 100644 index d097d2c1..00000000 --- a/vendor/built_in_modules/calendar_new/config/routes.rb +++ /dev/null @@ -1,17 +0,0 @@ -Rails.application.routes.draw do - namespace :panel do - namespace :calendar_new do - namespace :back_end do - match 'event_categories/list' => "event_categories#list" - resources :event_categories - match 'events/agenda' => 'events#agenda', :as => :agenda - - resources :events - end - namespace :front_end do - match 'events/agenda' => 'events#agenda', :as => :agenda - resources :events, except: [:new, :edit, :update, :destroy] - end - end - end -end diff --git a/vendor/built_in_modules/calendar_new/init.rb b/vendor/built_in_modules/calendar_new/init.rb deleted file mode 100644 index 486f10ec..00000000 --- a/vendor/built_in_modules/calendar_new/init.rb +++ /dev/null @@ -1,49 +0,0 @@ -module CalendarNew - OrbitApp.registration "CalendarNew",:type=> 'ModuleApp' do - module_label 'calendar.calendar' - base_url File.expand_path File.dirname(__FILE__) - # personal_plugin :enable => true,:path=>"panel/calendar/plugin/profile",:i18n=>'admin.calendar' - - version "0.1" - organization "Rulingcom" - author "RD dep" - intro "I am intro" - update_info 'some update_info' - - authorizable - categorizable - taggable - - front_end do - app_page 'events' do - frontend_i18n "calendar_new.frontend.events" - end - end - - side_bar do - head_label_i18n 'calendar.calendar',:icon_class=>"icons-calendar" - available_for [:admin,:guest,:manager,:sub_manager] - active_for_controllers ({:private=>['events','event_categories'],:public=>['panel/calendar_new/back_end/tags']}) - - - head_link_path "panel_calendar_new_back_end_events_path" - - # context_link 'calendar.categories', - # :link_path=>"admin_module_app_categories_path(get_module_app)" , - # :priority=>2, - # :active_for_category => 'CalendarNew', - # :available_for => [:manager] - context_link 'tags', - :link_path=>"admin_module_tags_path(module_app_id: get_module_app)" , - :priority=>4, - :active_for_tag => 'CalendarNew', - :available_for => [:manager] - - context_link 'calendar.categories', - :link_path=>"panel_calendar_new_back_end_event_categories_path" , - :priority=>3, - :active_for_category => 'CalendarNew', - :available_for => [:manager] - end - end -end diff --git a/vendor/built_in_modules/calendar_new/lib/calendar.rb b/vendor/built_in_modules/calendar_new/lib/calendar.rb deleted file mode 100644 index 35fadd06..00000000 --- a/vendor/built_in_modules/calendar_new/lib/calendar.rb +++ /dev/null @@ -1,4 +0,0 @@ -require "calendar_new/engine" - -module CalendarNew -end diff --git a/vendor/built_in_modules/calendar_new/lib/calendar/engine.rb b/vendor/built_in_modules/calendar_new/lib/calendar/engine.rb deleted file mode 100644 index b209de58..00000000 --- a/vendor/built_in_modules/calendar_new/lib/calendar/engine.rb +++ /dev/null @@ -1,4 +0,0 @@ -module CalendarNew - class Engine < Rails::Engine - end -end diff --git a/vendor/built_in_modules/calendar_new/lib/calendar/version.rb b/vendor/built_in_modules/calendar_new/lib/calendar/version.rb deleted file mode 100644 index 8876f6c2..00000000 --- a/vendor/built_in_modules/calendar_new/lib/calendar/version.rb +++ /dev/null @@ -1,3 +0,0 @@ -module CalendarNew - VERSION = "0.0.1" -end diff --git a/vendor/built_in_modules/calendar_new/lib/tasks/calendar_tasks.rake b/vendor/built_in_modules/calendar_new/lib/tasks/calendar_tasks.rake deleted file mode 100644 index f5f67ef6..00000000 --- a/vendor/built_in_modules/calendar_new/lib/tasks/calendar_tasks.rake +++ /dev/null @@ -1,4 +0,0 @@ -# desc "Explaining what the task does" -# task :calendar do -# # Task goes here -# end diff --git a/vendor/built_in_modules/calendar_new/script/rails b/vendor/built_in_modules/calendar_new/script/rails deleted file mode 100755 index e323e44b..00000000 --- a/vendor/built_in_modules/calendar_new/script/rails +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby -#!/usr/bin/env ruby -# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. - -ENGINE_PATH = File.expand_path('../..', __FILE__) -load File.expand_path('../../test/dummy/script/rails', __FILE__) diff --git a/vendor/built_in_modules/calendar_new/test/calendar_test.rb b/vendor/built_in_modules/calendar_new/test/calendar_test.rb deleted file mode 100644 index fe53cb4d..00000000 --- a/vendor/built_in_modules/calendar_new/test/calendar_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class CalendarTest < ActiveSupport::TestCase - test "truth" do - assert_kind_of Module, Calendar - end -end diff --git a/vendor/built_in_modules/calendar_new/test/dummy/Rakefile b/vendor/built_in_modules/calendar_new/test/dummy/Rakefile deleted file mode 100644 index 36458522..00000000 --- a/vendor/built_in_modules/calendar_new/test/dummy/Rakefile +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env rake -# Add your own tasks in files placed in lib/tasks ending in .rake, -# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. - -require File.expand_path('../config/application', __FILE__) - -Dummy::Application.load_tasks diff --git a/vendor/built_in_modules/calendar_new/test/dummy/app/assets/javascripts/application.js b/vendor/built_in_modules/calendar_new/test/dummy/app/assets/javascripts/application.js deleted file mode 100644 index 37c7bfcd..00000000 --- a/vendor/built_in_modules/calendar_new/test/dummy/app/assets/javascripts/application.js +++ /dev/null @@ -1,9 +0,0 @@ -// This is a manifest file that'll be compiled into including all the files listed below. -// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically -// be included in the compiled file accessible from http://example.com/assets/application.js -// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -// the compiled file. -// -//= require jquery -//= require jquery_ujs -//= require_tree . diff --git a/vendor/built_in_modules/calendar_new/test/dummy/app/assets/stylesheets/application.css b/vendor/built_in_modules/calendar_new/test/dummy/app/assets/stylesheets/application.css deleted file mode 100644 index fc25b572..00000000 --- a/vendor/built_in_modules/calendar_new/test/dummy/app/assets/stylesheets/application.css +++ /dev/null @@ -1,7 +0,0 @@ -/* - * This is a manifest file that'll automatically include all the stylesheets available in this directory - * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at - * the top of the compiled file, but it's generally better to create a new file per style scope. - *= require_self - *= require_tree . -*/ \ No newline at end of file diff --git a/vendor/built_in_modules/calendar_new/test/dummy/app/controllers/application_controller.rb b/vendor/built_in_modules/calendar_new/test/dummy/app/controllers/application_controller.rb deleted file mode 100644 index e8065d95..00000000 --- a/vendor/built_in_modules/calendar_new/test/dummy/app/controllers/application_controller.rb +++ /dev/null @@ -1,3 +0,0 @@ -class ApplicationController < ActionController::Base - protect_from_forgery -end diff --git a/vendor/built_in_modules/calendar_new/test/dummy/app/helpers/application_helper.rb b/vendor/built_in_modules/calendar_new/test/dummy/app/helpers/application_helper.rb deleted file mode 100644 index de6be794..00000000 --- a/vendor/built_in_modules/calendar_new/test/dummy/app/helpers/application_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module ApplicationHelper -end diff --git a/vendor/built_in_modules/calendar_new/test/dummy/app/mailers/.gitkeep b/vendor/built_in_modules/calendar_new/test/dummy/app/mailers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/calendar_new/test/dummy/app/models/.gitkeep b/vendor/built_in_modules/calendar_new/test/dummy/app/models/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/calendar_new/test/dummy/app/views/layouts/application.html.erb b/vendor/built_in_modules/calendar_new/test/dummy/app/views/layouts/application.html.erb deleted file mode 100644 index 9a8a761b..00000000 --- a/vendor/built_in_modules/calendar_new/test/dummy/app/views/layouts/application.html.erb +++ /dev/null @@ -1,14 +0,0 @@ - - - - Dummy - <%= stylesheet_link_tag "application" %> - <%= javascript_include_tag "application" %> - <%= csrf_meta_tags %> - - - -<%= yield %> - - - diff --git a/vendor/built_in_modules/calendar_new/test/dummy/config.ru b/vendor/built_in_modules/calendar_new/test/dummy/config.ru deleted file mode 100644 index 1989ed8d..00000000 --- a/vendor/built_in_modules/calendar_new/test/dummy/config.ru +++ /dev/null @@ -1,4 +0,0 @@ -# This file is used by Rack-based servers to start the application. - -require ::File.expand_path('../config/environment', __FILE__) -run Dummy::Application diff --git a/vendor/built_in_modules/calendar_new/test/dummy/config/application.rb b/vendor/built_in_modules/calendar_new/test/dummy/config/application.rb deleted file mode 100644 index bd50affb..00000000 --- a/vendor/built_in_modules/calendar_new/test/dummy/config/application.rb +++ /dev/null @@ -1,45 +0,0 @@ -require File.expand_path('../boot', __FILE__) - -require 'rails/all' - -Bundler.require -require "calendar" - -module Dummy - class Application < Rails::Application - # Settings in config/environments/* take precedence over those specified here. - # Application configuration should go into files in config/initializers - # -- all .rb files in that directory are automatically loaded. - - # Custom directories with classes and modules you want to be autoloadable. - # config.autoload_paths += %W(#{config.root}/extras) - - # Only load the plugins named here, in the order given (default is alphabetical). - # :all can be used as a placeholder for all plugins not explicitly named. - # config.plugins = [ :exception_notification, :ssl_requirement, :all ] - - # Activate observers that should always be running. - # config.active_record.observers = :cacher, :garbage_collector, :forum_observer - - # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. - # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. - # config.time_zone = 'Central Time (US & Canada)' - - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - # config.i18n.default_locale = :de - - # Configure the default encoding used in templates for Ruby 1.9. - config.encoding = "utf-8" - - # Configure sensitive parameters which will be filtered from the log file. - config.filter_parameters += [:password] - - # Enable the asset pipeline - config.assets.enabled = true - - # Version of your assets, change this if you want to expire all your assets - config.assets.version = '1.0' - end -end - diff --git a/vendor/built_in_modules/calendar_new/test/dummy/config/boot.rb b/vendor/built_in_modules/calendar_new/test/dummy/config/boot.rb deleted file mode 100644 index eba06813..00000000 --- a/vendor/built_in_modules/calendar_new/test/dummy/config/boot.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'rubygems' -gemfile = File.expand_path('../../../../Gemfile', __FILE__) - -if File.exist?(gemfile) - ENV['BUNDLE_GEMFILE'] = gemfile - require 'bundler' - Bundler.setup -end - -$:.unshift File.expand_path('../../../../lib', __FILE__) \ No newline at end of file diff --git a/vendor/built_in_modules/calendar_new/test/dummy/config/database.yml b/vendor/built_in_modules/calendar_new/test/dummy/config/database.yml deleted file mode 100644 index 51a4dd45..00000000 --- a/vendor/built_in_modules/calendar_new/test/dummy/config/database.yml +++ /dev/null @@ -1,25 +0,0 @@ -# SQLite version 3.x -# gem install sqlite3 -# -# Ensure the SQLite 3 gem is defined in your Gemfile -# gem 'sqlite3' -development: - adapter: sqlite3 - database: db/development.sqlite3 - pool: 5 - timeout: 5000 - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: - adapter: sqlite3 - database: db/test.sqlite3 - pool: 5 - timeout: 5000 - -production: - adapter: sqlite3 - database: db/production.sqlite3 - pool: 5 - timeout: 5000 diff --git a/vendor/built_in_modules/calendar_new/test/dummy/config/environment.rb b/vendor/built_in_modules/calendar_new/test/dummy/config/environment.rb deleted file mode 100644 index 3da5eb91..00000000 --- a/vendor/built_in_modules/calendar_new/test/dummy/config/environment.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Load the rails application -require File.expand_path('../application', __FILE__) - -# Initialize the rails application -Dummy::Application.initialize! diff --git a/vendor/built_in_modules/calendar_new/test/dummy/config/environments/development.rb b/vendor/built_in_modules/calendar_new/test/dummy/config/environments/development.rb deleted file mode 100644 index 95a50b91..00000000 --- a/vendor/built_in_modules/calendar_new/test/dummy/config/environments/development.rb +++ /dev/null @@ -1,30 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # In the development environment your application's code is reloaded on - # every request. This slows down response time but is perfect for development - # since you don't have to restart the web server when you make code changes. - config.cache_classes = false - - # Log error messages when you accidentally call methods on nil. - config.whiny_nils = true - - # Show full error reports and disable caching - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Don't care if the mailer can't send - config.action_mailer.raise_delivery_errors = false - - # Print deprecation notices to the Rails logger - config.active_support.deprecation = :log - - # Only use best-standards-support built into browsers - config.action_dispatch.best_standards_support = :builtin - - # Do not compress assets - config.assets.compress = false - - # Expands the lines which load the assets - config.assets.debug = true -end diff --git a/vendor/built_in_modules/calendar_new/test/dummy/config/environments/production.rb b/vendor/built_in_modules/calendar_new/test/dummy/config/environments/production.rb deleted file mode 100644 index ca2c5888..00000000 --- a/vendor/built_in_modules/calendar_new/test/dummy/config/environments/production.rb +++ /dev/null @@ -1,60 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # Code is not reloaded between requests - config.cache_classes = true - - # Full error reports are disabled and caching is turned on - config.consider_all_requests_local = false - config.action_controller.perform_caching = true - - # Disable Rails's static asset server (Apache or nginx will already do this) - config.serve_static_assets = false - - # Compress JavaScripts and CSS - config.assets.compress = true - - # Don't fallback to assets pipeline if a precompiled asset is missed - config.assets.compile = false - - # Generate digests for assets URLs - config.assets.digest = true - - # Defaults to Rails.root.join("public/assets") - # config.assets.manifest = YOUR_PATH - - # Specifies the header that your server uses for sending files - # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx - - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true - - # See everything in the log (default is :info) - # config.log_level = :debug - - # Use a different logger for distributed setups - # config.logger = SyslogLogger.new - - # Use a different cache store in production - # config.cache_store = :mem_cache_store - - # Enable serving of images, stylesheets, and JavaScripts from an asset server - # config.action_controller.asset_host = "http://assets.example.com" - - # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) - # config.assets.precompile += %w( search.js ) - - # Disable delivery errors, bad email addresses will be ignored - # config.action_mailer.raise_delivery_errors = false - - # Enable threaded mode - # config.threadsafe! - - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation can not be found) - config.i18n.fallbacks = true - - # Send deprecation notices to registered listeners - config.active_support.deprecation = :notify -end diff --git a/vendor/built_in_modules/calendar_new/test/dummy/config/environments/test.rb b/vendor/built_in_modules/calendar_new/test/dummy/config/environments/test.rb deleted file mode 100644 index 6810c914..00000000 --- a/vendor/built_in_modules/calendar_new/test/dummy/config/environments/test.rb +++ /dev/null @@ -1,39 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # The test environment is used exclusively to run your application's - # test suite. You never need to work with it otherwise. Remember that - # your test database is "scratch space" for the test suite and is wiped - # and recreated between test runs. Don't rely on the data there! - config.cache_classes = true - - # Configure static asset server for tests with Cache-Control for performance - config.serve_static_assets = true - config.static_cache_control = "public, max-age=3600" - - # Log error messages when you accidentally call methods on nil - config.whiny_nils = true - - # Show full error reports and disable caching - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Raise exceptions instead of rendering exception templates - config.action_dispatch.show_exceptions = false - - # Disable request forgery protection in test environment - config.action_controller.allow_forgery_protection = false - - # Tell Action Mailer not to deliver emails to the real world. - # The :test delivery method accumulates sent emails in the - # ActionMailer::Base.deliveries array. - config.action_mailer.delivery_method = :test - - # Use SQL instead of Active Record's schema dumper when creating the test database. - # This is necessary if your schema can't be completely dumped by the schema dumper, - # like if you have constraints or database-specific column types - # config.active_record.schema_format = :sql - - # Print deprecation notices to the stderr - config.active_support.deprecation = :stderr -end diff --git a/vendor/built_in_modules/calendar_new/test/dummy/config/initializers/backtrace_silencers.rb b/vendor/built_in_modules/calendar_new/test/dummy/config/initializers/backtrace_silencers.rb deleted file mode 100644 index 59385cdf..00000000 --- a/vendor/built_in_modules/calendar_new/test/dummy/config/initializers/backtrace_silencers.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. -# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } - -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. -# Rails.backtrace_cleaner.remove_silencers! diff --git a/vendor/built_in_modules/calendar_new/test/dummy/config/initializers/inflections.rb b/vendor/built_in_modules/calendar_new/test/dummy/config/initializers/inflections.rb deleted file mode 100644 index 9e8b0131..00000000 --- a/vendor/built_in_modules/calendar_new/test/dummy/config/initializers/inflections.rb +++ /dev/null @@ -1,10 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new inflection rules using the following format -# (all these examples are active by default): -# ActiveSupport::Inflector.inflections do |inflect| -# inflect.plural /^(ox)$/i, '\1en' -# inflect.singular /^(ox)en/i, '\1' -# inflect.irregular 'person', 'people' -# inflect.uncountable %w( fish sheep ) -# end diff --git a/vendor/built_in_modules/calendar_new/test/dummy/config/initializers/mime_types.rb b/vendor/built_in_modules/calendar_new/test/dummy/config/initializers/mime_types.rb deleted file mode 100644 index 72aca7e4..00000000 --- a/vendor/built_in_modules/calendar_new/test/dummy/config/initializers/mime_types.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new mime types for use in respond_to blocks: -# Mime::Type.register "text/richtext", :rtf -# Mime::Type.register_alias "text/html", :iphone diff --git a/vendor/built_in_modules/calendar_new/test/dummy/config/initializers/secret_token.rb b/vendor/built_in_modules/calendar_new/test/dummy/config/initializers/secret_token.rb deleted file mode 100644 index 0e47c5cd..00000000 --- a/vendor/built_in_modules/calendar_new/test/dummy/config/initializers/secret_token.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Your secret key for verifying the integrity of signed cookies. -# If you change this key, all old signed cookies will become invalid! -# Make sure the secret is at least 30 characters and all random, -# no regular words or you'll be exposed to dictionary attacks. -Dummy::Application.config.secret_token = '51389313d40e5a40269583258f5a6734ca9764cd65e633594119a8cb165b4058f032d11407e10634acd50965e156a9c7f894b9e617526afe373506699bf6c2ee' diff --git a/vendor/built_in_modules/calendar_new/test/dummy/config/initializers/session_store.rb b/vendor/built_in_modules/calendar_new/test/dummy/config/initializers/session_store.rb deleted file mode 100644 index 952473ff..00000000 --- a/vendor/built_in_modules/calendar_new/test/dummy/config/initializers/session_store.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Be sure to restart your server when you modify this file. - -Dummy::Application.config.session_store :cookie_store, key: '_dummy_session' - -# Use the database for sessions instead of the cookie-based default, -# which shouldn't be used to store highly confidential information -# (create the session table with "rails generate session_migration") -# Dummy::Application.config.session_store :active_record_store diff --git a/vendor/built_in_modules/calendar_new/test/dummy/config/initializers/wrap_parameters.rb b/vendor/built_in_modules/calendar_new/test/dummy/config/initializers/wrap_parameters.rb deleted file mode 100644 index 999df201..00000000 --- a/vendor/built_in_modules/calendar_new/test/dummy/config/initializers/wrap_parameters.rb +++ /dev/null @@ -1,14 +0,0 @@ -# Be sure to restart your server when you modify this file. -# -# This file contains settings for ActionController::ParamsWrapper which -# is enabled by default. - -# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. -ActiveSupport.on_load(:action_controller) do - wrap_parameters format: [:json] -end - -# Disable root element in JSON by default. -ActiveSupport.on_load(:active_record) do - self.include_root_in_json = false -end diff --git a/vendor/built_in_modules/calendar_new/test/dummy/config/locales/en.yml b/vendor/built_in_modules/calendar_new/test/dummy/config/locales/en.yml deleted file mode 100644 index 179c14ca..00000000 --- a/vendor/built_in_modules/calendar_new/test/dummy/config/locales/en.yml +++ /dev/null @@ -1,5 +0,0 @@ -# Sample localization file for English. Add more files in this directory for other locales. -# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. - -en: - hello: "Hello world" diff --git a/vendor/built_in_modules/calendar_new/test/dummy/config/routes.rb b/vendor/built_in_modules/calendar_new/test/dummy/config/routes.rb deleted file mode 100644 index bb509f27..00000000 --- a/vendor/built_in_modules/calendar_new/test/dummy/config/routes.rb +++ /dev/null @@ -1,58 +0,0 @@ -Dummy::Application.routes.draw do - # The priority is based upon order of creation: - # first created -> highest priority. - - # Sample of regular route: - # match 'products/:id' => 'catalog#view' - # Keep in mind you can assign values other than :controller and :action - - # Sample of named route: - # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase - # This route can be invoked with purchase_url(:id => product.id) - - # Sample resource route (maps HTTP verbs to controller actions automatically): - # resources :products - - # Sample resource route with options: - # resources :products do - # member do - # get 'short' - # post 'toggle' - # end - # - # collection do - # get 'sold' - # end - # end - - # Sample resource route with sub-resources: - # resources :products do - # resources :comments, :sales - # resource :seller - # end - - # Sample resource route with more complex sub-resources - # resources :products do - # resources :comments - # resources :sales do - # get 'recent', :on => :collection - # end - # end - - # Sample resource route within a namespace: - # namespace :admin do - # # Directs /admin/products/* to Admin::ProductsController - # # (app/controllers/admin/products_controller.rb) - # resources :products - # end - - # You can have the root of your site routed with "root" - # just remember to delete public/index.html. - # root :to => 'welcome#index' - - # See how all your routes lay out with "rake routes" - - # This is a legacy wild controller route that's not recommended for RESTful applications. - # Note: This route will make all actions in every controller accessible via GET requests. - # match ':controller(/:action(/:id(.:format)))' -end diff --git a/vendor/built_in_modules/calendar_new/test/dummy/lib/assets/.gitkeep b/vendor/built_in_modules/calendar_new/test/dummy/lib/assets/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/calendar_new/test/dummy/log/.gitkeep b/vendor/built_in_modules/calendar_new/test/dummy/log/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/calendar_new/test/dummy/public/404.html b/vendor/built_in_modules/calendar_new/test/dummy/public/404.html deleted file mode 100644 index 9a48320a..00000000 --- a/vendor/built_in_modules/calendar_new/test/dummy/public/404.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - The page you were looking for doesn't exist (404) - - - - - -
    -

    The page you were looking for doesn't exist.

    -

    You may have mistyped the address or the page may have moved.

    -
    - - diff --git a/vendor/built_in_modules/calendar_new/test/dummy/public/422.html b/vendor/built_in_modules/calendar_new/test/dummy/public/422.html deleted file mode 100644 index 83660ab1..00000000 --- a/vendor/built_in_modules/calendar_new/test/dummy/public/422.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - The change you wanted was rejected (422) - - - - - -
    -

    The change you wanted was rejected.

    -

    Maybe you tried to change something you didn't have access to.

    -
    - - diff --git a/vendor/built_in_modules/calendar_new/test/dummy/public/500.html b/vendor/built_in_modules/calendar_new/test/dummy/public/500.html deleted file mode 100644 index b80307fc..00000000 --- a/vendor/built_in_modules/calendar_new/test/dummy/public/500.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - We're sorry, but something went wrong (500) - - - - - -
    -

    We're sorry, but something went wrong.

    -

    We've been notified about this issue and we'll take a look at it shortly.

    -
    - - diff --git a/vendor/built_in_modules/calendar_new/test/dummy/public/favicon.ico b/vendor/built_in_modules/calendar_new/test/dummy/public/favicon.ico deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/calendar_new/test/dummy/script/rails b/vendor/built_in_modules/calendar_new/test/dummy/script/rails deleted file mode 100755 index f8da2cff..00000000 --- a/vendor/built_in_modules/calendar_new/test/dummy/script/rails +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby -# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. - -APP_PATH = File.expand_path('../../config/application', __FILE__) -require File.expand_path('../../config/boot', __FILE__) -require 'rails/commands' diff --git a/vendor/built_in_modules/calendar_new/test/integration/navigation_test.rb b/vendor/built_in_modules/calendar_new/test/integration/navigation_test.rb deleted file mode 100644 index 97a94c9b..00000000 --- a/vendor/built_in_modules/calendar_new/test/integration/navigation_test.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'test_helper' - -class NavigationTest < ActionDispatch::IntegrationTest - fixtures :all - - # test "the truth" do - # assert true - # end -end - diff --git a/vendor/built_in_modules/calendar_new/test/test_helper.rb b/vendor/built_in_modules/calendar_new/test/test_helper.rb deleted file mode 100644 index dcd3b276..00000000 --- a/vendor/built_in_modules/calendar_new/test/test_helper.rb +++ /dev/null @@ -1,10 +0,0 @@ -# Configure Rails Environment -ENV["RAILS_ENV"] = "test" - -require File.expand_path("../dummy/config/environment.rb", __FILE__) -require "rails/test_help" - -Rails.backtrace_cleaner.remove_silencers! - -# Load support files -Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } diff --git a/vendor/built_in_modules/faq/.gitignore b/vendor/built_in_modules/faq/.gitignore deleted file mode 100644 index 1dfe31e6..00000000 --- a/vendor/built_in_modules/faq/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -.bundle/ -log/*.log -pkg/ -test/dummy/db/*.sqlite3 -test/dummy/log/*.log -test/dummy/tmp/ -test/dummy/.sass-cache diff --git a/vendor/built_in_modules/faq/Gemfile b/vendor/built_in_modules/faq/Gemfile deleted file mode 100644 index 7e1df87c..00000000 --- a/vendor/built_in_modules/faq/Gemfile +++ /dev/null @@ -1,17 +0,0 @@ -source "http://rubygems.org" - -# Declare your gem's dependencies in faq.gemspec. -# Bundler will treat runtime dependencies like base dependencies, and -# development dependencies will be added by default to the :development group. -gemspec - -# jquery-rails is used by the dummy application -gem "jquery-rails" - -# Declare any dependencies that are still in development here instead of in -# your gemspec. These might include edge Rails or gems from your path or -# Git. Remember to move these dependencies to your gemspec before releasing -# your gem to rubygems.org. - -# To use debugger -# gem 'debugger' diff --git a/vendor/built_in_modules/faq/MIT-LICENSE b/vendor/built_in_modules/faq/MIT-LICENSE deleted file mode 100644 index 5146945d..00000000 --- a/vendor/built_in_modules/faq/MIT-LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2013 YOURNAME - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/built_in_modules/faq/README.rdoc b/vendor/built_in_modules/faq/README.rdoc deleted file mode 100644 index 4626eb20..00000000 --- a/vendor/built_in_modules/faq/README.rdoc +++ /dev/null @@ -1,3 +0,0 @@ -= Faq - -This project rocks and uses MIT-LICENSE. \ No newline at end of file diff --git a/vendor/built_in_modules/faq/Rakefile b/vendor/built_in_modules/faq/Rakefile deleted file mode 100644 index f5f498ea..00000000 --- a/vendor/built_in_modules/faq/Rakefile +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env rake -begin - require 'bundler/setup' -rescue LoadError - puts 'You must `gem install bundler` and `bundle install` to run rake tasks' -end -begin - require 'rdoc/task' -rescue LoadError - require 'rdoc/rdoc' - require 'rake/rdoctask' - RDoc::Task = Rake::RDocTask -end - -RDoc::Task.new(:rdoc) do |rdoc| - rdoc.rdoc_dir = 'rdoc' - rdoc.title = 'Faq' - rdoc.options << '--line-numbers' - rdoc.rdoc_files.include('README.rdoc') - rdoc.rdoc_files.include('lib/**/*.rb') -end - -APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__) -load 'rails/tasks/engine.rake' - - - -Bundler::GemHelper.install_tasks - -require 'rake/testtask' - -Rake::TestTask.new(:test) do |t| - t.libs << 'lib' - t.libs << 'test' - t.pattern = 'test/**/*_test.rb' - t.verbose = false -end - - -task :default => :test diff --git a/vendor/built_in_modules/faq/app/assets/images/faq/.gitkeep b/vendor/built_in_modules/faq/app/assets/images/faq/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/faq/app/assets/javascripts/faq/.gitkeep b/vendor/built_in_modules/faq/app/assets/javascripts/faq/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/faq/app/assets/javascripts/faq/qa_form.js.erb b/vendor/built_in_modules/faq/app/assets/javascripts/faq/qa_form.js.erb deleted file mode 100644 index 22f756c9..00000000 --- a/vendor/built_in_modules/faq/app/assets/javascripts/faq/qa_form.js.erb +++ /dev/null @@ -1,28 +0,0 @@ -<%#= encoding: utf-8 %> -$(document).ready(function(){ -//alert("Anc Loaded"); -$('.qa_links_block a.delete').live('click', function(){ - $(this).parents('.list_item').remove(); -}); - -$('.qa_files_block a.delete').live('click', function(){ - $(this).parents('.list_item').remove(); -}); - -$(document).on('click', '.action a.remove_existing_record', function(){ - if(confirm("<%= I18n.t(:sure?)%>")){ - $(this).next('.should_destroy').attr('value', 1); - $("tr#" + $(this).prev().attr('value')).hide(); - } -}); - -$(document).on('click', '.quick_edit_cancel', function(){ - tr = $(this).attr('rel'); - $('#' + tr).hide(); - $("tr#qa_file_" + $(this).prev().attr('value')).hide(); - $("tr#qa_link_" + $(this).prev().attr('value')).hide(); -}); -$('.reject_info').tooltip({ - placement : 'bottom' -}); -}); \ No newline at end of file diff --git a/vendor/built_in_modules/faq/app/assets/stylesheets/faq/.gitkeep b/vendor/built_in_modules/faq/app/assets/stylesheets/faq/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/faq/app/controllers/.gitkeep b/vendor/built_in_modules/faq/app/controllers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/faq/app/controllers/application_controller.rb b/vendor/built_in_modules/faq/app/controllers/application_controller.rb deleted file mode 100644 index 307a4acd..00000000 --- a/vendor/built_in_modules/faq/app/controllers/application_controller.rb +++ /dev/null @@ -1,23 +0,0 @@ -class ApplicationController < ActionController::Base - protect_from_forgery - before_filter :set_locale - - # Set I18n.locale - def set_locale - # update session if passed - session[:locale] = params[:locale] if params[:locale] - - # set locale based on session or default - begin - # check if locale is valid for non site pages - if !VALID_LOCALES.include?(session[:locale]) - I18n.locale = I18n.default_locale - else - I18n.locale = session[:locale] - end - rescue - I18n.locale = I18n.default_locale - end - end - -end diff --git a/vendor/built_in_modules/faq/app/controllers/panel/faq/back_end/qas_controller.rb b/vendor/built_in_modules/faq/app/controllers/panel/faq/back_end/qas_controller.rb deleted file mode 100644 index 2883fc06..00000000 --- a/vendor/built_in_modules/faq/app/controllers/panel/faq/back_end/qas_controller.rb +++ /dev/null @@ -1,112 +0,0 @@ -class Panel::Faq::BackEnd::QasController < OrbitBackendController - - open_for_sub_manager :except => [:index] - - before_filter :only => [ :new, :create, :edit, :update ] do |controller| - @categories = get_categories_for_form - end - - def index - - @tags = get_tags - @statuses = get_statuses - @categories = get_categories_for_index - - category_ids = @categories.collect{|t| t.id} - @qas = get_sorted_and_filtered("qa", :category_id.in => category_ids) - - # respond_to do |format| - # format.html # index.html.erb - # format.xml { render :xml => @qas } - # format.js - # end - end - - # GET /qas/1 - # GET /qas/1.xml - def show - @qa = Qa.find(params[:id]) - respond_to do |format| - format.html # show.html.erb - format.xml { render :xml => @qa } - end - end - - # GET /qas/new - # GET /qas/new.xml - def new - @qa = Qa.new - @tags = get_tags - @statuses = get_statuses - respond_to do |format| - format.html # new.html.erb - format.xml { render :xml => @qa } - end - end - - # GET /qas/1/edit - def edit - @qa = Qa.find(params[:id]) - @statuses = get_statuses - @tags = get_tags - end - - # POST /qas - # POST /qas.xml - def create - @qa = Qa.new(params[:qa]) - @tags = get_tags - @qa.create_user_id = current_user.id - @qa.update_user_id = current_user.id - - respond_to do |format| - if @qa.save - format.html { redirect_to(panel_faq_back_end_qas_url) } - format.xml { render :xml => @qa, :status => :created, :location => @qa } - else - format.html { render :action => "new" } - format.xml { render :xml => @qa.errors, :status => :unprocessable_entity } - end - end - end - - # PUT /qas/1 - # PUT /qas/1.xml - def update - @qa = Qa.find(params[:id]) - @qa.update_user_id = current_user.id - - respond_to do |format| - if @qa.update_attributes(params[:qa]) - - format.html { redirect_to(panel_faq_back_end_qas_path) } - format.js { render 'toggle_enable' } - format.xml { head :ok } - else - format.html { render :action => "edit" } - format.xml { render :xml => @qa.errors, :status => :unprocessable_entity } - end - end - end - - # DELETE /qas/1 - # DELETE /qas/1.xml - def destroy - @qa = Qa.find(params[:id]) - @qa.destroy - - respond_to do |format| - format.html { redirect_to(panel_faq_back_end_qas_url) } - # format.xml { head :ok } - format.js - end - end - - def delete - if params[:ids] - qas = Qa.any_in(:_id => params[:ids]).destroy_all - end - redirect_to panel_faq_back_end_qas_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]) - end - -end diff --git a/vendor/built_in_modules/faq/app/controllers/panel/faq/front_end/qas_controller.rb b/vendor/built_in_modules/faq/app/controllers/panel/faq/front_end/qas_controller.rb deleted file mode 100644 index 8cf0c0b6..00000000 --- a/vendor/built_in_modules/faq/app/controllers/panel/faq/front_end/qas_controller.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Panel::Faq::FrontEnd::QasController < OrbitWidgetController - - def initialize - super - @app_title = 'faq' - end - - # GET /qas - # GET /qas.xml - - def index - - @item = Page.find(params[:page_id]) - - @title = @item.title - - if @item.frontend_data_count - @page_num = @item.frontend_data_count - else - @page_num = 0 - end - - date_now = Time.now - - if params[:category_id] !="[]" && !params[:category_id].blank? - @qas = Qa.all.can_display.any_in(:qa_category_id => params[:category_id]).merge(QaCategory.excludes('disable' => true)).desc( :is_top ).page( params[:page_main] ).per(@page_num) - @qa_categorys = QaCategory.any_in(:_id => @item.category).excludes('disable' => true) rescue nil - elsif params[:tag_id] !="[]" && !params[:tag_id].blank? - Qa.all.can_display.any_in(:tagged_ids => params[:tag_id]).merge(QaCategory.excludes('disable' => true)).desc( :is_top ).page( params[:page_main] ).per(@page_num) - @qas = @tag.archive_files.can_display.desc( :is_top ).page( params[:page_main] ).per(@page_num) - get_categorys - else - @qas = Qa.all.can_display.merge(QaCategory.excludes('disable' => true)).desc( :is_top ).page( params[:page_main] ).per(@page_num) - get_categorys - end - end - - def show - @qa = Qa.find(params[:id]) - # get_categorys - end - - - protected - - def get_categorys - # @qa_categorys = QaCategory.excludes('disable' => true) - end - -end diff --git a/vendor/built_in_modules/faq/app/helpers/.gitkeep b/vendor/built_in_modules/faq/app/helpers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/faq/app/mailers/.gitkeep b/vendor/built_in_modules/faq/app/mailers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/faq/app/models/.gitkeep b/vendor/built_in_modules/faq/app/models/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/faq/app/models/qa.rb b/vendor/built_in_modules/faq/app/models/qa.rb deleted file mode 100644 index 0273fc4f..00000000 --- a/vendor/built_in_modules/faq/app/models/qa.rb +++ /dev/null @@ -1,67 +0,0 @@ -# encoding: utf-8 - -class Qa - include Mongoid::Document - include Mongoid::Timestamps - include Mongoid::MultiParameterAttributes - - include OrbitModel::LanguageRestrict - include OrbitModel::Status - include OrbitTag::Taggable - include OrbitCategory::Categorizable - - field :title, localize: true - field :answer, localize: true - - field :create_user_id - field :update_user_id - - has_many :qa_links, :autosave => true, :dependent => :destroy - has_many :qa_files, :autosave => true, :dependent => :destroy - - accepts_nested_attributes_for :qa_files, :allow_destroy => true - accepts_nested_attributes_for :qa_links, :allow_destroy => true - - # belongs_to :qa_category - - before_save :clean_values - - validates :title, :at_least_one => true - - - def self.search( category_id = nil ) - - if category_id.to_s.size > 0 - - find(:all, :conditions => {qa_category_id: category_id}).desc( :is_top, :title ) - - else - - find(:all).desc( :is_top, :title) - - end - - end - - - def self.widget_datas - - where( :is_hidden => false ).desc(:is_top, :created_at) - - end - - protected - - def qa_category_with_title - self.category.title - end - - def clean_values - self.qa_links.each do |link| - link.delete if link.url.blank? && link.title.blank? - end - self.tagged_ids.delete('') - end - - paginates_per 10 -end \ No newline at end of file diff --git a/vendor/built_in_modules/faq/app/models/qa_file.rb b/vendor/built_in_modules/faq/app/models/qa_file.rb deleted file mode 100644 index 30b694ea..00000000 --- a/vendor/built_in_modules/faq/app/models/qa_file.rb +++ /dev/null @@ -1,14 +0,0 @@ -class QaFile - - include Mongoid::Document - include Mongoid::Timestamps - - mount_uploader :file, AssetUploader - - field :description, localize: true - field :should_destroy, :type => Boolean - field :title, localize: true - - belongs_to :qa - -end diff --git a/vendor/built_in_modules/faq/app/models/qa_link.rb b/vendor/built_in_modules/faq/app/models/qa_link.rb deleted file mode 100644 index f26cee65..00000000 --- a/vendor/built_in_modules/faq/app/models/qa_link.rb +++ /dev/null @@ -1,24 +0,0 @@ -class QaLink - - include Mongoid::Document - include Mongoid::Timestamps - - field :url - field :title, localize: true - - field :should_destroy, :type => Boolean - - belongs_to :qa - - before_validation :add_http - validates :url, :presence => true, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i - - protected - - def add_http - unless self.url[/^http:\/\//] || self.url[/^https:\/\//] - self.url = 'http://' + self.url - end - end - -end diff --git a/vendor/built_in_modules/faq/app/views/.gitkeep b/vendor/built_in_modules/faq/app/views/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_clear_filters.html.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_clear_filters.html.erb deleted file mode 100644 index 48ace0ee..00000000 --- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_clear_filters.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -
    - <%= link_to content_tag(:i, nil, :class => 'icons-cycle') + t(:clear), panel_faq_back_end_qas_path(:filter => @filter, :sort => params[:sort], :direction => params[:direction], :clear => true, :type => type), :class => "btn btn-small js_history" %> -
    \ No newline at end of file diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_filter.html.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_filter.html.erb deleted file mode 100644 index 906db029..00000000 --- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_filter.html.erb +++ /dev/null @@ -1,37 +0,0 @@ - - -<% content_for :page_specific_javascript do %> - <%= javascript_include_tag "sort_header" %> -<% end %> diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_filter_categories.html.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_filter_categories.html.erb deleted file mode 100644 index 7eaa489a..00000000 --- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_filter_categories.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -
    - <% @qa_categories.each do |category| -%> - <%= link_to category.title, panel_faq_back_end_qas_path(:filter => @filter, :new_filter => {:type => 'categories', :id => category.id}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('categories', category.id)}" %> - <% end -%> -
    -<%= render :partial => 'clear_filters', :locals => {:type => 'categories'} %> \ No newline at end of file diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_filter_status.html.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_filter_status.html.erb deleted file mode 100644 index 442bfdd7..00000000 --- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_filter_status.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -
    - <%= link_to t(:top), panel_faq_back_end_qas_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_top'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('status', 'is_top')}" %> - <%= link_to t(:hot), panel_faq_back_end_qas_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_hot'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('status', 'is_hot')}" %> - <%= link_to t(:hidden), panel_faq_back_end_qas_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_hidden'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('status', 'is_hidden')}" unless(is_guest?)%> -
    -<%= render :partial => 'clear_filters', :locals => {:type => 'status'} %> \ No newline at end of file diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_filter_tags.html.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_filter_tags.html.erb deleted file mode 100644 index 02e348a1..00000000 --- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_filter_tags.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -
    - <% @tags.each do |tag| -%> - <%= link_to tag.name, panel_faq_back_end_qas_path(:filter => @filter, :new_filter => {:type => 'tags', :id => tag.id}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn btn-small js_history#{is_filter_active?('tags', tag.id)}" %> - <% end -%> -
    -<%= render :partial => 'clear_filters', :locals => {:type => 'tags'} %> \ No newline at end of file diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_form.html.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_form.html.erb deleted file mode 100644 index d9391d77..00000000 --- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_form.html.erb +++ /dev/null @@ -1,235 +0,0 @@ -<% content_for :page_specific_css do %> - <%= stylesheet_link_tag "lib/main-forms" %> - <%= stylesheet_link_tag "lib/fileupload" %> - <%= stylesheet_link_tag "lib/main-list" %> -<% end %> -<% content_for :page_specific_javascript do %> - <%= javascript_include_tag "lib/bootstrap-fileupload" %> - <%= javascript_include_tag "lib/bootstrap-datetimepicker" %> - <%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %> - <%= javascript_include_tag "lib/modal-preview" %> - <%= javascript_include_tag "lib/file-type" %> -<% end %> -<%= f.error_messages %> -
    - -
    - - - - - - -
    - - -
    - - -
    - <%= f.label :category ,t(:category), :class=>"control-label muted" %> -
    - <%= f.select :category_id, @categories.collect{|t| [ t.title, t.id ]} %> -
    -
    - -
    - - -
    - - -
    - -
    - - - -
    -
    - -
    - - -
    - - -
    - -
    - <% @tags.each do |tag| %> - - <% end %> -
    -
    - -
    - -
    - - - - - - -
    -<% @site_in_use_locales.each_with_index do |locale, i| %> -
    "> -
    - <%= f.label :title , t('faq.question'), :class=>"control-label muted" %> -
    - <%= f.fields_for :title_translations do |f| %> - <%= f.text_field locale, :class=>'post-title', :value => (@qa.title_translations[locale] rescue nil) %> - <% end %> -
    -
    -
    - <%= f.label :answer ,t('faq.answer'), :class => "control-label muted" %> - <%= f.fields_for :answer_translations do |f| %> -
    -
    - <%= f.text_area locale, :style=>"width:100%", :class => 'ckeditor input-block-level', :value => (@qa.answer_translations[locale] rescue nil) %> -
    -
    - <% end %> -
    -
    -<% end %> - -
    - -
    - - - <% if @qa && !@qa.qa_links.blank? %> -
    - <% @qa.qa_links.each_with_index do |qa_link, i| %> - <%= f.fields_for :qa_links, qa_link do |f| %> - <%= render :partial => 'form_qa_link', :object => qa_link, :locals => {:f => f, :i => i} %> - <% end %> - <% end %> -
    -
    - <% end %> - - -
    -

    - <%= hidden_field_tag 'qa_link_field_count', @qa.qa_links.count %> - <%= t(:add) %> -

    - -
    -
    - - -
    - -
    - - - <% if @qa && !@qa.qa_files.blank? %> -
    - <% @qa.qa_files.each_with_index do |qa_file, i| %> - <%= f.fields_for :qa_files, qa_file do |f| %> - <%= render :partial => 'form_qa_file', :object => qa_file, :locals => {:f => f, :i => i} %> - <% end %> - <% end %> -
    -
    - <% end %> - - -
    -
    -

    - <%= hidden_field_tag 'qa_file_field_count', @qa.qa_files.count %> - <%= t(:add) %> -

    - -
    -
    -
    - -
    - -
    - <%= f.submit t('submit'), class: 'btn btn-primary' %> - <%= button_tag t("preview"), id: "button_for_preview", name: "commit", class: 'btn post_preview', type: :button, url: preview_panel_announcement_back_end_bulletins_path %> - <%= link_to t('cancel'), get_go_back, :class=>"btn" %> -
    - -
    -<% content_for :page_specific_javascript do %> - -<% end %> - diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_form_qa_file.html.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_form_qa_file.html.erb deleted file mode 100644 index 5184d7eb..00000000 --- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_form_qa_file.html.erb +++ /dev/null @@ -1,55 +0,0 @@ -<% if form_qa_file.new_record? %> -
    -<% else %> -
    - <% if form_qa_file.file.blank? %> - <%= t(:no_file) %> - <% else %> - <%= link_to content_tag(:i) + form_qa_file.file_identifier, form_qa_file.file.url, {:class => 'file-link file-type', :target => '_blank', :title => form_qa_file.file_identifier} %> - <% end %> -<% end %> -
    - - - - <% @site_in_use_locales.each_with_index do |locale, i| %> - <%= locale %>"> - <%= f.fields_for :title_translations do |f| %> - <%= f.text_field locale, :class => "input-medium", placeholder: t(:alternative), :value => (form_qa_file.title_translations[locale] rescue nil) %> - <% end %> - - <% end %> - - - - <% @site_in_use_locales.each_with_index do |locale, i| %> - <%= locale %>"> - <%= f.fields_for :description_translations do |f| %> - <%= f.text_field locale, :class => "input-medium", placeholder: t(:description), :value => (form_qa_file.description_translations[locale] rescue nil) %> - <% end %> - - <% end %> - - - <% if form_qa_file.new_record? %> - - - - <% else %> - - <%= f.hidden_field :id %> - - <%= f.hidden_field :_destroy, :value => nil, :class => 'should_destroy' %> - - <% end %> -
    -
    \ No newline at end of file diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_form_qa_link.html.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_form_qa_link.html.erb deleted file mode 100644 index f10993b0..00000000 --- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_form_qa_link.html.erb +++ /dev/null @@ -1,26 +0,0 @@ -
    - - <%= f.text_field :url, class: "input-large", placeholder: t(:url) %> - - - <% @site_in_use_locales.each_with_index do |locale, i| %> - <%= locale %>"> - <%= f.fields_for :title_translations do |f| %> - <%= f.text_field locale, :class => "input-large", placeholder: t(:url_alt), :value => (form_link.title_translations[locale] rescue nil) %> - <% end %> - - <% end %> - - - <% if form_qa_link.new_record? %> - - - - <% else %> - - <%= f.hidden_field :id %> - - <%= f.hidden_field :_destroy, :value => nil, :class => 'should_destroy' %> - - <% end %> -
    diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_qa.html.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_qa.html.erb deleted file mode 100644 index 5c735cac..00000000 --- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_qa.html.erb +++ /dev/null @@ -1,44 +0,0 @@ - - - <% if (qa.create_user_id == current_or_guest_user.id) || is_manager? %> - <%= check_box_tag 'to_delete[]', qa.id, false, :class => "checkbox_in_list" %> - <% end -%> - - -
    -
    - <% if qa.is_top? %> - <%= t(:top) %> - <% end %> - <% if qa.is_hot? %> - <%= t(:hot) %> - <% end %> - <% if qa.is_hidden? %> - <%= t(:hidden) %> - <% end %> -
    -
    - - <%= qa.qa_category.title rescue nil %> - - <%= link_to qa.title, panel_faq_front_end_qa_path(qa) %> -
    - -
    - - -
    -
    - <% qa.sorted_tags.each do |tag| %> - <%= tag.name %> - <% end %> -
    -
    - - - diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_sort_headers.html.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/_sort_headers.html.erb deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/destroy.js.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/destroy.js.erb deleted file mode 100644 index fbe87fe2..00000000 --- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/destroy.js.erb +++ /dev/null @@ -1 +0,0 @@ -$("#<%= dom_id @qa %>").remove(); \ No newline at end of file diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/edit.html.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/edit.html.erb deleted file mode 100644 index 5fc91f55..00000000 --- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/edit.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -

    <%= t('qa.editing_faq') %>

    - -<%= form_for @qa, :url => panel_faq_back_end_qa_path(@qa), :html => {:class => 'form-horizontal main-forms'} do |f| %> - <%= render :partial => 'form', :locals => {:f => f} %> -<% end %> diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/index.html.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/index.html.erb deleted file mode 100644 index df852484..00000000 --- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/index.html.erb +++ /dev/null @@ -1,41 +0,0 @@ -<% set_default_index do - objects @qas - quick_edit_link type: 'edit', - link: 'edit_panel_faq_back_end_qa_path' - quick_edit_link type: 'delete', - link: 'panel_faq_back_end_qa_path' - field type: 'status', - db_field: @statuses, - translation: 'status', - hide: 'phone', - sort: 'status' - field type: 'associated', - db_field: 'category', - model_field: 'title', - translation: 'category', - hide: 'phone', - sort: 'category' - field db_field: 'title', - translation: 'title', - sort: 'title', - display_option: 'link_to value, panel_faq_front_end_qa_path(object)', - quick_edit: true, - header_class: 'span5' - field type: 'tags', - hide: 'phone', - sort: 'tags' - filter_field type: 'array', - values: @statuses, - translation: 'status' - filter_field type: 'objects', - values: @categories, - translation: 'category', - object_field: 'title' - filter_field type: 'objects', - values: @tags, - translation: 'tags', - object_field: 'name' - footer link: 'new_panel_faq_back_end_qa_path' -end %> - -<%= render 'admin/default_index/index' %> diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/index.js.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/index.js.erb deleted file mode 100644 index bbcc7ae8..00000000 --- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/index.js.erb +++ /dev/null @@ -1,7 +0,0 @@ -$("#collapse-status").html("<%= j render 'filter_status' %>"); -$("#collapse-category").html("<%= j render 'filter_categories' %>"); -$("#collapse-tags").html("<%= j render 'filter_tags' %>"); -$("#delete_all").attr("action", "<%= delete_panel_faq_back_end_qas_path(:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil, :sort_options => params[:sort_options]) %>"); -$("#sort_headers").html("<%= j render 'sort_headers' %>"); -$("#tbody_qas").html("<%= j render :partial => 'qa', :collection => @qas %>"); -$("#qa_pagination").html("<%= j paginate @qas, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>"); \ No newline at end of file diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/new.html.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/new.html.erb deleted file mode 100644 index 49ec7437..00000000 --- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/new.html.erb +++ /dev/null @@ -1,9 +0,0 @@ - -<%= flash_messages %> -
    -<%= form_for @qa, :url => panel_faq_back_end_qas_path, :html => {:class => 'form-horizontal main-forms'} do |f| %> - <%= render :partial => 'form', :locals => {:f => f} %> -<% end %> -
    -<%#= link_back %> - diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/show.html.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/show.html.erb deleted file mode 100644 index 09cf5afc..00000000 --- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/show.html.erb +++ /dev/null @@ -1,28 +0,0 @@ -
      -
    • - <%= t(:category) %> - <%= @qa.qa_category.title rescue nil %> -
    • -
    • - <%= t("faq.question") %> - <%= @qa.title %> -
    • -
    • - <%= t("faq.answer") %> - <%= @qa.answer.html_safe rescue '' %> -
    • -
    • - <%= t(:link) if !@qa.qa_links.blank? %> - <% @qa.qa_links.each do | blink | %> - <%= link_to blink.title, blink.url, :target => '_blank' %> - <% end %> -
    • -
    • - <%= t("faq.file") if !@qa.qa_files.blank? %> - <% @qa.qa_files.each do | bfile | %> - <%= link_to bfile.title, bfile.file.url, {:target => '_blank', :title => bfile.description} if bfile.file.file %> - <% end %> -
    • -
    - -<%= link_back %> diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/toggle_enable.js.erb b/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/toggle_enable.js.erb deleted file mode 100644 index b00cfa07..00000000 --- a/vendor/built_in_modules/faq/app/views/panel/faq/back_end/qas/toggle_enable.js.erb +++ /dev/null @@ -1,3 +0,0 @@ -$("#enable_<%= @bulletin.id %>").toggle(); -$("#disable_<%= @bulletin.id %>").toggle(); -$("#bulletin_<%= @bulletin.id %>").toggleClass('disable'); \ No newline at end of file diff --git a/vendor/built_in_modules/faq/app/views/panel/faq/front_end/qas/show.html.erb b/vendor/built_in_modules/faq/app/views/panel/faq/front_end/qas/show.html.erb deleted file mode 100644 index 7ee6d1b9..00000000 --- a/vendor/built_in_modules/faq/app/views/panel/faq/front_end/qas/show.html.erb +++ /dev/null @@ -1,32 +0,0 @@ - -

    <%= @qa.title %>

    -
    -
    - <%= t(:category) %>:<%= @qa.category.title rescue nil %> -
    -
    -
    - <%= @qa.answer.html_safe rescue '' %> -
    -
    - <% if @qa.qa_links.size > 0 %> -
    - - -
    - <% end %> - <% if @qa.qa_files.size > 0 %> -
    - -
    - <% @qa.qa_files.each do | bfile | %> - <%= link_to bfile.title, bfile.file.url, {:target => '_blank', :title => bfile.description} if bfile.file.file %> - <% end %> -
    -
    - <% end %> -
    diff --git a/vendor/built_in_modules/faq/config/locales/en.yml b/vendor/built_in_modules/faq/config/locales/en.yml deleted file mode 100644 index d401e481..00000000 --- a/vendor/built_in_modules/faq/config/locales/en.yml +++ /dev/null @@ -1,23 +0,0 @@ -en: - - faq: - default_widget: - question: Question - title: Question - answer: Answer - to_more: Read More - qa_category_with_title: Category - faq: FAQ - widget: - index: FAQ Widget - frontend: - faq: FAQ Frontend - read_more: Read More - question: Question - answer: Answer - qa: - create_qa_category_success: FAQ category was successfully created - editing_web_resource: Editing FAQ - list_of_web_resource: FAQ list - new_web_resource: New FAQ - update_qa_category_success: FAQ was successfully updated diff --git a/vendor/built_in_modules/faq/config/locales/zh_tw.yml b/vendor/built_in_modules/faq/config/locales/zh_tw.yml deleted file mode 100644 index aa932e8d..00000000 --- a/vendor/built_in_modules/faq/config/locales/zh_tw.yml +++ /dev/null @@ -1,24 +0,0 @@ -zh_tw: - - faq: - default_widget: - question: 問題 - title: 問題 - answer: 回答 - to_more: 閱讀更多 - qa_category_with_title: 類別 - faq: 問與答 - widget: - index: 問與答Widget - frontend: - faq: 問與答前台 - read_more: 閱讀更多 - question: 問題 - answer: 回答 - - qa: - create_qa_category_success: 問與答類別已成功建立 - editing_web_resource: 編輯問與答 - list_of_web_resource: 問與答列表 - new_web_resource: 新增問與答 - update_qa_category_success: 問與答已成功更新 diff --git a/vendor/built_in_modules/faq/config/routes.rb b/vendor/built_in_modules/faq/config/routes.rb deleted file mode 100644 index 9d3729ce..00000000 --- a/vendor/built_in_modules/faq/config/routes.rb +++ /dev/null @@ -1,23 +0,0 @@ -Rails.application.routes.draw do - - namespace :panel do - namespace :faq do - namespace :back_end do - resources :qas do - collection do - get 'delete' - end - end - resources :qa_categorys - resources :tags - end - namespace :front_end do - resources :qas - end - namespace :widget do - match "index" => "qas#index" - end - end - end - match "/appfront/*path" => redirect("/panel/*path") -end diff --git a/vendor/built_in_modules/faq/faq.gemspec b/vendor/built_in_modules/faq/faq.gemspec deleted file mode 100644 index 92317c27..00000000 --- a/vendor/built_in_modules/faq/faq.gemspec +++ /dev/null @@ -1,23 +0,0 @@ -$:.push File.expand_path("../lib", __FILE__) - -# Maintain your gem's version: -require "faq/version" - -# Describe your gem and declare its dependencies: -Gem::Specification.new do |s| - s.name = "faq" - s.version = Faq::VERSION - s.authors = ["TODO: Your name"] - s.email = ["TODO: Your email"] - s.homepage = "TODO" - s.summary = "TODO: Summary of Faq." - s.description = "TODO: Description of Faq." - - s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"] - s.test_files = Dir["test/**/*"] - - s.add_dependency "rails", "~> 3.2.12" - # s.add_dependency "jquery-rails" - - s.add_development_dependency "sqlite3" -end diff --git a/vendor/built_in_modules/faq/faq.json b/vendor/built_in_modules/faq/faq.json deleted file mode 100644 index be108e6b..00000000 --- a/vendor/built_in_modules/faq/faq.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "title": "faq", - "version": "0.1", - "organization": "Rulingcom", - "author": "RD dep", - "intro": "A simple blog……", - "update_info": "Some info", - "create_date": "03-19-2013", - "widgets": ["index"], - "category": ["QaCategory"], - "enable_frontend": true -} diff --git a/vendor/built_in_modules/faq/init.rb b/vendor/built_in_modules/faq/init.rb deleted file mode 100644 index cd75cfc5..00000000 --- a/vendor/built_in_modules/faq/init.rb +++ /dev/null @@ -1,77 +0,0 @@ -module Faq - OrbitApp.registration "Faq",:type=> 'ModuleApp' do - module_label 'faq.faq' - base_url File.expand_path File.dirname(__FILE__) - # personal_plugin :enable => true,:path=>"panel/faq/plugin/profile",:i18n=>'admin.faq' - - version "0.1" - organization "Rulingcom" - author "RD dep" - intro "I am intro" - update_info 'some update_info' - - front_end do - app_page 'qas' do - frontend_i18n "faq.frontend.faq" - end - end - - # category ["QaCategory"] - data_count 1..20 - - taggable - categorizable - authorizable - - widgets do - default_widget do - query 'Qa' - enable ['typeA'] - link_field :qa_category_with_title,{:method => 'panel_faq_front_end_qas_path',:args=>{:category_id => [:category,:id]}} - link_field :title, {:method => 'panel_faq_front_end_qa_path',:args=>:self} - link_to_more 'panel_faq_front_end_qas_path',:title_i18n=> 'faq.default_widget.to_more' - end - - categories_query 'QaCategory.all' - tags_query 'FaqTag.all' - - # customize_widget "index" do - # widget_i18n "faq.widget.index" - # style ["1"] - # end - end - - - side_bar do - head_label_i18n 'faq.faq',:icon_class=>"icons-help" - available_for [:admin,:guest,:manager,:sub_manager] - active_for_controllers ({:private=>['qas', 'qa_categorys','module_tags', 'categories']}) - active_for_object_auth ['QaCategory'] - - head_link_path "panel_faq_back_end_qas_path" - - context_link 'list_', - :link_path=>"panel_faq_back_end_qas_path" , - :priority=>1, - :active_for_action=>{:qas=>:index}, - :available_for => [:all] - - context_link 'add', - :link_path=>"new_panel_faq_back_end_qa_path" , - :priority=>2, - :active_for_action=>{:qas=>:new}, - :available_for => [:sub_manager] - - context_link 'categories', - :link_path=>"admin_module_app_categories_path(get_module_app)" , - :priority=>3, - :active_for_category => 'Faq', - :available_for => [:manager] - context_link 'tags', - :link_path=>"admin_module_tags_path(module_app_id: get_module_app)" , - :priority=>4, - :active_for_tag => 'Faq', - :available_for => [:manager] - end - end -end diff --git a/vendor/built_in_modules/faq/lib/faq.rb b/vendor/built_in_modules/faq/lib/faq.rb deleted file mode 100644 index 936b03b4..00000000 --- a/vendor/built_in_modules/faq/lib/faq.rb +++ /dev/null @@ -1,4 +0,0 @@ -require "faq/engine" - -module Faq -end diff --git a/vendor/built_in_modules/faq/lib/faq/engine.rb b/vendor/built_in_modules/faq/lib/faq/engine.rb deleted file mode 100644 index 0dc2942e..00000000 --- a/vendor/built_in_modules/faq/lib/faq/engine.rb +++ /dev/null @@ -1,4 +0,0 @@ -module Faq - class Engine < ::Rails::Engine - end -end diff --git a/vendor/built_in_modules/faq/lib/faq/version.rb b/vendor/built_in_modules/faq/lib/faq/version.rb deleted file mode 100644 index ecab1e3d..00000000 --- a/vendor/built_in_modules/faq/lib/faq/version.rb +++ /dev/null @@ -1,3 +0,0 @@ -module Faq - VERSION = "0.0.1" -end diff --git a/vendor/built_in_modules/faq/lib/tasks/faq_tasks.rake b/vendor/built_in_modules/faq/lib/tasks/faq_tasks.rake deleted file mode 100644 index 7c5e83d5..00000000 --- a/vendor/built_in_modules/faq/lib/tasks/faq_tasks.rake +++ /dev/null @@ -1,4 +0,0 @@ -# desc "Explaining what the task does" -# task :faq do -# # Task goes here -# end diff --git a/vendor/built_in_modules/faq/script/rails b/vendor/built_in_modules/faq/script/rails deleted file mode 100755 index 967f1b7d..00000000 --- a/vendor/built_in_modules/faq/script/rails +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env ruby -# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. - -ENGINE_ROOT = File.expand_path('../..', __FILE__) -ENGINE_PATH = File.expand_path('../../lib/faq/engine', __FILE__) - -require 'rails/all' -require 'rails/engine/commands' diff --git a/vendor/built_in_modules/faq/test/dummy/README.rdoc b/vendor/built_in_modules/faq/test/dummy/README.rdoc deleted file mode 100644 index 7c36f235..00000000 --- a/vendor/built_in_modules/faq/test/dummy/README.rdoc +++ /dev/null @@ -1,261 +0,0 @@ -== Welcome to Rails - -Rails is a web-application framework that includes everything needed to create -database-backed web applications according to the Model-View-Control pattern. - -This pattern splits the view (also called the presentation) into "dumb" -templates that are primarily responsible for inserting pre-built data in between -HTML tags. The model contains the "smart" domain objects (such as Account, -Product, Person, Post) that holds all the business logic and knows how to -persist themselves to a database. The controller handles the incoming requests -(such as Save New Account, Update Product, Show Post) by manipulating the model -and directing data to the view. - -In Rails, the model is handled by what's called an object-relational mapping -layer entitled Active Record. This layer allows you to present the data from -database rows as objects and embellish these data objects with business logic -methods. You can read more about Active Record in -link:files/vendor/rails/activerecord/README.html. - -The controller and view are handled by the Action Pack, which handles both -layers by its two parts: Action View and Action Controller. These two layers -are bundled in a single package due to their heavy interdependence. This is -unlike the relationship between the Active Record and Action Pack that is much -more separate. Each of these packages can be used independently outside of -Rails. You can read more about Action Pack in -link:files/vendor/rails/actionpack/README.html. - - -== Getting Started - -1. At the command prompt, create a new Rails application: - rails new myapp (where myapp is the application name) - -2. Change directory to myapp and start the web server: - cd myapp; rails server (run with --help for options) - -3. Go to http://localhost:3000/ and you'll see: - "Welcome aboard: You're riding Ruby on Rails!" - -4. Follow the guidelines to start developing your application. You can find -the following resources handy: - -* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html -* Ruby on Rails Tutorial Book: http://www.railstutorial.org/ - - -== Debugging Rails - -Sometimes your application goes wrong. Fortunately there are a lot of tools that -will help you debug it and get it back on the rails. - -First area to check is the application log files. Have "tail -f" commands -running on the server.log and development.log. Rails will automatically display -debugging and runtime information to these files. Debugging info will also be -shown in the browser on requests from 127.0.0.1. - -You can also log your own messages directly into the log file from your code -using the Ruby logger class from inside your controllers. Example: - - class WeblogController < ActionController::Base - def destroy - @weblog = Weblog.find(params[:id]) - @weblog.destroy - logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!") - end - end - -The result will be a message in your log file along the lines of: - - Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1! - -More information on how to use the logger is at http://www.ruby-doc.org/core/ - -Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are -several books available online as well: - -* Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe) -* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide) - -These two books will bring you up to speed on the Ruby language and also on -programming in general. - - -== Debugger - -Debugger support is available through the debugger command when you start your -Mongrel or WEBrick server with --debugger. This means that you can break out of -execution at any point in the code, investigate and change the model, and then, -resume execution! You need to install ruby-debug to run the server in debugging -mode. With gems, use sudo gem install ruby-debug. Example: - - class WeblogController < ActionController::Base - def index - @posts = Post.all - debugger - end - end - -So the controller will accept the action, run the first line, then present you -with a IRB prompt in the server window. Here you can do things like: - - >> @posts.inspect - => "[#nil, "body"=>nil, "id"=>"1"}>, - #"Rails", "body"=>"Only ten..", "id"=>"2"}>]" - >> @posts.first.title = "hello from a debugger" - => "hello from a debugger" - -...and even better, you can examine how your runtime objects actually work: - - >> f = @posts.first - => #nil, "body"=>nil, "id"=>"1"}> - >> f. - Display all 152 possibilities? (y or n) - -Finally, when you're ready to resume execution, you can enter "cont". - - -== Console - -The console is a Ruby shell, which allows you to interact with your -application's domain model. Here you'll have all parts of the application -configured, just like it is when the application is running. You can inspect -domain models, change values, and save to the database. Starting the script -without arguments will launch it in the development environment. - -To start the console, run rails console from the application -directory. - -Options: - -* Passing the -s, --sandbox argument will rollback any modifications - made to the database. -* Passing an environment name as an argument will load the corresponding - environment. Example: rails console production. - -To reload your controllers and models after launching the console run -reload! - -More information about irb can be found at: -link:http://www.rubycentral.org/pickaxe/irb.html - - -== dbconsole - -You can go to the command line of your database directly through rails -dbconsole. You would be connected to the database with the credentials -defined in database.yml. Starting the script without arguments will connect you -to the development database. Passing an argument will connect you to a different -database, like rails dbconsole production. Currently works for MySQL, -PostgreSQL and SQLite 3. - -== Description of Contents - -The default directory structure of a generated Ruby on Rails application: - - |-- app - | |-- assets - | |-- images - | |-- javascripts - | `-- stylesheets - | |-- controllers - | |-- helpers - | |-- mailers - | |-- models - | `-- views - | `-- layouts - |-- config - | |-- environments - | |-- initializers - | `-- locales - |-- db - |-- doc - |-- lib - | `-- tasks - |-- log - |-- public - |-- script - |-- test - | |-- fixtures - | |-- functional - | |-- integration - | |-- performance - | `-- unit - |-- tmp - | |-- cache - | |-- pids - | |-- sessions - | `-- sockets - `-- vendor - |-- assets - `-- stylesheets - `-- plugins - -app - Holds all the code that's specific to this particular application. - -app/assets - Contains subdirectories for images, stylesheets, and JavaScript files. - -app/controllers - Holds controllers that should be named like weblogs_controller.rb for - automated URL mapping. All controllers should descend from - ApplicationController which itself descends from ActionController::Base. - -app/models - Holds models that should be named like post.rb. Models descend from - ActiveRecord::Base by default. - -app/views - Holds the template files for the view that should be named like - weblogs/index.html.erb for the WeblogsController#index action. All views use - eRuby syntax by default. - -app/views/layouts - Holds the template files for layouts to be used with views. This models the - common header/footer method of wrapping views. In your views, define a layout - using the layout :default and create a file named default.html.erb. - Inside default.html.erb, call <% yield %> to render the view using this - layout. - -app/helpers - Holds view helpers that should be named like weblogs_helper.rb. These are - generated for you automatically when using generators for controllers. - Helpers can be used to wrap functionality for your views into methods. - -config - Configuration files for the Rails environment, the routing map, the database, - and other dependencies. - -db - Contains the database schema in schema.rb. db/migrate contains all the - sequence of Migrations for your schema. - -doc - This directory is where your application documentation will be stored when - generated using rake doc:app - -lib - Application specific libraries. Basically, any kind of custom code that - doesn't belong under controllers, models, or helpers. This directory is in - the load path. - -public - The directory available for the web server. Also contains the dispatchers and the - default HTML files. This should be set as the DOCUMENT_ROOT of your web - server. - -script - Helper scripts for automation and generation. - -test - Unit and functional tests along with fixtures. When using the rails generate - command, template test files will be generated for you and placed in this - directory. - -vendor - External libraries that the application depends on. Also includes the plugins - subdirectory. If the app has frozen rails, those gems also go here, under - vendor/rails/. This directory is in the load path. diff --git a/vendor/built_in_modules/faq/test/dummy/Rakefile b/vendor/built_in_modules/faq/test/dummy/Rakefile deleted file mode 100644 index 36458522..00000000 --- a/vendor/built_in_modules/faq/test/dummy/Rakefile +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env rake -# Add your own tasks in files placed in lib/tasks ending in .rake, -# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. - -require File.expand_path('../config/application', __FILE__) - -Dummy::Application.load_tasks diff --git a/vendor/built_in_modules/faq/test/dummy/app/assets/javascripts/application.js b/vendor/built_in_modules/faq/test/dummy/app/assets/javascripts/application.js deleted file mode 100644 index 9097d830..00000000 --- a/vendor/built_in_modules/faq/test/dummy/app/assets/javascripts/application.js +++ /dev/null @@ -1,15 +0,0 @@ -// This is a manifest file that'll be compiled into application.js, which will include all the files -// listed below. -// -// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, -// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. -// -// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -// the compiled file. -// -// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD -// GO AFTER THE REQUIRES BELOW. -// -//= require jquery -//= require jquery_ujs -//= require_tree . diff --git a/vendor/built_in_modules/faq/test/dummy/app/assets/stylesheets/application.css b/vendor/built_in_modules/faq/test/dummy/app/assets/stylesheets/application.css deleted file mode 100644 index 3192ec89..00000000 --- a/vendor/built_in_modules/faq/test/dummy/app/assets/stylesheets/application.css +++ /dev/null @@ -1,13 +0,0 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, - * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the top of the - * compiled file, but it's generally better to create a new file per style scope. - * - *= require_self - *= require_tree . - */ diff --git a/vendor/built_in_modules/faq/test/dummy/app/controllers/application_controller.rb b/vendor/built_in_modules/faq/test/dummy/app/controllers/application_controller.rb deleted file mode 100644 index e8065d95..00000000 --- a/vendor/built_in_modules/faq/test/dummy/app/controllers/application_controller.rb +++ /dev/null @@ -1,3 +0,0 @@ -class ApplicationController < ActionController::Base - protect_from_forgery -end diff --git a/vendor/built_in_modules/faq/test/dummy/app/helpers/application_helper.rb b/vendor/built_in_modules/faq/test/dummy/app/helpers/application_helper.rb deleted file mode 100644 index de6be794..00000000 --- a/vendor/built_in_modules/faq/test/dummy/app/helpers/application_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module ApplicationHelper -end diff --git a/vendor/built_in_modules/faq/test/dummy/app/mailers/.gitkeep b/vendor/built_in_modules/faq/test/dummy/app/mailers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/faq/test/dummy/app/models/.gitkeep b/vendor/built_in_modules/faq/test/dummy/app/models/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/faq/test/dummy/app/views/layouts/application.html.erb b/vendor/built_in_modules/faq/test/dummy/app/views/layouts/application.html.erb deleted file mode 100644 index 4cab2684..00000000 --- a/vendor/built_in_modules/faq/test/dummy/app/views/layouts/application.html.erb +++ /dev/null @@ -1,14 +0,0 @@ - - - - Dummy - <%= stylesheet_link_tag "application", :media => "all" %> - <%= javascript_include_tag "application" %> - <%= csrf_meta_tags %> - - - -<%= yield %> - - - diff --git a/vendor/built_in_modules/faq/test/dummy/config.ru b/vendor/built_in_modules/faq/test/dummy/config.ru deleted file mode 100644 index 1989ed8d..00000000 --- a/vendor/built_in_modules/faq/test/dummy/config.ru +++ /dev/null @@ -1,4 +0,0 @@ -# This file is used by Rack-based servers to start the application. - -require ::File.expand_path('../config/environment', __FILE__) -run Dummy::Application diff --git a/vendor/built_in_modules/faq/test/dummy/config/application.rb b/vendor/built_in_modules/faq/test/dummy/config/application.rb deleted file mode 100644 index b2b4e7d5..00000000 --- a/vendor/built_in_modules/faq/test/dummy/config/application.rb +++ /dev/null @@ -1,59 +0,0 @@ -require File.expand_path('../boot', __FILE__) - -require 'rails/all' - -Bundler.require -require "faq" - -module Dummy - class Application < Rails::Application - # Settings in config/environments/* take precedence over those specified here. - # Application configuration should go into files in config/initializers - # -- all .rb files in that directory are automatically loaded. - - # Custom directories with classes and modules you want to be autoloadable. - # config.autoload_paths += %W(#{config.root}/extras) - - # Only load the plugins named here, in the order given (default is alphabetical). - # :all can be used as a placeholder for all plugins not explicitly named. - # config.plugins = [ :exception_notification, :ssl_requirement, :all ] - - # Activate observers that should always be running. - # config.active_record.observers = :cacher, :garbage_collector, :forum_observer - - # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. - # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. - # config.time_zone = 'Central Time (US & Canada)' - - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - # config.i18n.default_locale = :de - - # Configure the default encoding used in templates for Ruby 1.9. - config.encoding = "utf-8" - - # Configure sensitive parameters which will be filtered from the log file. - config.filter_parameters += [:password] - - # Enable escaping HTML in JSON. - config.active_support.escape_html_entities_in_json = true - - # Use SQL instead of Active Record's schema dumper when creating the database. - # This is necessary if your schema can't be completely dumped by the schema dumper, - # like if you have constraints or database-specific column types - # config.active_record.schema_format = :sql - - # Enforce whitelist mode for mass assignment. - # This will create an empty whitelist of attributes available for mass-assignment for all models - # in your app. As such, your models will need to explicitly whitelist or blacklist accessible - # parameters by using an attr_accessible or attr_protected declaration. - config.active_record.whitelist_attributes = true - - # Enable the asset pipeline - config.assets.enabled = true - - # Version of your assets, change this if you want to expire all your assets - config.assets.version = '1.0' - end -end - diff --git a/vendor/built_in_modules/faq/test/dummy/config/boot.rb b/vendor/built_in_modules/faq/test/dummy/config/boot.rb deleted file mode 100644 index eba06813..00000000 --- a/vendor/built_in_modules/faq/test/dummy/config/boot.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'rubygems' -gemfile = File.expand_path('../../../../Gemfile', __FILE__) - -if File.exist?(gemfile) - ENV['BUNDLE_GEMFILE'] = gemfile - require 'bundler' - Bundler.setup -end - -$:.unshift File.expand_path('../../../../lib', __FILE__) \ No newline at end of file diff --git a/vendor/built_in_modules/faq/test/dummy/config/database.yml b/vendor/built_in_modules/faq/test/dummy/config/database.yml deleted file mode 100644 index 51a4dd45..00000000 --- a/vendor/built_in_modules/faq/test/dummy/config/database.yml +++ /dev/null @@ -1,25 +0,0 @@ -# SQLite version 3.x -# gem install sqlite3 -# -# Ensure the SQLite 3 gem is defined in your Gemfile -# gem 'sqlite3' -development: - adapter: sqlite3 - database: db/development.sqlite3 - pool: 5 - timeout: 5000 - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: - adapter: sqlite3 - database: db/test.sqlite3 - pool: 5 - timeout: 5000 - -production: - adapter: sqlite3 - database: db/production.sqlite3 - pool: 5 - timeout: 5000 diff --git a/vendor/built_in_modules/faq/test/dummy/config/environment.rb b/vendor/built_in_modules/faq/test/dummy/config/environment.rb deleted file mode 100644 index 3da5eb91..00000000 --- a/vendor/built_in_modules/faq/test/dummy/config/environment.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Load the rails application -require File.expand_path('../application', __FILE__) - -# Initialize the rails application -Dummy::Application.initialize! diff --git a/vendor/built_in_modules/faq/test/dummy/config/environments/development.rb b/vendor/built_in_modules/faq/test/dummy/config/environments/development.rb deleted file mode 100644 index 82c74d15..00000000 --- a/vendor/built_in_modules/faq/test/dummy/config/environments/development.rb +++ /dev/null @@ -1,37 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # In the development environment your application's code is reloaded on - # every request. This slows down response time but is perfect for development - # since you don't have to restart the web server when you make code changes. - config.cache_classes = false - - # Log error messages when you accidentally call methods on nil. - config.whiny_nils = true - - # Show full error reports and disable caching - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Don't care if the mailer can't send - config.action_mailer.raise_delivery_errors = false - - # Print deprecation notices to the Rails logger - config.active_support.deprecation = :log - - # Only use best-standards-support built into browsers - config.action_dispatch.best_standards_support = :builtin - - # Raise exception on mass assignment protection for Active Record models - config.active_record.mass_assignment_sanitizer = :strict - - # Log the query plan for queries taking more than this (works - # with SQLite, MySQL, and PostgreSQL) - config.active_record.auto_explain_threshold_in_seconds = 0.5 - - # Do not compress assets - config.assets.compress = false - - # Expands the lines which load the assets - config.assets.debug = true -end diff --git a/vendor/built_in_modules/faq/test/dummy/config/environments/production.rb b/vendor/built_in_modules/faq/test/dummy/config/environments/production.rb deleted file mode 100644 index bdac56a7..00000000 --- a/vendor/built_in_modules/faq/test/dummy/config/environments/production.rb +++ /dev/null @@ -1,67 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # Code is not reloaded between requests - config.cache_classes = true - - # Full error reports are disabled and caching is turned on - config.consider_all_requests_local = false - config.action_controller.perform_caching = true - - # Disable Rails's static asset server (Apache or nginx will already do this) - config.serve_static_assets = false - - # Compress JavaScripts and CSS - config.assets.compress = true - - # Don't fallback to assets pipeline if a precompiled asset is missed - config.assets.compile = false - - # Generate digests for assets URLs - config.assets.digest = true - - # Defaults to nil and saved in location specified by config.assets.prefix - # config.assets.manifest = YOUR_PATH - - # Specifies the header that your server uses for sending files - # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx - - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true - - # See everything in the log (default is :info) - # config.log_level = :debug - - # Prepend all log lines with the following tags - # config.log_tags = [ :subdomain, :uuid ] - - # Use a different logger for distributed setups - # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) - - # Use a different cache store in production - # config.cache_store = :mem_cache_store - - # Enable serving of images, stylesheets, and JavaScripts from an asset server - # config.action_controller.asset_host = "http://assets.example.com" - - # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) - # config.assets.precompile += %w( search.js ) - - # Disable delivery errors, bad email addresses will be ignored - # config.action_mailer.raise_delivery_errors = false - - # Enable threaded mode - # config.threadsafe! - - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation can not be found) - config.i18n.fallbacks = true - - # Send deprecation notices to registered listeners - config.active_support.deprecation = :notify - - # Log the query plan for queries taking more than this (works - # with SQLite, MySQL, and PostgreSQL) - # config.active_record.auto_explain_threshold_in_seconds = 0.5 -end diff --git a/vendor/built_in_modules/faq/test/dummy/config/environments/test.rb b/vendor/built_in_modules/faq/test/dummy/config/environments/test.rb deleted file mode 100644 index f1a48141..00000000 --- a/vendor/built_in_modules/faq/test/dummy/config/environments/test.rb +++ /dev/null @@ -1,37 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # The test environment is used exclusively to run your application's - # test suite. You never need to work with it otherwise. Remember that - # your test database is "scratch space" for the test suite and is wiped - # and recreated between test runs. Don't rely on the data there! - config.cache_classes = true - - # Configure static asset server for tests with Cache-Control for performance - config.serve_static_assets = true - config.static_cache_control = "public, max-age=3600" - - # Log error messages when you accidentally call methods on nil - config.whiny_nils = true - - # Show full error reports and disable caching - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Raise exceptions instead of rendering exception templates - config.action_dispatch.show_exceptions = false - - # Disable request forgery protection in test environment - config.action_controller.allow_forgery_protection = false - - # Tell Action Mailer not to deliver emails to the real world. - # The :test delivery method accumulates sent emails in the - # ActionMailer::Base.deliveries array. - config.action_mailer.delivery_method = :test - - # Raise exception on mass assignment protection for Active Record models - config.active_record.mass_assignment_sanitizer = :strict - - # Print deprecation notices to the stderr - config.active_support.deprecation = :stderr -end diff --git a/vendor/built_in_modules/faq/test/dummy/config/initializers/backtrace_silencers.rb b/vendor/built_in_modules/faq/test/dummy/config/initializers/backtrace_silencers.rb deleted file mode 100644 index 59385cdf..00000000 --- a/vendor/built_in_modules/faq/test/dummy/config/initializers/backtrace_silencers.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. -# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } - -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. -# Rails.backtrace_cleaner.remove_silencers! diff --git a/vendor/built_in_modules/faq/test/dummy/config/initializers/inflections.rb b/vendor/built_in_modules/faq/test/dummy/config/initializers/inflections.rb deleted file mode 100644 index 5d8d9be2..00000000 --- a/vendor/built_in_modules/faq/test/dummy/config/initializers/inflections.rb +++ /dev/null @@ -1,15 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new inflection rules using the following format -# (all these examples are active by default): -# ActiveSupport::Inflector.inflections do |inflect| -# inflect.plural /^(ox)$/i, '\1en' -# inflect.singular /^(ox)en/i, '\1' -# inflect.irregular 'person', 'people' -# inflect.uncountable %w( fish sheep ) -# end -# -# These inflection rules are supported but not enabled by default: -# ActiveSupport::Inflector.inflections do |inflect| -# inflect.acronym 'RESTful' -# end diff --git a/vendor/built_in_modules/faq/test/dummy/config/initializers/mime_types.rb b/vendor/built_in_modules/faq/test/dummy/config/initializers/mime_types.rb deleted file mode 100644 index 72aca7e4..00000000 --- a/vendor/built_in_modules/faq/test/dummy/config/initializers/mime_types.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new mime types for use in respond_to blocks: -# Mime::Type.register "text/richtext", :rtf -# Mime::Type.register_alias "text/html", :iphone diff --git a/vendor/built_in_modules/faq/test/dummy/config/initializers/secret_token.rb b/vendor/built_in_modules/faq/test/dummy/config/initializers/secret_token.rb deleted file mode 100644 index f71ec8d9..00000000 --- a/vendor/built_in_modules/faq/test/dummy/config/initializers/secret_token.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Your secret key for verifying the integrity of signed cookies. -# If you change this key, all old signed cookies will become invalid! -# Make sure the secret is at least 30 characters and all random, -# no regular words or you'll be exposed to dictionary attacks. -Dummy::Application.config.secret_token = '952c6d72a8f6b07c06e64505287a675a0528f43620143ba79b080afa16d8696bfa9ae6187146e05a10d0e1e08b729be269951e1acd52653a1d95cb294271566e' diff --git a/vendor/built_in_modules/faq/test/dummy/config/initializers/session_store.rb b/vendor/built_in_modules/faq/test/dummy/config/initializers/session_store.rb deleted file mode 100644 index 952473ff..00000000 --- a/vendor/built_in_modules/faq/test/dummy/config/initializers/session_store.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Be sure to restart your server when you modify this file. - -Dummy::Application.config.session_store :cookie_store, key: '_dummy_session' - -# Use the database for sessions instead of the cookie-based default, -# which shouldn't be used to store highly confidential information -# (create the session table with "rails generate session_migration") -# Dummy::Application.config.session_store :active_record_store diff --git a/vendor/built_in_modules/faq/test/dummy/config/initializers/wrap_parameters.rb b/vendor/built_in_modules/faq/test/dummy/config/initializers/wrap_parameters.rb deleted file mode 100644 index 999df201..00000000 --- a/vendor/built_in_modules/faq/test/dummy/config/initializers/wrap_parameters.rb +++ /dev/null @@ -1,14 +0,0 @@ -# Be sure to restart your server when you modify this file. -# -# This file contains settings for ActionController::ParamsWrapper which -# is enabled by default. - -# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. -ActiveSupport.on_load(:action_controller) do - wrap_parameters format: [:json] -end - -# Disable root element in JSON by default. -ActiveSupport.on_load(:active_record) do - self.include_root_in_json = false -end diff --git a/vendor/built_in_modules/faq/test/dummy/config/locales/en.yml b/vendor/built_in_modules/faq/test/dummy/config/locales/en.yml deleted file mode 100644 index 179c14ca..00000000 --- a/vendor/built_in_modules/faq/test/dummy/config/locales/en.yml +++ /dev/null @@ -1,5 +0,0 @@ -# Sample localization file for English. Add more files in this directory for other locales. -# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. - -en: - hello: "Hello world" diff --git a/vendor/built_in_modules/faq/test/dummy/config/routes.rb b/vendor/built_in_modules/faq/test/dummy/config/routes.rb deleted file mode 100644 index eb8579be..00000000 --- a/vendor/built_in_modules/faq/test/dummy/config/routes.rb +++ /dev/null @@ -1,58 +0,0 @@ -Dummy::Application.routes.draw do - # The priority is based upon order of creation: - # first created -> highest priority. - - # Sample of regular route: - # match 'products/:id' => 'catalog#view' - # Keep in mind you can assign values other than :controller and :action - - # Sample of named route: - # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase - # This route can be invoked with purchase_url(:id => product.id) - - # Sample resource route (maps HTTP verbs to controller actions automatically): - # resources :products - - # Sample resource route with options: - # resources :products do - # member do - # get 'short' - # post 'toggle' - # end - # - # collection do - # get 'sold' - # end - # end - - # Sample resource route with sub-resources: - # resources :products do - # resources :comments, :sales - # resource :seller - # end - - # Sample resource route with more complex sub-resources - # resources :products do - # resources :comments - # resources :sales do - # get 'recent', :on => :collection - # end - # end - - # Sample resource route within a namespace: - # namespace :admin do - # # Directs /admin/products/* to Admin::ProductsController - # # (app/controllers/admin/products_controller.rb) - # resources :products - # end - - # You can have the root of your site routed with "root" - # just remember to delete public/index.html. - # root :to => 'welcome#index' - - # See how all your routes lay out with "rake routes" - - # This is a legacy wild controller route that's not recommended for RESTful applications. - # Note: This route will make all actions in every controller accessible via GET requests. - # match ':controller(/:action(/:id))(.:format)' -end diff --git a/vendor/built_in_modules/faq/test/dummy/lib/assets/.gitkeep b/vendor/built_in_modules/faq/test/dummy/lib/assets/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/faq/test/dummy/log/.gitkeep b/vendor/built_in_modules/faq/test/dummy/log/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/faq/test/dummy/public/404.html b/vendor/built_in_modules/faq/test/dummy/public/404.html deleted file mode 100644 index 9a48320a..00000000 --- a/vendor/built_in_modules/faq/test/dummy/public/404.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - The page you were looking for doesn't exist (404) - - - - - -
    -

    The page you were looking for doesn't exist.

    -

    You may have mistyped the address or the page may have moved.

    -
    - - diff --git a/vendor/built_in_modules/faq/test/dummy/public/422.html b/vendor/built_in_modules/faq/test/dummy/public/422.html deleted file mode 100644 index 83660ab1..00000000 --- a/vendor/built_in_modules/faq/test/dummy/public/422.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - The change you wanted was rejected (422) - - - - - -
    -

    The change you wanted was rejected.

    -

    Maybe you tried to change something you didn't have access to.

    -
    - - diff --git a/vendor/built_in_modules/faq/test/dummy/public/500.html b/vendor/built_in_modules/faq/test/dummy/public/500.html deleted file mode 100644 index f3648a0d..00000000 --- a/vendor/built_in_modules/faq/test/dummy/public/500.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - We're sorry, but something went wrong (500) - - - - - -
    -

    We're sorry, but something went wrong.

    -
    - - diff --git a/vendor/built_in_modules/faq/test/dummy/public/favicon.ico b/vendor/built_in_modules/faq/test/dummy/public/favicon.ico deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/faq/test/dummy/script/rails b/vendor/built_in_modules/faq/test/dummy/script/rails deleted file mode 100755 index f8da2cff..00000000 --- a/vendor/built_in_modules/faq/test/dummy/script/rails +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby -# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. - -APP_PATH = File.expand_path('../../config/application', __FILE__) -require File.expand_path('../../config/boot', __FILE__) -require 'rails/commands' diff --git a/vendor/built_in_modules/faq/test/faq_test.rb b/vendor/built_in_modules/faq/test/faq_test.rb deleted file mode 100644 index c426305b..00000000 --- a/vendor/built_in_modules/faq/test/faq_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class FaqTest < ActiveSupport::TestCase - test "truth" do - assert_kind_of Module, Faq - end -end diff --git a/vendor/built_in_modules/faq/test/integration/navigation_test.rb b/vendor/built_in_modules/faq/test/integration/navigation_test.rb deleted file mode 100644 index 97a94c9b..00000000 --- a/vendor/built_in_modules/faq/test/integration/navigation_test.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'test_helper' - -class NavigationTest < ActionDispatch::IntegrationTest - fixtures :all - - # test "the truth" do - # assert true - # end -end - diff --git a/vendor/built_in_modules/faq/test/test_helper.rb b/vendor/built_in_modules/faq/test/test_helper.rb deleted file mode 100644 index 1e26a313..00000000 --- a/vendor/built_in_modules/faq/test/test_helper.rb +++ /dev/null @@ -1,15 +0,0 @@ -# Configure Rails Environment -ENV["RAILS_ENV"] = "test" - -require File.expand_path("../dummy/config/environment.rb", __FILE__) -require "rails/test_help" - -Rails.backtrace_cleaner.remove_silencers! - -# Load support files -Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } - -# Load fixtures from the engine -if ActiveSupport::TestCase.method_defined?(:fixture_path=) - ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__) -end diff --git a/vendor/built_in_modules/location/.gitignore b/vendor/built_in_modules/location/.gitignore deleted file mode 100644 index 1463de6d..00000000 --- a/vendor/built_in_modules/location/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.bundle/ -log/*.log -pkg/ -test/dummy/db/*.sqlite3 -test/dummy/log/*.log -test/dummy/tmp/ \ No newline at end of file diff --git a/vendor/built_in_modules/location/Gemfile b/vendor/built_in_modules/location/Gemfile deleted file mode 100644 index a6e487f4..00000000 --- a/vendor/built_in_modules/location/Gemfile +++ /dev/null @@ -1,17 +0,0 @@ -source "http://rubygems.org" - -# Declare your gem's dependencies in location.gemspec. -# Bundler will treat runtime dependencies like base dependencies, and -# development dependencies will be added by default to the :development group. -gemspec - -# jquery-rails is used by the dummy application -gem "jquery-rails" - -# Declare any dependencies that are still in development here instead of in -# your gemspec. These might include edge Rails or gems from your path or -# Git. Remember to move these dependencies to your gemspec before releasing -# your gem to rubygems.org. - -# To use debugger -# gem 'ruby-debug19', :require => 'ruby-debug' diff --git a/vendor/built_in_modules/location/MIT-LICENSE b/vendor/built_in_modules/location/MIT-LICENSE deleted file mode 100644 index 406f17b7..00000000 --- a/vendor/built_in_modules/location/MIT-LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2012 YOURNAME - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/built_in_modules/location/README.rdoc b/vendor/built_in_modules/location/README.rdoc deleted file mode 100644 index 937b4141..00000000 --- a/vendor/built_in_modules/location/README.rdoc +++ /dev/null @@ -1,3 +0,0 @@ -= Location - -This project rocks and uses MIT-LICENSE. diff --git a/vendor/built_in_modules/location/Rakefile b/vendor/built_in_modules/location/Rakefile deleted file mode 100644 index 66353374..00000000 --- a/vendor/built_in_modules/location/Rakefile +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env rake -begin - require 'bundler/setup' -rescue LoadError - puts 'You must `gem install bundler` and `bundle install` to run rake tasks' -end -begin - require 'rdoc/task' -rescue LoadError - require 'rdoc/rdoc' - require 'rake/rdoctask' - RDoc::Task = Rake::RDocTask -end - -RDoc::Task.new(:rdoc) do |rdoc| - rdoc.rdoc_dir = 'rdoc' - rdoc.title = 'Location' - rdoc.options << '--line-numbers' - rdoc.rdoc_files.include('README.rdoc') - rdoc.rdoc_files.include('lib/**/*.rb') -end - -APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__) -load 'rails/tasks/engine.rake' - - -Bundler::GemHelper.install_tasks - -require 'rake/testtask' - -Rake::TestTask.new(:test) do |t| - t.libs << 'lib' - t.libs << 'test' - t.pattern = 'test/**/*_test.rb' - t.verbose = false -end - - -task :default => :test diff --git a/vendor/built_in_modules/location/app/assets/images/gprs/.gitkeep b/vendor/built_in_modules/location/app/assets/images/gprs/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/location/app/assets/images/location/.gitkeep b/vendor/built_in_modules/location/app/assets/images/location/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/location/app/assets/javascripts/location.js b/vendor/built_in_modules/location/app/assets/javascripts/location.js deleted file mode 100644 index 3edb22cb..00000000 --- a/vendor/built_in_modules/location/app/assets/javascripts/location.js +++ /dev/null @@ -1,131 +0,0 @@ -var Locations = function(ls){ - l = this; - this.name = "Locations"; - this.locations = ls; - this.markerCounts = 0; - var map = null, - infowindow = new google.maps.InfoWindow(), - default_location = new google.maps.LatLng( 24.8043107, 121.03042159999995 ), - infowindow_template = "
    ", - markers = []; - - - var initialize = function() { - google.maps.visualRefresh = true; - var location = ( l.locations.length ? new google.maps.LatLng( l.locations[0].latitude, l.locations[0].longitude ) : default_location ), - mapOptions = { - zoom: 16, - center: location, - mapTypeId: google.maps.MapTypeId.ROADMAP - }; - - map = new google.maps.Map( document.getElementById('map'), mapOptions ); - - for( i = 0; i < l.locations.length; i++ ){ - markers.push( addMarker( new google.maps.LatLng(l.locations[i].latitude, l.locations[i].longitude), l.locations[i].color, i, function( index ){ - - }) ); - } - - } - - var addMarker = function( location, pinColor, index, markerCallback ){ - - var pin = getPin(( pinColor.substr( 0, 1 ) == "#" ? pinColor.replace("#","") : pinColor )), - marker = new google.maps.Marker({ - map: map, - icon: pin.image, - shadow: pin.shadow, - position: location, - zIndex: 10 - }); - - google.maps.event.addListener( marker, 'click', function() { - - infowindow.setContent( getTemplate( index ) ); - infowindow.open( map, marker ); - if( typeof markerCallback == "function" ) - markerCallback.call( this, index ); - - }); - - l.markerCounts++; - return {"marker" : marker, "category_id" : l.locations[index].category_id}; - } - - - - var getTemplate = function( obj ){ - - var object = ( typeof obj == "number" ? l.locations[obj] : ( typeof obj == "object" ? obj : null ) ); - - if ( object ){ - - var template = $( "
    " ); - template.html( infowindow_template ); - template.find( '.title' ).text( object.name ); - template.find( "img.thumbnail" ).attr( "src", object.file.thumb.url ); - return template.html(); - - }else{ - - throw new InvalidObjectError(); - } - - } - - var getPin = function( color ){ - - var pinImage = new google.maps.MarkerImage("http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=%E2%80%A2|" + color, - new google.maps.Size(21, 34), - new google.maps.Point(0,0), - new google.maps.Point(10, 34)); - - var pinShadow = new google.maps.MarkerImage("http://chart.apis.google.com/chart?chst=d_map_pin_shadow", - new google.maps.Size(40, 37), - new google.maps.Point(0, 0), - new google.maps.Point(12, 35)); - - return {"image":pinImage,"shadow":pinShadow}; - } - - this.getMarker = function( index ){ - return markers[index]; - } - this.getAllMarkers = function( ){ - return markers; - } - - this.clearFilter = function(){ - var m = l.getAllMarkers(); - for( i = 0; i < m.length; i++ ){ - m[i].marker.setVisible(true); - } - } - - this.filterMarkers = function( categories ){ - var filtered = [], - m = l.getAllMarkers(); - - for( i = 0; i < m.length; i++ ){ - m[i].marker.setVisible(false); - } - for( i = 0; i < categories.length; i++ ){ - filtered = filtered.concat(m.filter(function(a){return a.category_id == categories[i]})); - } - for( i = 0; i < filtered.length; i++ ){ - filtered[i].marker.setVisible(true); - } - return filtered; - } - initialize(); - -} - -var InvalidObjectError = function(){ - this.name = "InvalidObjectError"; - this.message = "Object not valid"; -} - -InvalidObjectError.prototype = new Error(); -InvalidObjectError.prototype.constructor = InvalidObjectError; diff --git a/vendor/built_in_modules/location/app/assets/javascripts/panel/location/back_end/locations.js b/vendor/built_in_modules/location/app/assets/javascripts/panel/location/back_end/locations.js deleted file mode 100644 index dee720fa..00000000 --- a/vendor/built_in_modules/location/app/assets/javascripts/panel/location/back_end/locations.js +++ /dev/null @@ -1,2 +0,0 @@ -// Place all the behaviors and hooks related to the matching controller here. -// All this logic will automatically be available in application.js. diff --git a/vendor/built_in_modules/location/app/assets/stylesheets/gprs/.gitkeep b/vendor/built_in_modules/location/app/assets/stylesheets/gprs/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/location/app/assets/stylesheets/location/.gitkeep b/vendor/built_in_modules/location/app/assets/stylesheets/location/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/location/app/assets/stylesheets/panel/gprs/back_end/locations.css b/vendor/built_in_modules/location/app/assets/stylesheets/panel/gprs/back_end/locations.css deleted file mode 100644 index afad32db..00000000 --- a/vendor/built_in_modules/location/app/assets/stylesheets/panel/gprs/back_end/locations.css +++ /dev/null @@ -1,4 +0,0 @@ -/* - Place all the styles related to the matching controller here. - They will automatically be included in application.css. -*/ diff --git a/vendor/built_in_modules/location/app/assets/stylesheets/panel/location/back_end/locations.css b/vendor/built_in_modules/location/app/assets/stylesheets/panel/location/back_end/locations.css deleted file mode 100644 index afad32db..00000000 --- a/vendor/built_in_modules/location/app/assets/stylesheets/panel/location/back_end/locations.css +++ /dev/null @@ -1,4 +0,0 @@ -/* - Place all the styles related to the matching controller here. - They will automatically be included in application.css. -*/ diff --git a/vendor/built_in_modules/location/app/controllers/.gitkeep b/vendor/built_in_modules/location/app/controllers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/location/app/controllers/panel/location/back_end/location_categories_controller.rb b/vendor/built_in_modules/location/app/controllers/panel/location/back_end/location_categories_controller.rb deleted file mode 100644 index 7dd5e220..00000000 --- a/vendor/built_in_modules/location/app/controllers/panel/location/back_end/location_categories_controller.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Panel::Location::BackEnd::LocationCategoriesController < OrbitBackendController - def index - @module_app_id = @module_app.id rescue nil - @categories = get_categories_for_index - @categories = @categories.page(params[:page]).per(10) - respond_to do |format| - format.html # index.html.erb - format.json { render json: @categories } - end - end - - def list - @module_app_id = @module_app.id rescue nil - @categories = get_categories_for_index - @categories = @categories.page(params[:page]).per(10) - render :layout => false - end - -end \ No newline at end of file diff --git a/vendor/built_in_modules/location/app/controllers/panel/location/back_end/locations_controller.rb b/vendor/built_in_modules/location/app/controllers/panel/location/back_end/locations_controller.rb deleted file mode 100644 index e3baf793..00000000 --- a/vendor/built_in_modules/location/app/controllers/panel/location/back_end/locations_controller.rb +++ /dev/null @@ -1,132 +0,0 @@ -class Panel::Location::BackEnd::LocationsController < OrbitBackendController - include AdminHelper - open_for_visitor :only => [:get_location_categories, :get_categorywise_locations] - - def index - @locations = LocationInfo.all - @categories = get_categories_for_index - @location_infos = []; - @locations.each do |loc| - loc['color'] = Category.find(loc.category_id).custom_value - @location_infos << loc - end - respond_to do |format| - format.html # new.html.erb - format.json { render json: @locations } - end - end - - def new - @location_info = LocationInfo.new - @categories = get_categories_for_index - - respond_to do |format| - format.html # new.html.erb - format.json { render json: @location } - end - end - - def edit - @location_info = LocationInfo.find(params[:id]) - @categories = get_categories_for_index - - end - - def show - @location_info = LocationInfo.find(params[:id]) - respond_to do |format| - format.html - format.json { render json: @location } - end - end - - def create - @location_info = LocationInfo.new(params[:location_info]) - @categories = get_categories_for_index - if @location_info.save - flash[:success] = "Success!!" - redirect_to panel_location_back_end_locations_url - else - error_msg = @location_info.errors.full_messages - render 'new' - end - end - - def update - @location_info = LocationInfo.find(params[:id]) - @location_info.update_attributes(params[:location_info]) - redirect_to panel_location_back_end_locations_url - end - - def destroy - @location_info = LocationInfo.find(params[:id]) - @location_info.destroy - redirect_to panel_location_back_end_locations_url - - end - - def get_locations - location_infos = LocationInfo.all - @data = Array.new - - location_infos.each do |location| - picurl = location.file.blank? ? '' : "http://#{request.host_with_port + location.file.url}" - thumburl = location.file.blank? ? '' : "http://#{request.host_with_port + location.file.thumb.url}" - @data << { name: location.name, - pic_url: picurl, - thumb_url: thumburl, - longitude: location.longitude, - latitude: location.latitude, - description: location.description } - end - - render :json => JSON.pretty_generate(@data) - end - - def get_categories - @data = Array.new - @data << { name: "Department", - link: "http://#{request.host_with_port}"+"/panel/location/back_end/locations/get_locations?locale=en" } - - render :json => JSON.pretty_generate(@data) - end - - def get_location_categories - check_mobile_api_openness - location_categories = get_categories_for_index - @data = Array.new - - location_categories.each do |category| - I18n.locale = :en - name_en = category.title - I18n.locale = :zh_tw - name_zh_tw = category.title - category_id = category.id.to_s - @data << { name_en: name_en, name_zh_tw: name_zh_tw, category_id: category_id, location_link: "http://#{request.host_with_port}"+"/#{panel_location_back_end_locations_get_categorywise_locations_path}"+"?category_id=#{category_id}"} - end - - render :json => JSON.pretty_generate(@data) - end - - def get_categorywise_locations - check_mobile_api_openness - location_infos = LocationInfo.where(:category_id => params[:category_id]) - @data = Array.new - - location_infos.each do |location| - - picurl = location.file.blank? ? '' : "http://#{request.host_with_port + location.file.url}" - thumburl = location.file.blank? ? '' : "http://#{request.host_with_port + location.file.thumb.url}" - - @data << { id: location.id.to_s, - name: location.name, - pic_url: picurl, - thumb_url: thumburl, - longitude: location.longitude, - latitude: location.latitude, - description: location.description } - end - - render :json => JSON.pretty_generate(@data) - end -end diff --git a/vendor/built_in_modules/location/app/controllers/panel/location/front_end/locations_controller.rb b/vendor/built_in_modules/location/app/controllers/panel/location/front_end/locations_controller.rb deleted file mode 100644 index 4be3e2ec..00000000 --- a/vendor/built_in_modules/location/app/controllers/panel/location/front_end/locations_controller.rb +++ /dev/null @@ -1,12 +0,0 @@ -class Panel::Location::FrontEnd::LocationsController < OrbitWidgetController - def index - @categories = @module_app.categories.enabled - @locations = LocationInfo.all - - @location_infos = []; - @locations.each do |loc| - loc['color'] = Category.find(loc.category_id).custom_value - @location_infos << loc - end - end -end \ No newline at end of file diff --git a/vendor/built_in_modules/location/app/controllers/panel/location/widget/locations_controller.rb b/vendor/built_in_modules/location/app/controllers/panel/location/widget/locations_controller.rb deleted file mode 100644 index f03e8087..00000000 --- a/vendor/built_in_modules/location/app/controllers/panel/location/widget/locations_controller.rb +++ /dev/null @@ -1,17 +0,0 @@ -class Panel::Location::Widget::LocationsController < OrbitWidgetController - def location_widget - @categories = params[:category_id] - locations = LocationInfo.where(:category_id.in => @categories) - @url = "http://maps.googleapis.com/maps/api/staticmap?zoom=16&size=400x400&maptype=roadmap%20&sensor=false&" - markers = "" - locations.each do |loc| - color = Category.find(loc.category_id).custom_value - color.gsub!("#","") - markers = markers + "markers=color:0x#{color}|#{loc.latitude},#{loc.longitude}&" - end - @url = @url + markers.chop - # http://maps.googleapis.com/maps/api/staticmap?zoom=13&size=600x300&maptype=roadmap%20&markers=color:0xCF2C9B|40.702147,-74.015794&markers=color:CF2C9B|label:G|40.711614,-74.012318%20&markers=color:red|color:red|label:C|40.718217,-73.998284&sensor=false - - - end -end \ No newline at end of file diff --git a/vendor/built_in_modules/location/app/controllers/panel/locations/back_end/locations_controller.rb b/vendor/built_in_modules/location/app/controllers/panel/locations/back_end/locations_controller.rb deleted file mode 100644 index b5bc2edd..00000000 --- a/vendor/built_in_modules/location/app/controllers/panel/locations/back_end/locations_controller.rb +++ /dev/null @@ -1,84 +0,0 @@ -class Panel::Locations::BackEnd::LocationsController < OrbitBackendController - - #before_filter :clean_values, :only => [:create, :update] - - before_filter :force_order_for_visitor,:only => [:index, :new, :edit, :delete] - before_filter :force_order_for_user,:except => [:get_locations,:index] - #before_filter :for_app_sub_manager,:except => [:index, :new, :edit, :delete, :get_locations] - - def index - @locations = Location.all - respond_to do |format| - format.html # new.html.erb - format.json { render json: @locations } - end - end - - def new - @location = Location.new - - respond_to do |format| - format.html # new.html.erb - format.json { render json: @location } - end - end - - def edit - @location = Location.find(params[:id]) - end - - def show - @location = Location.find(params[:id]) - respond_to do |format| - format.html - format.json { render json: @location } - end - end - - def create - @location = Location.new(params[:location]) - @location.save! - redirect_to panel_gprs_back_end_locations_url - end - - def update - @location = Location.find(params[:id]) - @location.update_attributes(params[:location]) - redirect_to panel_gprs_back_end_locations_url - end - - def destroy - @location = Location.find(params[:id]) - @location.destroy - redirect_to panel_gprs_back_end_locations_url - - end - - def get_locations - locations = Location.all - @data = Array.new - - locations.each do |location| - picurl = location.file.blank? ? '' : "http://#{request.host_with_port + location.file.url}" - thumburl = location.file.blank? ? '' : "http://#{request.host_with_port + location.file.thumb.url}" - @data << { name: location.name, - pic_url: picurl, - thumb_url: thumburl, - longitude: location.longitude, - latitude: location.latitude, - description: location.description } - end - - #print readable json - render :json => JSON.pretty_generate({location: @data}) - - #render :json => {location: @data}.to_json - end - def get_categories - @data = Array.new - @data << { name: "Department", - link: "http://#{request.host_with_port}"+"/panel/location/back_end/location/get_locations" } - - render :json => JSON.pretty_generate(@data) - end -end diff --git a/vendor/built_in_modules/location/app/helpers/.gitkeep b/vendor/built_in_modules/location/app/helpers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/location/app/helpers/panel/location/back_end/locations_helper.rb b/vendor/built_in_modules/location/app/helpers/panel/location/back_end/locations_helper.rb deleted file mode 100644 index a354c2c9..00000000 --- a/vendor/built_in_modules/location/app/helpers/panel/location/back_end/locations_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module Panel::Location::BackEnd::LocationsHelper -end diff --git a/vendor/built_in_modules/location/app/helpers/panel/locations/back_end/locations_helper.rb b/vendor/built_in_modules/location/app/helpers/panel/locations/back_end/locations_helper.rb deleted file mode 100644 index c6dcef87..00000000 --- a/vendor/built_in_modules/location/app/helpers/panel/locations/back_end/locations_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module Panel::Locations::BackEnd::LocationsHelper -end diff --git a/vendor/built_in_modules/location/app/mailers/.gitkeep b/vendor/built_in_modules/location/app/mailers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/location/app/models/.gitkeep b/vendor/built_in_modules/location/app/models/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/location/app/models/location.rb b/vendor/built_in_modules/location/app/models/location.rb deleted file mode 100644 index f381e720..00000000 --- a/vendor/built_in_modules/location/app/models/location.rb +++ /dev/null @@ -1,12 +0,0 @@ -class Location - include Mongoid::Document - include Mongoid::Timestamps - include OrbitCategory::Categorizable - - mount_uploader :file, LocationUploader - - field :name - field :description - field :longitude, type: Float - field :latitude, type: Float -end diff --git a/vendor/built_in_modules/location/app/models/location_info.rb b/vendor/built_in_modules/location/app/models/location_info.rb deleted file mode 100644 index df6d80eb..00000000 --- a/vendor/built_in_modules/location/app/models/location_info.rb +++ /dev/null @@ -1,21 +0,0 @@ -class LocationInfo - include Mongoid::Document - include Mongoid::Timestamps - include OrbitCategory::Categorizable - - - mount_uploader :file, LocationsUploader - - field :name, localize: true - field :description, localize: true - field :longitude, type: Float - field :latitude, type: Float - - validates :file, presence: true - validates :longitude, - numericality: { less_than_or_equal_to: 180.0, greater_than_or_equal_to: -180.0 }, - unless: Proc.new{self.longitude.blank?} - validates :latitude, - numericality: { less_than_or_equal_to: 90.0, greater_than_or_equal_to: -90.0 }, - unless: Proc.new{self.latitude.blank?} -end diff --git a/vendor/built_in_modules/location/app/uploaders/locations_uploader.rb b/vendor/built_in_modules/location/app/uploaders/locations_uploader.rb deleted file mode 100644 index 55056a5b..00000000 --- a/vendor/built_in_modules/location/app/uploaders/locations_uploader.rb +++ /dev/null @@ -1,61 +0,0 @@ -class LocationsUploader < CarrierWave::Uploader::Base - - # Include RMagick or ImageScience support: - # include CarrierWave::RMagick - # include CarrierWave::ImageScience - include CarrierWave::MiniMagick - - # Choose what kind of storage to use for this uploader: - # storage :file - # storage :s3 - - # Override the directory where uploaded files will be stored. - # This is a sensible default for uploaders that are meant to be mounted: - def store_dir - "location/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" - end - - # Provide a default URL as a default if there hasn't been a file uploaded: - # def default_url - # "/images/fallback/" + [version_name, "default.png"].compact.join('_') - # end - - # Process files as they are uploaded: - # process :scale => [200, 300] - # - # def scale(width, height) - # # do something - # end - - # Create different versions of your uploaded files: - # version :thumb do - # process :scale => [50, 50] - # end - - version :thumb do - process :resize_to_fill => [150, 120] - end - - # Add a white list of extensions which are allowed to be uploaded. - # For images you might use something like this: - # def extension_white_list - # %w(jpg jpeg gif png) - # end - - # Override the filename of the uploaded files: - # def filename - # "something.jpg" if original_filename - # end - -# def manipulate! -# raise current_path.inspect -# image = ::MiniMagick::Image.open(current_path) -# image = yield(image) -# image.write(current_path) -# ::MiniMagick::Image.open(current_path) -# rescue ::MiniMagick::Error, ::MiniMagick::Invalid => e -# raise CarrierWave::ProcessingError.new("Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: #{e}") -# end - -end - diff --git a/vendor/built_in_modules/location/app/views/.gitkeep b/vendor/built_in_modules/location/app/views/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/location/app/views/panel/location/back_end/location_categories/_category.html.erb b/vendor/built_in_modules/location/app/views/panel/location/back_end/location_categories/_category.html.erb deleted file mode 100644 index 096260c6..00000000 --- a/vendor/built_in_modules/location/app/views/panel/location/back_end/location_categories/_category.html.erb +++ /dev/null @@ -1,21 +0,0 @@ - - <% @site_valid_locales.each_with_index do |locale, i| %> - - <%= category.title_translations[locale] %> - <% if i == 0 %> -
    - -
    - <% end %> - - <% end %> - <%= category.custom_value %> - \ No newline at end of file diff --git a/vendor/built_in_modules/location/app/views/panel/location/back_end/location_categories/_form.html.erb b/vendor/built_in_modules/location/app/views/panel/location/back_end/location_categories/_form.html.erb deleted file mode 100644 index 59f9d791..00000000 --- a/vendor/built_in_modules/location/app/views/panel/location/back_end/location_categories/_form.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -<%= flash_messages %> -<%= f.error_messages %> -<%= label_tag("color", t("location.color")) %> -
    - <%= f.text_field :custom_value, id: "color", :class => "color-picker miniColors input-small", :size => "7", :maxlength => "7", :autocomplete=>"off",:value=>"9100FF" %> -
    -<%= f.fields_for :title_translations do |f| %> - <% @site_valid_locales.each do |locale| %> - <%= label_tag "name-#{locale}", "#{t(:name)} (#{I18nVariable.from_locale(locale)})" %> - <%= f.text_field locale, :class => 'input-large', :value => (@category.title_translations[locale] rescue ''), placeholder: t(:name), id: locale %> - <% end %> -<% end %> diff --git a/vendor/built_in_modules/location/app/views/panel/location/back_end/location_categories/index.html.erb b/vendor/built_in_modules/location/app/views/panel/location/back_end/location_categories/index.html.erb deleted file mode 100644 index 2c0ae280..00000000 --- a/vendor/built_in_modules/location/app/views/panel/location/back_end/location_categories/index.html.erb +++ /dev/null @@ -1,66 +0,0 @@ -<%= stylesheet_link_tag "jquery.miniColors" %> - -<%= javascript_include_tag "jquery.miniColors.min" %> - -<%= javascript_include_tag "admin/categories" %> - -
    - - - - <% @site_valid_locales.each_with_index do |locale, i| %> - - <% end %> - - - - - <%= render partial: 'category', collection: @categories %> - -
    <%= t(:_locale, :locale => locale) %><%= t('event_category.color') %>
    - - -
    -
    - <%= link_to content_tag(:i, nil, class: "icons-plus") + " " + t(:add), '#', class: "btn btn-primary open-slide", data: {title: t(:add_category), id: 'new', module: @module_app_id.to_s } %> -
    - -
    -
    -
    -
    - - - - -
    -
    -
    -
    - <%= form_for :category, url: nil, html:{:id=>"color"}, remote: true do |f| %> -
    - <%= render :partial => "form", :locals => { :f => f } %> -
    - <%= t(:cancel) %> - <%= f.submit t(:submit), class: 'btn btn-primary btn-small' %> -
    -
    - <% end %> -
    -
    -
    -
    - \ No newline at end of file diff --git a/vendor/built_in_modules/location/app/views/panel/location/back_end/location_categories/list.html.erb b/vendor/built_in_modules/location/app/views/panel/location/back_end/location_categories/list.html.erb deleted file mode 100644 index 38d45712..00000000 --- a/vendor/built_in_modules/location/app/views/panel/location/back_end/location_categories/list.html.erb +++ /dev/null @@ -1,21 +0,0 @@ - - - - <% @site_valid_locales.each_with_index do |locale, i| %> - - <% end %> - - - - - <%= render partial: 'category', collection: @categories %> - -
    <%= t(:_locale, :locale => locale) %><%= t('location_category.color') %>
    -
    -
    - <%= link_to content_tag(:i, nil, class: "icons-plus") + " " + t(:add), '#', class: "btn btn-primary open-slide", data: {title: t(:add_category), id: 'new', module: @module_app_id.to_s } %> -
    - -
    \ No newline at end of file diff --git a/vendor/built_in_modules/location/app/views/panel/location/back_end/locations/_form.html.erb b/vendor/built_in_modules/location/app/views/panel/location/back_end/locations/_form.html.erb deleted file mode 100644 index 41a6560c..00000000 --- a/vendor/built_in_modules/location/app/views/panel/location/back_end/locations/_form.html.erb +++ /dev/null @@ -1,48 +0,0 @@ - <% @location_info.errors.full_messages.each do |msg| %> -
  • * <%= msg %>
  • - <% end %> -
    - -
    - <%= f.fields_for :name_translations do |f| %> - <%= f.text_field locale, :class=>'span4', :value => (@location_info.name_translations[locale.to_s] rescue nil) %> - <% end %> -
    -
    -
    - -
    - <%= @location_info.file? ? ( link_to t(:view), @location_info.file.url, {:class => 'for_preview btn', :target => '_blank', :title => t(:view)}) : '' %> - <%= f.file_field :file %> -
    -
    -
    - -
    - <%= f.text_field :latitude, :class=>"span2", :placeholder => "Latitude" %> - <%= f.text_field :longitude, :class=>"span2", :placeholder => "Longitude" %> -
    -
    - - -
    - -
    - <%= f.select :category_id, @categories.collect{|t| [ t.title, t.id ]} %> -
    -
    - - -
    - -
    - <%= f.fields_for :description_translations do |f| %> - <%= f.text_area locale, :class=>'span4', :cols=>"30", :row=>"5", :value => (@location_info.description_translations[locale.to_s] rescue nil) %> - <% end %> -
    -
    -
    -
    - <%= f.submit t("submit"), :class=>"btn" %> -
    -
    diff --git a/vendor/built_in_modules/location/app/views/panel/location/back_end/locations/edit.html.erb b/vendor/built_in_modules/location/app/views/panel/location/back_end/locations/edit.html.erb deleted file mode 100644 index 357907d8..00000000 --- a/vendor/built_in_modules/location/app/views/panel/location/back_end/locations/edit.html.erb +++ /dev/null @@ -1,4 +0,0 @@ -<%= form_for @location_info, :url=> panel_location_back_end_location_path(@location_info), :html => { :class=>"form-horizontal"} do |f| %> - <%= render :partial => 'form', :locals => {:f => f} %> -<% end %> - diff --git a/vendor/built_in_modules/location/app/views/panel/location/back_end/locations/index.html.erb b/vendor/built_in_modules/location/app/views/panel/location/back_end/locations/index.html.erb deleted file mode 100644 index cbd1c516..00000000 --- a/vendor/built_in_modules/location/app/views/panel/location/back_end/locations/index.html.erb +++ /dev/null @@ -1,73 +0,0 @@ - -<%= javascript_include_tag "location" %> - - - - - - - - - <%if is_manager? %> - - - <% end %> - - - - <% @location_infos.each do |location| %> - - - - - - - <%if is_manager? %> - - - <%end%> - - <% end %> - -
    <%= t('location.picture') %><%= t('location.name') %><%= t('location.longitude') %><%= t('location.latitude') %><%= t('location.description') %><%= t('location.edit') %><%= t('location.delete') %>
    <%= image_tag(location.file, alt: location.file, size: "50x50" ) if !location.file.blank? %><%= location.name %><%= location.longitude%><%= location.latitude%><%= location.description %><%= link_to 'Edit', edit_panel_location_back_end_location_path(location) %><%= link_to 'Destroy', panel_location_back_end_location_path(location), method: :delete , :confirm => t(:sure?) %>
    -
    - Categories : -
    -
    - <% @categories.each do |category| %> - - <% end %> -
    -Clear Filter -
    -<%if is_manager? %> -<%= link_to 'Add', new_panel_location_back_end_location_path, :class => "btn btn-primary pull-right", :id=>"create_event_btn", :ref=>"add-btn"%> -<% end %> - diff --git a/vendor/built_in_modules/location/app/views/panel/location/back_end/locations/new.html.erb b/vendor/built_in_modules/location/app/views/panel/location/back_end/locations/new.html.erb deleted file mode 100644 index 36545064..00000000 --- a/vendor/built_in_modules/location/app/views/panel/location/back_end/locations/new.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<%= form_for @location_info, :url=> panel_location_back_end_locations_path, :html => { :class=>"form-horizontal"} do |f| %> - <%= render :partial => 'form', :locals => {:f => f} %> -<% end %> diff --git a/vendor/built_in_modules/location/app/views/panel/location/front_end/locations/index.html.erb b/vendor/built_in_modules/location/app/views/panel/location/front_end/locations/index.html.erb deleted file mode 100644 index 58fb2367..00000000 --- a/vendor/built_in_modules/location/app/views/panel/location/front_end/locations/index.html.erb +++ /dev/null @@ -1,40 +0,0 @@ -<%= javascript_include_tag "location" %> -
    - Categories : - <% @categories.each do |category| %> - <%= category.title %> - <% end %> -
    -Clear Filter -
    - - diff --git a/vendor/built_in_modules/location/app/views/panel/location/widget/locations/location_widget.html.erb b/vendor/built_in_modules/location/app/views/panel/location/widget/locations/location_widget.html.erb deleted file mode 100644 index 8b8cada2..00000000 --- a/vendor/built_in_modules/location/app/views/panel/location/widget/locations/location_widget.html.erb +++ /dev/null @@ -1,3 +0,0 @@ - - <%= image_tag @url, :width=>"300", :height=>"300" %> - \ No newline at end of file diff --git a/vendor/built_in_modules/location/config/locales/en.yml b/vendor/built_in_modules/location/config/locales/en.yml deleted file mode 100644 index 95fffb61..00000000 --- a/vendor/built_in_modules/location/config/locales/en.yml +++ /dev/null @@ -1,7 +0,0 @@ -en: - location: - location: Location - categories: Categories - all_locations: All Locations - add_location: Add Location - add_category: Add Category diff --git a/vendor/built_in_modules/location/config/locales/zh_tw.yml b/vendor/built_in_modules/location/config/locales/zh_tw.yml deleted file mode 100644 index 8c6b4ea7..00000000 --- a/vendor/built_in_modules/location/config/locales/zh_tw.yml +++ /dev/null @@ -1,7 +0,0 @@ -zh_tw: - location: - location: 地標 - categories: 類別 - all_locations: 全部地點 - add_location: 新增地點 - add_category: 新增類別 \ No newline at end of file diff --git a/vendor/built_in_modules/location/config/routes.rb b/vendor/built_in_modules/location/config/routes.rb deleted file mode 100644 index bc9389bd..00000000 --- a/vendor/built_in_modules/location/config/routes.rb +++ /dev/null @@ -1,23 +0,0 @@ -Rails.application.routes.draw do - namespace :panel do - namespace :location do - namespace :back_end do - match 'location_categories/list' => "location_categories#list" - match "locations/get_locations" => "locations#get_locations" - match "locations/get_categorywise_locations" => "locations#get_categorywise_locations" - match "locations/get_location_categories" => "locations#get_location_categories" - resources :location_categories - match "locations/get_locations" => "locations#get_locations" - match "locations/get_categories" => "locations#get_categories" - - resources :locations - end - namespace :front_end do - resources :locations - end - namespace :widget do - match "location_widget" => "locations#location_widget" - end - end - end -end diff --git a/vendor/built_in_modules/location/init.rb b/vendor/built_in_modules/location/init.rb deleted file mode 100644 index 3e71da77..00000000 --- a/vendor/built_in_modules/location/init.rb +++ /dev/null @@ -1,73 +0,0 @@ -module Location - OrbitApp.registration "Location",:type=> 'ModuleApp' do - module_label 'location.location' - base_url File.expand_path File.dirname(__FILE__) - # personal_plugin :enable => true,:path=>"panel/location/plugin/profile",:i18n=>'admin.location' - - version "0.1" - organization "Rulingcom" - author "RD dep" - intro "I am intro" - update_info 'some update_info' - - front_end do - app_page 'locations' do - frontend_i18n 'location.location' - end - end - - # category ["BulletinCategory"] - - # widgets do - # default_widget do - # query 'Bulletin.all' - # image :image - # end - - # categories_query 'BulletinCategory.all' - # tags_query 'LocationTag.all' - - # customize_widget "index","location.widget.index",:fields=>["title","category","postdate"],:style=>["cu_style_1","cu_style_2","cu_style_3","cu_style_4","cu_style_5"] - # customize_widget "bulletins_and_web_links","location.widget.bulletins_and_web_links" - # # item "index","location.widget.index",:default_template=>true,:fields=>["title","category","postdate"] - # # item "bulletins_and_web_links","location.widget.bulletins_and_web_links" - # end - - categorizable - authorizable - - widgets do - customize_widget "location_widget" do - widget_i18n "location.location" - end - end - - side_bar do - head_label_i18n 'location.location',:icon_class=>"icons-location" - available_for [:admin,:guest,:manager,:sub_manager] - active_for_controllers ({:private=>['locations','location_categories']}) - - head_link_path "panel_location_back_end_locations_path" - - context_link 'location.all_locations', - :link_path=>"panel_location_back_end_locations_path" , - :priority=>1, - :active_for_action=>{:locations=>:index}, - :available_for => [:manager] - - context_link 'location.add_location', - :link_path=>"new_panel_location_back_end_location_path" , - :priority=>1, - :active_for_action=>{:locations=>:new}, - :available_for => [:manager] - - - context_link 'location.categories', - :link_path=>"panel_location_back_end_location_categories_path" , - :priority=>1, - :active_for_category => 'Location', - :available_for => [:manager] - - end - end -end diff --git a/vendor/built_in_modules/location/lib/location.rb b/vendor/built_in_modules/location/lib/location.rb deleted file mode 100644 index b13f49bd..00000000 --- a/vendor/built_in_modules/location/lib/location.rb +++ /dev/null @@ -1,4 +0,0 @@ -require "gprs/engine" - -module Location -end diff --git a/vendor/built_in_modules/location/lib/location/engine.rb b/vendor/built_in_modules/location/lib/location/engine.rb deleted file mode 100644 index 161a9bbd..00000000 --- a/vendor/built_in_modules/location/lib/location/engine.rb +++ /dev/null @@ -1,4 +0,0 @@ -module Location - class Engine < Rails::Engine - end -end diff --git a/vendor/built_in_modules/location/lib/location/version.rb b/vendor/built_in_modules/location/lib/location/version.rb deleted file mode 100644 index 95df884b..00000000 --- a/vendor/built_in_modules/location/lib/location/version.rb +++ /dev/null @@ -1,3 +0,0 @@ -module Location - VERSION = "0.0.1" -end diff --git a/vendor/built_in_modules/location/lib/tasks/location_tasks.rake b/vendor/built_in_modules/location/lib/tasks/location_tasks.rake deleted file mode 100644 index 152c5d6b..00000000 --- a/vendor/built_in_modules/location/lib/tasks/location_tasks.rake +++ /dev/null @@ -1,4 +0,0 @@ -# desc "Explaining what the task does" -# task :location do -# # Task goes here -# end diff --git a/vendor/built_in_modules/location/location.gemspec b/vendor/built_in_modules/location/location.gemspec deleted file mode 100644 index 439256b7..00000000 --- a/vendor/built_in_modules/location/location.gemspec +++ /dev/null @@ -1,23 +0,0 @@ -$:.push File.expand_path("../lib", __FILE__) - -# Maintain your gem's version: -require "location/version" - -# Describe your gem and declare its dependencies: -Gem::Specification.new do |s| - s.name = "location" - s.version = Location::VERSION - s.authors = ["TODO: Your name"] - s.email = ["TODO: Your email"] - s.homepage = "TODO" - s.summary = "TODO: Summary of Location." - s.description = "TODO: Description of Location." - - s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"] - s.test_files = Dir["test/**/*"] - - s.add_dependency "rails", "~> 3.1.8" - # s.add_dependency "jquery-rails" - - s.add_development_dependency "sqlite3" -end diff --git a/vendor/built_in_modules/location/location.json b/vendor/built_in_modules/location/location.json deleted file mode 100644 index 01e89b5d..00000000 --- a/vendor/built_in_modules/location/location.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "title": "location", - "version": "0.1", - "organization": "Rulingcom", - "author": "RD dep", - "intro": "A simple blog……", - "update_info": "Some info", - "create_date": "11-11-2011", - "widgets": [], - "category": [], - "enable_frontend": false -} diff --git a/vendor/built_in_modules/location/script/rails b/vendor/built_in_modules/location/script/rails deleted file mode 100755 index e323e44b..00000000 --- a/vendor/built_in_modules/location/script/rails +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby -#!/usr/bin/env ruby -# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. - -ENGINE_PATH = File.expand_path('../..', __FILE__) -load File.expand_path('../../test/dummy/script/rails', __FILE__) diff --git a/vendor/built_in_modules/location/test/dummy/Rakefile b/vendor/built_in_modules/location/test/dummy/Rakefile deleted file mode 100644 index 36458522..00000000 --- a/vendor/built_in_modules/location/test/dummy/Rakefile +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env rake -# Add your own tasks in files placed in lib/tasks ending in .rake, -# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. - -require File.expand_path('../config/application', __FILE__) - -Dummy::Application.load_tasks diff --git a/vendor/built_in_modules/location/test/dummy/app/assets/javascripts/application.js b/vendor/built_in_modules/location/test/dummy/app/assets/javascripts/application.js deleted file mode 100644 index 37c7bfcd..00000000 --- a/vendor/built_in_modules/location/test/dummy/app/assets/javascripts/application.js +++ /dev/null @@ -1,9 +0,0 @@ -// This is a manifest file that'll be compiled into including all the files listed below. -// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically -// be included in the compiled file accessible from http://example.com/assets/application.js -// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -// the compiled file. -// -//= require jquery -//= require jquery_ujs -//= require_tree . diff --git a/vendor/built_in_modules/location/test/dummy/app/assets/stylesheets/application.css b/vendor/built_in_modules/location/test/dummy/app/assets/stylesheets/application.css deleted file mode 100644 index fc25b572..00000000 --- a/vendor/built_in_modules/location/test/dummy/app/assets/stylesheets/application.css +++ /dev/null @@ -1,7 +0,0 @@ -/* - * This is a manifest file that'll automatically include all the stylesheets available in this directory - * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at - * the top of the compiled file, but it's generally better to create a new file per style scope. - *= require_self - *= require_tree . -*/ \ No newline at end of file diff --git a/vendor/built_in_modules/location/test/dummy/app/controllers/application_controller.rb b/vendor/built_in_modules/location/test/dummy/app/controllers/application_controller.rb deleted file mode 100644 index e8065d95..00000000 --- a/vendor/built_in_modules/location/test/dummy/app/controllers/application_controller.rb +++ /dev/null @@ -1,3 +0,0 @@ -class ApplicationController < ActionController::Base - protect_from_forgery -end diff --git a/vendor/built_in_modules/location/test/dummy/app/helpers/application_helper.rb b/vendor/built_in_modules/location/test/dummy/app/helpers/application_helper.rb deleted file mode 100644 index de6be794..00000000 --- a/vendor/built_in_modules/location/test/dummy/app/helpers/application_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module ApplicationHelper -end diff --git a/vendor/built_in_modules/location/test/dummy/app/mailers/.gitkeep b/vendor/built_in_modules/location/test/dummy/app/mailers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/location/test/dummy/app/models/.gitkeep b/vendor/built_in_modules/location/test/dummy/app/models/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/location/test/dummy/app/views/layouts/application.html.erb b/vendor/built_in_modules/location/test/dummy/app/views/layouts/application.html.erb deleted file mode 100644 index 9a8a761b..00000000 --- a/vendor/built_in_modules/location/test/dummy/app/views/layouts/application.html.erb +++ /dev/null @@ -1,14 +0,0 @@ - - - - Dummy - <%= stylesheet_link_tag "application" %> - <%= javascript_include_tag "application" %> - <%= csrf_meta_tags %> - - - -<%= yield %> - - - diff --git a/vendor/built_in_modules/location/test/dummy/config.ru b/vendor/built_in_modules/location/test/dummy/config.ru deleted file mode 100644 index 1989ed8d..00000000 --- a/vendor/built_in_modules/location/test/dummy/config.ru +++ /dev/null @@ -1,4 +0,0 @@ -# This file is used by Rack-based servers to start the application. - -require ::File.expand_path('../config/environment', __FILE__) -run Dummy::Application diff --git a/vendor/built_in_modules/location/test/dummy/config/application.rb b/vendor/built_in_modules/location/test/dummy/config/application.rb deleted file mode 100644 index e98216b3..00000000 --- a/vendor/built_in_modules/location/test/dummy/config/application.rb +++ /dev/null @@ -1,45 +0,0 @@ -require File.expand_path('../boot', __FILE__) - -require 'rails/all' - -Bundler.require -require "location" - -module Dummy - class Application < Rails::Application - # Settings in config/environments/* take precedence over those specified here. - # Application configuration should go into files in config/initializers - # -- all .rb files in that directory are automatically loaded. - - # Custom directories with classes and modules you want to be autoloadable. - # config.autoload_paths += %W(#{config.root}/extras) - - # Only load the plugins named here, in the order given (default is alphabetical). - # :all can be used as a placeholder for all plugins not explicitly named. - # config.plugins = [ :exception_notification, :ssl_requirement, :all ] - - # Activate observers that should always be running. - # config.active_record.observers = :cacher, :garbage_collector, :forum_observer - - # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. - # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. - # config.time_zone = 'Central Time (US & Canada)' - - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - # config.i18n.default_locale = :de - - # Configure the default encoding used in templates for Ruby 1.9. - config.encoding = "utf-8" - - # Configure sensitive parameters which will be filtered from the log file. - config.filter_parameters += [:password] - - # Enable the asset pipeline - config.assets.enabled = true - - # Version of your assets, change this if you want to expire all your assets - config.assets.version = '1.0' - end -end - diff --git a/vendor/built_in_modules/location/test/dummy/config/boot.rb b/vendor/built_in_modules/location/test/dummy/config/boot.rb deleted file mode 100644 index eba06813..00000000 --- a/vendor/built_in_modules/location/test/dummy/config/boot.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'rubygems' -gemfile = File.expand_path('../../../../Gemfile', __FILE__) - -if File.exist?(gemfile) - ENV['BUNDLE_GEMFILE'] = gemfile - require 'bundler' - Bundler.setup -end - -$:.unshift File.expand_path('../../../../lib', __FILE__) \ No newline at end of file diff --git a/vendor/built_in_modules/location/test/dummy/config/database.yml b/vendor/built_in_modules/location/test/dummy/config/database.yml deleted file mode 100644 index 51a4dd45..00000000 --- a/vendor/built_in_modules/location/test/dummy/config/database.yml +++ /dev/null @@ -1,25 +0,0 @@ -# SQLite version 3.x -# gem install sqlite3 -# -# Ensure the SQLite 3 gem is defined in your Gemfile -# gem 'sqlite3' -development: - adapter: sqlite3 - database: db/development.sqlite3 - pool: 5 - timeout: 5000 - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: - adapter: sqlite3 - database: db/test.sqlite3 - pool: 5 - timeout: 5000 - -production: - adapter: sqlite3 - database: db/production.sqlite3 - pool: 5 - timeout: 5000 diff --git a/vendor/built_in_modules/location/test/dummy/config/environment.rb b/vendor/built_in_modules/location/test/dummy/config/environment.rb deleted file mode 100644 index 3da5eb91..00000000 --- a/vendor/built_in_modules/location/test/dummy/config/environment.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Load the rails application -require File.expand_path('../application', __FILE__) - -# Initialize the rails application -Dummy::Application.initialize! diff --git a/vendor/built_in_modules/location/test/dummy/config/environments/development.rb b/vendor/built_in_modules/location/test/dummy/config/environments/development.rb deleted file mode 100644 index 95a50b91..00000000 --- a/vendor/built_in_modules/location/test/dummy/config/environments/development.rb +++ /dev/null @@ -1,30 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # In the development environment your application's code is reloaded on - # every request. This slows down response time but is perfect for development - # since you don't have to restart the web server when you make code changes. - config.cache_classes = false - - # Log error messages when you accidentally call methods on nil. - config.whiny_nils = true - - # Show full error reports and disable caching - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Don't care if the mailer can't send - config.action_mailer.raise_delivery_errors = false - - # Print deprecation notices to the Rails logger - config.active_support.deprecation = :log - - # Only use best-standards-support built into browsers - config.action_dispatch.best_standards_support = :builtin - - # Do not compress assets - config.assets.compress = false - - # Expands the lines which load the assets - config.assets.debug = true -end diff --git a/vendor/built_in_modules/location/test/dummy/config/environments/production.rb b/vendor/built_in_modules/location/test/dummy/config/environments/production.rb deleted file mode 100644 index ca2c5888..00000000 --- a/vendor/built_in_modules/location/test/dummy/config/environments/production.rb +++ /dev/null @@ -1,60 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # Code is not reloaded between requests - config.cache_classes = true - - # Full error reports are disabled and caching is turned on - config.consider_all_requests_local = false - config.action_controller.perform_caching = true - - # Disable Rails's static asset server (Apache or nginx will already do this) - config.serve_static_assets = false - - # Compress JavaScripts and CSS - config.assets.compress = true - - # Don't fallback to assets pipeline if a precompiled asset is missed - config.assets.compile = false - - # Generate digests for assets URLs - config.assets.digest = true - - # Defaults to Rails.root.join("public/assets") - # config.assets.manifest = YOUR_PATH - - # Specifies the header that your server uses for sending files - # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx - - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true - - # See everything in the log (default is :info) - # config.log_level = :debug - - # Use a different logger for distributed setups - # config.logger = SyslogLogger.new - - # Use a different cache store in production - # config.cache_store = :mem_cache_store - - # Enable serving of images, stylesheets, and JavaScripts from an asset server - # config.action_controller.asset_host = "http://assets.example.com" - - # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) - # config.assets.precompile += %w( search.js ) - - # Disable delivery errors, bad email addresses will be ignored - # config.action_mailer.raise_delivery_errors = false - - # Enable threaded mode - # config.threadsafe! - - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation can not be found) - config.i18n.fallbacks = true - - # Send deprecation notices to registered listeners - config.active_support.deprecation = :notify -end diff --git a/vendor/built_in_modules/location/test/dummy/config/environments/test.rb b/vendor/built_in_modules/location/test/dummy/config/environments/test.rb deleted file mode 100644 index 6810c914..00000000 --- a/vendor/built_in_modules/location/test/dummy/config/environments/test.rb +++ /dev/null @@ -1,39 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # The test environment is used exclusively to run your application's - # test suite. You never need to work with it otherwise. Remember that - # your test database is "scratch space" for the test suite and is wiped - # and recreated between test runs. Don't rely on the data there! - config.cache_classes = true - - # Configure static asset server for tests with Cache-Control for performance - config.serve_static_assets = true - config.static_cache_control = "public, max-age=3600" - - # Log error messages when you accidentally call methods on nil - config.whiny_nils = true - - # Show full error reports and disable caching - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Raise exceptions instead of rendering exception templates - config.action_dispatch.show_exceptions = false - - # Disable request forgery protection in test environment - config.action_controller.allow_forgery_protection = false - - # Tell Action Mailer not to deliver emails to the real world. - # The :test delivery method accumulates sent emails in the - # ActionMailer::Base.deliveries array. - config.action_mailer.delivery_method = :test - - # Use SQL instead of Active Record's schema dumper when creating the test database. - # This is necessary if your schema can't be completely dumped by the schema dumper, - # like if you have constraints or database-specific column types - # config.active_record.schema_format = :sql - - # Print deprecation notices to the stderr - config.active_support.deprecation = :stderr -end diff --git a/vendor/built_in_modules/location/test/dummy/config/initializers/backtrace_silencers.rb b/vendor/built_in_modules/location/test/dummy/config/initializers/backtrace_silencers.rb deleted file mode 100644 index 59385cdf..00000000 --- a/vendor/built_in_modules/location/test/dummy/config/initializers/backtrace_silencers.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. -# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } - -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. -# Rails.backtrace_cleaner.remove_silencers! diff --git a/vendor/built_in_modules/location/test/dummy/config/initializers/inflections.rb b/vendor/built_in_modules/location/test/dummy/config/initializers/inflections.rb deleted file mode 100644 index 9e8b0131..00000000 --- a/vendor/built_in_modules/location/test/dummy/config/initializers/inflections.rb +++ /dev/null @@ -1,10 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new inflection rules using the following format -# (all these examples are active by default): -# ActiveSupport::Inflector.inflections do |inflect| -# inflect.plural /^(ox)$/i, '\1en' -# inflect.singular /^(ox)en/i, '\1' -# inflect.irregular 'person', 'people' -# inflect.uncountable %w( fish sheep ) -# end diff --git a/vendor/built_in_modules/location/test/dummy/config/initializers/mime_types.rb b/vendor/built_in_modules/location/test/dummy/config/initializers/mime_types.rb deleted file mode 100644 index 72aca7e4..00000000 --- a/vendor/built_in_modules/location/test/dummy/config/initializers/mime_types.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new mime types for use in respond_to blocks: -# Mime::Type.register "text/richtext", :rtf -# Mime::Type.register_alias "text/html", :iphone diff --git a/vendor/built_in_modules/location/test/dummy/config/initializers/secret_token.rb b/vendor/built_in_modules/location/test/dummy/config/initializers/secret_token.rb deleted file mode 100644 index 370a8fa2..00000000 --- a/vendor/built_in_modules/location/test/dummy/config/initializers/secret_token.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Your secret key for verifying the integrity of signed cookies. -# If you change this key, all old signed cookies will become invalid! -# Make sure the secret is at least 30 characters and all random, -# no regular words or you'll be exposed to dictionary attacks. -Dummy::Application.config.secret_token = '181584334acb820e1d0e0e53b71c0985251f4e5bfd188a962d5f9acfeeb0e46dfd6ca68784528cab00d8e6e8da087cce2bf7d060fe2b2c742a814c23689ff6af' diff --git a/vendor/built_in_modules/location/test/dummy/config/initializers/session_store.rb b/vendor/built_in_modules/location/test/dummy/config/initializers/session_store.rb deleted file mode 100644 index 952473ff..00000000 --- a/vendor/built_in_modules/location/test/dummy/config/initializers/session_store.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Be sure to restart your server when you modify this file. - -Dummy::Application.config.session_store :cookie_store, key: '_dummy_session' - -# Use the database for sessions instead of the cookie-based default, -# which shouldn't be used to store highly confidential information -# (create the session table with "rails generate session_migration") -# Dummy::Application.config.session_store :active_record_store diff --git a/vendor/built_in_modules/location/test/dummy/config/initializers/wrap_parameters.rb b/vendor/built_in_modules/location/test/dummy/config/initializers/wrap_parameters.rb deleted file mode 100644 index 999df201..00000000 --- a/vendor/built_in_modules/location/test/dummy/config/initializers/wrap_parameters.rb +++ /dev/null @@ -1,14 +0,0 @@ -# Be sure to restart your server when you modify this file. -# -# This file contains settings for ActionController::ParamsWrapper which -# is enabled by default. - -# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. -ActiveSupport.on_load(:action_controller) do - wrap_parameters format: [:json] -end - -# Disable root element in JSON by default. -ActiveSupport.on_load(:active_record) do - self.include_root_in_json = false -end diff --git a/vendor/built_in_modules/location/test/dummy/config/locales/en.yml b/vendor/built_in_modules/location/test/dummy/config/locales/en.yml deleted file mode 100644 index 179c14ca..00000000 --- a/vendor/built_in_modules/location/test/dummy/config/locales/en.yml +++ /dev/null @@ -1,5 +0,0 @@ -# Sample localization file for English. Add more files in this directory for other locales. -# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. - -en: - hello: "Hello world" diff --git a/vendor/built_in_modules/location/test/dummy/config/routes.rb b/vendor/built_in_modules/location/test/dummy/config/routes.rb deleted file mode 100644 index bb509f27..00000000 --- a/vendor/built_in_modules/location/test/dummy/config/routes.rb +++ /dev/null @@ -1,58 +0,0 @@ -Dummy::Application.routes.draw do - # The priority is based upon order of creation: - # first created -> highest priority. - - # Sample of regular route: - # match 'products/:id' => 'catalog#view' - # Keep in mind you can assign values other than :controller and :action - - # Sample of named route: - # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase - # This route can be invoked with purchase_url(:id => product.id) - - # Sample resource route (maps HTTP verbs to controller actions automatically): - # resources :products - - # Sample resource route with options: - # resources :products do - # member do - # get 'short' - # post 'toggle' - # end - # - # collection do - # get 'sold' - # end - # end - - # Sample resource route with sub-resources: - # resources :products do - # resources :comments, :sales - # resource :seller - # end - - # Sample resource route with more complex sub-resources - # resources :products do - # resources :comments - # resources :sales do - # get 'recent', :on => :collection - # end - # end - - # Sample resource route within a namespace: - # namespace :admin do - # # Directs /admin/products/* to Admin::ProductsController - # # (app/controllers/admin/products_controller.rb) - # resources :products - # end - - # You can have the root of your site routed with "root" - # just remember to delete public/index.html. - # root :to => 'welcome#index' - - # See how all your routes lay out with "rake routes" - - # This is a legacy wild controller route that's not recommended for RESTful applications. - # Note: This route will make all actions in every controller accessible via GET requests. - # match ':controller(/:action(/:id(.:format)))' -end diff --git a/vendor/built_in_modules/location/test/dummy/lib/assets/.gitkeep b/vendor/built_in_modules/location/test/dummy/lib/assets/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/location/test/dummy/log/.gitkeep b/vendor/built_in_modules/location/test/dummy/log/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/location/test/dummy/public/404.html b/vendor/built_in_modules/location/test/dummy/public/404.html deleted file mode 100644 index 9a48320a..00000000 --- a/vendor/built_in_modules/location/test/dummy/public/404.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - The page you were looking for doesn't exist (404) - - - - - -
    -

    The page you were looking for doesn't exist.

    -

    You may have mistyped the address or the page may have moved.

    -
    - - diff --git a/vendor/built_in_modules/location/test/dummy/public/422.html b/vendor/built_in_modules/location/test/dummy/public/422.html deleted file mode 100644 index 83660ab1..00000000 --- a/vendor/built_in_modules/location/test/dummy/public/422.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - The change you wanted was rejected (422) - - - - - -
    -

    The change you wanted was rejected.

    -

    Maybe you tried to change something you didn't have access to.

    -
    - - diff --git a/vendor/built_in_modules/location/test/dummy/public/500.html b/vendor/built_in_modules/location/test/dummy/public/500.html deleted file mode 100644 index b80307fc..00000000 --- a/vendor/built_in_modules/location/test/dummy/public/500.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - We're sorry, but something went wrong (500) - - - - - -
    -

    We're sorry, but something went wrong.

    -

    We've been notified about this issue and we'll take a look at it shortly.

    -
    - - diff --git a/vendor/built_in_modules/location/test/dummy/public/favicon.ico b/vendor/built_in_modules/location/test/dummy/public/favicon.ico deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/location/test/dummy/script/rails b/vendor/built_in_modules/location/test/dummy/script/rails deleted file mode 100755 index f8da2cff..00000000 --- a/vendor/built_in_modules/location/test/dummy/script/rails +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby -# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. - -APP_PATH = File.expand_path('../../config/application', __FILE__) -require File.expand_path('../../config/boot', __FILE__) -require 'rails/commands' diff --git a/vendor/built_in_modules/location/test/functional/panel/gprs/back_end/locations_controller_test.rb b/vendor/built_in_modules/location/test/functional/panel/gprs/back_end/locations_controller_test.rb deleted file mode 100644 index 0edd65ab..00000000 --- a/vendor/built_in_modules/location/test/functional/panel/gprs/back_end/locations_controller_test.rb +++ /dev/null @@ -1,14 +0,0 @@ -require 'test_helper' - -class Panel::Location::BackEnd::LocationsControllerTest < ActionController::TestCase - test "should get index" do - get :index - assert_response :success - end - - test "should get edit" do - get :edit - assert_response :success - end - -end diff --git a/vendor/built_in_modules/location/test/functional/panel/location/back_end/locations_controller_test.rb b/vendor/built_in_modules/location/test/functional/panel/location/back_end/locations_controller_test.rb deleted file mode 100644 index 0edd65ab..00000000 --- a/vendor/built_in_modules/location/test/functional/panel/location/back_end/locations_controller_test.rb +++ /dev/null @@ -1,14 +0,0 @@ -require 'test_helper' - -class Panel::Location::BackEnd::LocationsControllerTest < ActionController::TestCase - test "should get index" do - get :index - assert_response :success - end - - test "should get edit" do - get :edit - assert_response :success - end - -end diff --git a/vendor/built_in_modules/location/test/integration/navigation_test.rb b/vendor/built_in_modules/location/test/integration/navigation_test.rb deleted file mode 100644 index 97a94c9b..00000000 --- a/vendor/built_in_modules/location/test/integration/navigation_test.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'test_helper' - -class NavigationTest < ActionDispatch::IntegrationTest - fixtures :all - - # test "the truth" do - # assert true - # end -end - diff --git a/vendor/built_in_modules/location/test/location_test.rb b/vendor/built_in_modules/location/test/location_test.rb deleted file mode 100644 index b85756bc..00000000 --- a/vendor/built_in_modules/location/test/location_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class LocationTest < ActiveSupport::TestCase - test "truth" do - assert_kind_of Module, Location - end -end diff --git a/vendor/built_in_modules/location/test/test_helper.rb b/vendor/built_in_modules/location/test/test_helper.rb deleted file mode 100644 index dcd3b276..00000000 --- a/vendor/built_in_modules/location/test/test_helper.rb +++ /dev/null @@ -1,10 +0,0 @@ -# Configure Rails Environment -ENV["RAILS_ENV"] = "test" - -require File.expand_path("../dummy/config/environment.rb", __FILE__) -require "rails/test_help" - -Rails.backtrace_cleaner.remove_silencers! - -# Load support files -Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } diff --git a/vendor/built_in_modules/location/test/unit/helpers/panel/gprs/back_end/locations_helper_test.rb b/vendor/built_in_modules/location/test/unit/helpers/panel/gprs/back_end/locations_helper_test.rb deleted file mode 100644 index 9e39a511..00000000 --- a/vendor/built_in_modules/location/test/unit/helpers/panel/gprs/back_end/locations_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class Panel::Location::BackEnd::LocationsHelperTest < ActionView::TestCase -end diff --git a/vendor/built_in_modules/location/test/unit/helpers/panel/location/back_end/locations_helper_test.rb b/vendor/built_in_modules/location/test/unit/helpers/panel/location/back_end/locations_helper_test.rb deleted file mode 100644 index 9e39a511..00000000 --- a/vendor/built_in_modules/location/test/unit/helpers/panel/location/back_end/locations_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class Panel::Location::BackEnd::LocationsHelperTest < ActionView::TestCase -end diff --git a/vendor/built_in_modules/video/.gitignore b/vendor/built_in_modules/video/.gitignore deleted file mode 100644 index 1463de6d..00000000 --- a/vendor/built_in_modules/video/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.bundle/ -log/*.log -pkg/ -test/dummy/db/*.sqlite3 -test/dummy/log/*.log -test/dummy/tmp/ \ No newline at end of file diff --git a/vendor/built_in_modules/video/Gemfile b/vendor/built_in_modules/video/Gemfile deleted file mode 100644 index a6e487f4..00000000 --- a/vendor/built_in_modules/video/Gemfile +++ /dev/null @@ -1,17 +0,0 @@ -source "http://rubygems.org" - -# Declare your gem's dependencies in location.gemspec. -# Bundler will treat runtime dependencies like base dependencies, and -# development dependencies will be added by default to the :development group. -gemspec - -# jquery-rails is used by the dummy application -gem "jquery-rails" - -# Declare any dependencies that are still in development here instead of in -# your gemspec. These might include edge Rails or gems from your path or -# Git. Remember to move these dependencies to your gemspec before releasing -# your gem to rubygems.org. - -# To use debugger -# gem 'ruby-debug19', :require => 'ruby-debug' diff --git a/vendor/built_in_modules/video/MIT-LICENSE b/vendor/built_in_modules/video/MIT-LICENSE deleted file mode 100644 index 406f17b7..00000000 --- a/vendor/built_in_modules/video/MIT-LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2012 YOURNAME - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/built_in_modules/video/README.rdoc b/vendor/built_in_modules/video/README.rdoc deleted file mode 100644 index 937b4141..00000000 --- a/vendor/built_in_modules/video/README.rdoc +++ /dev/null @@ -1,3 +0,0 @@ -= Location - -This project rocks and uses MIT-LICENSE. diff --git a/vendor/built_in_modules/video/Rakefile b/vendor/built_in_modules/video/Rakefile deleted file mode 100644 index 66353374..00000000 --- a/vendor/built_in_modules/video/Rakefile +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env rake -begin - require 'bundler/setup' -rescue LoadError - puts 'You must `gem install bundler` and `bundle install` to run rake tasks' -end -begin - require 'rdoc/task' -rescue LoadError - require 'rdoc/rdoc' - require 'rake/rdoctask' - RDoc::Task = Rake::RDocTask -end - -RDoc::Task.new(:rdoc) do |rdoc| - rdoc.rdoc_dir = 'rdoc' - rdoc.title = 'Location' - rdoc.options << '--line-numbers' - rdoc.rdoc_files.include('README.rdoc') - rdoc.rdoc_files.include('lib/**/*.rb') -end - -APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__) -load 'rails/tasks/engine.rake' - - -Bundler::GemHelper.install_tasks - -require 'rake/testtask' - -Rake::TestTask.new(:test) do |t| - t.libs << 'lib' - t.libs << 'test' - t.pattern = 'test/**/*_test.rb' - t.verbose = false -end - - -task :default => :test diff --git a/vendor/built_in_modules/video/app/assets/images/gprs/.gitkeep b/vendor/built_in_modules/video/app/assets/images/gprs/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/video/app/assets/images/location/.gitkeep b/vendor/built_in_modules/video/app/assets/images/location/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/video/app/assets/javascripts/gprs/.gitkeep b/vendor/built_in_modules/video/app/assets/javascripts/gprs/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/video/app/assets/javascripts/panel/gprs/back_end/locations.js b/vendor/built_in_modules/video/app/assets/javascripts/panel/gprs/back_end/locations.js deleted file mode 100644 index dee720fa..00000000 --- a/vendor/built_in_modules/video/app/assets/javascripts/panel/gprs/back_end/locations.js +++ /dev/null @@ -1,2 +0,0 @@ -// Place all the behaviors and hooks related to the matching controller here. -// All this logic will automatically be available in application.js. diff --git a/vendor/built_in_modules/video/app/assets/javascripts/panel/location/back_end/locations.js b/vendor/built_in_modules/video/app/assets/javascripts/panel/location/back_end/locations.js deleted file mode 100644 index dee720fa..00000000 --- a/vendor/built_in_modules/video/app/assets/javascripts/panel/location/back_end/locations.js +++ /dev/null @@ -1,2 +0,0 @@ -// Place all the behaviors and hooks related to the matching controller here. -// All this logic will automatically be available in application.js. diff --git a/vendor/built_in_modules/video/app/assets/stylesheets/gprs/.gitkeep b/vendor/built_in_modules/video/app/assets/stylesheets/gprs/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/video/app/assets/stylesheets/location/.gitkeep b/vendor/built_in_modules/video/app/assets/stylesheets/location/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/video/app/assets/stylesheets/panel/gprs/back_end/locations.css b/vendor/built_in_modules/video/app/assets/stylesheets/panel/gprs/back_end/locations.css deleted file mode 100644 index afad32db..00000000 --- a/vendor/built_in_modules/video/app/assets/stylesheets/panel/gprs/back_end/locations.css +++ /dev/null @@ -1,4 +0,0 @@ -/* - Place all the styles related to the matching controller here. - They will automatically be included in application.css. -*/ diff --git a/vendor/built_in_modules/video/app/assets/stylesheets/panel/location/back_end/locations.css b/vendor/built_in_modules/video/app/assets/stylesheets/panel/location/back_end/locations.css deleted file mode 100644 index afad32db..00000000 --- a/vendor/built_in_modules/video/app/assets/stylesheets/panel/location/back_end/locations.css +++ /dev/null @@ -1,4 +0,0 @@ -/* - Place all the styles related to the matching controller here. - They will automatically be included in application.css. -*/ diff --git a/vendor/built_in_modules/video/app/controllers/.gitkeep b/vendor/built_in_modules/video/app/controllers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/video/app/controllers/panel/video/back_end/channel_videos_controller.rb b/vendor/built_in_modules/video/app/controllers/panel/video/back_end/channel_videos_controller.rb deleted file mode 100644 index c6c7f09d..00000000 --- a/vendor/built_in_modules/video/app/controllers/panel/video/back_end/channel_videos_controller.rb +++ /dev/null @@ -1,61 +0,0 @@ -class Panel::Video::BackEnd::ChannelVideosController < OrbitBackendController -# before_filter :force_order_for_visitor,:only => [:index, :new, :edit, :delete] -# before_filter :force_order_for_user,:except => [:index] - open_for_admin - open_for_manager - open_for_sub_manager - - def index - @channel_videos = ChannelVideo.all - respond_to do |format| - format.html # new.html.erb - format.json { render json: @videos } - end - end - - def show - @channel_video = ChannelVideo.find(params[:id]) - client = YouTubeIt::Client.new(:dev_key => "AI39si5KGPg8rhKLBfmeukit2tCSP_B9lT8igiNICbrbgUXQoAdYGvsyCGCmO1wGnr1OW4bDRv-ESolwk-rdBNIAgVTL9VYaEA") - @client_videos = client.videos_by(:user => @channel_video.channel_name, :per_page => 5) - - respond_to do |format| - format.html - format.json { render json: @location } - end - end - - def new - @channel_video = ChannelVideo.new - end - - def edit - @channel_video = ChannelVideo.find(params[:id]) - end - - def create - @channel_video = ChannelVideo.new(params[:channel_video]) - - if @channel_video.save - redirect_to panel_video_back_end_channel_videos_url - else - render 'new' - end - end - - def update - @channel_video = ChannelVideo.find(params[:id]) - - if @channel_video.update_attributes(params[:channel_video]) - redirect_to panel_video_back_end_channel_videos_url - else - render 'edit' - end - end - - def destroy - @channel_video = ChannelVideo.find(params[:id]) - @channel_video.destroy - redirect_to panel_video_back_end_channel_videos_url - - end -end diff --git a/vendor/built_in_modules/video/app/controllers/panel/video/back_end/videos_controller.rb b/vendor/built_in_modules/video/app/controllers/panel/video/back_end/videos_controller.rb deleted file mode 100644 index 078b134a..00000000 --- a/vendor/built_in_modules/video/app/controllers/panel/video/back_end/videos_controller.rb +++ /dev/null @@ -1,74 +0,0 @@ -class Panel::Video::BackEnd::VideosController < OrbitBackendController - - #before_filter :clean_values, :only => [:create, :update] - - before_filter :force_order_for_visitor,:only => [:index, :new, :edit, :delete] - before_filter :force_order_for_user,:except => [:get_videos,:index] - # before_filter :for_app_sub_manager,:except => [:index, :new, :edit, :delete, :get_videos] - - def index - @videos = Video.all - @client = YouTubeIt::Client.new(:dev_key => "AI39si5KGPg8rhKLBfmeukit2tCSP_B9lT8igiNICbrbgUXQoAdYGvsyCGCmO1wGnr1OW4bDRv-ESolwk-rdBNIAgVTL9VYaEA") - - respond_to do |format| - format.html # new.html.erb - format.json { render json: @videos } - end - end - - def new - @video = Video.new - - respond_to do |format| - format.html # new.html.erb - format.json { render json: @video } - end - end - - def edit - @video = Video.find(params[:id]) - end - - def show - @video = Video.find(params[:id]) - respond_to do |format| - format.html - format.json { render json: @video } - end - end - - def create - @video = Video.new(params[:video]) - @video.save! - redirect_to panel_videos_back_end_videos_url - end - - def update - @video = Video.find(params[:id]) - @video.update_attributes(params[:video]) - redirect_to panel_videos_back_end_videos_url - end - - def destroy - @video = Video.find(params[:id]) - @video.destroy - redirect_to panel_videos_back_end_videos_url - - end - - def get_videos - videos = Video.all - @data = Array.new - - videos.each do |video| - @data << { title: video.title, - url: video.url, - description: video.description } - end - - #print readable json - render :json => JSON.pretty_generate({video: @data}) - - #render :json => {video: @data}.to_json - end -end diff --git a/vendor/built_in_modules/video/app/controllers/panel/video/front_end/channel_videos_controller.rb b/vendor/built_in_modules/video/app/controllers/panel/video/front_end/channel_videos_controller.rb deleted file mode 100644 index 6f14481c..00000000 --- a/vendor/built_in_modules/video/app/controllers/panel/video/front_end/channel_videos_controller.rb +++ /dev/null @@ -1,26 +0,0 @@ -class Panel::Video::FrontEnd::ChannelVideosController < OrbitWidgetController - def initialize - super - @app_title = 'video' - end - - def index - @item = Page.find(params[:page_id]) rescue nil - if @item - if @item.frontend_data_count - @page_num = @item.frontend_data_count - else - @page_num = 15 - end - @frontend_style = @item.frontend_style - end - @item = Page.find(params[:page_id]) rescue nil - @channel_video = ChannelVideo.first rescue nil - client = YouTubeIt::Client.new(:dev_key => "AI39si5KGPg8rhKLBfmeukit2tCSP_B9lT8igiNICbrbgUXQoAdYGvsyCGCmO1wGnr1OW4bDRv-ESolwk-rdBNIAgVTL9VYaEA") - @client_videos = client.videos_by(:user => @channel_video.channel_name, :per_page => 5) - - respond_to do |format| - format.html # index.html.erb - end - end -end \ No newline at end of file diff --git a/vendor/built_in_modules/video/app/controllers/panel/video/widget/channel_videos_controller.rb b/vendor/built_in_modules/video/app/controllers/panel/video/widget/channel_videos_controller.rb deleted file mode 100644 index bccea587..00000000 --- a/vendor/built_in_modules/video/app/controllers/panel/video/widget/channel_videos_controller.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Panel::Video::Widget::ChannelVideosController < OrbitWidgetController - - def initialize - super - @app_title = 'video' - end - - # GET /bulletins - # GET /bulletins.xml - - def channel_videos - @part = PagePart.find(params[:part_id]) - - if @part.widget_data_count - @page_num = @part.widget_data_count - else - @page_num = 4 - end - - if @part.widget_field - @widget_fields = @part.widget_field - else - @widget_fields = [] - end - - @channel_video = ChannelVideo.find(@part.widget_options['channel_videos']) rescue nil - client = YouTubeIt::Client.new(:dev_key => "AI39si5KGPg8rhKLBfmeukit2tCSP_B9lT8igiNICbrbgUXQoAdYGvsyCGCmO1wGnr1OW4bDRv-ESolwk-rdBNIAgVTL9VYaEA") - @client_videos = client.videos_by(:user => @channel_video.channel_name, :per_page => 5) - - - end - - # def bulletins_list_and_pic - - # if params[:widget_data_count] - # @page_num = params[:widget_data_count]; - # else - # @page_num = 4; - # end - - # @title = params[:part_title] - # date_now = Time.now - # if !params[:category_id].blank? - # @bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.where(:bulletin_category_id => params[:category_id]).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page]).per(@page_num ) - # @current_category = BulletinCategory.from_id(params[:category_id]) rescue nil - # elsif !params[:tag_id].blank? - # @bulletins = Bulletin.available_for_lang(I18n.locale).can_display.where(:tagged_ids => params[:tag_id]).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page] ).per(@page_num) - # else - # @bulletins = Bulletin.available_for_lang(I18n.locale).can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page]).per(@page_num ) - # end - - # get_categorys - - # end - - # def reload_bulletins - # @selected_tag = Tag.find(params[:tag_id]) - # @bulletins = Bulletin.available_for_lang(I18n.locale).can_display.where(:tagged_ids => params[:tag_id]).where(:is_hidden => false).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc(:is_top, sort).page(params[:page]).per(5) rescue nil - # end - - -end diff --git a/vendor/built_in_modules/video/app/helpers/.gitkeep b/vendor/built_in_modules/video/app/helpers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/video/app/helpers/panel/videos/back_end/videos_helper.rb b/vendor/built_in_modules/video/app/helpers/panel/videos/back_end/videos_helper.rb deleted file mode 100644 index 8cc8935a..00000000 --- a/vendor/built_in_modules/video/app/helpers/panel/videos/back_end/videos_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module Panel::Locations::BackEnd::VideosHelper -end diff --git a/vendor/built_in_modules/video/app/mailers/.gitkeep b/vendor/built_in_modules/video/app/mailers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/video/app/models/.gitkeep b/vendor/built_in_modules/video/app/models/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/video/app/models/channel_video.rb b/vendor/built_in_modules/video/app/models/channel_video.rb deleted file mode 100644 index 86493e9a..00000000 --- a/vendor/built_in_modules/video/app/models/channel_video.rb +++ /dev/null @@ -1,10 +0,0 @@ -class ChannelVideo - include Mongoid::Document - include Mongoid::Timestamps - - attr_accessible :channel_name - - field :channel_name - - validates_presence_of :channel_name -end \ No newline at end of file diff --git a/vendor/built_in_modules/video/app/models/video.rb b/vendor/built_in_modules/video/app/models/video.rb deleted file mode 100644 index 62b55e55..00000000 --- a/vendor/built_in_modules/video/app/models/video.rb +++ /dev/null @@ -1,8 +0,0 @@ -class Video - include Mongoid::Document - include Mongoid::Timestamps - - field :title - field :description - field :url -end diff --git a/vendor/built_in_modules/video/app/uploaders/locations_uploader.rb b/vendor/built_in_modules/video/app/uploaders/locations_uploader.rb deleted file mode 100644 index 55056a5b..00000000 --- a/vendor/built_in_modules/video/app/uploaders/locations_uploader.rb +++ /dev/null @@ -1,61 +0,0 @@ -class LocationsUploader < CarrierWave::Uploader::Base - - # Include RMagick or ImageScience support: - # include CarrierWave::RMagick - # include CarrierWave::ImageScience - include CarrierWave::MiniMagick - - # Choose what kind of storage to use for this uploader: - # storage :file - # storage :s3 - - # Override the directory where uploaded files will be stored. - # This is a sensible default for uploaders that are meant to be mounted: - def store_dir - "location/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" - end - - # Provide a default URL as a default if there hasn't been a file uploaded: - # def default_url - # "/images/fallback/" + [version_name, "default.png"].compact.join('_') - # end - - # Process files as they are uploaded: - # process :scale => [200, 300] - # - # def scale(width, height) - # # do something - # end - - # Create different versions of your uploaded files: - # version :thumb do - # process :scale => [50, 50] - # end - - version :thumb do - process :resize_to_fill => [150, 120] - end - - # Add a white list of extensions which are allowed to be uploaded. - # For images you might use something like this: - # def extension_white_list - # %w(jpg jpeg gif png) - # end - - # Override the filename of the uploaded files: - # def filename - # "something.jpg" if original_filename - # end - -# def manipulate! -# raise current_path.inspect -# image = ::MiniMagick::Image.open(current_path) -# image = yield(image) -# image.write(current_path) -# ::MiniMagick::Image.open(current_path) -# rescue ::MiniMagick::Error, ::MiniMagick::Invalid => e -# raise CarrierWave::ProcessingError.new("Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: #{e}") -# end - -end - diff --git a/vendor/built_in_modules/video/app/views/.gitkeep b/vendor/built_in_modules/video/app/views/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/video/app/views/panel/video/back_end/channel_videos/_form.html.erb b/vendor/built_in_modules/video/app/views/panel/video/back_end/channel_videos/_form.html.erb deleted file mode 100644 index 27c3be5d..00000000 --- a/vendor/built_in_modules/video/app/views/panel/video/back_end/channel_videos/_form.html.erb +++ /dev/null @@ -1,14 +0,0 @@ -
    -

    YouTube Channel

    -
    - -
    - <%= f.text_field :channel_name, :class=>'span4', :placeholder => 'Channel Name'%> -
    -
    - -
    -
    - <%= f.submit t("submit"), :class=>"btn" %> -
    -
    diff --git a/vendor/built_in_modules/video/app/views/panel/video/back_end/channel_videos/edit.html.erb b/vendor/built_in_modules/video/app/views/panel/video/back_end/channel_videos/edit.html.erb deleted file mode 100644 index fa13c6ee..00000000 --- a/vendor/built_in_modules/video/app/views/panel/video/back_end/channel_videos/edit.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<%= form_for @channel_video, :url => panel_video_back_end_channel_video_path, :method => :put, :html => { :class=>"form-horizontal"} do |f| %> - <%= render :partial => 'form', :locals => {:f => f} %> -<% end %> \ No newline at end of file diff --git a/vendor/built_in_modules/video/app/views/panel/video/back_end/channel_videos/index.html.erb b/vendor/built_in_modules/video/app/views/panel/video/back_end/channel_videos/index.html.erb deleted file mode 100644 index 673ada29..00000000 --- a/vendor/built_in_modules/video/app/views/panel/video/back_end/channel_videos/index.html.erb +++ /dev/null @@ -1,29 +0,0 @@ -
    -

    YouTube Channel

    - - - - - - <%if is_manager? %> - - - <% end %> - - - - <% @channel_videos.each do |video| %> - - - - <%if is_manager? %> - - - <% end %> - - <% end %> - -
    <%= t('channel_name') %><%= t('videos.show') %><%= t('videos.edit') %><%= t('videos.delete') %>
    <%= video.channel_name %><%= link_to 'Show Channel Videos', panel_video_back_end_channel_video_path(video) %><%= link_to 'Edit', edit_panel_video_back_end_channel_video_path(video) %><%= link_to 'Delete Channel', panel_video_back_end_channel_video_path(video), method: :delete , :confirm => t(:sure?) %>
    -<%if is_manager? %> -<%= link_to 'New', new_panel_video_back_end_channel_video_path, :class => "btn btn-primary pull-right", :id=>"create_event_btn", :ref=>"add-btn" %> -<% end %> diff --git a/vendor/built_in_modules/video/app/views/panel/video/back_end/channel_videos/new.html.erb b/vendor/built_in_modules/video/app/views/panel/video/back_end/channel_videos/new.html.erb deleted file mode 100644 index 72191ada..00000000 --- a/vendor/built_in_modules/video/app/views/panel/video/back_end/channel_videos/new.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<%= form_for @channel_video, :url => panel_video_back_end_channel_videos_path, :html => { :class=>"form-horizontal"} do |f| %> - <%= render :partial => 'form', :locals => {:f => f} %> -<% end %> diff --git a/vendor/built_in_modules/video/app/views/panel/video/back_end/channel_videos/show.html.erb b/vendor/built_in_modules/video/app/views/panel/video/back_end/channel_videos/show.html.erb deleted file mode 100644 index 1e7bd2af..00000000 --- a/vendor/built_in_modules/video/app/views/panel/video/back_end/channel_videos/show.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -<% @client_videos.videos.each do |v| %> - - <% @video = v.video_id.split(/tag:youtube.com,2008:video:+/).last %> - <% @vd = UnvlogIt.new("https://www.youtube.com/watch?v=#{@video}")%> - <%= @vd.embed_html(400, 300).html_safe %> - <%= @vd.title %> - <%end%> \ No newline at end of file diff --git a/vendor/built_in_modules/video/app/views/panel/video/back_end/videos/_form.html.erb b/vendor/built_in_modules/video/app/views/panel/video/back_end/videos/_form.html.erb deleted file mode 100644 index c715d916..00000000 --- a/vendor/built_in_modules/video/app/views/panel/video/back_end/videos/_form.html.erb +++ /dev/null @@ -1,26 +0,0 @@ -
    - -
    - <%= f.text_field :title, :class=>"span2", :placeholder => "Title" %> -
    -
    - -
    - -
    - <%= f.text_field :url, :class=>"span2", :placeholder => "URL" %> -
    -
    -
    - -
    - <%= f.fields_for :description_translations do |f| %> - <%= f.text_area locale, :class=>'span4', :cols=>"30", :row=>"5", :value => (@video.description_translations[locale.to_s] rescue nil) %> - <% end %> -
    -
    -
    -
    - <%= f.submit t("submit"), :class=>"btn" %> -
    -
    diff --git a/vendor/built_in_modules/video/app/views/panel/video/back_end/videos/edit.html.erb b/vendor/built_in_modules/video/app/views/panel/video/back_end/videos/edit.html.erb deleted file mode 100644 index bb4e9336..00000000 --- a/vendor/built_in_modules/video/app/views/panel/video/back_end/videos/edit.html.erb +++ /dev/null @@ -1,4 +0,0 @@ -<%= form_for @video, :url=> panel_videos_back_end_video_path(@video), :html => { :class=>"form-horizontal"} do |f| %> - <%= render :partial => 'form', :locals => {:f => f} %> -<% end %> - diff --git a/vendor/built_in_modules/video/app/views/panel/video/back_end/videos/index.html.erb b/vendor/built_in_modules/video/app/views/panel/video/back_end/videos/index.html.erb deleted file mode 100644 index a5653f95..00000000 --- a/vendor/built_in_modules/video/app/views/panel/video/back_end/videos/index.html.erb +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - <%if is_manager? %> - - - <% end %> - - - - <% @videos.each do |video| %> - - <% video_display = UnvlogIt.new(video.url)%> - - - <% @client_videos = @client.videos_by(:user => 'ntuprs', :per_page => 5) %> - - - <%if is_manager? %> - - - <%end%> - - <% end %> - -
    <%= t('videos.title') %><%= t('videos.description') %><%= t('videos.edit') %><%= t('videos.delete') %>
    <%= video_display.embed_html(400, 300).html_safe %><%= video.title %><% @client_videos.videos.each do |v| %> <% @video = v.video_id.split(/tag:youtube.com,2008:video:+/).last %><% vd = UnvlogIt.new("https://www.youtube.com/watch?v=#{@video}")%><%= vd.embed_html(200, 150).html_safe %>


    <% end %>
    <%= link_to 'Edit', edit_panel_videos_back_end_video_path(video) %><%= link_to 'Destroy', panel_videos_back_end_video_path(video), method: :delete , :confirm => t(:sure?) %>
    -<%if is_manager? %> -<%= link_to 'New', new_panel_videos_back_end_video_path, :class => "btn btn-primary", :id=>"create_event_btn", :ref=>"add-btn" %> -<% end %> diff --git a/vendor/built_in_modules/video/app/views/panel/video/back_end/videos/new.html.erb b/vendor/built_in_modules/video/app/views/panel/video/back_end/videos/new.html.erb deleted file mode 100644 index 0b876d1a..00000000 --- a/vendor/built_in_modules/video/app/views/panel/video/back_end/videos/new.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<%= form_for @video, :url=> panel_videos_back_end_videos_path, :html => { :class=>"form-horizontal"} do |f| %> - <%= render :partial => 'form', :locals => {:f => f} %> -<% end %> diff --git a/vendor/built_in_modules/video/app/views/panel/video/front_end/channel_videos/index.html.erb b/vendor/built_in_modules/video/app/views/panel/video/front_end/channel_videos/index.html.erb deleted file mode 100644 index 0c38f740..00000000 --- a/vendor/built_in_modules/video/app/views/panel/video/front_end/channel_videos/index.html.erb +++ /dev/null @@ -1,14 +0,0 @@ -
    -

    Videos

    -
      - <% @client_videos.videos.each do |v| %> - <% @video = v.video_id.split(/tag:youtube.com,2008:video:+/).last %> - <% @vd = UnvlogIt.new("https://www.youtube.com/watch?v=#{@video}")%> -
    • -

      <%= @vd.title %>

      -
      - <%=link_to image_tag(@vd.thumbnail, :size => '200x150'), "https://www.youtube.com/watch?v=#{@video}", :class => "cover", :target => "blank" %> -
      -
    • - <%end%> -
    \ No newline at end of file diff --git a/vendor/built_in_modules/video/app/views/panel/video/widget/channel_videos/channel_videos.html.erb b/vendor/built_in_modules/video/app/views/panel/video/widget/channel_videos/channel_videos.html.erb deleted file mode 100644 index 5f3a9382..00000000 --- a/vendor/built_in_modules/video/app/views/panel/video/widget/channel_videos/channel_videos.html.erb +++ /dev/null @@ -1,9 +0,0 @@ -

    Videos

    -
      - -<% @client_videos.videos.each do |v| %> - <% @video = v.video_id.split(/tag:youtube.com,2008:video:+/).last %> - <% @vd = UnvlogIt.new("https://www.youtube.com/watch?v=#{@video}")%> -
    • <%= @vd.title %> -

      <%= @vd.embed_html(200, 150).html_safe %>
    • - <%end%> \ No newline at end of file diff --git a/vendor/built_in_modules/video/config/locales/en.yml b/vendor/built_in_modules/video/config/locales/en.yml deleted file mode 100644 index 83c87731..00000000 --- a/vendor/built_in_modules/video/config/locales/en.yml +++ /dev/null @@ -1,5 +0,0 @@ -en: - video: - video: Video - videos: Videos - channel: Channel \ No newline at end of file diff --git a/vendor/built_in_modules/video/config/locales/zh_tw.yml b/vendor/built_in_modules/video/config/locales/zh_tw.yml deleted file mode 100644 index 7d1c0da5..00000000 --- a/vendor/built_in_modules/video/config/locales/zh_tw.yml +++ /dev/null @@ -1,5 +0,0 @@ -zh_tw: - video: - video: 影片 - videos: 影片 - channel: 頻道 \ No newline at end of file diff --git a/vendor/built_in_modules/video/config/routes.rb b/vendor/built_in_modules/video/config/routes.rb deleted file mode 100644 index b1e8d883..00000000 --- a/vendor/built_in_modules/video/config/routes.rb +++ /dev/null @@ -1,20 +0,0 @@ -Rails.application.routes.draw do - namespace :panel do - namespace :video do - namespace :back_end do - match "videos/get_videos" => "videos#get_videos" - resources :videos - resources :channel_videos - end - - namespace :front_end do - resources :channel_videos - # match "/channel_videos" => "channel_videos#channel_videos", :via => :get - end - namespace :widget do - #resources :channel_videos - match "/channel_videos" => "channel_videos#channel_videos", :via => :get - end - end - end -end diff --git a/vendor/built_in_modules/video/init.rb b/vendor/built_in_modules/video/init.rb deleted file mode 100644 index 6e0b4936..00000000 --- a/vendor/built_in_modules/video/init.rb +++ /dev/null @@ -1,74 +0,0 @@ -module Videos - OrbitApp.registration "Video",:type=> 'ModuleApp' do - module_label 'video.video' - base_url File.expand_path File.dirname(__FILE__) - # personal_plugin :enable => true,:path=>"panel/location/plugin/profile",:i18n=>'admin.location' - - version "0.1" - organization "Rulingcom" - author "RD dep" - intro "I am intro" - update_info 'some update_info' - #enable_frontend true - - front_end do - app_page 'channel_videos' do - frontend_i18n "video.front_end.channel_videos" - end - end - - authorizable - - # category ["BulletinCategory"] - - # widgets do - # default_widget do - # query 'Bulletin.all' - # image :image - # end - - # categories_query 'BulletinCategory.all' - # tags_query 'LocationTag.all' - - # customize_widget "index","location.widget.index",:fields=>["title","category","postdate"],:style=>["cu_style_1","cu_style_2","cu_style_3","cu_style_4","cu_style_5"] - # customize_widget "bulletins_and_web_links","location.widget.bulletins_and_web_links" - # # item "index","location.widget.index",:default_template=>true,:fields=>["title","category","postdate"] - # # item "bulletins_and_web_links","location.widget.bulletins_and_web_links" - # end - - widgets do - #default_widget do - # query 'ChannelVideo.all' - # enable ['typeB_style3', 'typeB_style4'] - # field :channel_name - # image :image - # end - - # tags_query 'GalleryTag.all' - - #* customize_widget "albums","gallery.widget.albums",:fields=>[],:style=>[],:options=>{"widget1"=>{"vertical"=>[1, 2], "horizontal"=>[1, 2, 3, 4, 5, 6], "album_id"=>{"query"=>"GalleryAlbum.all", "value"=>:id, "label"=>:name}}} - #* customize_widget_options_fields_i18n({"widget1"=>{"vertical"=>"gallery.widget_option.vertical", "horizontal"=>"gallery.widget_option.horizontal", "album_id"=>"gallery.album"}} ) - customize_widget "channel_videos" do - widget_i18n "videos.widget.channel_videos" - style ["1","2"] - options "channel_videos",:i18n =>"videos.channel_videos",:options_item => {"query"=>"ChannelVideo.all", "value"=>:id, "label"=>:channel_name} - end - - end - - - side_bar do - head_label_i18n 'video.channel',:icon_class=>"icon-facetime-video" - available_for [:admin,:guest,:manager,:sub_manager] - active_for_controllers ({:private=>['channel_videos', 'videos']}) - - head_link_path "panel_video_back_end_channel_videos_path" - - context_link 'video.channel', - :link_path=>"panel_video_back_end_channel_videos_path" , - :priority=>1, - :available_for => [:manager] - - end - end -end diff --git a/vendor/built_in_modules/video/lib/tasks/location_tasks.rake b/vendor/built_in_modules/video/lib/tasks/location_tasks.rake deleted file mode 100644 index 152c5d6b..00000000 --- a/vendor/built_in_modules/video/lib/tasks/location_tasks.rake +++ /dev/null @@ -1,4 +0,0 @@ -# desc "Explaining what the task does" -# task :location do -# # Task goes here -# end diff --git a/vendor/built_in_modules/video/script/rails b/vendor/built_in_modules/video/script/rails deleted file mode 100755 index e323e44b..00000000 --- a/vendor/built_in_modules/video/script/rails +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby -#!/usr/bin/env ruby -# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. - -ENGINE_PATH = File.expand_path('../..', __FILE__) -load File.expand_path('../../test/dummy/script/rails', __FILE__) diff --git a/vendor/built_in_modules/video/test/dummy/Rakefile b/vendor/built_in_modules/video/test/dummy/Rakefile deleted file mode 100644 index 36458522..00000000 --- a/vendor/built_in_modules/video/test/dummy/Rakefile +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env rake -# Add your own tasks in files placed in lib/tasks ending in .rake, -# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. - -require File.expand_path('../config/application', __FILE__) - -Dummy::Application.load_tasks diff --git a/vendor/built_in_modules/video/test/dummy/app/assets/javascripts/application.js b/vendor/built_in_modules/video/test/dummy/app/assets/javascripts/application.js deleted file mode 100644 index 37c7bfcd..00000000 --- a/vendor/built_in_modules/video/test/dummy/app/assets/javascripts/application.js +++ /dev/null @@ -1,9 +0,0 @@ -// This is a manifest file that'll be compiled into including all the files listed below. -// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically -// be included in the compiled file accessible from http://example.com/assets/application.js -// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -// the compiled file. -// -//= require jquery -//= require jquery_ujs -//= require_tree . diff --git a/vendor/built_in_modules/video/test/dummy/app/assets/stylesheets/application.css b/vendor/built_in_modules/video/test/dummy/app/assets/stylesheets/application.css deleted file mode 100644 index fc25b572..00000000 --- a/vendor/built_in_modules/video/test/dummy/app/assets/stylesheets/application.css +++ /dev/null @@ -1,7 +0,0 @@ -/* - * This is a manifest file that'll automatically include all the stylesheets available in this directory - * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at - * the top of the compiled file, but it's generally better to create a new file per style scope. - *= require_self - *= require_tree . -*/ \ No newline at end of file diff --git a/vendor/built_in_modules/video/test/dummy/app/controllers/application_controller.rb b/vendor/built_in_modules/video/test/dummy/app/controllers/application_controller.rb deleted file mode 100644 index e8065d95..00000000 --- a/vendor/built_in_modules/video/test/dummy/app/controllers/application_controller.rb +++ /dev/null @@ -1,3 +0,0 @@ -class ApplicationController < ActionController::Base - protect_from_forgery -end diff --git a/vendor/built_in_modules/video/test/dummy/app/helpers/application_helper.rb b/vendor/built_in_modules/video/test/dummy/app/helpers/application_helper.rb deleted file mode 100644 index de6be794..00000000 --- a/vendor/built_in_modules/video/test/dummy/app/helpers/application_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module ApplicationHelper -end diff --git a/vendor/built_in_modules/video/test/dummy/app/mailers/.gitkeep b/vendor/built_in_modules/video/test/dummy/app/mailers/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/video/test/dummy/app/models/.gitkeep b/vendor/built_in_modules/video/test/dummy/app/models/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/video/test/dummy/app/views/layouts/application.html.erb b/vendor/built_in_modules/video/test/dummy/app/views/layouts/application.html.erb deleted file mode 100644 index 9a8a761b..00000000 --- a/vendor/built_in_modules/video/test/dummy/app/views/layouts/application.html.erb +++ /dev/null @@ -1,14 +0,0 @@ - - - - Dummy - <%= stylesheet_link_tag "application" %> - <%= javascript_include_tag "application" %> - <%= csrf_meta_tags %> - - - -<%= yield %> - - - diff --git a/vendor/built_in_modules/video/test/dummy/config.ru b/vendor/built_in_modules/video/test/dummy/config.ru deleted file mode 100644 index 1989ed8d..00000000 --- a/vendor/built_in_modules/video/test/dummy/config.ru +++ /dev/null @@ -1,4 +0,0 @@ -# This file is used by Rack-based servers to start the application. - -require ::File.expand_path('../config/environment', __FILE__) -run Dummy::Application diff --git a/vendor/built_in_modules/video/test/dummy/config/application.rb b/vendor/built_in_modules/video/test/dummy/config/application.rb deleted file mode 100644 index e98216b3..00000000 --- a/vendor/built_in_modules/video/test/dummy/config/application.rb +++ /dev/null @@ -1,45 +0,0 @@ -require File.expand_path('../boot', __FILE__) - -require 'rails/all' - -Bundler.require -require "location" - -module Dummy - class Application < Rails::Application - # Settings in config/environments/* take precedence over those specified here. - # Application configuration should go into files in config/initializers - # -- all .rb files in that directory are automatically loaded. - - # Custom directories with classes and modules you want to be autoloadable. - # config.autoload_paths += %W(#{config.root}/extras) - - # Only load the plugins named here, in the order given (default is alphabetical). - # :all can be used as a placeholder for all plugins not explicitly named. - # config.plugins = [ :exception_notification, :ssl_requirement, :all ] - - # Activate observers that should always be running. - # config.active_record.observers = :cacher, :garbage_collector, :forum_observer - - # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. - # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. - # config.time_zone = 'Central Time (US & Canada)' - - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - # config.i18n.default_locale = :de - - # Configure the default encoding used in templates for Ruby 1.9. - config.encoding = "utf-8" - - # Configure sensitive parameters which will be filtered from the log file. - config.filter_parameters += [:password] - - # Enable the asset pipeline - config.assets.enabled = true - - # Version of your assets, change this if you want to expire all your assets - config.assets.version = '1.0' - end -end - diff --git a/vendor/built_in_modules/video/test/dummy/config/boot.rb b/vendor/built_in_modules/video/test/dummy/config/boot.rb deleted file mode 100644 index eba06813..00000000 --- a/vendor/built_in_modules/video/test/dummy/config/boot.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'rubygems' -gemfile = File.expand_path('../../../../Gemfile', __FILE__) - -if File.exist?(gemfile) - ENV['BUNDLE_GEMFILE'] = gemfile - require 'bundler' - Bundler.setup -end - -$:.unshift File.expand_path('../../../../lib', __FILE__) \ No newline at end of file diff --git a/vendor/built_in_modules/video/test/dummy/config/database.yml b/vendor/built_in_modules/video/test/dummy/config/database.yml deleted file mode 100644 index 51a4dd45..00000000 --- a/vendor/built_in_modules/video/test/dummy/config/database.yml +++ /dev/null @@ -1,25 +0,0 @@ -# SQLite version 3.x -# gem install sqlite3 -# -# Ensure the SQLite 3 gem is defined in your Gemfile -# gem 'sqlite3' -development: - adapter: sqlite3 - database: db/development.sqlite3 - pool: 5 - timeout: 5000 - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: - adapter: sqlite3 - database: db/test.sqlite3 - pool: 5 - timeout: 5000 - -production: - adapter: sqlite3 - database: db/production.sqlite3 - pool: 5 - timeout: 5000 diff --git a/vendor/built_in_modules/video/test/dummy/config/environment.rb b/vendor/built_in_modules/video/test/dummy/config/environment.rb deleted file mode 100644 index 3da5eb91..00000000 --- a/vendor/built_in_modules/video/test/dummy/config/environment.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Load the rails application -require File.expand_path('../application', __FILE__) - -# Initialize the rails application -Dummy::Application.initialize! diff --git a/vendor/built_in_modules/video/test/dummy/config/environments/development.rb b/vendor/built_in_modules/video/test/dummy/config/environments/development.rb deleted file mode 100644 index 95a50b91..00000000 --- a/vendor/built_in_modules/video/test/dummy/config/environments/development.rb +++ /dev/null @@ -1,30 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # In the development environment your application's code is reloaded on - # every request. This slows down response time but is perfect for development - # since you don't have to restart the web server when you make code changes. - config.cache_classes = false - - # Log error messages when you accidentally call methods on nil. - config.whiny_nils = true - - # Show full error reports and disable caching - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Don't care if the mailer can't send - config.action_mailer.raise_delivery_errors = false - - # Print deprecation notices to the Rails logger - config.active_support.deprecation = :log - - # Only use best-standards-support built into browsers - config.action_dispatch.best_standards_support = :builtin - - # Do not compress assets - config.assets.compress = false - - # Expands the lines which load the assets - config.assets.debug = true -end diff --git a/vendor/built_in_modules/video/test/dummy/config/environments/production.rb b/vendor/built_in_modules/video/test/dummy/config/environments/production.rb deleted file mode 100644 index ca2c5888..00000000 --- a/vendor/built_in_modules/video/test/dummy/config/environments/production.rb +++ /dev/null @@ -1,60 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # Code is not reloaded between requests - config.cache_classes = true - - # Full error reports are disabled and caching is turned on - config.consider_all_requests_local = false - config.action_controller.perform_caching = true - - # Disable Rails's static asset server (Apache or nginx will already do this) - config.serve_static_assets = false - - # Compress JavaScripts and CSS - config.assets.compress = true - - # Don't fallback to assets pipeline if a precompiled asset is missed - config.assets.compile = false - - # Generate digests for assets URLs - config.assets.digest = true - - # Defaults to Rails.root.join("public/assets") - # config.assets.manifest = YOUR_PATH - - # Specifies the header that your server uses for sending files - # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx - - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true - - # See everything in the log (default is :info) - # config.log_level = :debug - - # Use a different logger for distributed setups - # config.logger = SyslogLogger.new - - # Use a different cache store in production - # config.cache_store = :mem_cache_store - - # Enable serving of images, stylesheets, and JavaScripts from an asset server - # config.action_controller.asset_host = "http://assets.example.com" - - # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) - # config.assets.precompile += %w( search.js ) - - # Disable delivery errors, bad email addresses will be ignored - # config.action_mailer.raise_delivery_errors = false - - # Enable threaded mode - # config.threadsafe! - - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation can not be found) - config.i18n.fallbacks = true - - # Send deprecation notices to registered listeners - config.active_support.deprecation = :notify -end diff --git a/vendor/built_in_modules/video/test/dummy/config/environments/test.rb b/vendor/built_in_modules/video/test/dummy/config/environments/test.rb deleted file mode 100644 index 6810c914..00000000 --- a/vendor/built_in_modules/video/test/dummy/config/environments/test.rb +++ /dev/null @@ -1,39 +0,0 @@ -Dummy::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # The test environment is used exclusively to run your application's - # test suite. You never need to work with it otherwise. Remember that - # your test database is "scratch space" for the test suite and is wiped - # and recreated between test runs. Don't rely on the data there! - config.cache_classes = true - - # Configure static asset server for tests with Cache-Control for performance - config.serve_static_assets = true - config.static_cache_control = "public, max-age=3600" - - # Log error messages when you accidentally call methods on nil - config.whiny_nils = true - - # Show full error reports and disable caching - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Raise exceptions instead of rendering exception templates - config.action_dispatch.show_exceptions = false - - # Disable request forgery protection in test environment - config.action_controller.allow_forgery_protection = false - - # Tell Action Mailer not to deliver emails to the real world. - # The :test delivery method accumulates sent emails in the - # ActionMailer::Base.deliveries array. - config.action_mailer.delivery_method = :test - - # Use SQL instead of Active Record's schema dumper when creating the test database. - # This is necessary if your schema can't be completely dumped by the schema dumper, - # like if you have constraints or database-specific column types - # config.active_record.schema_format = :sql - - # Print deprecation notices to the stderr - config.active_support.deprecation = :stderr -end diff --git a/vendor/built_in_modules/video/test/dummy/config/initializers/backtrace_silencers.rb b/vendor/built_in_modules/video/test/dummy/config/initializers/backtrace_silencers.rb deleted file mode 100644 index 59385cdf..00000000 --- a/vendor/built_in_modules/video/test/dummy/config/initializers/backtrace_silencers.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. -# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } - -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. -# Rails.backtrace_cleaner.remove_silencers! diff --git a/vendor/built_in_modules/video/test/dummy/config/initializers/inflections.rb b/vendor/built_in_modules/video/test/dummy/config/initializers/inflections.rb deleted file mode 100644 index 9e8b0131..00000000 --- a/vendor/built_in_modules/video/test/dummy/config/initializers/inflections.rb +++ /dev/null @@ -1,10 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new inflection rules using the following format -# (all these examples are active by default): -# ActiveSupport::Inflector.inflections do |inflect| -# inflect.plural /^(ox)$/i, '\1en' -# inflect.singular /^(ox)en/i, '\1' -# inflect.irregular 'person', 'people' -# inflect.uncountable %w( fish sheep ) -# end diff --git a/vendor/built_in_modules/video/test/dummy/config/initializers/mime_types.rb b/vendor/built_in_modules/video/test/dummy/config/initializers/mime_types.rb deleted file mode 100644 index 72aca7e4..00000000 --- a/vendor/built_in_modules/video/test/dummy/config/initializers/mime_types.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new mime types for use in respond_to blocks: -# Mime::Type.register "text/richtext", :rtf -# Mime::Type.register_alias "text/html", :iphone diff --git a/vendor/built_in_modules/video/test/dummy/config/initializers/secret_token.rb b/vendor/built_in_modules/video/test/dummy/config/initializers/secret_token.rb deleted file mode 100644 index 370a8fa2..00000000 --- a/vendor/built_in_modules/video/test/dummy/config/initializers/secret_token.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Your secret key for verifying the integrity of signed cookies. -# If you change this key, all old signed cookies will become invalid! -# Make sure the secret is at least 30 characters and all random, -# no regular words or you'll be exposed to dictionary attacks. -Dummy::Application.config.secret_token = '181584334acb820e1d0e0e53b71c0985251f4e5bfd188a962d5f9acfeeb0e46dfd6ca68784528cab00d8e6e8da087cce2bf7d060fe2b2c742a814c23689ff6af' diff --git a/vendor/built_in_modules/video/test/dummy/config/initializers/session_store.rb b/vendor/built_in_modules/video/test/dummy/config/initializers/session_store.rb deleted file mode 100644 index 952473ff..00000000 --- a/vendor/built_in_modules/video/test/dummy/config/initializers/session_store.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Be sure to restart your server when you modify this file. - -Dummy::Application.config.session_store :cookie_store, key: '_dummy_session' - -# Use the database for sessions instead of the cookie-based default, -# which shouldn't be used to store highly confidential information -# (create the session table with "rails generate session_migration") -# Dummy::Application.config.session_store :active_record_store diff --git a/vendor/built_in_modules/video/test/dummy/config/initializers/wrap_parameters.rb b/vendor/built_in_modules/video/test/dummy/config/initializers/wrap_parameters.rb deleted file mode 100644 index 999df201..00000000 --- a/vendor/built_in_modules/video/test/dummy/config/initializers/wrap_parameters.rb +++ /dev/null @@ -1,14 +0,0 @@ -# Be sure to restart your server when you modify this file. -# -# This file contains settings for ActionController::ParamsWrapper which -# is enabled by default. - -# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. -ActiveSupport.on_load(:action_controller) do - wrap_parameters format: [:json] -end - -# Disable root element in JSON by default. -ActiveSupport.on_load(:active_record) do - self.include_root_in_json = false -end diff --git a/vendor/built_in_modules/video/test/dummy/config/locales/en.yml b/vendor/built_in_modules/video/test/dummy/config/locales/en.yml deleted file mode 100644 index 179c14ca..00000000 --- a/vendor/built_in_modules/video/test/dummy/config/locales/en.yml +++ /dev/null @@ -1,5 +0,0 @@ -# Sample localization file for English. Add more files in this directory for other locales. -# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. - -en: - hello: "Hello world" diff --git a/vendor/built_in_modules/video/test/dummy/config/routes.rb b/vendor/built_in_modules/video/test/dummy/config/routes.rb deleted file mode 100644 index bb509f27..00000000 --- a/vendor/built_in_modules/video/test/dummy/config/routes.rb +++ /dev/null @@ -1,58 +0,0 @@ -Dummy::Application.routes.draw do - # The priority is based upon order of creation: - # first created -> highest priority. - - # Sample of regular route: - # match 'products/:id' => 'catalog#view' - # Keep in mind you can assign values other than :controller and :action - - # Sample of named route: - # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase - # This route can be invoked with purchase_url(:id => product.id) - - # Sample resource route (maps HTTP verbs to controller actions automatically): - # resources :products - - # Sample resource route with options: - # resources :products do - # member do - # get 'short' - # post 'toggle' - # end - # - # collection do - # get 'sold' - # end - # end - - # Sample resource route with sub-resources: - # resources :products do - # resources :comments, :sales - # resource :seller - # end - - # Sample resource route with more complex sub-resources - # resources :products do - # resources :comments - # resources :sales do - # get 'recent', :on => :collection - # end - # end - - # Sample resource route within a namespace: - # namespace :admin do - # # Directs /admin/products/* to Admin::ProductsController - # # (app/controllers/admin/products_controller.rb) - # resources :products - # end - - # You can have the root of your site routed with "root" - # just remember to delete public/index.html. - # root :to => 'welcome#index' - - # See how all your routes lay out with "rake routes" - - # This is a legacy wild controller route that's not recommended for RESTful applications. - # Note: This route will make all actions in every controller accessible via GET requests. - # match ':controller(/:action(/:id(.:format)))' -end diff --git a/vendor/built_in_modules/video/test/dummy/lib/assets/.gitkeep b/vendor/built_in_modules/video/test/dummy/lib/assets/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/video/test/dummy/log/.gitkeep b/vendor/built_in_modules/video/test/dummy/log/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/video/test/dummy/public/404.html b/vendor/built_in_modules/video/test/dummy/public/404.html deleted file mode 100644 index 9a48320a..00000000 --- a/vendor/built_in_modules/video/test/dummy/public/404.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - The page you were looking for doesn't exist (404) - - - - - -
      -

      The page you were looking for doesn't exist.

      -

      You may have mistyped the address or the page may have moved.

      -
      - - diff --git a/vendor/built_in_modules/video/test/dummy/public/422.html b/vendor/built_in_modules/video/test/dummy/public/422.html deleted file mode 100644 index 83660ab1..00000000 --- a/vendor/built_in_modules/video/test/dummy/public/422.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - The change you wanted was rejected (422) - - - - - -
      -

      The change you wanted was rejected.

      -

      Maybe you tried to change something you didn't have access to.

      -
      - - diff --git a/vendor/built_in_modules/video/test/dummy/public/500.html b/vendor/built_in_modules/video/test/dummy/public/500.html deleted file mode 100644 index b80307fc..00000000 --- a/vendor/built_in_modules/video/test/dummy/public/500.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - We're sorry, but something went wrong (500) - - - - - -
      -

      We're sorry, but something went wrong.

      -

      We've been notified about this issue and we'll take a look at it shortly.

      -
      - - diff --git a/vendor/built_in_modules/video/test/dummy/public/favicon.ico b/vendor/built_in_modules/video/test/dummy/public/favicon.ico deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/video/test/dummy/script/rails b/vendor/built_in_modules/video/test/dummy/script/rails deleted file mode 100755 index f8da2cff..00000000 --- a/vendor/built_in_modules/video/test/dummy/script/rails +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby -# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. - -APP_PATH = File.expand_path('../../config/application', __FILE__) -require File.expand_path('../../config/boot', __FILE__) -require 'rails/commands' diff --git a/vendor/built_in_modules/video/test/functional/panel/gprs/back_end/locations_controller_test.rb b/vendor/built_in_modules/video/test/functional/panel/gprs/back_end/locations_controller_test.rb deleted file mode 100644 index 0edd65ab..00000000 --- a/vendor/built_in_modules/video/test/functional/panel/gprs/back_end/locations_controller_test.rb +++ /dev/null @@ -1,14 +0,0 @@ -require 'test_helper' - -class Panel::Location::BackEnd::LocationsControllerTest < ActionController::TestCase - test "should get index" do - get :index - assert_response :success - end - - test "should get edit" do - get :edit - assert_response :success - end - -end diff --git a/vendor/built_in_modules/video/test/functional/panel/location/back_end/locations_controller_test.rb b/vendor/built_in_modules/video/test/functional/panel/location/back_end/locations_controller_test.rb deleted file mode 100644 index 0edd65ab..00000000 --- a/vendor/built_in_modules/video/test/functional/panel/location/back_end/locations_controller_test.rb +++ /dev/null @@ -1,14 +0,0 @@ -require 'test_helper' - -class Panel::Location::BackEnd::LocationsControllerTest < ActionController::TestCase - test "should get index" do - get :index - assert_response :success - end - - test "should get edit" do - get :edit - assert_response :success - end - -end diff --git a/vendor/built_in_modules/video/test/integration/navigation_test.rb b/vendor/built_in_modules/video/test/integration/navigation_test.rb deleted file mode 100644 index 97a94c9b..00000000 --- a/vendor/built_in_modules/video/test/integration/navigation_test.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'test_helper' - -class NavigationTest < ActionDispatch::IntegrationTest - fixtures :all - - # test "the truth" do - # assert true - # end -end - diff --git a/vendor/built_in_modules/video/test/location_test.rb b/vendor/built_in_modules/video/test/location_test.rb deleted file mode 100644 index b85756bc..00000000 --- a/vendor/built_in_modules/video/test/location_test.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'test_helper' - -class LocationTest < ActiveSupport::TestCase - test "truth" do - assert_kind_of Module, Location - end -end diff --git a/vendor/built_in_modules/video/test/test_helper.rb b/vendor/built_in_modules/video/test/test_helper.rb deleted file mode 100644 index dcd3b276..00000000 --- a/vendor/built_in_modules/video/test/test_helper.rb +++ /dev/null @@ -1,10 +0,0 @@ -# Configure Rails Environment -ENV["RAILS_ENV"] = "test" - -require File.expand_path("../dummy/config/environment.rb", __FILE__) -require "rails/test_help" - -Rails.backtrace_cleaner.remove_silencers! - -# Load support files -Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } diff --git a/vendor/built_in_modules/video/test/unit/helpers/panel/gprs/back_end/locations_helper_test.rb b/vendor/built_in_modules/video/test/unit/helpers/panel/gprs/back_end/locations_helper_test.rb deleted file mode 100644 index 9e39a511..00000000 --- a/vendor/built_in_modules/video/test/unit/helpers/panel/gprs/back_end/locations_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class Panel::Location::BackEnd::LocationsHelperTest < ActionView::TestCase -end diff --git a/vendor/built_in_modules/video/test/unit/helpers/panel/location/back_end/locations_helper_test.rb b/vendor/built_in_modules/video/test/unit/helpers/panel/location/back_end/locations_helper_test.rb deleted file mode 100644 index 9e39a511..00000000 --- a/vendor/built_in_modules/video/test/unit/helpers/panel/location/back_end/locations_helper_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -class Panel::Location::BackEnd::LocationsHelperTest < ActionView::TestCase -end diff --git a/vendor/built_in_modules/video/video.gemspec b/vendor/built_in_modules/video/video.gemspec deleted file mode 100644 index 439256b7..00000000 --- a/vendor/built_in_modules/video/video.gemspec +++ /dev/null @@ -1,23 +0,0 @@ -$:.push File.expand_path("../lib", __FILE__) - -# Maintain your gem's version: -require "location/version" - -# Describe your gem and declare its dependencies: -Gem::Specification.new do |s| - s.name = "location" - s.version = Location::VERSION - s.authors = ["TODO: Your name"] - s.email = ["TODO: Your email"] - s.homepage = "TODO" - s.summary = "TODO: Summary of Location." - s.description = "TODO: Description of Location." - - s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"] - s.test_files = Dir["test/**/*"] - - s.add_dependency "rails", "~> 3.1.8" - # s.add_dependency "jquery-rails" - - s.add_development_dependency "sqlite3" -end diff --git a/vendor/built_in_modules/video/video.json b/vendor/built_in_modules/video/video.json deleted file mode 100644 index 01e89b5d..00000000 --- a/vendor/built_in_modules/video/video.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "title": "location", - "version": "0.1", - "organization": "Rulingcom", - "author": "RD dep", - "intro": "A simple blog……", - "update_info": "Some info", - "create_date": "11-11-2011", - "widgets": [], - "category": [], - "enable_frontend": false -}