diff --git a/.gitignore b/.gitignore index 98965d6da..2d915d1cd 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,7 @@ /config/secrets.yml /config/redis.yml /config/elasticsearch.yml +/config/aliyun_vod.yml public/upload.html /config/configuration.yml diff --git a/.merge_file_a17580 b/.merge_file_a17580 new file mode 100644 index 000000000..47e471767 --- /dev/null +++ b/.merge_file_a17580 @@ -0,0 +1,529 @@ +import React, {Component} from 'react'; +import logo from './logo.svg'; +import './App.css'; +import {LocaleProvider} from 'antd' +import zhCN from 'antd/lib/locale-provider/zh_CN'; +import { + BrowserRouter as Router, + Route, + Switch +} from 'react-router-dom'; +import axios from 'axios'; +import '@icedesign/base/dist/ICEDesignBase.css'; + +import '@icedesign/base/index.scss'; + +import LoginDialog from './modules/login/LoginDialog'; +import Notcompletedysl from './modules/user/Notcompletedysl'; +import Trialapplicationysl from './modules/login/Trialapplicationysl'; +import Trialapplicationreview from './modules/user/Trialapplicationreview'; +import Addcourses from "./modules/courses/coursesPublic/Addcourses"; +import AccountProfile from"./modules/user/AccountProfile"; + + +import Trialapplication from './modules/login/Trialapplication' + +import NotFoundPage from './NotFoundPage' + +import Loading from './Loading' + +import Loadable from 'react-loadable'; + + +import moment from 'moment' + +import {MuiThemeProvider, createMuiTheme} from 'material-ui/styles'; + +// import './AppConfig' + +import history from './history'; + +import {SnackbarHOC} from 'educoder' +import {initAxiosInterceptors} from './AppConfig' + + +// !!!tpi需要这个来加载css +import {TPMIndexHOC} from './modules/tpm/TPMIndexHOC'; + + +const theme = createMuiTheme({ + palette: { + primary: { + main: '#4CACFF', + contrastText: 'rgba(255, 255, 255, 0.87)' + }, + secondary: {main: '#4CACFF'}, // #11cb5f This is just green.A700 as hex. + }, +}); +// +// const Trialapplication= Loadable({ +// loader: () =>import('./modules/login/Trialapplication'), +// loading:Loading, +// }) +//登入 +const EducoderLogin = Loadable({ + loader: () => import('./modules/login/EducoderLogin'), + loading: Loading, +}) +const TestIndex = Loadable({ + loader: () => import('./modules/test'), + loading: Loading, +}) + +const IndexWrapperComponent = Loadable({ + loader: () => import('./modules/page/IndexWrapper'), + loading: Loading, +}) + +const CommentComponent = Loadable({ + loader: () => import('./modules/comment/CommentContainer'), + loading: Loading, +}) + +const TestMaterialDesignComponent = Loadable({ + loader: () => import('./modules/test/md/TestMaterialDesign'), + loading: Loading, +}) +const TestCodeMirrorComponent = Loadable({ + loader: () => import('./modules/test/codemirror/TestCodeMirror'), + loading: Loading, +}) + +const TestComponent = Loadable({ + loader: () => import('./modules/test/TestRC'), + loading: Loading, +}) +const TestUrlQueryComponent = Loadable({ + loader: () => import('./modules/test/urlquery/TestUrlQuery'), + loading: Loading, +}) + +const TPMIndexComponent = Loadable({ + loader: () => import('./modules/tpm/TPMIndex'), + loading: Loading, +}) +const TPMShixunsIndexComponent = Loadable({ + loader: () => import('./modules/tpm/shixuns/ShixunsIndex'), + loading: Loading, +}) + +//实训课程(原实训路径) +const ShixunPaths = Loadable({ + loader: () => import('./modules/paths/Index'), + loading: Loading, +}) + +//在线课堂 +const CoursesIndex = Loadable({ + loader: () => import('./modules/courses/Index'), + loading: Loading, +}) +const SearchPage = Loadable({ + loader: () => import('./search/SearchPage'), + loading: Loading, +}) + +//教学案例 +const MoopCases = Loadable({ + loader: () => import('./modules/moop_cases/index'), + loading: Loading, +}) + +// 课堂讨论 +// const BoardIndex = Loadable({ +// loader: () => import('./modules/courses/boards/BoardIndex'), +// loading:Loading, +// }) + +// //课堂普通作业&分组作业 +// const CoursesWorkIndex = Loadable({ +// loader: () => import('./modules/courses/busyWork/Index'), +// loading:Loading, +// }) +// + +// const TPMShixunchildIndexComponent = Loadable({ +// loader: () => import('./modules/tpm/shixunchild/ShixunChildIndex'), +// loading: Loading, +// }) + + +// const TPMshixunfork_listIndexComponent = Loadable({ +// loader: () => import('./modules/tpm/shixunchild/Shixunfork_list'), +// loading: Loading, +// }) + + +const ForumsIndexComponent = Loadable({ + loader: () => import('./modules/forums/ForumsIndex'), + loading: Loading, +}) + +// trustie plus forum +// const TPForumsIndexComponent = Loadable({ +// loader: () => import('./modules/tp-forums/TPForumsIndex'), +// loading: Loading, +// }) + + +// const TestPageComponent = Loadable({ +// loader: () => import('./modules/page/Index'), +// loading: Loading, +// }) + + +//新建实训 +const Newshixuns = Loadable({ + loader: () => import('./modules/tpm/newshixuns/Newshixuns'), + loading: Loading, +}) + + +//实训首页 +const ShixunsHome = Loadable({ + loader: () => import('./modules/home/shixunsHome'), + loading: Loading, +}) + + +const CompatibilityPageLoadable = Loadable({ + loader: () => import('./modules/common/CompatibilityPage'), + loading: Loading, +}) + +//403页面 +const Shixunauthority = Loadable({ + loader: () => import('./modules/403/Shixunauthority'), + loading: Loading, +}) + + +//404页面 +const Shixunnopage = Loadable({ + loader: () => import('./modules/404/Shixunnopage'), + loading: Loading, +}) + +//500页面 +const http500 = Loadable({ + loader: () => import('./modules/500/http500'), + loading: Loading, +}) + +// 登录注册 +const LoginRegisterPage = Loadable({ + loader: () => import('./modules/user/LoginRegisterPage'), + loading: Loading, +}) +const AccountPage = Loadable({ + loader: () => import('./modules/user/AccountPage'), + loading: Loading, +}) + +// 个人主页 +const UsersInfo = Loadable({ + loader: () => import('./modules/user/usersInfo/Infos'), + loading: Loading, +}) + +// 兴趣页面 +const Interestpage = Loadable({ + loader: () => import('./modules/login/EducoderInteresse'), + loading: Loading, +}) + +//众包创新 +const ProjectPackages=Loadable({ + loader: () => import('./modules/projectPackages/ProjectPackageIndex'), + loading: Loading, +}) + +class App extends Component { + constructor(props) { + super(props) + // this.state = { + // isRenders:false, + // } + + } + + componentDidMount() { + // force an update if the URL changes + history.listen(() => { + this.forceUpdate() + const $ = window.$ + // https://www.trustie.net/issues/21919 可能会有问题 + $("html").animate({ scrollTop: $('html').scrollTop() - 0 }) + }); + + initAxiosInterceptors(this.props) + + // + // axios.interceptors.response.use((response) => { + // // console.log("response"+response); + // if(response!=undefined) + // // console.log("response"+response.data.statu); + // if (response&&response.data.status === 407) { + // this.setState({ + // isRenders: true, + // }) + // } + // return response; + // }, (error) => { + // //TODO 这里如果样式变了会出现css不加载的情况 + // }); + } + //修改登录方法 + Modifyloginvalue=()=>{ + this.setState({ + isRender:false, + }) + } + + render() { + + + return ( + + + + + this.Modifyloginvalue()}> + + + + + + {/*{*/} + {/* isRender === true?*/} + {/* : ""*/} + {/*}*/} + + {/*{*/} + {/* isRenders === true?*/} + {/**/} + {/*:""*/} + {/*}*/} + + + + {/**/} + + {/*众包创新*/} + + {/*认证*/} + + + {/*403*/} + + + + + {/*404*/} + + + + + + () + }> + {/**/} + + + + + + + + + + + + {/*列表页*/} + + + {/* + + + */} + + {/**/} + {/**/} + + + {/*实训课程(原实训路径)*/} + + + () + } + > + + {/*课堂*/} + + + {/* 课堂讨论 */} + {/* */} + + {/* + */} + + {/* */} + {/* 兴趣页面*/} + {/**/} + + + + + + + + + {/* 教学案例 */} + () + }/> + + {/* */} + {/*列表页*/} + {/**/} + {/*首页*/} + + + + {/**/} + + + + + + ); + } +} + +// moment国际化,设置为中文 +moment.defineLocale('zh-cn', { + months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), + monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'), + weekdaysMin: '日_一_二_三_四_五_六'.split('_'), + longDateFormat: { + LT: 'Ah点mm分', + LTS: 'Ah点m分s秒', + L: 'YYYY-MM-DD', + LL: 'YYYY年MMMD日', + LLL: 'YYYY年MMMD日Ah点mm分', + LLLL: 'YYYY年MMMD日ddddAh点mm分', + l: 'YYYY-MM-DD', + ll: 'YYYY年MMMD日', + lll: 'YYYY年MMMD日Ah点mm分', + llll: 'YYYY年MMMD日ddddAh点mm分' + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || + meridiem === '上午') { + return hour; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } else { + // '中午' + return hour >= 11 ? hour : hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1130) { + return '上午'; + } else if (hm < 1230) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar: { + sameDay: function () { + return this.minutes() === 0 ? '[今天]Ah[点整]' : '[今天]LT'; + }, + nextDay: function () { + return this.minutes() === 0 ? '[明天]Ah[点整]' : '[明天]LT'; + }, + lastDay: function () { + return this.minutes() === 0 ? '[昨天]Ah[点整]' : '[昨天]LT'; + }, + nextWeek: function () { + var startOfWeek, prefix; + startOfWeek = moment().startOf('week'); + prefix = this.unix() - startOfWeek.unix() >= 7 * 24 * 3600 ? '[下]' : '[本]'; + return this.minutes() === 0 ? prefix + 'dddAh点整' : prefix + 'dddAh点mm'; + }, + lastWeek: function () { + var startOfWeek, prefix; + startOfWeek = moment().startOf('week'); + prefix = this.unix() < startOfWeek.unix() ? '[上]' : '[本]'; + return this.minutes() === 0 ? prefix + 'dddAh点整' : prefix + 'dddAh点mm'; + }, + sameElse: 'LL' + }, + ordinalParse: /\d{1,2}(日|月|周)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '日'; + case 'M': + return number + '月'; + case 'w': + case 'W': + return number + '周'; + default: + return number; + } + }, + relativeTime: { + future: '%s内', + past: '%s前', + s: '几秒', + m: '1分钟', + mm: '%d分钟', + h: '1小时', + hh: '%d小时', + d: '1天', + dd: '%d天', + M: '1个月', + MM: '%d个月', + y: '1年', + yy: '%d年' + }, + week: { + // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 + dow: 1, // Monday is the first day of the week. + doy: 4 // The week that contains Jan 4th is the first week of the year. + } +}); +export default SnackbarHOC()(App); \ No newline at end of file diff --git a/app/assets/javascripts/forums.js b/app/assets/javascripts/blob.js similarity index 100% rename from app/assets/javascripts/forums.js rename to app/assets/javascripts/blob.js diff --git a/app/assets/javascripts/projects.js b/app/assets/javascripts/projects.js new file mode 100644 index 000000000..dee720fac --- /dev/null +++ b/app/assets/javascripts/projects.js @@ -0,0 +1,2 @@ +// 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/app/assets/javascripts/users/banks.js b/app/assets/javascripts/users/banks.js new file mode 100644 index 000000000..dee720fac --- /dev/null +++ b/app/assets/javascripts/users/banks.js @@ -0,0 +1,2 @@ +// 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/app/assets/stylesheets/forums.scss b/app/assets/stylesheets/blob.scss similarity index 64% rename from app/assets/stylesheets/forums.scss rename to app/assets/stylesheets/blob.scss index fafd631e1..d0d4a71e3 100644 --- a/app/assets/stylesheets/forums.scss +++ b/app/assets/stylesheets/blob.scss @@ -1,3 +1,3 @@ -// Place all the styles related to the forums controller here. +// Place all the styles related to the blob controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/projects.scss b/app/assets/stylesheets/projects.scss new file mode 100644 index 000000000..d01926666 --- /dev/null +++ b/app/assets/stylesheets/projects.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the projects controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/users/banks.scss b/app/assets/stylesheets/users/banks.scss new file mode 100644 index 000000000..6f7c19148 --- /dev/null +++ b/app/assets/stylesheets/users/banks.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the users/banks controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index d1357d43f..aa9ddebf0 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -81,8 +81,6 @@ class AccountsController < ApplicationController return normal_status(-2, "错误的账号或密码") end - @user.update_column(:last_login_on, Time.now) - successful_authentication(@user) session[:user_id] = @user.id @@ -124,7 +122,7 @@ class AccountsController < ApplicationController set_autologin_cookie(user) UserAction.create(:action_id => user.try(:id), :action_type => "Login", :user_id => user.try(:id), :ip => request.remote_ip) - + user.update_column(:last_login_on, Time.now) # 注册完成后有一天的试用申请(先去掉) # UserDayCertification.create(user_id: user.id, status: 1) end @@ -160,7 +158,7 @@ class AccountsController < ApplicationController # 发送验证码 # params[:login] 手机号或者邮箱号 - # params[:type]为事件通知类型 1:用户注册注册 2:忘记密码 3: 绑定手机 4: 绑定邮箱 # 如果有新的继续后面加 + # params[:type]为事件通知类型 1:用户注册注册 2:忘记密码 3: 绑定手机 4: 绑定邮箱, 5: 验收手机号有效 # 如果有新的继续后面加 # 发送验证码:send_type 1:注册手机验证码 2:找回密码手机验证码 3:找回密码邮箱验证码 4:绑定手机 5:绑定邮箱 # 6:手机验证码登录 7:邮箱验证码登录 8:邮箱注册验证码 9: 验收手机号有效 def get_verification_code @@ -200,7 +198,7 @@ class AccountsController < ApplicationController session[:user_id] = nil end - # type 事件类型 1:用户注册 2:忘记密码 3: 绑定手机 4: 绑定邮箱 # 如果有新的继续后面加 + # type 事件类型 1:用户注册 2:忘记密码 3: 绑定手机 4: 绑定邮箱, 5: 验证手机号是否有效 # 如果有新的继续后面加 # login_type 1:手机类型 2:邮箱类型 def verify_type login_type, type case type @@ -212,6 +210,8 @@ class AccountsController < ApplicationController login_type == 1 ? 4 : tip_exception('请填写正确的手机号') when 4 login_type == 1 ? tip_exception('请填写正确的邮箱') : 5 + when 5 + login_type == 1 ? 9 : tip_exception('请填写正确的手机号') end end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index c76ca51a7..db6ae7b57 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -39,6 +39,7 @@ class ApplicationController < ActionController::Base @user_course_identity = current_user.course_identity(@course) if @user_course_identity > Course::STUDENT && @course.is_public == 0 tip_exception(401, "..") unless User.current.logged? + check_account tip_exception(409, "您没有权限进入") end uid_logger("###############user_course_identity:#{@user_course_identity}") @@ -64,10 +65,10 @@ class ApplicationController < ActionController::Base # 发送及记录激活码 # 发送验证码:type 1:注册手机验证码 2:找回密码手机验证码 3:找回密码邮箱验证码 4:绑定手机 5:绑定邮箱 - # 6:手机验证码登录 7:邮箱验证码登录 8:邮箱注册验证码 + # 6:手机验证码登录 7:邮箱验证码登录 8:邮箱注册验证码 9:验证手机号有效 def check_verification_code(code, send_type, value) case send_type - when 1, 2, 4 + when 1, 2, 4, 9 # 手机类型的发送 sigle_para = {phone: value} status = Educoder::Sms.send(mobile: value, code: code) @@ -189,8 +190,8 @@ class ApplicationController < ActionController::Base # 资料是否完善 def check_account if !current_user.profile_completed? - info_url = '/account/profile' - tip_exception(402, info_url) + #info_url = '/account/profile' + tip_exception(402, nil) end end @@ -241,14 +242,17 @@ class ApplicationController < ActionController::Base User.current = User.find 57703 end - if params[:debug] == 'teacher' #todo 为了测试,记得讲debug删除 - User.current = User.find 81403 - elsif params[:debug] == 'student' - User.current = User.find 8686 - elsif params[:debug] == 'admin' - User.current = User.find 1 - end + # 测试版前端需求 + if request.host == "47.96.87.25" + if params[:debug] == 'teacher' #todo 为了测试,记得讲debug删除 + User.current = User.find 81403 + elsif params[:debug] == 'student' + User.current = User.find 8686 + elsif params[:debug] == 'admin' + User.current = User.find 1 + end + end # User.current = User.find 81403 end @@ -350,7 +354,7 @@ class ApplicationController < ActionController::Base logger.info("--uri_exec: .....res is #{res}") JSON.parse(res) rescue Exception => e - uid_logger("--uri_exec: exception #{e.message}") + uid_logger_error("--uri_exec: exception #{e.message}") raise Educoder::TipException.new("实训平台繁忙(繁忙等级:84)") end end diff --git a/app/controllers/bidding_users_controller.rb b/app/controllers/bidding_users_controller.rb index ad0de6587..5fbecd885 100644 --- a/app/controllers/bidding_users_controller.rb +++ b/app/controllers/bidding_users_controller.rb @@ -9,8 +9,7 @@ class BiddingUsersController < ApplicationController end def win - package = current_user.project_packages.find(params[:project_package_id]) - ProjectPackages::WinBiddingService.call(package, params) + ProjectPackages::WinBiddingService.call(current_package, current_user, params) render_ok rescue ProjectPackages::WinBiddingService::Error => ex render_error(ex.message) diff --git a/app/controllers/blob_controller.rb b/app/controllers/blob_controller.rb new file mode 100644 index 000000000..bba1efb5f --- /dev/null +++ b/app/controllers/blob_controller.rb @@ -0,0 +1,12 @@ +class BlobController < ApplicationController + def new + commit unless @repository.empty? + end + + def create + create_commit(Files::CreateService, success_path: after_create_path, + failure_view: :new, + failure_path: namespace_project_new_blob_path(@project.namespace, @project, @ref)) + end + +end diff --git a/app/controllers/callbacks/aliyun_vods_controller.rb b/app/controllers/callbacks/aliyun_vods_controller.rb new file mode 100644 index 000000000..cd385995d --- /dev/null +++ b/app/controllers/callbacks/aliyun_vods_controller.rb @@ -0,0 +1,24 @@ +class Callbacks::AliyunVodsController < Callbacks::BaseController + before_action :check_signature_valid! + + def create + Videos::DispatchCallbackService.call(params) + render_ok + end + + private + + def check_signature_valid! + return if AliyunVod::Sign.verify?(header_signature, header_timestamp) + + render_not_acceptable + end + + def header_timestamp + request.headers['X-VOD-TIMESTAMP'] + end + + def header_signature + request.headers['X-VOD-SIGNATURE'] + end +end \ No newline at end of file diff --git a/app/controllers/callbacks/base_controller.rb b/app/controllers/callbacks/base_controller.rb new file mode 100644 index 000000000..42e1ae972 --- /dev/null +++ b/app/controllers/callbacks/base_controller.rb @@ -0,0 +1,5 @@ +class Callbacks::BaseController < ActionController::Base + include RenderHelper + + skip_before_action :verify_authenticity_token +end \ No newline at end of file diff --git a/app/controllers/challenges_controller.rb b/app/controllers/challenges_controller.rb index fdaa30305..9e87d3799 100644 --- a/app/controllers/challenges_controller.rb +++ b/app/controllers/challenges_controller.rb @@ -1,5 +1,5 @@ class ChallengesController < ApplicationController - before_action :require_login, :check_auth + before_action :require_login, :check_auth, except: [:index] before_action :find_shixun, only: [:new, :create, :index] skip_before_action :verify_authenticity_token, only: [:create, :update, :create_choose_question, :crud_answer] before_action :find_challenge, only: [:edit, :show, :update, :create_choose_question, :index_down, :index_up, @@ -151,10 +151,11 @@ class ChallengesController < ApplicationController def index uid_logger("identifier: #{params}") - @challenges = Challenge.fields_for_list.where(shixun_id: @shixun.id) + @challenges = @shixun.challenges.fields_for_list @editable = @shixun.status == 0 # before_action:有判断权限,如果没发布,则肯定是管理人员 @user = current_user + @shixun.increment!(:visits) end def show diff --git a/app/controllers/concerns/render_helper.rb b/app/controllers/concerns/render_helper.rb index 5ea73e666..0307bd4c9 100644 --- a/app/controllers/concerns/render_helper.rb +++ b/app/controllers/concerns/render_helper.rb @@ -7,6 +7,10 @@ module RenderHelper render json: { status: -1, message: message } end + def render_not_acceptable(message = '请求已拒绝') + render json: { status: 406, message: message } + end + def render_not_found(message = I18n.t('error.record_not_found')) render json: { status: 404, message: message } # render status: 404, json: { errors: errors } diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index abc3e4856..75d515186 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -49,30 +49,12 @@ class CoursesController < ApplicationController @user = current_user # 根据分类查询课堂(全部,我的,最新,最热) @order = params[:order].present? ? params[:order] : "all" - order_str = @order != "course_members_count" && @order != "created_at" ? "updated_at" : @order - - # if @order == "all" - # @course = Course.where(is_delete: 0, is_hidden: 0).select("select c.name, c.id, s.name, u.login, ifnull(concat(u.lastname,u.firstname), - # u.login), s.name from courses c, users u, user_extensions ue, schools s where c.is_delete=0 and - # c.tea_id=u.id and u.id=ue.user_id and ue.school_id=s.id") - - # @courses = Course.where(is_delete: 0, is_hidden: 0) - # .order("courses.id = 1309 desc, courses.created_at desc") - - # @courses = Course.where(is_delete: 0, is_hidden: 0).select("courses.id, courses.tea_id, courses.name, courses.exercises_count, courses.polls_count, - # courses.is_public, courses.is_end, courses.visits, courses.course_members_count,courses.homework_commons_count,(SELECT MAX(created_at) - # FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a") - # .order("courses.id = 1309 desc, a desc") - if @order == "mine" - tip_exception(401, "..") unless current_user.logged? - @courses = Course.joins(:course_members) - .where("is_delete = 0 AND is_hidden = 0 AND course_members.user_id = ?", @user.id).distinct - elsif @order == "created_at" - # REDO:Extension - @courses = Course.where(is_delete: 0, is_hidden: 0, is_end: 0).distinct + if @order == "visits" + order_str = "courses.id = 1309 DESC, courses.visits DESC" + @courses = Course.where(is_delete: 0, is_hidden: 0) else - # REDO:Extension - @courses = Course.where(is_delete: 0, is_hidden: 0).distinct + order_str = "courses.id = 1309 DESC, courses.homepage_show DESC, courses.created_at desc" + @courses = Course.where(is_delete: 0, is_hidden: 0, is_end: 0) end # 根据搜索关键字进一步筛选 @@ -92,7 +74,7 @@ class CoursesController < ApplicationController .where("#{sql}", keyword: "%#{params[:search]}%").distinct end @courses_count = @courses.count("courses.id") - @courses = @courses.order("courses.id = 1309 DESC, courses.#{order_str} DESC") + @courses = @courses.order(order_str) # 分页 page = params[:page] || 1 @@ -234,6 +216,8 @@ class CoursesController < ApplicationController def destroy if @course.is_delete == 0 @course.delete! + Tiding.create!(user_id: @course.tea_id, trigger_user_id: 1, container_id: @course.id, + container_type: 'Course', tiding_type: 'Delete', extra: @course.name) normal_status(0, "成功") else normal_status(-1, "课堂已删除,无需重复操作") @@ -296,7 +280,13 @@ class CoursesController < ApplicationController @applications = CourseMessage.unhandled_join_course_requests_by_course(@course). joins("join users on course_messages.course_message_id=users.id"). where("LOWER(concat(users.lastname, users.firstname)) LIKE ?", "%#{search_str}%") - @teacher_list_size = @course.teachers.size + if @course.try(:id) != 1309 || current_user.admin? || current_user.try(:id) == 15582 + teacher_list = @course.course_members.where("course_members.role in (1, 2, 3)") + else + teacher_list = @course.course_members.where("(course_members.role in (1, 3) or (course_members.user_id = #{current_user.id} + and course_members.role = 2))") + end + @teacher_list_size = teacher_list.size @applications_size = CourseMessage.unhandled_join_course_requests_by_course(@course).size @is_admin = @user_course_identity < Course::PROFESSOR end @@ -909,6 +899,7 @@ class CoursesController < ApplicationController CourseAddStudentCreateWorksJob.perform_later(course.id, [current_user.id]) StudentJoinCourseNotifyJob.perform_later(current_user.id, course.id) end + student_role = 1 end # 创建教师身份 @@ -921,24 +912,33 @@ class CoursesController < ApplicationController course_message = CourseMessage.new(course_id: course.id, user_id: course.tea_id, status: 0, course_message_id: current_user.id, course_message_type: "JoinCourseRequest", viewed: false) - course_message.content = 2 if params[:professor].present? && params[:professor].to_i == 1 - course_message.content = 3 if params[:assistant_professor].present? && params[:assistant_professor].to_i == 1 + if params[:professor].present? && params[:professor].to_i == 1 + course_message.content = 2 + role = 9 + message = "教师申请已提交,请等待审核" + else + course_message.content = 3 + role = 7 + message = "助教申请已提交,请等待审核" + end course_message.save! - role = course_message.content == 2 ? '7' : '9' # 7:助教 9:教师 + # role = course_message.content == 2 ? '9' : '7' # 7:助教 9:教师 ApplyTeacherRoleJoinCourseNotifyJob.perform_later(current_user.id, course.id, role) - message = "#{course_message.content == 2 ? '助教' : '教师'}申请已提交,请等待审核" + # message = "#{course_message.content == 2 ? '教师' : '助教'}申请已提交,请等待审核" else - message = "#{existing_course_message.content == 2 ? '助教' : '教师'}申请已提交,请等待审核" + message = "#{existing_course_message.content == '2' ? '教师' : '助教'}申请已提交,请等待审核" end + else + message = "您已是课堂成员" end teacher_role = 1 end - if teacher_role && current_user.student_of_course?(course) + if teacher_role && student_role render json: { status: 0, message: message, course_id: course.id} - elsif current_user.student_of_course?(course) + elsif student_role render json: { status: 0, message: "加入成功", course_id: course.id} else normal_status(message) @@ -1154,6 +1154,12 @@ class CoursesController < ApplicationController #课堂的作业信息 shixun_homeworks = homeworks.search_homework_type(4) #全部实训作业 shixun_titles = shixun_homeworks.pluck(:name) + ["总得分"] + + # 更新实训作业成绩 + shixun_homeworks.includes(:homework_challenge_settings, :published_settings, :homework_commons_shixun).each do |homework| + homework.update_homework_work_score + end + shixun_homeworks = shixun_homeworks&.includes(score_student_works: :user) common_homeworks = homeworks.search_homework_type(1) #全部普通作业 diff --git a/app/controllers/discusses_controller.rb b/app/controllers/discusses_controller.rb index 3b987be51..6ddf71ba4 100644 --- a/app/controllers/discusses_controller.rb +++ b/app/controllers/discusses_controller.rb @@ -1,7 +1,8 @@ class DiscussesController < ApplicationController LIMIT = 10 + before_action :require_login, only: [:create, :reply, :hidden, :reward_code, :plus, :destroy] before_action :find_container, only: [:index, :hidden] - before_action :find_discuss, except: [:create, :index, :new_message, :reward_code] + before_action :find_discuss, except: [:create, :index, :new_message, :reward_code, :forum_discusses, :plus] def index page = params[:page].to_i @@ -28,6 +29,48 @@ class DiscussesController < ApplicationController @current_user = current_user end + def forum_discusses + page = params[:page] || 1 + limit = params[:limit] || 15 + offset = (page.to_i-1) * limit + search = params[:search] + tag = params[:tag_repertoire_id] + sql, sql1, sql2 = '', '', '' + sql1 = + unless search.blank? + "and d.content like '%#{search}%'" + end + + sql2 = + if tag + shixun_ids = ShixunTagRepertoire.where(:tag_repertoire_id => tag).pluck(:shixun_id) + "and d.dis_id in(#{shixun_ids.join(",")})" + end + + sql = "select d.id from discusses d join shixuns s on d.dis_id = s.id where s.status = 2 and s.hidden = false and d.root_id is null + and d.hidden = false #{sql1} #{sql2} order by d.created_at desc" + + memo_ids = Discuss.find_by_sql(sql).pluck(:id) + @memo_count = memo_ids.size + memo_ids = memo_ids[offset, limit] + order_ids = memo_ids.size > 0 ? memo_ids.join(',') : -1 + @memos = Discuss.where(id: memo_ids).order("field(id,#{order_ids})").includes(:praise_treads, dis: :tag_repertoires, user: :user_extension) + # @memos = memos.includes(:praise_treads, user: :user_extension).page(page).per(limit) + # 实训标签使用最多的9个 + # @hot_tags = TagRepertoire.find_by_sql("select distinct(a.name), a.id from + # (select tr.id, tr.name, count(d.dis_id) cnt + # from tag_repertoires tr join (shixun_tag_repertoires str + # left join (shixuns s join discusses d on d.dis_id = s.id) + # on s.id = str.shixun_id) on tr.id = str.tag_repertoire_id + # group by d.dis_id order by cnt desc) a limit 9").map{|ht| ht.attributes.dup} + tag_id = ShixunTagRepertoire.joins(:shixun).order("myshixuns_count desc").pluck(:tag_repertoire_id).uniq.first(9) + @hot_tags = TagRepertoire.select([:id, :name]).where(id: tag_id).order("FIELD(id, #{tag_id.join(",")})").map{|ht| ht.attributes.dup} if tag_id + + @memos = DiscussesService.new.memo_list @memos + @hot_memos = Memo.field_for_recommend.posts.hot.includes(:tag_repertoires).limit(4) + @recommend_shixuns = DiscussesService.new.recommends + end + def new_message onclick_time = Myshixun.find(params[:myshixun_id]).try(:onclick_time) ids = Discuss.where(user_id: User.current.id, dis_id: params[:container_id], dis_type: params[:container_type]). diff --git a/app/controllers/exercises_controller.rb b/app/controllers/exercises_controller.rb index 6f121db5f..e92c3b266 100644 --- a/app/controllers/exercises_controller.rb +++ b/app/controllers/exercises_controller.rb @@ -703,12 +703,14 @@ class ExercisesController < ApplicationController end if ex_status == 1 #如果试卷存在已发布的,或者是已截止的,那么则直接跳过 g_course = params[:group_ids] #表示是否传入分班参数,如果传入分班的参数,那么试卷的统一设置需修改 + tiding_group_ids = g_course if g_course user_course_groups = @course.charge_group_ids(current_user) if g_course.map(&:to_i).sort == user_course_groups.sort # 如果是设置为全部班级,则试卷不用分组,且试卷设定为统一设置,否则则分组设置 exercise.exercise_group_settings.destroy_all ex_unified = true e_time = ex_end_time + tiding_group_ids = [] else ex_unified = false g_course.each do |i| @@ -748,7 +750,7 @@ class ExercisesController < ApplicationController if exercise.course_acts.size == 0 exercise.course_acts << CourseActivity.new(:user_id => exercise.user_id,:course_id => exercise.course_id) end - ExercisePublishNotifyJob.perform_later(exercise.id, g_course) + ExercisePublishNotifyJob.perform_later(exercise.id, tiding_group_ids) end end end @@ -1084,6 +1086,7 @@ class ExercisesController < ApplicationController :subjective_score => subjective_score } @answer_committed_user.update_attributes(commit_option) + CommitExercsieNotifyJobJob.perform_later(@exercise.id, current_user.id) normal_status(0,"试卷提交成功!") end rescue Exception => e diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index d090ae253..2cfa61cc9 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -17,8 +17,8 @@ class FilesController < ApplicationController sort_type = params[:sort_type] || 'created_on' # created_on:时间排序, downloads:下载次数排序; quotes: 引用次数排序 course_second_category_id = params[:course_second_category_id] || 0 # 0: 为主目录, 其他为次目录id @user = current_user - @attachments = @course.attachments.by_course_second_category_id(course_second_category_id) - .includes(attachment_group_settings: :course_group, author: [:user_extension, :course_members]) + @attachments = course_second_category_id.to_i == 0 ? @course.attachments : @course.attachments.by_course_second_category_id(course_second_category_id) + @attachments = @attachments.includes(attachment_group_settings: :course_group, author: [:user_extension, :course_members]) .ordered(sort: sort.to_i, sort_type: sort_type.strip) get_category(@course, course_second_category_id) diff --git a/app/controllers/forums_controller.rb b/app/controllers/forums_controller.rb deleted file mode 100644 index 82573fdd0..000000000 --- a/app/controllers/forums_controller.rb +++ /dev/null @@ -1,2 +0,0 @@ -class ForumsController < ApplicationController -end diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index b3b062c1a..828198def 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -467,13 +467,13 @@ class GamesController < ApplicationController path = params[:path] game_code = GameCode.where(:game_id => @game.try(:id), :path => path).first if game_code.present? - content = game_code.try(:new_code) + @content = game_code.try(:new_code) # @content = if @myshixun.mirror_name.select{|a| a.include?("MachineLearning") || a.include?("Python")}.present? && content.present? # content.gsub(/\t/, ' ') # else # content # end - update_file_content(content, @myshixun.repo_path, path, current_user.git_mail, current_user.real_name, "game passed reset") + update_file_content(@content, @myshixun.repo_path, path, current_user.git_mail, current_user.real_name, "game passed reset") else tip_exception("代码重置失败,代码为空") end @@ -494,17 +494,10 @@ class GamesController < ApplicationController path = path.try(:strip) uid_logger("--rep_content: path is #{path}") begin - if @myshixun.repo_name.nil? - g = Gitlab.client - repo_name = g.project(@myshixun.gpid).path_with_namespace - @myshixun.update_column(:repo_name, repo_name) - @content = git_fle_content("#{repo_name}.git", path) || "" - else - @content = git_fle_content(@myshixun.repo_path, path) || "" - end - + @content = git_fle_content(@myshixun.repo_path, path) || "" rescue Exception => e # 思路: 异常首先应该考虑去恢复 + # retry为1表示已经轮训完成后还没有解决问题,这个时候需要检测异常 if params[:retry].to_i == 1 begin # 如果模板没有问题,则通过中间层检测实训仓库是否异常 @@ -542,7 +535,7 @@ class GamesController < ApplicationController end end end - # 有异常,版本库获取不到代码,前端轮训30S后,调用retry == 1 + # 有异常,版本库获取不到代码,前端轮训15S后,调用retry == 1 tip_exception(0, e.message) end end diff --git a/app/controllers/homework_commons_controller.rb b/app/controllers/homework_commons_controller.rb index f7906ecda..ff1ee4e96 100644 --- a/app/controllers/homework_commons_controller.rb +++ b/app/controllers/homework_commons_controller.rb @@ -255,29 +255,7 @@ class HomeworkCommonsController < ApplicationController def update_score tip_exception("作业还未发布,暂不能计算成绩") if @homework.publish_time.nil? || @homework.publish_time > Time.now begin - if @homework.unified_setting - student_works = @homework.student_works - user_ids = @course.students.pluck(:user_id) - else - user_ids = @course.students.where(course_group_id: @homework.published_settings.pluck(:course_group_id)).pluck(:user_id) - student_works = @homework.student_works.where(user_id: user_ids) - end - - student_works = student_works.includes(:challenge_work_scores) - - challenge_settings = @homework.homework_challenge_settings - challenge_setting_ids = challenge_settings.pluck(:challenge_id) - myshixuns = Myshixun.where(shixun_id: @homework.homework_commons_shixun&.shixun_id, user_id: user_ids).includes(:games) - myshixuns.find_each(batch_size: 100) do |myshixun| - work = student_works.select{|work| work.user_id == myshixun.user_id}.first - if work && myshixun - games = myshixun.games.select{|game| challenge_setting_ids.include?(game.challenge_id)} - HomeworksService.new.update_myshixun_work_score work, myshixun, games, @homework, challenge_settings - end - end - HomeworksService.new.update_student_eff_score @homework if (@homework.allow_late && @homework.late_time < Time.now) || - (!@homework.allow_late && @homework.end_time < Time.now) - @homework.update_attribute('calculation_time', Time.now) + @homework.update_homework_work_score normal_status("更新成功") rescue Exception => e uid_logger(e.message) @@ -336,7 +314,7 @@ class HomeworkCommonsController < ApplicationController @messages = @messages.parent_comment end - @messages = @messages.page(@page).per(@limit).order("created_on desc") + @messages = @messages.includes(:praise_treads).page(@page).per(@limit).order("created_on desc") end def reference_answer @@ -1347,6 +1325,7 @@ class HomeworkCommonsController < ApplicationController def group_list @page = params[:page] || 1 @limit = params[:limit] || 10 + @course_member_count = @course.course_groups.count @course_groups = @course.course_groups.page(@page).per(@limit) @ungroup_user_ids = @course.course_members.ungroup_students.pluck(:user_id) end @@ -1357,7 +1336,7 @@ class HomeworkCommonsController < ApplicationController shixun = @homework.shixuns.take # 通过代码文件来判断语言 language = shixun.challenges.practice_type.pluck(:path).first - language = language.split(";")[0].split(".")[1].downcase if language.present? + language = language.split(";")[0].split(".").last.downcase if language.present? user_lists = [] if language.present? && (language == "java" || language == "py") user_ids = @course.course_members.where(course_group_id: params[:group_ids]).distinct(:user_id).pluck(:user_id) @@ -1480,7 +1459,8 @@ class HomeworkCommonsController < ApplicationController if game_codes.count > 0 code_rate += game_codes.map(&:rate).sum / challenge.path.split(";").length end - target = game_codes.count > 0 ? game_codes[0].target_user_id : nil + logger.info("#####game_codes: #{game_codes}") + #target = game_codes.count > 0 ? game_codes[0].target_user_id : nil # 作品完成时间 game = challenge.games.find_by(user_id: @user.id) end_time = game.end_time @@ -1488,7 +1468,7 @@ class HomeworkCommonsController < ApplicationController all_score = homework_challenge_settings.find_by(challenge_id: challenge.id).try(:score).to_f final_score = @student_work.work_challenge_score game, all_score # 抄袭用户 - copy_user = User.find_by_id(game_codes[0].target_user_id) + copy_user = User.find_by_id(game_codes[0].try(:target_user_id)) copy_end_time = copy_user.games.find_by(challenge_id: challenge.id).try(:end_time) if copy_user.present? # 代码部分 code_list = [] @@ -1498,7 +1478,7 @@ class HomeworkCommonsController < ApplicationController code_list << {path: path, origin_content: info.origin_content, target_content: info.target_content} end end - + # TODO: 这里本来应该前端做的,但是现在页面已经刷不开了。 {code_rate: code_rate, copy_user_id: copy_user.try(:id), end_time: end_time, final_score: final_score, all_score: all_score, copy_end_time: copy_end_time, copy_username: copy_user.try(:full_name), username: game.user.full_name, code_list: code_list, subject: challenge.subject, position: challenge.position, diff --git a/app/controllers/libraries_controller.rb b/app/controllers/libraries_controller.rb index 55894aaa6..a2e70d95a 100644 --- a/app/controllers/libraries_controller.rb +++ b/app/controllers/libraries_controller.rb @@ -2,7 +2,8 @@ class LibrariesController < ApplicationController include PaginateHelper before_action :require_login, :check_auth, except: %i[index show] - + before_action :check_account, except: %i[index show] + after_action :increment_visit_count, only: [:show, :edit, :update] helper_method :current_library, :library_manageable? def index @@ -22,7 +23,7 @@ class LibrariesController < ApplicationController end @count = libraries.count - @libraries = paginate libraries.includes(:library_tags, :praise_tread_cache, user: :user_extension) + @libraries = paginate libraries.includes(:library_tags, user: :user_extension) ids = @libraries.map(&:id) @download_count_map = Attachment.where(container_type: 'Library', container_id: ids) @@ -38,7 +39,7 @@ class LibrariesController < ApplicationController def create library = current_user.libraries.new Libraries::SaveService.call(library, current_user, save_params) - render_ok + render_ok({id: library.id}) rescue Libraries::SaveService::Error => ex render_error(ex.message) end @@ -47,7 +48,7 @@ class LibrariesController < ApplicationController return render_forbidden unless library_manageable?(current_library) Libraries::SaveService.call(current_library, current_user, save_params) - render_ok + render_ok({id: current_library.id}) rescue Libraries::SaveService::Error => ex render_error(ex.message) end @@ -80,6 +81,10 @@ class LibrariesController < ApplicationController current_user&.id == library.user_id || admin_or_business? end + def increment_visit_count + current_library.increment_visited_count! if current_library && current_library.id + end + def save_params params.permit(:title, :content, :author_name, :author_school_name, :cover_id, :publish, attachment_ids: [], tag_ids: []) diff --git a/app/controllers/memos_controller.rb b/app/controllers/memos_controller.rb index 869d787db..88139fe7e 100644 --- a/app/controllers/memos_controller.rb +++ b/app/controllers/memos_controller.rb @@ -1,5 +1,10 @@ class MemosController < ApplicationController - before_action :set_memo, only: [:show, :edit, :update, :destroy] + before_action :require_login, except: [:show, :index] + before_action :check_account, only: [:new, :create] + before_action :set_memo, only: [:show, :edit, :update, :destroy, :sticky_or_cancel, :hidden, :more_reply] + before_action :validate_memo_params, only: [:create, :update] + before_action :owner_or_admin, only: [:edit, :update, :destroy] + before_action :require_business, only: [:sticky_or_cancel, :hidden] include ApplicationHelper # GET /memos @@ -8,27 +13,21 @@ class MemosController < ApplicationController @user = current_user @memos = Memo.all s_order = (params[:order] == "replies_count" ? "all_replies_count" : params[:order]) || "updated_at" - #@tidding_count = unviewed_tiddings(current_user) if current_user.present? - page = params[:page].to_i + # @tidding_count = unviewed_tiddings(current_user) if current_user.present? + page = params[:page] || 1 + limit = params[:limit] || 15 search = params[:search] - offset = page * 15 forum_id = params[:forum] - user_id = params[:user_id] - if user_id == -1 - user_id = current_user.try(:id) - end tag_repertoire_id = params[:tag_repertoire_id] sql = if forum_id - search ? "forum_id = #{forum_id} and root_id is null and subject like '%#{search}%'" : + !search.blank? ? "forum_id = #{forum_id} and root_id is null and subject like '%#{search}%'" : "forum_id = #{forum_id} and root_id is null" - elsif search - user_id ? "author_id = #{user_id.to_i} and forum_id in(3, 5) and root_id is null and subject like '%#{search}%'" : - "forum_id in(3, 5) and root_id is null and subject like '%#{search}%'" + elsif !search.blank? + "forum_id in(3, 5) and root_id is null and subject like '%#{search}%'" else - user_id ? "author_id = #{user_id.to_i} and forum_id in(3, 5) and root_id is null" : - "forum_id in(3, 5) and root_id is null" + "forum_id in(3, 5) and root_id is null" end if tag_repertoire_id @@ -41,27 +40,27 @@ class MemosController < ApplicationController sql += " and all_replies_count != 0" end - memos = Memo.field_for_list.includes(:praise_tread, :author).where("#{sql}") + memos = Memo.field_for_list.where("#{sql}") @memos_count = memos.length - @memos = memos.order("sticky = 1 desc, #{Memo.table_name}.#{s_order} desc").offset(offset).limit(15) - @my_memos_count = Memo.user_posts(current_user.try(:id)).count + @memos = memos.order("sticky = 1 desc, #{Memo.table_name}.#{s_order} desc").page(page).per(limit) + @memos = @memos.includes(:praise_treads, :tag_repertoires, author: :user_extension) + # @my_memos_count = Memo.user_posts(current_user.try(:id)).count @tags_info = MemoTagRepertoire.find_by_sql("SELECT tag_repertoire_id, tr.name, count(*) cnt FROM memo_tag_repertoires mtr join tag_repertoires tr on tr.id = mtr.tag_repertoire_id group by tag_repertoire_id order by cnt desc, tag_repertoire_id desc limit 9") - @hot_memos = Memo.field_for_recommend.posts.hot.limit(4) + @hot_memos = Memo.field_for_recommend.posts.hot.includes(:tag_repertoires).limit(4) + @recommend_shixuns = DiscussesService.new.recommends end - # GET /memos/1 # GET /memos/1.json def show # tidding_count = unviewed_tiddings(current_user) if current_user @user = current_user - # TODO 附件最后再做 - # attachments_list = @memo.update_column(:viewed_count, @memo.viewed_count+1) - @memos = @memo.reply_for_memo.includes(:praise_tread, :author).order("created_at desc").limit(10) - + @memos = @memo.reply_for_memo.includes(:praise_treads, author: :user_extension).order("created_at desc").limit(10) + @attachments = @memo.attachments + @recommend_shixuns = DiscussesService.new.recommends end # GET /memos/new @@ -71,43 +70,44 @@ class MemosController < ApplicationController # GET /memos/1/edit def edit + @tag_list = TagRepertoire.field_for_list.order("name asc") + @memo_tags = @memo.tag_repertoires.field_for_list + @attachments = @memo.attachments end - # POST /memos # POST /memos.json def create ActiveRecord::Base.transaction do begin @memo = Memo.new(memo_params) @memo.author = current_user - # TODO 保存附件 - # @memo.save_attachments(params[:attachments]) if params[:attachments] @memo.save! + Attachment.associate_container(params[:attachment_ids], @memo.id, @memo.class.name) params[:tags].each do |tag| - MemoTagRepertoire.create(:memo_id => @memo.id, :tag_repertoire_id => tag) + MemoTagRepertoire.create!(memo_id: @memo.id, tag_repertoire_id: tag) end - @status = 0 - @message = "帖子创建成功!" + render :json => {memo_id: @memo.id, status: 0, message: "帖子创建成功"} rescue Exception => e - @status = -1 - @message = "帖子创建失败,原因:#{e}" + tip_exception("帖子创建失败,原因:#{e}") raise ActiveRecord::Rollback end end - - end - # PATCH/PUT /memos/1 # PATCH/PUT /memos/1.json def update - respond_to do |format| - if @memo.update(memo_params) - format.html { redirect_to @memo, notice: 'Memo was successfully updated.' } - format.json { render :show, status: :ok, location: @memo } - else - format.html { render :edit } - format.json { render json: @memo.errors, status: :unprocessable_entity } + ActiveRecord::Base.transaction do + begin + @memo.update_attributes!(memo_params) + Attachment.associate_container(params[:attachment_ids], @memo.id, @memo.class.name) + @memo.memo_tag_repertoires.destroy_all + params[:tags].each do |tag| + MemoTagRepertoire.create!(memo_id: @memo.id, tag_repertoire_id: tag) + end + normal_status("帖子更新成功") + rescue Exception => e + tip_exception("帖子更新失败,原因:#{e}") + raise ActiveRecord::Rollback end end end @@ -116,21 +116,83 @@ class MemosController < ApplicationController # DELETE /memos/1.json def destroy @memo.destroy - respond_to do |format| - format.html { redirect_to memos_url, notice: 'Memo was successfully destroyed.' } - format.json { head :no_content } + normal_status("删除成功") + end + + def sticky_or_cancel + tip_exception("只能对主贴进行置顶操作") unless @memo.parent_id.nil? + begin + @memo.update_attributes!(sticky: !@memo.sticky) + normal_status("更新成功") + rescue Exception => e + tip_exception("更新失败,原因:#{e}") + raise ActiveRecord::Rollback end end - private - # Use callbacks to share common setup or constraints between actions. - def set_memo - @memo = Memo.find(params[:id]) + def hidden + tip_exception("不能对主贴进行隐藏操作") if @memo.parent_id.nil? + begin + @memo.update_attributes!(hidden: @memo.hidden == 0 ? 1 : 0) + normal_status("更新成功") + rescue Exception => e + tip_exception("更新失败,原因:#{e}") + raise ActiveRecord::Rollback end + end - # Never trust parameters from the scary internet, only allow the white list through. - def memo_params - params.fetch(:memo, {}) + def reply + tip_exception("parent_id不能为空") if params[:parent_id].blank? + tip_exception("content不能为空") if params[:content].blank? + + ActiveRecord::Base.transaction do + begin + memo = Memo.find_by!(id: params[:parent_id]) + @reply = Memo.new + @reply.content = params[:content] + @reply.author = current_user + @reply.forum_id = memo.forum_id + @reply.subject = memo.subject + @reply.root_id = memo.root_id || memo.id + memo.children << @reply + m = Memo.find_by!(id: @reply.root_id) + m.update_attributes!(all_replies_count: m.all_replies_count + 1) + rescue Exception => e + tip_exception("回复失败,原因:#{e}") + raise ActiveRecord::Rollback + end end + end + + def more_reply + @user = current_user + page = params[:page] || 2 + limit = params[:limit] || 10 + offset = (page.to_i - 1) * limit + @memos_count = Memo.where(parent_id: @memo.id).count + @memos = Memo.limit(limit).where(parent_id: @memo.id).includes(:author, :praise_treads).order("created_at desc").offset(offset) + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_memo + @memo = Memo.find(params[:id]) + end + + def owner_or_admin + tip_exception(403, "无权限操作") unless @memo.author == current_user || current_user.admin? || current_user.business? + end + + # Never trust parameters from the scary internet, only allow the white list through. + def memo_params + params.require(:memo).permit(:subject, :content, :forum_id) + end + + def validate_memo_params + tip_exception("话题名称不能为空") if params[:subject].blank? + tip_exception("话题内容不能为空") if params[:content].blank? + tip_exception("话题类型不能为空") if params[:forum_id].blank? + tip_exception("技术标签不能为空") if params[:forum_id].to_i == 5 && params[:tags].blank? + end end diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index 1d6b15969..c36ad09b6 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -265,9 +265,10 @@ class MyshixunsController < ApplicationController # params[:evaluate] 实训评测时更新必须给的参数,需要依据该参数做性能统计,其它类型的更新可以跳过 # 自动保存的时候evaluate为0;点评测的时候为1 if params[:evaluate] == 1 + exec_time = game.challenge.try(:exec_time) @sec_key = generate_identifier(EvaluateRecord, 12) record = EvaluateRecord.create!(:user_id => current_user.id, :shixun_id => @myshixun.shixun_id, :game_id => game_id, - :identifier => @sec_key) + :identifier => @sec_key, :exec_time => exec_time) uid_logger("-- game build: file update #{@sec_key}, record id is #{record.id}, time is **** #{Time.now.strftime("%Y-%m-%d %H:%M:%S.%L")}") end unless @hide_code diff --git a/app/controllers/polls_controller.rb b/app/controllers/polls_controller.rb index 7d978d722..ba3030424 100644 --- a/app/controllers/polls_controller.rb +++ b/app/controllers/polls_controller.rb @@ -919,6 +919,7 @@ class PollsController < ApplicationController :end_at => Time.now } poll_user_current.update_attributes(poll_user_params) + CommitPollNotifyJobJob.perform_later(@poll.id, current_user.id) normal_status(0, "问卷提交成功!") end ## 需添加发送消息的接口,稍后添加 diff --git a/app/controllers/project_packages_controller.rb b/app/controllers/project_packages_controller.rb index de896c920..3cc7e79cb 100644 --- a/app/controllers/project_packages_controller.rb +++ b/app/controllers/project_packages_controller.rb @@ -1,7 +1,7 @@ class ProjectPackagesController < ApplicationController include PaginateHelper - before_action :require_login, :check_auth, only: %i[create update destroy] + before_action :require_login, :check_auth, only: %i[show create update destroy] helper_method :current_package, :package_manageable? diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index c9ed6c597..672477790 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -1,10 +1,2 @@ class ProjectsController < ApplicationController - def search - query_params = { keyword: params[:keyword], category: 'manage' } - projects = Users::ProjectService.new(current_user, query_params).call - - params[:limit] = params[:per_page].to_i.zero? ? 20 : params[:per_page].to_i - @count = projects.count - @projects = paginate projects - end end \ No newline at end of file diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 26effd12e..fb999b879 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -2,10 +2,10 @@ class ShixunsController < ApplicationController include ShixunsHelper include ApplicationHelper - before_action :require_login, :check_auth, except: [:download_file, :index, :menus] + before_action :require_login, :check_auth, except: [:download_file, :index, :menus, :show, :show_right, :ranking_list, + :discusses, :collaborators, :fork_list, :propaedeutics] before_action :check_account, only: [:new, :create, :shixun_exec] - before_action :check_auth, except: [:download_file, :index, :menus] before_action :find_shixun, :shixun_access_allowed, except: [:index, :new, :create, :menus, :get_recommend_shixuns, :propaedeutics, :departments, :apply_shixun_mirror, @@ -164,7 +164,7 @@ class ShixunsController < ApplicationController @new_shixun = Shixun.new @new_shixun.attributes = @shixun.attributes.dup.except("id","user_id","visits","gpid","status", "identifier", "averge_star", "homepage_show","repo_name", "myshixuns_count", "challenges_count", - "can_copy") + "can_copy", "created_at", "updated_at") @new_shixun.user_id = User.current.id @new_shixun.averge_star = 5 @new_shixun.identifier = generate_identifier Shixun, 8 @@ -406,20 +406,19 @@ class ShixunsController < ApplicationController end end @shixun.update_attributes(shixun_params) + logger.info("##########shixun_info_params: #{shixun_info_params}") + logger.info("##########params[:shixun_info][:evaluate_script]: #{params[:shixun_info][:evaluate_script]}") @shixun.shixun_info.update_attributes(shixun_info_params) @shixun.shixun_schools.delete_all - if params[:scope_partment].present? && params[:user_scope].to_i == 1 + # scope_partment: 高校的名称 + if params[:scope_partment].present? arr = [] ids = School.where(:name => params[:scope_partment]).pluck(:id).uniq ids.each do |id| arr << { :school_id => id, :shixun_id => @shixun.id } end ShixunSchool.create!(arr) - use_scope = 1 - else - use_scope = 0 end - @shixun.update_attributes!(:use_scope => use_scope) # 超级管理员和运营人员才能保存 中间层服务器pod信息的配置 if current_user.admin? || current_user.business? @shixun.shixun_service_configs.destroy_all @@ -515,6 +514,103 @@ class ShixunsController < ApplicationController # 以前在开启挑战的时候检测实训是否更新,更新则重置,觉得应该放在TPI更好 # 中间需要一个过渡动画 # TODO: 第一次开启实训都会去判断是否是纯选择题类型,感觉做成在创建关卡的时候就判断该实训是否是纯选择题更加合适 + def shixun_exec + if is_shixun_opening? + tip_show_exception(-3, "#{@shixun.opening_time.strftime('%Y-%m-%d %H:%M:%S')}") + end + current_myshixun = @shixun.current_myshixun(current_user.id) + + min_challenges = @shixun.challenges.pluck(:id , :st) + + Rails.logger.info("11111111112#{current_myshixun.try(:id)}") + Rails.logger.info("111111111102#{params[:reset] != 1}") + + # 因为读写分离有延迟,所以如果是重置来的请求可以先跳过,重置过来的params[:reset]为1 + if current_myshixun && params[:reset] != "1" + games = current_myshixun.games + # 如果TPM和TPI的管卡数不相等或者关卡顺序错了,说明实训被极大的改动,需要重置,实训发布前打过的实训都需要重置 + if is_shixun_reset?(games, min_challenges, current_myshixun) + # 这里页面弹框要收到 当前用户myshixun的identifier. + tip_show_exception("/myshixuns/#{current_myshixun.try(:identifier)}/reset_my_game") + end + + # 如果存在实训,则直接进入实训 + # 如果实训允许跳关,传参params[:challenge_id]跳入具体的关卡 + @current_task = + if params[:challenge_id] + game = games.where(challenge_id: params[:challenge_id]).take + if @shixun.task_pass || game.status != 3 + game + else + current_myshixun.current_task(games) + end + else + current_myshixun.current_task(games) + end + else + # 如果未创建关卡一定不能开启实训,否则TPI没法找到当前的关卡 + if @shixun.challenges_count == 0 + tip_exception("开启实战前请先创建实训关卡") + end + + # 判断实训是否全为选择题 + is_choice_type = (min_challenges.size == min_challenges.select{|challenge| challenge.last == 1}.count) + if !is_choice_type + commit = GitService.commits(repo_path: @repo_path).try(:first) + uid_logger("First comit########{commit}") + tip_exception("开启实战前请先在版本库中提交代码") if commit.blank? + commit_id = commit["id"] + end + + ActiveRecord::Base.transaction do + begin + cloud_bridge = edu_setting('cloud_bridge') + myshixun_identifier = generate_identifier Myshixun, 10 + myshixun = @shixun.myshixuns.create!(user_id: current_user.id, identifier: myshixun_identifier, + modify_time: @shixun.modify_time, reset_time: @shixun.reset_time, + onclick_time: Time.now, commit_id: commit_id, repo_name: (is_choice_type ? "-1" : nil)) + uid_logger("myshixun_id is #{myshixun.id}") + + + # 其它创建关卡等操作 + challenges = @shixun.challenges + # 之所以增加user_id是为了方便统计查询性能 + game_attrs = %i[challenge_id myshixun_id status user_id open_time identifier modify_time created_at updated_at] + Game.bulk_insert(*game_attrs) do |worker| + base_attr = { myshixun_id: myshixun.id, user_id: myshixun.user_id } + challenges.each_with_index do |challenge, index| + status = (index == 0 ? 0 : 3) + game_identifier = generate_identifier(Game, 12) + worker.add(base_attr.merge(challenge_id: challenge.id, status: status, open_time: Time.now, + identifier: game_identifier, modify_time: challenge.modify_time)) + end + end + + # 如果实训是纯选择题,则不需要去fork仓库以及中间层的相关操作了 + unless is_choice_type + # fork仓库 + project_fork(myshixun, @repo_path, current_user.login) + + rep_url = Base64.urlsafe_encode64(repo_ip_url @repo_path ) + uid_logger("start openGameInstance") + uri = "#{cloud_bridge}/bridge/game/openGameInstance" + logger.info("end openGameInstance") + params = {tpiID: "#{myshixun.id}", tpmGitURL:rep_url, tpiRepoName: myshixun.repo_name.split("/").last} + uid_logger("openGameInstance params is #{params}") + interface_post uri, params, 83, "实训云平台繁忙(繁忙等级:83)" + end + + @current_task = myshixun.current_task(myshixun.games) + uid_logger("## shixun exec: myshixun id is #{myshixun.id}") + rescue Exception => e + uid_logger_error(e.message) + tip_exception("实训云平台繁忙(繁忙等级:81)") + raise ActiveRecord::Rollback + end + end + end + end + # def shixun_exec # if is_shixun_opening? # tip_show_exception(-3, "#{@shixun.opening_time.strftime('%Y-%m-%d %H:%M:%S')}") @@ -522,10 +618,6 @@ class ShixunsController < ApplicationController # current_myshixun = @shixun.current_myshixun(current_user.id) # # min_challenges = @shixun.challenges.pluck(:id , :st) - # - # Rails.logger.info("11111111112#{current_myshixun.try(:id)}") - # Rails.logger.info("111111111102#{params[:reset] != 1}") - # # # 因为读写分离有延迟,所以如果是重置来的请求可以先跳过,重置过来的params[:reset]为1 # if current_myshixun && params[:reset] != "1" # games = current_myshixun.games @@ -542,7 +634,6 @@ class ShixunsController < ApplicationController # current_myshixun.update_column(:repo_name, repo_name) # end # - # # # 如果存在实训,则直接进入实训 # # 如果实训允许跳关,传参params[:challenge_id]跳入具体的关卡 # @current_task = @@ -571,159 +662,59 @@ class ShixunsController < ApplicationController # commit_id = commit["id"] # end # - # ActiveRecord::Base.transaction do - # begin - # cloud_bridge = edu_setting('cloud_bridge') - # myshixun_identifier = generate_identifier Myshixun, 10 - # myshixun = @shixun.myshixuns.create!(user_id: current_user.id, identifier: myshixun_identifier, - # modify_time: @shixun.modify_time, reset_time: @shixun.reset_time, - # onclick_time: Time.now, commit_id: commit_id) - # uid_logger("myshixun_id is #{myshixun.id}") - # - # - # # 其它创建关卡等操作 - # challenges = @shixun.challenges - # # 之所以增加user_id是为了方便统计查询性能 - # game_attrs = %i[challenge_id myshixun_id status user_id open_time identifier modify_time created_at updated_at] - # Game.bulk_insert(*game_attrs) do |worker| - # base_attr = { myshixun_id: myshixun.id, user_id: myshixun.user_id } - # challenges.each_with_index do |challenge, index| - # status = (index == 0 ? 0 : 3) - # game_identifier = generate_identifier(Game, 12) - # worker.add(base_attr.merge(challenge_id: challenge.id, status: status, open_time: Time.now, - # identifier: game_identifier, modify_time: challenge.modify_time)) + # begin + # ActiveRecord::Base.transaction do + # begin + # myshixun_identifier = generate_identifier Myshixun, 10 + # myshixun_params = {user_id: current_user.id, identifier: myshixun_identifier, + # modify_time: @shixun.modify_time, reset_time: @shixun.reset_time, + # onclick_time: Time.now, commit_id: commit_id} + # @myshixun = @shixun.myshixuns.create!(myshixun_params) + # # 其它创建关卡等操作 + # challenges = @shixun.challenges + # # 之所以增加user_id是为了方便统计查询性能 + # game_attrs = %i[challenge_id myshixun_id status user_id open_time identifier modify_time created_at updated_at] + # Game.bulk_insert(*game_attrs) do |worker| + # base_attr = {myshixun_id: @myshixun.id, user_id: @myshixun.user_id} + # challenges.each_with_index do |challenge, index| + # status = (index == 0 ? 0 : 3) + # game_identifier = generate_identifier(Game, 12) + # worker.add(base_attr.merge(challenge_id: challenge.id, status: status, open_time: Time.now, + # identifier: game_identifier, modify_time: challenge.modify_time)) + # end # end + # @current_task = @myshixun.current_task(@myshixun.games) + # rescue Exception => e + # logger.error("------ActiveRecord::RecordInvalid: #{e.message}") + # raise("ActiveRecord::RecordInvalid") # end - # - # # 如果实训是纯选择题,则不需要去fork仓库以及中间层的相关操作了 + # end + # # 如果实训是纯选择题,则不需要去fork仓库以及中间层的相关操作了 + # ActiveRecord::Base.transaction do # unless is_choice_type # # fork仓库 - # project_fork(myshixun, @repo_path, current_user.login) - # - # rep_url = Base64.urlsafe_encode64(repo_ip_url @repo_path ) + # cloud_bridge = edu_setting('cloud_bridge') + # project_fork(@myshixun, @repo_path, current_user.login) + # rep_url = Base64.urlsafe_encode64(repo_ip_url @repo_path) # uid_logger("start openGameInstance") # uri = "#{cloud_bridge}/bridge/game/openGameInstance" # logger.info("end openGameInstance") - # params = {tpiID: "#{myshixun.id}", tpmGitURL:rep_url, tpiRepoName: myshixun.repo_name.split("/").last} + # params = {tpiID: "#{@myshixun.id}", tpmGitURL: rep_url, tpiRepoName: @myshixun.repo_name.split("/").last} # uid_logger("openGameInstance params is #{params}") # interface_post uri, params, 83, "实训云平台繁忙(繁忙等级:83)" # end - # - # @current_task = myshixun.current_task(myshixun.games) - # uid_logger("## shixun exec: myshixun id is #{myshixun.id}") - # rescue Exception => e - # uid_logger_error(e.message) - # tip_exception("实训云平台繁忙(繁忙等级:81)") - # raise ActiveRecord::Rollback # end + # rescue Exception => e + # logger.info("shixun_exec error: #{e.message}") + # if e.message != "ActiveRecord::RecordInvalid" + # logger.error("##########project_fork error #{e.message}") + # @myshixun.destroy! + # end + # raise "实训云平台繁忙(繁忙等级:81)" # end # end # end - def shixun_exec - if is_shixun_opening? - tip_show_exception(-3, "#{@shixun.opening_time.strftime('%Y-%m-%d %H:%M:%S')}") - end - current_myshixun = @shixun.current_myshixun(current_user.id) - - min_challenges = @shixun.challenges.pluck(:id , :st) - # 因为读写分离有延迟,所以如果是重置来的请求可以先跳过,重置过来的params[:reset]为1 - if current_myshixun && params[:reset] != "1" - games = current_myshixun.games - # 如果TPM和TPI的管卡数不相等或者关卡顺序错了,说明实训被极大的改动,需要重置,实训发布前打过的实训都需要重置 - if is_shixun_reset?(games, min_challenges, current_myshixun) - # 这里页面弹框要收到 当前用户myshixun的identifier. - tip_show_exception("/myshixuns/#{current_myshixun.try(:identifier)}/reset_my_game") - end - - - if current_myshixun.repo_name.nil? - g = Gitlab.client - repo_name = g.project(current_myshixun.gpid).try(:path_with_namespace) - current_myshixun.update_column(:repo_name, repo_name) - end - - # 如果存在实训,则直接进入实训 - # 如果实训允许跳关,传参params[:challenge_id]跳入具体的关卡 - @current_task = - if params[:challenge_id] - game = games.where(challenge_id: params[:challenge_id]).take - if @shixun.task_pass || game.status != 3 - game - else - current_myshixun.current_task(games) - end - else - current_myshixun.current_task(games) - end - else - # 如果未创建关卡一定不能开启实训,否则TPI没法找到当前的关卡 - if @shixun.challenges_count == 0 - tip_exception("开启实战前请先创建实训关卡") - end - - # 判断实训是否全为选择题 - is_choice_type = (min_challenges.size == min_challenges.select{|challenge| challenge.last == 1}.count) - if !is_choice_type - commit = GitService.commits(repo_path: @repo_path).try(:first) - uid_logger("First comit########{commit}") - tip_exception("开启实战前请先在版本库中提交代码") if commit.blank? - commit_id = commit["id"] - end - - begin - ActiveRecord::Base.transaction do - begin - myshixun_identifier = generate_identifier Myshixun, 10 - myshixun_params = {user_id: current_user.id, identifier: myshixun_identifier, - modify_time: @shixun.modify_time, reset_time: @shixun.reset_time, - onclick_time: Time.now, commit_id: commit_id} - @myshixun = @shixun.myshixuns.create!(myshixun_params) - # 其它创建关卡等操作 - challenges = @shixun.challenges - # 之所以增加user_id是为了方便统计查询性能 - game_attrs = %i[challenge_id myshixun_id status user_id open_time identifier modify_time created_at updated_at] - Game.bulk_insert(*game_attrs) do |worker| - base_attr = {myshixun_id: @myshixun.id, user_id: @myshixun.user_id} - challenges.each_with_index do |challenge, index| - status = (index == 0 ? 0 : 3) - game_identifier = generate_identifier(Game, 12) - worker.add(base_attr.merge(challenge_id: challenge.id, status: status, open_time: Time.now, - identifier: game_identifier, modify_time: challenge.modify_time)) - end - end - @current_task = @myshixun.current_task(@myshixun.games) - rescue Exception => e - logger.error("------ActiveRecord::RecordInvalid: #{e.message}") - raise("ActiveRecord::RecordInvalid") - end - end - # 如果实训是纯选择题,则不需要去fork仓库以及中间层的相关操作了 - ActiveRecord::Base.transaction do - unless is_choice_type - # fork仓库 - cloud_bridge = edu_setting('cloud_bridge') - project_fork(@myshixun, @repo_path, current_user.login) - rep_url = Base64.urlsafe_encode64(repo_ip_url @repo_path) - uid_logger("start openGameInstance") - uri = "#{cloud_bridge}/bridge/game/openGameInstance" - logger.info("end openGameInstance") - params = {tpiID: "#{@myshixun.id}", tpmGitURL: rep_url, tpiRepoName: @myshixun.repo_name.split("/").last} - uid_logger("openGameInstance params is #{params}") - interface_post uri, params, 83, "实训云平台繁忙(繁忙等级:83)" - end - end - rescue Exception => e - logger.info("shixun_exec error: #{e.message}") - if e.message != "ActiveRecord::RecordInvalid" - logger.error("##########project_fork error #{e.message}") - @myshixun.destroy! - end - raise "实训云平台繁忙(繁忙等级:81)" - end - end - end - # gameID 及实训ID # status: 0 , 1 申请过, 2,实训关卡路径未填, 3 实训标签未填, 4 实训未创建关卡 def publish @@ -783,8 +774,8 @@ class ShixunsController < ApplicationController school_name = "%#{params[:school_name].to_s.strip}%" if user_name.present? || school_name.present? @users = User.joins(user_extension: :school).where("users.id not in #{member_ids} AND users.status = 1 AND - (LOWER(users.lastname) LIKE ? or users.phone like ?) AND LOWER(schools.name) LIKE - ?", user_name, user_name, school_name) + (LOWER(concat(users.lastname, users.firstname)) LIKE ? or users.phone like ?) + AND LOWER(schools.name) LIKE ?", user_name, user_name, school_name) else @users = User.none end diff --git a/app/controllers/stages_controller.rb b/app/controllers/stages_controller.rb index 3967554aa..b0b072f83 100644 --- a/app/controllers/stages_controller.rb +++ b/app/controllers/stages_controller.rb @@ -1,5 +1,5 @@ class StagesController < ApplicationController - before_action :require_login, :check_auth + before_action :require_login, :check_auth, except: [:index] before_action :find_subject, only: [:create, :index] before_action :find_stage, only: [:update, :destroy, :edit, :up_position, :down_position] before_action :allowed, except: [:index] @@ -18,7 +18,7 @@ class StagesController < ApplicationController @stage.position = @subject.stages.count + 1 @stage.save! unless params[:shixun_id].blank? - shixuns = Shixun.where(id: params[:shixun_id]) + shixuns = Shixun.where(id: params[:shixun_id]).order("field(id, #{params[:shixun_id].join(",")})") shixuns.each do |shixun| StageShixun.create!(stage_id: @stage.id, subject_id: @subject.id, shixun_id: shixun.id, position: @stage.stage_shixuns.count + 1) end diff --git a/app/controllers/student_works_controller.rb b/app/controllers/student_works_controller.rb index a5d46e46a..68d52bd74 100644 --- a/app/controllers/student_works_controller.rb +++ b/app/controllers/student_works_controller.rb @@ -360,7 +360,7 @@ class StudentWorksController < ApplicationController Tiding.create(user_id: @work.user_id, trigger_user_id: User.current.id, container_id: new_score.id, container_type: "StudentWorksScore", parent_container_id: @work.id, parent_container_type: "HomeworkCommon", belong_container_id: @homework.course_id, - belong_container_type: "Course", viewed: 0, tiding_type: "HomeworkCommon", extra: new_score.reviewer_role) + belong_container_type: "Course", viewed: 0, tiding_type: new_score.reviewer_role == 3 ? "System" : "HomeworkCommon", extra: new_score.reviewer_role) case new_score.reviewer_role when 1 #教师评分:最后一个教师评分为最终评分 diff --git a/app/controllers/subjects_controller.rb b/app/controllers/subjects_controller.rb index bc5b0a607..9b28d9a10 100644 --- a/app/controllers/subjects_controller.rb +++ b/app/controllers/subjects_controller.rb @@ -1,7 +1,7 @@ class SubjectsController < ApplicationController - before_action :require_login, :check_auth, except: [:index] + before_action :require_login, :check_auth, except: [:index, :show] # before_action :check_auth, except: [:index] - before_action :check_account, only: [:new, :create] + before_action :check_account, except: [:index, :show] before_action :find_subject, except: [:index, :create, :new, :append_to_stage] before_action :allowed, only: [:update, :edit, :destroy, :publish, :cancel_publish, :cancel_has_publish, :search_members, :add_subject_members, :statistics, :shixun_report, :school_report, @@ -81,6 +81,7 @@ class SubjectsController < ApplicationController def show @user = current_user @is_creator = current_user.creator_of_subject?(@subject) + @is_manager = @user.manager_of_subject?(@subject) # 合作团队 @members = @subject.subject_members.includes(:user) @shixuns = @subject.shixuns.published.pluck(:id) @@ -222,7 +223,7 @@ class SubjectsController < ApplicationController @subject.update_attributes(status: 1) ApplyAction.create(container_type: "ApplySubject", container_id: @subject.id, user_id: current_user.id, status: 0) begin - status = Trustie::Sms.send(mobile: '18711011226', send_type:'publish_subject' , name: '管理员') + status = Educoder::Sms.send(mobile: '18711011226', send_type:'publish_subject' , name: '管理员') rescue => e uid_logger_error("发送验证码出错: #{e}") end @@ -281,7 +282,7 @@ class SubjectsController < ApplicationController # 删除实训 # DELETE: /api/subejcts/:id/delete_member def delete_member - tip_exception(403, "没权限操作") if !current_user.admin? + tip_exception(403, "没权限操作") unless current_user.manager_of_subject?(@subject) tip_exception('用户id不能为空') if params[:user_id].blank? user = @subject.subject_members.where(:user_id => params[:user_id], :role => 2).first tip_exception("管理员用户不允许删除,或用户不存在") if user.blank? diff --git a/app/controllers/tidings_controller.rb b/app/controllers/tidings_controller.rb index 795010b3f..9324b2755 100644 --- a/app/controllers/tidings_controller.rb +++ b/app/controllers/tidings_controller.rb @@ -1,6 +1,7 @@ class TidingsController < ApplicationController include PaginateHelper + before_action :require_login after_action :update_onclick_time!, only: [:index] def index diff --git a/app/controllers/users/banks_controller.rb b/app/controllers/users/banks_controller.rb new file mode 100644 index 000000000..2c792151e --- /dev/null +++ b/app/controllers/users/banks_controller.rb @@ -0,0 +1,40 @@ +class Users::BanksController < Users::BaseController + before_action :params_filter + def index + order = params[:order] || "updated_at" + sort = params[:sort] || "desc" + @banks = @object_type.classify.constantize.where(@object_filter) + @course_lists = CourseList.where(id: @banks.pluck(:course_list_id)) + @banks = @banks.where(course_list_id: params[:tag_id]) unless params[:tag_id].blank? + @banks = @banks.order("#{order} #{sort}") + @banks_count = @banks.size + end + + private + + def params_filter + type = ["normal", "group", "poll", "exercise", "gtask", "gtopic"] + tip_exception("object_type类型不正确") unless type.include?(params[:object_type]) + # HomeworkBank 普通、分组作业题库;ExerciseBank试卷、问卷题库;GtaskBank毕设选题题库;GtopicBank毕设任务题库; + case params[:object_type] + when 'normal' + @object_type = "HomeworkBank" + @object_filter = "homework_type = 1" # 普通作业 + when 'group' + @object_type = "HomeworkBank" + @object_filter = "homework_type = 3" # 分组作业 + when 'poll' + @object_type = "ExerciseBank" + @object_filter = "container_type = 'Poll'" # 问卷 + when 'exercise' + @object_type = "ExerciseBank" + @object_filter = "container_type = 'Exercise'" # 试卷 + when 'gtask' + @object_type = "GtaskBank" + @object_filter = nil + when 'gtopic' + @object_type = "GtopicBank" + @object_filter = nil + end + end +end diff --git a/app/controllers/users/base_controller.rb b/app/controllers/users/base_controller.rb index fd138a182..706b77802 100644 --- a/app/controllers/users/base_controller.rb +++ b/app/controllers/users/base_controller.rb @@ -21,7 +21,7 @@ class Users::BaseController < ApplicationController def private_user_resources! require_login - return if current_user.admin? || observed_logged_user? + return if current_user.admin_or_business? || observed_logged_user? render_forbidden end @@ -43,7 +43,7 @@ class Users::BaseController < ApplicationController page = page_value per_page = per_page_value - return Kaminari.paginate_array(objs).page(page).per(per_page) unless observed_logged_user? && opts[:special] + return Kaminari.paginate_array(objs).page(page).per(per_page) unless opts[:special] && observed_logged_user? # note: 为实现第一页少一条记录,让前端放置新建入口 if page == 1 diff --git a/app/controllers/users/private_message_details_controller.rb b/app/controllers/users/private_message_details_controller.rb index 486d23d7f..3a8f4e7fc 100644 --- a/app/controllers/users/private_message_details_controller.rb +++ b/app/controllers/users/private_message_details_controller.rb @@ -1,13 +1,16 @@ class Users::PrivateMessageDetailsController < Users::BaseController + before_action :require_login before_action :private_user_resources! after_action :update_message_status, only: [:show] + helper_method :target_user + def show messages = observed_user.private_messages.without_deleted.where(target: target_user) @count = messages.count - @messages = messages.order(send_time: :asc).includes(sender: :user_extension) + @messages = paginate messages.order(send_time: :desc).includes(sender: :user_extension) end private diff --git a/app/controllers/users/private_messages_controller.rb b/app/controllers/users/private_messages_controller.rb index b80b6152b..4f02b136f 100644 --- a/app/controllers/users/private_messages_controller.rb +++ b/app/controllers/users/private_messages_controller.rb @@ -1,4 +1,5 @@ class Users::PrivateMessagesController < Users::BaseController + before_action :require_login before_action :private_user_resources! after_action :update_onclick_time!, only: [:index] @@ -9,6 +10,8 @@ class Users::PrivateMessagesController < Users::BaseController query = "SELECT subquery.*, COUNT(*) message_count FROM (#{subquery}) subquery "\ "GROUP BY subquery.target_id ORDER BY subquery.send_time desc LIMIT #{limit_value} OFFSET #{offset_value}" @messages = PrivateMessage.select('*').from("(#{query}) AS query").includes(target: :user_extension) + + observed_user.private_messages.only_unread.update_all(status: 1) end def create diff --git a/app/controllers/users/projects_controller.rb b/app/controllers/users/projects_controller.rb index 863b99b37..07f4d5cac 100644 --- a/app/controllers/users/projects_controller.rb +++ b/app/controllers/users/projects_controller.rb @@ -1,4 +1,6 @@ class Users::ProjectsController < Users::BaseController + skip_before_action :check_observed_user_exists!, only: [:search] + def index projects = Users::ProjectService.new(observed_user, query_params).call @@ -6,6 +8,15 @@ class Users::ProjectsController < Users::BaseController @projects = paginate(projects.includes(:project_score, owner: { user_extension: :school }), special: true) end + def search + query_params = { keyword: params[:keyword], category: 'manage' } + projects = Users::ProjectService.new(current_user, query_params).call + + params[:limit] = params[:per_page].to_i.zero? ? 20 : params[:per_page].to_i + @count = projects.count + @projects = paginate projects + end + private def query_params diff --git a/app/controllers/users/video_auths_controller.rb b/app/controllers/users/video_auths_controller.rb new file mode 100644 index 000000000..d7950f873 --- /dev/null +++ b/app/controllers/users/video_auths_controller.rb @@ -0,0 +1,26 @@ +class Users::VideoAuthsController < Users::BaseController + before_action :private_user_resources! + + def create + result = Videos::CreateAuthService.call(observed_user, create_params) + render_ok(data: result) + rescue Videos::CreateAuthService::Error => ex + render_error(ex.message) + end + + def update + video = observed_user.videos.find_by(uuid: params[:video_id]) + return render_error('该视频凭证不存在') if video.blank? + + result = AliyunVod::Service.refresh_upload_video(video.uuid) + render_ok(data: result) + rescue AliyunVod::Error => _ + render_error('刷新上传凭证失败') + end + + private + + def create_params + params.permit(:title, :file_name, :file_size, :description, :cover_url) + end +end \ No newline at end of file diff --git a/app/controllers/users/videos_controller.rb b/app/controllers/users/videos_controller.rb new file mode 100644 index 000000000..e4dffec23 --- /dev/null +++ b/app/controllers/users/videos_controller.rb @@ -0,0 +1,60 @@ +class Users::VideosController < Users::BaseController + before_action :private_user_resources! + + helper_method :current_video + + def index + videos = Users::VideoQuery.call(observed_user, search_params) + + @count = videos.count + @videos = paginate videos + end + + def update + return render_error('该状态下不能编辑视频信息') unless current_video.published? + + current_video.update!(title: params[:title]) + + AliyunVod::Service.update_video_info(current_video.uuid, Title: current_video.title) rescue nil + end + + def cancel + video = observed_user.videos.find_by(uuid: params[:video_id]) + return render_not_found if video.blank? + return render_error('该状态下不能删除视频') unless video.pending? + + video.destroy! + AliyunVod::Service.delete_video([video.uuid]) rescue nil + + render_ok + end + + def review + params[:status] = 'processing' + videos = Users::VideoQuery.call(observed_user, params) + + @count = videos.count + @videos = paginate videos + end + + def batch_publish + Videos::BatchPublishService.call(observed_user, batch_publish_params) + render_ok + rescue Videos::BatchPublishService::Error => ex + render_error(ex.message) + end + + private + + def current_video + @_current_video ||= observed_user.videos.find_by(id: params[:id]) + end + + def search_params + params.permit(:keyword, :sort_by, :sort_direction) + end + + def batch_publish_params + params.permit(videos: %i[video_id title]) + end +end \ No newline at end of file diff --git a/app/decorators/course_decorator.rb b/app/decorators/course_decorator.rb index 9c76b058a..9c3340bbf 100644 --- a/app/decorators/course_decorator.rb +++ b/app/decorators/course_decorator.rb @@ -1,5 +1,5 @@ module CourseDecorator def can_visited? - is_public == 1 || User.current.admin? || User.current.member_of_course?(self) + is_public == 1 || User.current.admin_or_business? || User.current.member_of_course?(self) end end \ No newline at end of file diff --git a/app/decorators/tiding_decorator.rb b/app/decorators/tiding_decorator.rb index c9ad806ee..ab9de4b76 100644 --- a/app/decorators/tiding_decorator.rb +++ b/app/decorators/tiding_decorator.rb @@ -2,6 +2,9 @@ module TidingDecorator def content method_name = "#{container_type.underscore}_content" respond_to?(method_name) ? send(method_name) : '' + rescue => ex + Util.logger_error(ex) + '' end def how_long_time @@ -27,6 +30,7 @@ module TidingDecorator end def strip_html(text, len = 0, suffix = "...") + text = text.to_s str = "" if !text.nil? && text.length > 0 str = text.gsub(/<\/?.*?>/, '').strip @@ -43,13 +47,13 @@ module TidingDecorator # ================ 各种类消息内容方法 ================ def apply_user_authentication_content - return if trigger_user_id.zero? + t_user = trigger_user || User.find(1) if tiding_type == 'Apply' str1, str2 = if container.auth_type == 1 - [trigger_user.show_real_name, trigger_user.ID_number] + [t_user.show_real_name, t_user.ID_number] elsif container.auth_type == 2 - ue = trigger_user.user_extension + ue = t_user.user_extension [[ue.school&.name, ue.department&.name].join('_'), ue.identity_text] end I18n.t(locale_format(tiding_type, container.auth_type)) % [str1, str2] @@ -93,7 +97,7 @@ module TidingDecorator elsif status == 2 I18n.t(locale_format(tiding_type, "#{status}_#{extra.nil?}"), reason: extra) % [name, second_name] else - I18n.t(locale_format(tiding_type, status)) % [name, second_name] + I18n.t(locale_format(tiding_type, status), reason: extra) % [name, second_name] end end @@ -102,9 +106,9 @@ module TidingDecorator if tiding_type == 'Apply' I18n.t(locale_format(tiding_type)) % name elsif status == 2 - I18n.t(locale_format(tiding_type, "#{status}_#{extra.nil?}"), reason: extra) % name + I18n.t(locale_format(tiding_type, "#{status}_#{extra.nil?}"), name: name, reason: extra) else - I18n.t(locale_format(tiding_type, status)) % name + I18n.t(locale_format(tiding_type, status), name: name, reason: extra) end end @@ -123,7 +127,11 @@ module TidingDecorator end def course_content - I18n.t(locale_format) % container.name + if tiding_type == 'Delete' + I18n.t(locale_format(tiding_type)) % extra + else + I18n.t(locale_format) % container.name + end end def shixun_content @@ -261,16 +269,16 @@ module TidingDecorator def journal_content case tiding_type when 'Mentioned' then - I18n.t(locale_format(tiding_type)) % message_content_helper(container.notes) + I18n.t(locale_format(tiding_type)) % message_content_helper(container&.notes) when 'Comment' then - I18n.t(locale_format(tiding_type, container.parent.present?)) % message_content_helper(container.notes) + I18n.t(locale_format(tiding_type, container.parent.present?)) % message_content_helper(container&.notes) else - I18n.t(locale_format) % container.issue.subject + I18n.t(locale_format) % container&.issue&.subject end end def issue_content - I18n.t(locale_format) % container.subject + I18n.t(locale_format) % container&.subject end def pull_request_content @@ -291,15 +299,15 @@ module TidingDecorator end def poll_content - I18n.t(locale_format(parent_container_type)) % container.polls_name + I18n.t(locale_format(parent_container_type)) % container&.polls_name end def exercise_content - I18n.t(locale_format(parent_container_type)) % container.exercise_name + I18n.t(locale_format(parent_container_type)) % container&.exercise_name end def student_graduation_topic_content - I18n.t(locale_format) % container.graduation_topic.try(:name) + I18n.t(locale_format) % container&.graduation_topic.try(:name) end def deal_student_topic_select_content @@ -307,27 +315,27 @@ module TidingDecorator end def graduation_task_content - I18n.t(locale_format(parent_container_type)) % container.name + I18n.t(locale_format(parent_container_type)) % container&.name end def graduation_work_content - I18n.t(locale_format(extra.nil?)) % container.graduation_task.try(:name) + I18n.t(locale_format(extra.nil?)) % container&.graduation_task.try(:name) end def graduation_work_score_content - I18n.t(locale_format) % container.graduation_work.graduation_task.try(:name) + I18n.t(locale_format) % container&.graduation_work&.graduation_task.try(:name) end def homework_common_content - I18n.t(locale_format(parent_container_type), name: container.name, reason: extra) + I18n.t(locale_format(parent_container_type), name: container&.name, reason: extra) end def student_work_content - I18n.t(locale_format(extra.nil?)) % container.homework_common.try(:name) + I18n.t(locale_format(extra.nil?)) % container&.homework_common.try(:name) end def student_works_score_content - I18n.t(locale_format(extra)) % container.student_work.homework_common.try(:name) + I18n.t(locale_format(extra)) % container&.student_work&.homework_common.try(:name) end def challenge_work_score_content @@ -364,4 +372,12 @@ module TidingDecorator I18n.t(locale_format(tiding_type)) % [container.try(:title) || extra] end end + + def video_content + if tiding_type == 'System' + I18n.t(locale_format(tiding_type, status), reason: extra) % container.try(:title) + else + I18n.t(locale_format(tiding_type)) % [container.try(:title) || extra] + end + end end diff --git a/app/decorators/video_decorator.rb b/app/decorators/video_decorator.rb new file mode 100644 index 000000000..904e78dbb --- /dev/null +++ b/app/decorators/video_decorator.rb @@ -0,0 +1,5 @@ +module VideoDecorator + extend ApplicationDecorator + + display_time_method :published_at, :created_at, :updated_at +end \ No newline at end of file diff --git a/app/forms/users/update_account_form.rb b/app/forms/users/update_account_form.rb index d82459fcf..16c3c8013 100644 --- a/app/forms/users/update_account_form.rb +++ b/app/forms/users/update_account_form.rb @@ -5,8 +5,8 @@ class Users::UpdateAccountForm attr_accessor :nickname, :name, :show_realname, :gender, :location, :location_city, :identity, :student_id, :technical_title, :school_id, :department_id - validates :nickname, presence: true - validates :name, presence: true + validates :nickname, presence: true, length: { maximum: 20 } + validates :name, presence: true, length: { maximum: 10 } validates :gender, presence: true, numericality: { only_integer: true }, inclusion: { in: [0, 1] } validates :location, presence: true validates :location_city, presence: true diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 5df86ef54..099d45406 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -62,15 +62,18 @@ module ApplicationHelper # shixun开启挑战对应的行为名及url def task_operation_url current_myshixun, shixun - url = "/shixuns/#{shixun.identifier}/shixun_exec" - name = - if current_myshixun.blank? - shixun.status == 0 ? "模拟实战" : "开启挑战" - elsif current_myshixun.status == 1 - "查看实战" + if current_myshixun.blank? + name = shixun.status == 0 ? "模拟实战" : "开启挑战" + url = "/shixuns/#{shixun.identifier}/shixun_exec" + else + identifier = current_myshixun.current_task(current_myshixun.games).try(:identifier) + if current_myshixun.status == 1 + name = "查看实战" else - "继续挑战" + name = "继续挑战" end + url = identifier + end [name, url] end @@ -329,6 +332,23 @@ module ApplicationHelper content end + def strip_html(text, len=0, endss="...") + ss = "" + if !text.nil? && text.length>0 + ss=text.gsub(/<\/?.*?>/, '').strip + ss = ss.gsub(/ */, '') + ss = ss.gsub(/\r\n/,'') #新增 + ss = ss.gsub(/\n/,'') #新增 + if len > 0 && ss.length > len + ss = ss[0, len] + endss + elsif len > 0 && ss.length <= len + ss = ss + #ss = truncate(ss, :length => len) + end + end + ss + end + def strip_export_title(content) con_ = "" if content.length > 0 diff --git a/app/helpers/blob_helper.rb b/app/helpers/blob_helper.rb new file mode 100644 index 000000000..101bebb87 --- /dev/null +++ b/app/helpers/blob_helper.rb @@ -0,0 +1,2 @@ +module BlobHelper +end diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index 8c2aeb479..f14159cc2 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -194,7 +194,7 @@ module CoursesHelper # 获取课堂的资源数 def get_attachment_count(course, category_id) - course.attachments.where(course_second_category_id: category_id).size + category_id.to_i == 0 ? course.attachments.size : course.attachments.where(course_second_category_id: category_id).size end # 获取课堂的作业数 diff --git a/app/helpers/forums_helper.rb b/app/helpers/forums_helper.rb deleted file mode 100644 index 2e531fd46..000000000 --- a/app/helpers/forums_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module ForumsHelper -end diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb new file mode 100644 index 000000000..db5c5ce1a --- /dev/null +++ b/app/helpers/projects_helper.rb @@ -0,0 +1,2 @@ +module ProjectsHelper +end diff --git a/app/helpers/student_works_helper.rb b/app/helpers/student_works_helper.rb index a7103b4bf..ebe0ce52d 100644 --- a/app/helpers/student_works_helper.rb +++ b/app/helpers/student_works_helper.rb @@ -103,6 +103,10 @@ module StudentWorksHelper # 对结果进行排序 efficiency_list = results.sort {|x, y| x[:efficiency] <=> y[:efficiency]}.each_with_index.map do |result, index| + if result[:user_id] == work.user.id + myself_eff = [index+1, result[:efficiency]] + myself_object = [result[:consume_time], result[:eff_score], result[:round_size]] + end [index + 1, result[:efficiency], result[:user_id]] end diff --git a/app/helpers/users/banks_helper.rb b/app/helpers/users/banks_helper.rb new file mode 100644 index 000000000..c57477794 --- /dev/null +++ b/app/helpers/users/banks_helper.rb @@ -0,0 +1,2 @@ +module Users::BanksHelper +end diff --git a/app/jobs/apply_teacher_role_join_course_notify_job.rb b/app/jobs/apply_teacher_role_join_course_notify_job.rb index c2495c036..3ae5e32db 100644 --- a/app/jobs/apply_teacher_role_join_course_notify_job.rb +++ b/app/jobs/apply_teacher_role_join_course_notify_job.rb @@ -11,7 +11,7 @@ class ApplyTeacherRoleJoinCourseNotifyJob < ApplicationJob belong_container_type tiding_type extra created_at updated_at] same_attrs = { - trigger_user_id: user.id, container_id: course.id, container_type: 'JoinCourse', + trigger_user_id: user.id, container_id: course.id, container_type: 'JoinCourse', status: 0, belong_container_id: course.id, belong_container_type: 'Course', tiding_type: 'Apply', extra: role } Tiding.bulk_insert(*attrs) do |worker| diff --git a/app/jobs/batch_publish_video_notify_job.rb b/app/jobs/batch_publish_video_notify_job.rb new file mode 100644 index 000000000..01390dc2d --- /dev/null +++ b/app/jobs/batch_publish_video_notify_job.rb @@ -0,0 +1,23 @@ +# 批量发布视频 消息任务 +class BatchPublishVideoNotifyJob < ApplicationJob + queue_as :notify + + def perform(user_id, video_ids) + user = User.find_by(id: user_id) + return if user.blank? + + attrs = %i[user_id trigger_user_id container_id container_type tiding_type status created_at updated_at] + + same_attrs = { + user_id: 1, + trigger_user_id: user.id, + container_type: 'Video', + tiding_type: 'Apply', status: 0 + } + Tiding.bulk_insert(*attrs) do |worker| + user.videos.where(id: video_ids).each do |video| + worker.add same_attrs.merge(container_id: video.id) + end + end + end +end diff --git a/app/jobs/commit_exercsie_notify_job_job.rb b/app/jobs/commit_exercsie_notify_job_job.rb new file mode 100644 index 000000000..1be0bb2bc --- /dev/null +++ b/app/jobs/commit_exercsie_notify_job_job.rb @@ -0,0 +1,26 @@ +class CommitExercsieNotifyJobJob < ApplicationJob + queue_as :notify + + def perform(exercise_id, user_id) + exercise = Exercise.find_by(id: exercise_id) + user = User.find_by(id: user_id) + return if [exercise, user].any?(&:blank?) + course = exercise.course + + attrs = %i[user_id trigger_user_id container_id container_type parent_container_id parent_container_type + belong_container_id belong_container_type tiding_type viewed status created_at updated_at] + + same_attrs = { + trigger_user_id: user.id, + container_id: exercise.id, container_type: 'Exercise', + parent_container_id: exercise.id, parent_container_type: 'CommitExercise', + belong_container_id: course.id, belong_container_type: 'Course', + tiding_type: 'Exercise', viewed: 0, status: 0 + } + Tiding.bulk_insert(*attrs) do |worker| + course.course_member(user).member_teachers.each do |teacher| + worker.add same_attrs.merge(user_id: teacher.user_id) + end + end + end +end diff --git a/app/jobs/commit_poll_notify_job_job.rb b/app/jobs/commit_poll_notify_job_job.rb new file mode 100644 index 000000000..6953fa9e9 --- /dev/null +++ b/app/jobs/commit_poll_notify_job_job.rb @@ -0,0 +1,26 @@ +class CommitPollNotifyJobJob < ApplicationJob + queue_as :notify + + def perform(poll_id, user_id) + poll = Poll.find_by(id: poll_id) + user = User.find_by(id: user_id) + return if [poll, user].any?(&:blank?) + course = poll.course + + attrs = %i[user_id trigger_user_id container_id container_type parent_container_id parent_container_type + belong_container_id belong_container_type tiding_type viewed status created_at updated_at] + + same_attrs = { + trigger_user_id: user.id, + container_id: poll.id, container_type: 'Poll', + parent_container_id: poll.id, parent_container_type: 'CommitPoll', + belong_container_id: course.id, belong_container_type: 'Course', + tiding_type: 'Poll', viewed: 0, status: 0 + } + Tiding.bulk_insert(*attrs) do |worker| + course.course_member(user).member_teachers.each do |teacher| + worker.add same_attrs.merge(user_id: teacher.user_id) + end + end + end +end diff --git a/app/jobs/get_aliyun_video_info_job.rb b/app/jobs/get_aliyun_video_info_job.rb new file mode 100644 index 000000000..d93186458 --- /dev/null +++ b/app/jobs/get_aliyun_video_info_job.rb @@ -0,0 +1,17 @@ +# 获取阿里云视频信息 +class GetAliyunVideoInfoJob < ApplicationJob + queue_as :default + + def perform(vod_video_id) + video = Video.find_by(uuid: vod_video_id) + return if video.blank? || video.vod_uploading? + + result = AliyunVod::Service.get_play_info(video.uuid) + cover_url = result.dig('VideoBase', 'CoverURL') + file_url = (result.dig('PlayInfoList', 'PlayInfo') || []).first&.[]('PlayURL') + + video.cover_url = cover_url if cover_url.present? && video.cover_url.blank? + video.file_url = file_url if file_url.present? + video.save! + end +end \ No newline at end of file diff --git a/app/jobs/student_work_score_appeal_notify_job.rb b/app/jobs/student_work_score_appeal_notify_job.rb index 4d8076a0e..667d508c5 100644 --- a/app/jobs/student_work_score_appeal_notify_job.rb +++ b/app/jobs/student_work_score_appeal_notify_job.rb @@ -19,11 +19,20 @@ class StudentWorkScoreAppealNotifyJob < ApplicationJob belong_container_id: course.id, belong_container_type: 'Course', tiding_type: 'HomeworkCommon', viewed: 0, status: 0 } + + student_same_attrs = { + trigger_user_id: 0, + container_id: appeal.id, container_type: 'StudentWorksScoresAppeal', + parent_container_id: score.student_work_id, parent_container_type: 'StudentWork', + belong_container_id: course.id, belong_container_type: 'Course', + tiding_type: 'System', viewed: 0, status: 0 + } + Tiding.bulk_insert(*attrs) do |worker| course.course_member(user).member_teachers.each do |teacher| worker.add same_attrs.merge(user_id: teacher.user_id) end - worker.add same_attrs.merge(user_id: score.user_id) + worker.add student_same_attrs.merge(user_id: score.user_id) end end end diff --git a/app/libs/aliyun_vod.rb b/app/libs/aliyun_vod.rb new file mode 100644 index 000000000..0ce159fb6 --- /dev/null +++ b/app/libs/aliyun_vod.rb @@ -0,0 +1,5 @@ +module AliyunVod + class << self + attr_accessor :access_key_id, :access_key_secret, :base_url, :cate_id, :callback_url, :signature_key + end +end \ No newline at end of file diff --git a/app/libs/aliyun_vod/error.rb b/app/libs/aliyun_vod/error.rb new file mode 100644 index 000000000..a34785774 --- /dev/null +++ b/app/libs/aliyun_vod/error.rb @@ -0,0 +1,2 @@ +class AliyunVod::Error < StandardError +end \ No newline at end of file diff --git a/app/libs/aliyun_vod/service.rb b/app/libs/aliyun_vod/service.rb new file mode 100644 index 000000000..9350d2f43 --- /dev/null +++ b/app/libs/aliyun_vod/service.rb @@ -0,0 +1,8 @@ +module AliyunVod::Service + extend AliyunVod::Service::Base + + extend AliyunVod::Service::VideoUpload + extend AliyunVod::Service::VideoProcess + extend AliyunVod::Service::VideoManage + extend AliyunVod::Service::VideoPlay +end \ No newline at end of file diff --git a/app/libs/aliyun_vod/service/base.rb b/app/libs/aliyun_vod/service/base.rb new file mode 100644 index 000000000..85f74fc6f --- /dev/null +++ b/app/libs/aliyun_vod/service/base.rb @@ -0,0 +1,46 @@ +module AliyunVod::Service::Base + def request(method, params) + params = AliyunVod::Sign.format_params(params.compact) # 多层hash需要预先处理,保证值为string + params[:Signature] = AliyunVod::Sign.generate(params, method: method.to_s.upcase) + + Rails.logger.info("[AliyunVod] request => method: #{method}, params: #{params}") + + response = Faraday.public_send(method, AliyunVod.base_url, params) + result = JSON.parse(response.body) + + Rails.logger.info("[AliyunVod] response => status: #{response.status}, result: #{result}") + + raise AliyunVod::Error, result['Code'] if response.status != 200 + + result + rescue => ex + ::Util.logger_error(ex) + raise AliyunVod::Error, ex.message + end + + def base_params + { + AccessKeyId: AliyunVod.access_key_id, + Format: 'JSON', + Version: '2017-03-21', + SignatureMethod: 'HMAC-SHA1', + SignatureVersion: '1.0', + SignatureNonce: signature_nonce, + Timestamp: timestamp, + UserData: user_data + } + end + + def user_data + { MessageCallback: { CallbackURL: AliyunVod.callback_url } } + end + + def timestamp + Time.now.utc.iso8601 + end + + def signature_nonce + chars = ('a'..'z').to_a + ('A'..'Z').to_a + ('0'..'9').to_a + chars.sample(16).join('') + end +end \ No newline at end of file diff --git a/app/libs/aliyun_vod/service/video_manage.rb b/app/libs/aliyun_vod/service/video_manage.rb new file mode 100644 index 000000000..703151841 --- /dev/null +++ b/app/libs/aliyun_vod/service/video_manage.rb @@ -0,0 +1,40 @@ +# 视频管理 +module AliyunVod::Service::VideoManage + # 修改视频信息 + def update_video_info(video_id, **opts) + params = { + Action: 'UpdateVideoInfo', + VideoId: video_id + }.merge(base_params) + + params = opts.merge(params) + + result = request(:post, params) + + result + end + + # 获取视频信息 + def get_video_info(video_id) + params = { + Action: 'GetVideoInfo', + VideoId: video_id + }.merge(base_params) + + result = request(:post, params) + + result + end + + # 删除视频信息 + def delete_video(video_ids) + params = { + Action: 'DeleteVideo', + VideoIds: video_ids.join(',') + }.merge(base_params) + + result = request(:post, params) + + result + end +end \ No newline at end of file diff --git a/app/libs/aliyun_vod/service/video_play.rb b/app/libs/aliyun_vod/service/video_play.rb new file mode 100644 index 000000000..0c3a42abb --- /dev/null +++ b/app/libs/aliyun_vod/service/video_play.rb @@ -0,0 +1,17 @@ +# 视频播放 +module AliyunVod::Service::VideoPlay + # 获取视频播放地址 + # https://help.aliyun.com/document_detail/56124.html?spm=a2c4g.11186623.6.715.4d7e2d52dU1CTK + def get_play_info(video_id, **opts) + params = { + Action: 'GetPlayInfo', + VideoId: video_id + }.merge(base_params) + + params = opts.merge(params) + + result = request(:post, params) + + result + end +end \ No newline at end of file diff --git a/app/libs/aliyun_vod/service/video_process.rb b/app/libs/aliyun_vod/service/video_process.rb new file mode 100644 index 000000000..eec029c20 --- /dev/null +++ b/app/libs/aliyun_vod/service/video_process.rb @@ -0,0 +1,17 @@ +# 视频处理 +module AliyunVod::Service::VideoProcess + # 提交媒体截图作业 + def submit_snapshot_job(video_id, **opts) + params = { + Action: 'SubmitSnapshotJob', + VideoId: video_id + }.merge(base_params) + params = opts.merge(params) + + result = request(:post, params) + + raise AliyunVod::Error, '提交媒体截图作业失败' if result['SnapshotJob'].blank? + + result + end +end \ No newline at end of file diff --git a/app/libs/aliyun_vod/service/video_upload.rb b/app/libs/aliyun_vod/service/video_upload.rb new file mode 100644 index 000000000..97ecd970b --- /dev/null +++ b/app/libs/aliyun_vod/service/video_upload.rb @@ -0,0 +1,37 @@ +# 视频上传 +module AliyunVod::Service::VideoUpload + # 获取视频上传地址和凭证 + def create_upload_video(title, filename, **opts) + params = { + Action: 'CreateUploadVideo', + Title: title, + FileName: filename + }.merge(base_params) + + # 分类 + cate_id = AliyunVod.cate_id + params[:CateId] = cate_id if cate_id.present? + + params = opts.merge(params) + + result = request(:post, params) + + raise AliyunVod::Error, '获取上传凭证失败' if result['UploadAddress'].blank? + + result + end + + # 刷新视频上传凭证 + def refresh_upload_video(video_id) + params = { + Action: 'RefreshUploadVideo', + VideoId: video_id + }.merge(base_params) + + result = request(:post, params) + + raise AliyunVod::Error, '刷新上传凭证失败' if result['UploadAddress'].blank? + + result + end +end \ No newline at end of file diff --git a/app/libs/aliyun_vod/sign.rb b/app/libs/aliyun_vod/sign.rb new file mode 100644 index 000000000..28f100acc --- /dev/null +++ b/app/libs/aliyun_vod/sign.rb @@ -0,0 +1,41 @@ +module AliyunVod::Sign + # https://help.aliyun.com/document_detail/44434.html?spm=a2c4g.11186623.2.16.354c7853oqlhMb&/#SignatureNonce + def self.generate(params, **opts) + method = opts[:method] || 'POST' + key = opts[:key] || AliyunVod.access_key_secret + '&' + digest = OpenSSL::Digest.new('sha1') + + str = params_to_string(params) + str = percent_encode(str) + str = "#{method}&%2F&#{str}" + + Base64.encode64(OpenSSL::HMAC.digest(digest, key, str)).gsub(/\n/, '') + end + + def self.verify?(signature, timestamp) + content = "#{AliyunVod.callback_url}|#{timestamp}|#{AliyunVod.signature_key}" + our_signature = Digest::MD5.hexdigest(content) + ActiveSupport::SecurityUtils.secure_compare(signature, our_signature) + end + + def self.params_to_string(params) + params.sort.map { |k, v| "#{percent_encode(k)}=#{percent_encode(v)}" }.join('&') + end + + def self.percent_encode(str) + return '' if str.blank? + CGI::escape(str.to_s).gsub(/\+/,'%20').gsub(/\*/,'%2A').gsub(/%7E/,'~') + end + + def self.format_params(params) + params.each_with_object({}) do |arr, obj| + obj[arr[0]] = arr[1].is_a?(Hash) ? parse_hash_to_str(arr[1]) : arr[1] + end + end + + def self.parse_hash_to_str(hash) + hash.each_with_object({}) do |h, obj| + obj[h[0]] = h[1].is_a?(Hash) ? parse_hash_to_str(h[1].clone) : h[1].to_s + end.to_json + end +end \ No newline at end of file diff --git a/app/models/apply_add_school.rb b/app/models/apply_add_school.rb index bae65d24f..c303283ca 100644 --- a/app/models/apply_add_school.rb +++ b/app/models/apply_add_school.rb @@ -9,6 +9,7 @@ class ApplyAddSchool < ApplicationRecord private def send_notify - tidings.create!(user_id: 1, status: 0, trigger_user_id: user_id, belong_container: school, tiding_type: 'Apply') + Tiding.create!(user_id: 1, status: 0, container_id: id, container_type: 'ApplyAddSchools', + trigger_user_id: user_id, belong_container: school, tiding_type: 'Apply') end end \ No newline at end of file diff --git a/app/models/apply_user_authentication.rb b/app/models/apply_user_authentication.rb index c7fb5019e..d467eb850 100644 --- a/app/models/apply_user_authentication.rb +++ b/app/models/apply_user_authentication.rb @@ -3,8 +3,18 @@ class ApplyUserAuthentication < ApplicationRecord belongs_to :user + has_many :tidings, :as => :container, :dependent => :destroy + scope :real_name_auth, -> { where(auth_type: 1) } scope :professional_auth, -> { where(auth_type: 2) } scope :processing, -> { where(status: 0) } scope :passed, -> { where(status: 1) } + + after_create :send_tiding + + private + + def send_tiding + self.tidings << Tiding.new(:user_id => '1', :status=> 0, :trigger_user_id => user_id, :belong_container_id => 1, :belong_container_type =>'User', :tiding_type => "Apply") + end end diff --git a/app/models/bidding_user.rb b/app/models/bidding_user.rb index b518fb45e..3a427a011 100644 --- a/app/models/bidding_user.rb +++ b/app/models/bidding_user.rb @@ -5,7 +5,7 @@ class BiddingUser < ApplicationRecord belongs_to :project_package, counter_cache: true aasm(:status) do - state :pending, initiali: true + state :pending, initial: true state :bidding_won state :bidding_lost diff --git a/app/models/challenge.rb b/app/models/challenge.rb index 8e4d2ae42..adb54fae9 100644 --- a/app/models/challenge.rb +++ b/app/models/challenge.rb @@ -1,7 +1,6 @@ class Challenge < ApplicationRecord # difficulty: 关卡难度: 1.简单 2.中等 3.困难 # show_type: 效果展示:-1.无效果 1.图片 2.apk/exe 3.txt 4.html 5.mp3 6.mp4 - default_scope { order("challenges.position asc") } belongs_to :shixun, :touch => true, counter_cache: true belongs_to :user diff --git a/app/models/course.rb b/app/models/course.rb index 1f38827ae..25a017faa 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -327,7 +327,7 @@ class Course < ApplicationRecord #创建课程后,给该用户发送消息 def send_tiding - self.tidings << Tiding.new(user_id: tea_id, trigger_user_id: tea_id, belong_container_id: id, + self.tidings << Tiding.new(user_id: tea_id, trigger_user_id: 1, belong_container_id: id, belong_container_type: 'Course', tiding_type: 'System') end diff --git a/app/models/course_group.rb b/app/models/course_group.rb index 33e40ee52..d57edf497 100644 --- a/app/models/course_group.rb +++ b/app/models/course_group.rb @@ -8,7 +8,7 @@ class CourseGroup < ApplicationRecord has_many :homework_group_reviews, :dependent => :destroy scope :by_group_ids, lambda { |ids| where(id: ids)} - validates :name, length: { maximum: 20 } + validates :name, length: { maximum: 60 } after_create :generate_invite_code diff --git a/app/models/course_message.rb b/app/models/course_message.rb index acb45d5f4..674e92169 100644 --- a/app/models/course_message.rb +++ b/app/models/course_message.rb @@ -11,7 +11,7 @@ class CourseMessage < ApplicationRecord def pass! update!(status: :PASSED) - send_deal_tiding + send_deal_tiding(1) end def application_user @@ -20,16 +20,16 @@ class CourseMessage < ApplicationRecord def reject! update!(status: :REJECTED) - send_deal_tiding + send_deal_tiding(2) end private - def send_deal_tiding + def send_deal_tiding deal_status # 发送申请处理结果消息 Tiding.create!( - user_id: user_id, trigger_user: User.current, container_id: course_id, container_type: 'DealCourse', - belong_container: course, extra: content.to_i == 2 ? '7' : '9', tiding_type: 'System', status: status == :PASSED ? 1 : 2 + user_id: course_message_id, trigger_user_id: 1, container_id: course_id, container_type: 'DealCourse', + belong_container: course, extra: content.to_i == 2 ? '9' : '7', tiding_type: 'System', status: deal_status ) # 将申请消息置为已处理 Tiding.where(trigger_user_id: user_id, container_id: course_id, container_type: 'JoinCourse', status: 0).update_all(status: 1) diff --git a/app/models/discuss.rb b/app/models/discuss.rb index 2d9c00110..a50b18a6f 100644 --- a/app/models/discuss.rb +++ b/app/models/discuss.rb @@ -8,6 +8,7 @@ class Discuss < ApplicationRecord has_many :praise_treads, as: :praise_tread_object, dependent: :destroy has_many :tidings, as: :container, dependent: :destroy has_one :praise_tread_cache, as: :object, dependent: :destroy + belongs_to :dis, polymorphic: true belongs_to :challenge after_create :send_tiding @@ -44,6 +45,10 @@ class Discuss < ApplicationRecord Discuss.where(parent_id: self.id).includes(:user).reorder(created_at: :asc) end + def child_discuss_count + Discuss.where(root_id: id).count + end + private def send_tiding diff --git a/app/models/homework_common.rb b/app/models/homework_common.rb index 9aa4a8fe1..112fc523b 100644 --- a/app/models/homework_common.rb +++ b/app/models/homework_common.rb @@ -264,4 +264,30 @@ class HomeworkCommon < ApplicationRecord def challenge_score challenge_id homework_challenge_settings.find_by(challenge_id: challenge_id)&.score.to_f end + + def update_homework_work_score + if unified_setting + works = student_works + user_ids = course.students.pluck(:user_id) + else + user_ids = course.students.where(course_group_id: published_settings.pluck(:course_group_id)).pluck(:user_id) + works = student_works.where(user_id: user_ids) + end + + works = works.includes(:challenge_work_scores) + + challenge_settings = homework_challenge_settings + challenge_setting_ids = challenge_settings.pluck(:challenge_id) + myshixuns = Myshixun.where(shixun_id: homework_commons_shixun&.shixun_id, user_id: user_ids).includes(:games) + myshixuns.find_each(batch_size: 100) do |myshixun| + work = works.select{|work| work.user_id == myshixun.user_id}.first + if work && myshixun + games = myshixun.games.select{|game| challenge_setting_ids.include?(game.challenge_id)} + HomeworksService.new.update_myshixun_work_score work, myshixun, games, self, challenge_settings + end + end + HomeworksService.new.update_student_eff_score(self) if (allow_late && late_time < Time.now) || + (!allow_late && end_time < Time.now) + update_attribute('calculation_time', Time.now) + end end diff --git a/app/models/journals_for_message.rb b/app/models/journals_for_message.rb index 1da26fd22..4300ae9cc 100644 --- a/app/models/journals_for_message.rb +++ b/app/models/journals_for_message.rb @@ -11,6 +11,7 @@ class JournalsForMessage < ApplicationRecord scope :parent_comment, -> { where(m_parent_id: nil)} scope :search_by_jour_type, lambda{|type,ids| where(jour_type:type,jour_id: ids)} + has_many :tidings, as: :container, dependent: :destroy # "jour_type", # 留言所属类型 # "jour_id", # 留言所属类型的id @@ -25,6 +26,8 @@ class JournalsForMessage < ApplicationRecord # "is_comprehensive_evaluation", # 1 教师评论、2 匿评、3 留言 # "hidden", 隐藏 + after_create :send_tiding + # course_identity 课堂用户身份 def contents_show course_identity @@ -47,4 +50,29 @@ class JournalsForMessage < ApplicationRecord JournalsForMessage.includes(:user).where(m_parent_id: self.id).page(page).per(limit).reorder("created_on asc") end + + def send_tiding + # 回复和@同一个人时:只发@的消息(因@的消息先创建) + case self.jour_type + # 用户留言当做私信处理 不发消息 + when "Principal" +=begin + user_id = self.m_parent_id.present? ? JournalsForMessage.find(self.m_parent_id).user_id : self.jour_id + if user_id != self.user_id && !self.tidings.where(:user_id => user_id, :trigger_user_id => self.user_id, :tiding_type => "Mentioned").first.present? + self.tidings << Tiding.new(:trigger_user_id => self.user_id, :user_id => user_id, :parent_container_id => self.jour_id, :parent_container_type => self.jour_type, :belong_container_id => self.jour_id, :belong_container_type => "User", :viewed => 0, :tiding_type => self.m_parent_id.present? ? "Comment" : "Journal") + end +=end + when "HomeworkCommon", "GraduationTopic" + user_id = self.m_parent_id.present? ? JournalsForMessage.find(self.m_parent_id).user_id : (self.jour_type == "HomeworkCommon" ? self.jour.user_id : self.jour.tea_id) + if user_id != self.user_id && !self.tidings.where(:user_id => user_id, :trigger_user_id => self.user_id, :tiding_type => "Mentioned").first.present? + self.tidings << Tiding.new(:trigger_user_id => self.user_id, :user_id => user_id, :parent_container_id => self.jour_id, :parent_container_type => self.jour_type, :belong_container_id => self.jour.course_id, :belong_container_type => "Course", :viewed => 0, :tiding_type => "Comment") + end + when "StudentWorksScore" + course_id = self.jour.try(:student_work).try(:homework_common).try(:course_id) + user_id = self.m_parent_id.present? ? JournalsForMessage.find(self.m_parent_id).user_id : self.jour.user_id + if user_id != self.user_id && !self.tidings.where(:user_id => user_id, :trigger_user_id => self.user_id, :tiding_type => "Mentioned").first.present? + self.tidings << Tiding.new(:trigger_user_id => self.user_id, :user_id => user_id, :parent_container_id => self.jour_id, :parent_container_type => self.jour_type, :belong_container_id => course_id, :belong_container_type => "Course", :viewed => 0, :tiding_type => "Comment") + end + end + end end diff --git a/app/models/library.rb b/app/models/library.rb index 894dcdac0..e2bc20989 100644 --- a/app/models/library.rb +++ b/app/models/library.rb @@ -10,11 +10,13 @@ class Library < ApplicationRecord has_many :attachments, as: :container has_one :praise_tread_cache, foreign_key: :object_id + has_many :praise_treads, as: :praise_tread_object, dependent: :destroy + validates :uuid, presence: true, uniqueness: true aasm(:status) do - state :pending, initiali: true + state :pending, initial: true state :processing state :refused state :published @@ -32,6 +34,10 @@ class Library < ApplicationRecord end end + def increment_visited_count!(num = 1) + increment_column!(:visited_count, num) + end + def generate_uuid uuid = Util::UUID.time_uuid while Library.exists?(uuid: uuid) @@ -40,4 +46,10 @@ class Library < ApplicationRecord self.uuid = uuid end + + private + + def increment_column!(column, num = 1) + self.class.connection.execute("update #{self.class.table_name} set #{column} = COALESCE(#{column}, 0) + #{num} where id = #{id}") + end end \ No newline at end of file diff --git a/app/models/library_apply.rb b/app/models/library_apply.rb index 13e195f34..0a7ec8aec 100644 --- a/app/models/library_apply.rb +++ b/app/models/library_apply.rb @@ -4,7 +4,7 @@ class LibraryApply < ApplicationRecord belongs_to :library aasm(:status) do - state :pending, initiali: true + state :pending, initial: true state :refused state :agreed diff --git a/app/models/memo.rb b/app/models/memo.rb index 4dc153c81..d09251358 100644 --- a/app/models/memo.rb +++ b/app/models/memo.rb @@ -6,7 +6,7 @@ class Memo < ApplicationRecord has_many :memo_tag_repertoires, dependent: :destroy has_many :tag_repertoires, :through => :memo_tag_repertoires - has_many :praise_tread, as: :praise_tread_object, dependent: :destroy + has_many :praise_treads, as: :praise_tread_object, dependent: :destroy has_one :praise_tread_cache, as: :object, dependent: :destroy belongs_to :author, class_name: 'User', foreign_key: 'author_id' @@ -14,6 +14,8 @@ class Memo < ApplicationRecord has_many :descendants, foreign_key: :root_id, class_name: 'Memo' has_many :children, foreign_key: :parent_id, class_name: 'Memo' + has_many :attachments, as: :container, dependent: :destroy + has_many :tidings, as: :container, dependent: :destroy scope :field_for_list, lambda{ select([:id, :subject, :author_id, :sticky, :updated_at, :language, :reward, :all_replies_count, :viewed_count, :forum_id]) diff --git a/app/models/project_package.rb b/app/models/project_package.rb index 219f60ca4..a8e134918 100644 --- a/app/models/project_package.rb +++ b/app/models/project_package.rb @@ -17,7 +17,7 @@ class ProjectPackage < ApplicationRecord scope :invisible, -> { where(status: %i[pending applying refused]) } aasm(:status) do - state :pending, initiali: true + state :pending, initial: true state :applying state :refused state :published diff --git a/app/models/project_package_apply.rb b/app/models/project_package_apply.rb index 5116f075f..0dd69c0cf 100644 --- a/app/models/project_package_apply.rb +++ b/app/models/project_package_apply.rb @@ -4,7 +4,7 @@ class ProjectPackageApply < ApplicationRecord belongs_to :project_package aasm(:status) do - state :pending, initiali: true + state :pending, initial: true state :refused state :agreed diff --git a/app/models/searchable/dependents/user.rb b/app/models/searchable/dependents/user.rb index bb55d0530..e77bc9a40 100644 --- a/app/models/searchable/dependents/user.rb +++ b/app/models/searchable/dependents/user.rb @@ -17,6 +17,7 @@ module Searchable::Dependents::User # reindex subject created_subjects.each(&:reindex) + subjects.each(&:reindex) end end end \ No newline at end of file diff --git a/app/models/searchable/subject.rb b/app/models/searchable/subject.rb index 94a5c1383..a0036c200 100644 --- a/app/models/searchable/subject.rb +++ b/app/models/searchable/subject.rb @@ -27,6 +27,7 @@ module Searchable::Subject { author_name: user.real_name, author_school_name: user.school_name, + member_user_names: users.map(&:real_name).join(' ') } end @@ -43,7 +44,8 @@ module Searchable::Subject author_school_name: user.school_name, visits_count: visits, stage_count: stages_count, - stage_shixuns_count: stage_shixuns_count + stage_shixuns_count: stage_shixuns_count, + shixuns_count: shixuns_count } end diff --git a/app/models/shixun.rb b/app/models/shixun.rb index 82f689e3f..81b444c0a 100644 --- a/app/models/shixun.rb +++ b/app/models/shixun.rb @@ -5,7 +5,7 @@ class Shixun < ApplicationRecord # hide_code: 隐藏代码窗口 # code_hidden: 隐藏代码目录 # task_pass: 跳关 - has_many :challenges, dependent: :destroy + has_many :challenges, -> {order("challenges.position asc")}, dependent: :destroy has_many :challenge_tags, through: :challenges has_many :myshixuns, :dependent => :destroy has_many :shixun_members, dependent: :destroy @@ -38,6 +38,7 @@ class Shixun < ApplicationRecord belongs_to :user # 实训服务配置 has_many :shixun_service_configs, :dependent => :destroy + has_many :tidings, as: :container, dependent: :destroy scope :search_by_name, ->(keyword) { where("name like ? or description like ? ", "%#{keyword}%", "%#{keyword}%") } @@ -62,6 +63,8 @@ class Shixun < ApplicationRecord scope :field_for_recommend, lambda{ select([:id, :name, :identifier, :myshixuns_count]) } scope :find_by_ids,lambda{|k| where(id:k)} + after_create :send_tiding + # REDO:  def propaedeutics shixun_info.try(:propaedeutics) @@ -242,4 +245,15 @@ class Shixun < ApplicationRecord def finished_challenges_count(user) Game.joins(:myshixun).where(user_id: user.id, status: 2, myshixuns: { shixun_id: id }).count end + + def has_web_route? + self.mirror_name.include?('JavaWeb') || self.mirror_name.include?('PHP') && self.mirror_name.include?('Mysql') || self.mirror_name.include?('Web') + end + + private + + def send_tiding + self.tidings << Tiding.new(:user_id => user_id, :trigger_user_id => 1, :belong_container_id => id, :belong_container_type =>'Shixun', :tiding_type => "System", :viewed => 0) + end + end diff --git a/app/models/student_graduation_topic.rb b/app/models/student_graduation_topic.rb index ea1774695..50f150f92 100644 --- a/app/models/student_graduation_topic.rb +++ b/app/models/student_graduation_topic.rb @@ -17,7 +17,12 @@ class StudentGraduationTopic < ApplicationRecord scope :is_refused, -> {where(status: 2)} scope :is_accepted, -> {where(status: 1)} scope :is_accepting, -> {where(status: 0)} + after_create :send_tiding + def send_tiding + self.tidings << Tiding.new(:user_id => self.graduation_topic.tea_id, :trigger_user_id => self.user_id, :parent_container_id => self.graduation_topic_id, :parent_container_type => "GraduationTopic", + :belong_container_id => self.graduation_topic.course_id, :belong_container_type => "Course", :viewed => 0, :status => 0, :tiding_type => "GraduationTopic") + end # 学生名称 def name diff --git a/app/models/student_work.rb b/app/models/student_work.rb index 9151ca501..074068273 100644 --- a/app/models/student_work.rb +++ b/app/models/student_work.rb @@ -123,10 +123,10 @@ class StudentWork < ApplicationRecord # 更新作品成绩 def set_work_score - if work_status > 0 && homework_common && homework_common.homework_detail_manual && !self.ultimate_score + if work_status > 0 && homework_common && !self.ultimate_score case homework_common.homework_type when "normal", "group" - if !homework_common.homework_detail_manual.final_mode + if !homework_common&.homework_detail_manual&.final_mode tea_ass_proportion = homework_common.homework_detail_manual.ta_proportion tea_proportion = homework_common.homework_detail_manual.te_proportion if self.teacher_score diff --git a/app/models/tiding.rb b/app/models/tiding.rb index 90abdf809..d885f93fd 100644 --- a/app/models/tiding.rb +++ b/app/models/tiding.rb @@ -9,16 +9,15 @@ class Tiding < ApplicationRecord def identifier value = nil - if Object.const_defined?(container_type) - value = container.try(:identifier) - end - if value.blank? && parent_container_type && Object.const_defined?(parent_container_type) - value = parent_container_type.try(:identifier) + value = container.try(:identifier) rescue nil + + if value.blank? && parent_container_type + value = parent_container_type.try(:identifier) rescue nil end - if value.blank? && belong_container_type && Object.const_defined?(belong_container_type) - value = belong_container.try(:identifier) + if value.blank? && belong_container_type + value = belong_container.try(:identifier) rescue nil end value diff --git a/app/models/user.rb b/app/models/user.rb index ed9d70c00..9c3d1af39 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -60,8 +60,8 @@ class User < ApplicationRecord has_many :games, :dependent => :destroy has_many :created_subjects, foreign_key: :user_id, class_name: 'Subject' - has_many :subjects, :through => :subject_members has_many :subject_members, :dependent => :destroy + has_many :subjects, :through => :subject_members has_many :grades, :dependent => :destroy has_many :experiences, :dependent => :destroy has_many :student_works, :dependent => :destroy @@ -132,6 +132,12 @@ class User < ApplicationRecord # 项目 has_many :applied_projects, dependent: :destroy + # 教学案例 + has_many :libraries, dependent: :destroy + + # 视频 + has_many :videos, dependent: :destroy + # Groups and active users scope :active, lambda { where(status: STATUS_ACTIVE) } @@ -234,7 +240,7 @@ class User < ApplicationRecord # 课堂的老师(创建者、老师、助教),不用考虑当前身份 def teacher_of_course_non_active?(course) - course.course_members.exists?(user_id: id, role: [1,2,3]) || admin? || business? + course.course_members.exists?(user_id: id, role: [1,2,3]) end # 是否是教师,课堂管理员或者超级管理员 @@ -257,9 +263,9 @@ class User < ApplicationRecord course&.course_members.exists?(user_id: id) end - # 实训路径管理员:创建者或admin + # 实训路径管理员 def creator_of_subject?(subject) - subject.user_id == id || admin? + subject.user_id == id end # 实训路径:合作者、admin @@ -440,7 +446,7 @@ class User < ApplicationRecord end def manager_of_memo?(memo) - id == memo.author_id || admin? + id == memo.author_id || admin? || business? end # 是否是项目管理者 diff --git a/app/models/video.rb b/app/models/video.rb new file mode 100644 index 000000000..381db58a9 --- /dev/null +++ b/app/models/video.rb @@ -0,0 +1,36 @@ +class Video < ApplicationRecord + include AASM + + belongs_to :user + + has_many :video_applies, dependent: :destroy + has_one :processing_video_apply, -> { where(status: :pending) }, class_name: 'VideoApply' + + aasm(:status) do + state :pending, initial: true + state :processing + state :refused + state :published + + event :apply_publish do + transitions from: :pending, to: :processing + end + + event :refuse do + transitions from: :processing, to: :refused + end + + event :publish do + transitions from: :processing, to: :published, guard: :vod_uploaded? + end + end + + aasm(:vod_status, namespace: :vod) do + state :uploading, initial: true + state :uploaded + + event :upload_success do + transitions from: :uploading, to: :uploaded + end + end +end \ No newline at end of file diff --git a/app/models/video_apply.rb b/app/models/video_apply.rb new file mode 100644 index 000000000..694a448d7 --- /dev/null +++ b/app/models/video_apply.rb @@ -0,0 +1,19 @@ +class VideoApply < ApplicationRecord + include AASM + + belongs_to :video + + aasm(:status) do + state :pending, initial: true + state :refused + state :agreed + + event :refuse do + transitions from: :pending, to: :refused + end + + event :agree do + transitions from: :pending, to: :agreed + end + end +end \ No newline at end of file diff --git a/app/queries/application_query.rb b/app/queries/application_query.rb new file mode 100644 index 000000000..3a92cc6e8 --- /dev/null +++ b/app/queries/application_query.rb @@ -0,0 +1,3 @@ +class ApplicationQuery + include Callable +end \ No newline at end of file diff --git a/app/queries/users/video_query.rb b/app/queries/users/video_query.rb new file mode 100644 index 000000000..cfaa314cc --- /dev/null +++ b/app/queries/users/video_query.rb @@ -0,0 +1,28 @@ +class Users::VideoQuery < ApplicationQuery + include CustomSortable + + sort_columns :published_at, :title, default_by: :published_at, default_direction: :desc + + attr_reader :user, :params + + def initialize(user, params) + @user = user + @params = params + end + + def call + videos = user.videos + + videos = + case params[:status] + when 'published' then videos.published + when 'processing' then videos.processing + else videos.published + end + + keyword = params[:keyword].to_s.strip + videos = videos.where('title LIKE ?', "%#{keyword}%") if keyword.present? + + custom_sort(videos, params[:sort_by], params[:sort_direction]) + end +end \ No newline at end of file diff --git a/app/services/concerns/elasticsearch_able.rb b/app/services/concerns/elasticsearch_able.rb index e93f9c537..80ca5467e 100644 --- a/app/services/concerns/elasticsearch_able.rb +++ b/app/services/concerns/elasticsearch_able.rb @@ -22,13 +22,7 @@ module ElasticsearchAble fragment_size: EduSetting.get('es_highlight_fragment_size') || 30, tag: '', fields: { - name: { type: 'plain' }, - challenge_names: { type: 'plain' }, - challenge_tag_names: { type: 'plain' }, - description: { type: 'plain' }, - subject_stages: { type: 'plain' }, - content: { type: 'plain' }, - descendants_contents: { type: 'plain' }, + '*' => { type: 'plain', number_of_fragments: 3 } } } end @@ -47,4 +41,4 @@ module ElasticsearchAble def page params[:page].to_i <= 0 ? 1 : params[:page].to_i end -end \ No newline at end of file +end diff --git a/app/services/discusses_service.rb b/app/services/discusses_service.rb index 91fa523c9..81ac1eb33 100644 --- a/app/services/discusses_service.rb +++ b/app/services/discusses_service.rb @@ -58,7 +58,7 @@ class DiscussesService praise_count: 0, position: params[:position], challenge_id: params[:challenge_id], hidden: !current_user.admin? ) # 发送手机通知 - Trustie::Sms.send(mobile:'18173242757', send_type:'discuss', name:'管理员') + Educoder::Sms.send(mobile:'18173242757', send_type:'discuss', name:'管理员') rescue Exception => e raise(e.message) end @@ -148,30 +148,6 @@ class DiscussesService @discuss = Discuss.select([:id, :hidden, :reward, :dis_type, :dis_id, :position, :challenge_id, :root_id]).find(id) end - protected - def memo_list memos - memos.map do |m| - user = User.find(m.user_id) - praise_count = m.praise_tread.where(:praise_or_tread => 1).count - replies_count = Discuss.where(:root_id => m.id).count - shixun_tag = m.dis.tag_repertoires.map(&:name) - m.attributes.dup.except("user_id", "dis_id", "dis_type", "root_id").merge({ - subject: (message_content m.content), - username: user.show_name, - login: user.login, - praise_count: praise_count, - replies_count: replies_count, - image_url: url_to_avatar(user), - shixun_tag: shixun_tag, - tpm_url: "/shixuns/#{m.dis.identifier}/shixun_discuss" - }) - end - end - - def format_for_current_user current_user - {username: current_user.show_name, login: current_user.login, user_id: current_user.id, image_url: url_to_avatar(current_user), admin: current_user.admin?} - end - def recommends hot_shixuns = Shixun.field_for_recommend.published.order("myshixuns_count desc").limit(2) newest_shixuns = Shixun.field_for_recommend.published.order("created_at desc").limit(2) @@ -185,6 +161,30 @@ class DiscussesService return recommend_shixuns end + def memo_list memos + memos.map do |m| + user = m.user + # praise_count = m.praise_treads.select{|pt| pt.praise_or_tread == 1}.count + replies_count = m.child_discuss_count + shixun_tag = m.dis.tag_repertoires.map(&:name) + m.attributes.dup.except("user_id", "dis_id", "dis_type", "root_id", "praise_count", "content").merge({ + subject: (message_content m.content), + username: user.full_name, + login: user.login, + replies_count: replies_count, + image_url: url_to_avatar(user), + shixun_tag: shixun_tag, + tpm_url: "/shixuns/#{m.dis.identifier}/shixun_discuss" + }) + end + end + + protected + + def format_for_current_user current_user + {username: current_user.show_name, login: current_user.login, user_id: current_user.id, image_url: url_to_avatar(current_user), admin: current_user.admin?} + end + # 将数据库对象转换成哈希对象 def object_to_hash objects objects.map{|o| o.attributes.dup} diff --git a/app/services/duplicate_course_service.rb b/app/services/duplicate_course_service.rb index c9e991d7f..9d61984db 100644 --- a/app/services/duplicate_course_service.rb +++ b/app/services/duplicate_course_service.rb @@ -130,7 +130,7 @@ class DuplicateCourseService < ApplicationService def copy_attachments! origin_course.attachments.each do |origin_attachment| attachment = origin_attachment.copy - attachment.tag_list.add(origin_attachment.tag_list) # tag关联 + # attachment.tag_list.add(origin_attachment.tag_list) # tag关联 attachment.container = course attachment.created_on = Time.now attachment.publish_time = nil diff --git a/app/services/libraries/save_service.rb b/app/services/libraries/save_service.rb index 45cd033dd..8a5c5bfca 100644 --- a/app/services/libraries/save_service.rb +++ b/app/services/libraries/save_service.rb @@ -56,7 +56,7 @@ class Libraries::SaveService < ApplicationService destroy_ids = old_attachment_id - attachment_ids library.attachments.where(id: destroy_ids).delete_all - Attachment.where(id: attachment_ids, author_id: user.id).update_all(container: library) + Attachment.where(id: attachment_ids, author_id: user.id).update_all(container_type: library.class.to_s, container_id: library.id) end def library_params diff --git a/app/services/private_messages/create_service.rb b/app/services/private_messages/create_service.rb index 560f1a540..88f3a084f 100644 --- a/app/services/private_messages/create_service.rb +++ b/app/services/private_messages/create_service.rb @@ -3,7 +3,7 @@ class PrivateMessages::CreateService < ApplicationService attr_reader :sender, :receiver, :params - def initialize(sender, receiver, **params) + def initialize(sender, receiver, params) @sender = sender @receiver = receiver @params = params diff --git a/app/services/project_packages/save_service.rb b/app/services/project_packages/save_service.rb index a876f56b3..8385ac5dd 100644 --- a/app/services/project_packages/save_service.rb +++ b/app/services/project_packages/save_service.rb @@ -54,7 +54,7 @@ class ProjectPackages::SaveService < ApplicationService raise Error, '验证码不能为空' if params[:code].blank? code = VerificationCode.where(phone: params[:contact_phone], code_type: 9, code: params[:code]).last - raise Error, '无效的验证码' if code.blank? || !code.valid_code? + raise Error, '无效的验证码' if code.blank? || !code.effective? end def deal_attachments diff --git a/app/services/project_packages/win_bidding_service.rb b/app/services/project_packages/win_bidding_service.rb index 831c29449..54cb1e883 100644 --- a/app/services/project_packages/win_bidding_service.rb +++ b/app/services/project_packages/win_bidding_service.rb @@ -1,14 +1,16 @@ class ProjectPackages::WinBiddingService < ApplicationService Error = Class.new(StandardError) - attr_reader :package, :params + attr_reader :package, :user, :params - def initialize(package, params) + def initialize(package, user, params) @package = package + @user = user @params = params end def call + raise Error, '没有权限' unless package.creator_id == user.id || user.admin_or_business? raise Error, '竞标报名还未结束' unless package.bidding_end? raise Error, '该状态下不能选择中标者' unless package.may_finish_bidding? diff --git a/app/services/projects/apply_join_service.rb b/app/services/projects/apply_join_service.rb index a177de930..d14b3dc52 100644 --- a/app/services/projects/apply_join_service.rb +++ b/app/services/projects/apply_join_service.rb @@ -22,7 +22,7 @@ class Projects::ApplyJoinService < ApplicationService apply.forge_activities.find_or_create_by!(user: user, project: project) - notify_project_manager! + notify_project_manager!(apply) end # notify_project_owner @@ -47,10 +47,13 @@ class Projects::ApplyJoinService < ApplicationService end end - def notify_project_manager! + def notify_project_manager!(apply) columns = %i[user_id applied_id applied_type status viewed applied_user_id role project_id created_at updated_at] AppliedMessage.bulk_insert(*columns) do |worker| - base_attr = { status: false, viewed: false, applied_user_id: user.id, role: role_value, project_id: project.id } + base_attr = { + applied_id: apply.id, applied_type: 'AppliedProject', status: false, viewed: false, + applied_user_id: user.id, role: role_value, project_id: project.id + } project.manager_members.each do |manager| worker.add(base_attr.merge(user_id: manager.user_id)) diff --git a/app/services/search_shixun_service.rb b/app/services/search_shixun_service.rb deleted file mode 100644 index 2e77e82d8..000000000 --- a/app/services/search_shixun_service.rb +++ /dev/null @@ -1,96 +0,0 @@ -class SearchShixunService < ApplicationService - include ElasticsearchAble - - attr_reader :user, :params - - def initialize(user, params) - @user = user - @params = params - end - - def call - Shixun.search(keyword, - fields: search_fields, - where: where_clauses, - order: order_clauses, - includes: includes_clauses, - page: page, - per_page: per_page) - end - - private - - def tag_filter_shixun_ids - return [] if params[:tag_level].to_i == 0 || params[:tag_id].blank? - - case params[:tag_level].to_i - when 1 then - Repertoire.find(params[:tag_id]).tag_repertoires.joins(:shixun_tag_repertoires) - .pluck('shixun_tag_repertoires.shixun_id') - when 2 then - SubRepertoire.find(params[:tag_id]).tag_repertoires.joins(:shixun_tag_repertoires) - .pluck('shixun_tag_repertoires.shixun_id') - when 3 then - TagRepertoire.find(params[:tag_id]).shixun_tag_repertoires.pluck(:shixun_id) - else - [] - end - end - - def user_filter_shixun_ids - return [] if params[:order_by] != 'mine' - - user.shixun_members.pluck(:shixun_id) + user.myshixuns.pluck(:shixun_id) - end - - def keyword - params[:keyword].to_s.strip.presence || '*' - end - - def search_fields - %w(name^10 author_name challenge_names description challenge_tag_names) - end - - def where_clauses - hash = {} - - ids = user_filter_shixun_ids + tag_filter_shixun_ids - hash[:id] = ids if ids.present? - - if params[:order_by] == 'mine' - hash[:status] = { not: -1 } - else - hash.merge!(hidden: false, status: 2) - end - - unless params[:status].to_i.zero? - params[:status] = [0, 1] if params[:status].to_i == 1 - hash[:status] = params[:status] - end - - hash[:trainee] = params[:diff].to_i unless params[:diff].to_i.zero? - - hash - end - - def includes_clauses - [] - end - - def order_clauses - hash = { _score: :desc } - publish_order = { type: 'number', order: :desc, script: 'doc["status"].value=="2" ? 1 : 0' } - - sort = params[:sort].to_s.strip == 'asc' ? 'asc' : 'desc' - clauses = - case params[:order_by].presence - when 'new' then { _script: publish_order, created_at: sort } - when 'hot' then { _script: publish_order, myshixuns_count: sort } - when 'mine' then { created_at: sort } - else { _script: publish_order, publish_time: sort } - end - hash.merge!(clauses) - - hash - end -end \ No newline at end of file diff --git a/app/services/users/update_account_service.rb b/app/services/users/update_account_service.rb index d603cec8c..c8ba6da61 100644 --- a/app/services/users/update_account_service.rb +++ b/app/services/users/update_account_service.rb @@ -51,6 +51,8 @@ class Users::UpdateAccountService < ApplicationService if first_full_reward RewardGradeService.call(user, container_id: user.id, container_type: 'Account', score: 500) + + sms_notify_admin(user.lastname) if user.user_extension.teacher? end user @@ -65,4 +67,10 @@ class Users::UpdateAccountService < ApplicationService def user_extension_attributes params.slice(*%i[location location_city identity student_id technical_title school_id department_id]) end + + def sms_notify_admin name + Educoder::Sms.send(mobile:'17680641960', send_type:'teacher_register', name: name, user_name:'管理员') + rescue => ex + Util.logger_error(ex) + end end \ No newline at end of file diff --git a/app/services/videos/agree_apply_service.rb b/app/services/videos/agree_apply_service.rb new file mode 100644 index 000000000..50791935a --- /dev/null +++ b/app/services/videos/agree_apply_service.rb @@ -0,0 +1,35 @@ +class Videos::AgreeApplyService < ApplicationService + Error = Class.new(StandardError) + + attr_reader :video_apply, :video, :user + + def initialize(video_apply, user) + @video_apply = video_apply + @video = video_apply.video + @user = user + end + + def call + raise Error, '该状态下不能进行此操作' unless video_apply.may_agree? && video.may_publish? + + ActiveRecord::Base.transaction do + video_apply.agree! + + video.published_at = Time.now + video.publish + video.save! + + # 将消息改为已处理 + Tiding.where(container_id: video.id, container_type: 'Video', tiding_type: 'Apply', status: 0).update_all(status: 1) + notify_video_author! + end + end + + private + + def notify_video_author! + Tiding.create!(user_id: video.user_id, trigger_user_id: 1, + container_id: video.id, container_type: 'Video', + tiding_type: 'System', status: 1) + end +end \ No newline at end of file diff --git a/app/services/videos/batch_publish_service.rb b/app/services/videos/batch_publish_service.rb new file mode 100644 index 000000000..e435b9508 --- /dev/null +++ b/app/services/videos/batch_publish_service.rb @@ -0,0 +1,35 @@ +class Videos::BatchPublishService < ApplicationService + Error = Class.new(StandardError) + + attr_reader :user, :params + + def initialize(user, params) + @user = user + @params = params + end + + def call + video_params = Array.wrap(params[:videos]).compact + return if video_params.blank? + + video_ids = [] + ActiveRecord::Base.transaction do + video_params.each do |param| + video = user.videos.find_by(uuid: param[:video_id]) + next if video.blank? || video.processing_video_apply.present? + + raise Error, '视频还未上传完成' if video.vod_uploading? + + video.title = param[:title].to_s.strip.presence || video.title + video.apply_publish + video.save! + + video.video_applies.create! + + video_ids << video.id + end + end + + BatchPublishVideoNotifyJob.perform_later(user.id, video_ids) if video_ids.present? + end +end \ No newline at end of file diff --git a/app/services/videos/create_auth_service.rb b/app/services/videos/create_auth_service.rb new file mode 100644 index 000000000..8d83ca4e2 --- /dev/null +++ b/app/services/videos/create_auth_service.rb @@ -0,0 +1,41 @@ +class Videos::CreateAuthService < ApplicationService + Error = Class.new(StandardError) + + attr_reader :user, :params + + def initialize(user, params) + @user = user + @params = params.clone + end + + def call + validate! + + result = upload_video_result + + Video.create!(user: user, uuid: result['VideoId'], title: title, cover_url: params[:cover_url]) + + result + end + + private + + def title + @_title ||= params.delete(:title).to_s.strip + end + + def filename + @_filename ||= params.delete(:file_name).to_s.strip + end + + def validate! + raise Error, '视频标题不能为空' if title.blank? + raise Error, '源文件名不能为空' if filename.blank? + end + + def upload_video_result + AliyunVod::Service.create_upload_video(title, filename, params) + rescue AliyunVod::Error => _ + raise Error, '获取视频上传凭证失败' + end +end \ No newline at end of file diff --git a/app/services/videos/dispatch_callback_service.rb b/app/services/videos/dispatch_callback_service.rb new file mode 100644 index 000000000..3bdabd91a --- /dev/null +++ b/app/services/videos/dispatch_callback_service.rb @@ -0,0 +1,27 @@ +class Videos::DispatchCallbackService < ApplicationService + attr_reader :video, :params + + def initialize(params) + @video = Video.find_by(uuid: params[:VideoId]) + @params = params + end + + def call + return if video.blank? + + # TODO:: 拆分事件分发 + case params['EventType'] + when 'FileUploadComplete' then # 视频上传完成 + video.file_url = params['FileUrl'] + video.upload_success + video.save! + when 'SnapshotComplete' then # 封面截图完成 + return if video.cover_url.present? + + video.update!(cover_url: params['CoverUrl']) + end + + rescue => ex + Util.logger_error(ex) + end +end \ No newline at end of file diff --git a/app/services/videos/refuse_apply_service.rb b/app/services/videos/refuse_apply_service.rb new file mode 100644 index 000000000..5d796db79 --- /dev/null +++ b/app/services/videos/refuse_apply_service.rb @@ -0,0 +1,38 @@ +class Videos::RefuseApplyService < ApplicationService + Error = Class.new(StandardError) + + attr_reader :video_apply, :video, :user, :params + + def initialize(video_apply, user, params) + @video_apply = video_apply + @video = video_apply.video + @user = user + @params = params + end + + def call + reason = params[:reason].to_s.strip + raise Error, '原因不能为空' if reason.blank? + raise Error, '该状态下不能进行此操作' unless video_apply.may_refuse? + + ActiveRecord::Base.transaction do + video_apply.reason = reason + video_apply.refuse + video_apply.save! + + video.refuse! + + # 将消息改为已处理 + Tiding.where(container_id: video.id, container_type: 'Video', tiding_type: 'Apply', status: 0).update_all(status: 1) + notify_video_author! + end + end + + private + + def notify_video_author! + Tiding.create!(user_id: video.user_id, trigger_user_id: 1, + container_id: video.id, container_type: 'Video', + tiding_type: 'System', status: 2, extra: video_apply.reason) + end +end \ No newline at end of file diff --git a/app/templates/shared/main.css b/app/templates/shared/main.css index 48fd91b15..67d43dc6c 100644 --- a/app/templates/shared/main.css +++ b/app/templates/shared/main.css @@ -1,781 +1,781 @@ -/*整体公用样式--------------主题颜色为蓝色#459be5,字体颜色为#05101a*/ -@charset "utf-8"; -body{font-size:14px; line-height:2.0;background:#fafafa!important;font-family: "微软雅黑","宋体"; color:#05101a;height: 100%;position: relative; -} -html,body{height:100%;} -body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td,span{ margin:0; padding:0;} -table,input,textarea,select,button {outline: none;border-radius: 3px; font-family: "微软雅黑","宋体"; font-size:14px;line-height:1.9;border:1px solid #eaeaea;background: #FFFFff; color:#05101A;} -textarea{resize: none;} -/*设置input框的placehoder的字体颜色*/ -input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color: #cccccc} -input::-moz-placeholder,textarea::-moz-placeholder { color:#cccccc;} -input::-moz-placeholder,textarea::-moz-placeholder { color:#cccccc;} -input::-ms-input-placeholder,textarea::-ms-input-placeholder {color:#cccccc;} - -div,img,tr,td,table{ border:0;} -a:link,a:visited{text-decoration:none; color:#05101a;} -a:hover {color:#459be5;} -ol, ul, li {list-style-type: none;} -select:disabled,input:disabled{background-color: #EEEEEE;} -/*万能清除浮动*/ -.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden;} -.clearfix{clear:both;zoom:1} -.cl{ clear: both; overflow: hidden;} -/*通用浮动*/ -.fl{ float: left!important;} -.fr{ float: right!important;} -/*pre标签换行*/ -.break-word{word-break: break-all;word-wrap: break-word;} -.break-word-firefox{white-space: pre-wrap !important;word-break: break-all;} -/*文字左右两端对齐*/ -.justify{text-align: justify} -.indent{text-indent: 2em;} - -.edu-name-dark{ max-width:100px; display: block; } -.edu-info-dark{ max-width:345px; display: block; } -.edu-max-h200{ height:200px; overflow: auto;} -.edu-h260{ height:260px;} -.edu-h270{ height:270px;} -.edu-h310{ height:310px;} -.edu-position{ position: relative;} -.edu-h200-auto{ max-height:200px; overflow:auto;} -.edu-h300-auto{ max-height:300px; overflow:auto;} -.edu-h350-auto{ max-height:350px; overflow:auto;} -.edu-h280-auto{ height:280px; overflow:auto;} -.edu-txt-w240{ width:240px; display: block;} -.edu-txt-w280{ width:280px; display: block;} -.edu-txt-w320{ width:320px; display: block;} -.edu-txt-w200{ width:200px; display: block;} -a.edu-txt-w280,.edu-txt-w280{ width:280px; display: inline-block;text-align: center} -a.edu-txt-w190,.edu-txt-w190{ width:190px; display: inline-block;text-align: center} -a.edu-txt-w160,.edu-txt-w160{ width:160px; display: inline-block;text-align: center} -a.edu-txt-w140,.edu-txt-w140{ width:141px; display: inline-block;text-align: center} -a.edu-txt-w130,.edu-txt-w130{ width:130px; display: inline-block;text-align: center} -a.edu-txt-w120,.edu-txt-w120{ width:120px; display: inline-block;text-align: center} -a.edu-txt-w100,.edu-txt-w100{ width:100px; display: inline-block;text-align: center} -a.edu-txt-w90,.edu-txt-w90{ width:90px; display: inline-block;text-align: center} -a.edu-txt-w80,.edu-txt-w80{ width:80px; display: inline-block;text-align: center} - -/*超过隐藏*/ -.overellipsis{overflow: hidden;white-space: nowrap;text-overflow: ellipsis;} -.task-hide{overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} -.task-hide-2{overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;} -/*隐藏*/ -.none{display: none} -.block{ display:block;} - -.boxsizing{box-sizing: border-box} - - -/*字体icon均为18px*/ -.iconfont{font-size: 18px!important;} -/*通用文字大小样式*/ -.font-n{font-weight: normal!important;} -.font-bd{font-weight: bold;} -.font-n{font-weight: normal;} -.font-12{ font-size: 12px!important;} -.font-13{ font-size: 13px!important;} -.font-14{ font-size: 14px!important;} -.font-15{ font-size: 15px!important;} -.font-16{ font-size: 16px!important;} -.font-17{ font-size: 17px!important;} -.font-18{ font-size: 18px!important;} -.font-20{ font-size: 20px!important;} -.font-22{ font-size: 22px!important;} -.font-24{ font-size: 24px!important;} -.font-26{ font-size: 26px!important;} -.font-28{ font-size: 28px!important;} -.font-30{ font-size: 30px!important;} -.font-32{ font-size: 32px!important;} -.font-36{ font-size: 36px!important;} -.font-50{ font-size: 50px!important;} -.font-60{ font-size: 60px!important;} -.font-70{ font-size: 70px!important;} - -/*a标签的下划线*/ -a.decoration{text-decoration: underline} - -/*表单*/ -.panel-form-label{ display:inline-block; width:10%; min-width:90px; text-align:right; line-height:40px; font-weight: normal; } - -/*通用内外边距*/ -.mt-10{ margin-top:-10px;}.mt-3{ margin-top:-3px;}.mt0{ margin-top:0px!important;} .mt1{ margin-top:1px;}.mt2{ margin-top:2px;}.mt3{ margin-top:3px;}.mt4{ margin-top:4px;}.mt5{ margin-top:5px!important;}.mt6{ margin-top:6px;}.mt7{ margin-top:7px!important;}.mt8{ margin-top:8px;}.mt9{ margin-top:9px;}.mt10{ margin-top:10px!important;}.mt12{ margin-top:12px;}.mt13{ margin-top:13px;}.mt14{ margin-top:14px;}.mt15{ margin-top:15px!important;}.mt16{ margin-top:16px;}.mt17{ margin-top:17px;}.mt18{ margin-top:18px;}.mt20{ margin-top:20px!important;}.mt22{ margin-top:22px!important;}.mt23{ margin-top:23px!important;}.mt24{ margin-top:24px!important;}.mt25{ margin-top:25px;}.mt28{ margin-top:28px;}.mt30{ margin-top:30px!important;}.mt34{ margin-top:34px!important;}.mt35{ margin-top:35px!important;}.mt36{ margin-top:36px!important;}.mt40{ margin-top:40px;}.mt45{ margin-top:45px;}.mt46{ margin-top:46px;}.mt50{ margin-top:50px;!important;}.mt56{ margin-top:56px;!important;}.mt60{ margin-top:60px;}.mt70{ margin-top:70px;}.mt80{ margin-top:80px;}.mt95{ margin-top:95px;}.mt100{ margin-top:100px;}.mt110{ margin-top:110px;}.mt120{ margin-top:120px;}.mt130{ margin-top:130px;}.mt140{ margin-top:140px;}.mt150{ margin-top:150px;}.mt160{ margin-top:160px;} -.mb0{margin-bottom: 0px!important;}.mb3{ margin-bottom: 3px;}.mb5{ margin-bottom: 5px;}.mb7{ margin-bottom: 7px;}.mb10{ margin-bottom: 10px;}.mb11{ margin-bottom: 11px;}.mb14{ margin-bottom: 14px;}.mb15{ margin-bottom: 15px;}.mb16{ margin-bottom: 16px;}.mb20{ margin-bottom: 20px!important;}.mb25{ margin-bottom: 25px;}.mb26{ margin-bottom: 26px;}.mb28{ margin-bottom: 28px;}.mb30{ margin-bottom: 30px!important;}.mb40{ margin-bottom: 40px!important;}.mb50{ margin-bottom: 50px!important;}.mb60{ margin-bottom: 60px!important;}.mb70{ margin-bottom: 70px!important;}.mb80{ margin-bottom: 80px!important;}.mb90{ margin-bottom: 90px!important;}.mb100{ margin-bottom: 100px!important;}.mb110{ margin-bottom: 110px;} -.ml-3{ margin-left: -3px;}.ml1{margin-left: 1px;}.ml2{margin-left: 2px;}.ml3{margin-left: 3px;}.ml4{margin-left: 4px;}.ml5{ margin-left: 5px;}.ml6{ margin-left: 6px;}.ml10{ margin-left: 10px;}.ml12{ margin-left:12px!important;}.ml13{ margin-left:13px!important;}.ml15{ margin-left: 15px;}.ml18{ margin-left: 18px;}.ml20{ margin-left: 20px;}.ml22{ margin-left: 22px;}.ml25{ margin-left: 25px;}.ml30{ margin-left: 30px;}.ml33{ margin-left: 33px;}.ml35{ margin-left:35px;}.ml40{margin-left:40px;}.ml42{margin-left:42px;}.ml45{ margin-left: 45px;}.ml50{ margin-left: 50px;}.ml55{ margin-left: 55px;}.ml60{ margin-left: 60px;}.ml72{ margin-left: 72px;}.ml73{ margin-left: 73px;}.ml75{ margin-left: 75px;}.ml80{ margin-left: 80px;}.ml85{margin-left:85px;}.ml95{ margin-left: 95px;}.ml115{margin-left: 115px}.ml123{ margin-left: 123px;}.ml150{ margin-left: 150px;}.ml180{ margin-left: 180px;}.ml230{ margin-left: 230px;}.ml240{margin-left: 240px;}.ml250{ margin-left: 250px;}.ml290{ margin-left: 290px;} -.mr3{margin-right: 3px}.mr4{margin-right: 4px}.mr5{ margin-right: 5px;}.mr8{ margin-right: 8px;}.mr10{ margin-right: 10px;}.mr12{ margin-right:12px!important;}.mr15{ margin-right: 15px;}.mr18{ margin-right: 18px;}.mr20{ margin-right: 20px;}.mr24{ margin-right: 24px;}.mr25{ margin-right: 25px;}.mr30{ margin-right:30px;}.mr35{margin-right:35px;}.mr40{margin-right:40px;}.mr45{margin-right:45px;}.mr50{ margin-right: 50px;}.mr60{ margin-right:60px;}.mr70{ margin-right: 70px;}.mr75{ margin-right: 75px;}.mr80{ margin-right:80px;}.mr90{ margin-right:90px;}.mr100{ margin-right: 100px;}.mr110{ margin-right:110px;}.mr350{ margin-right:350px;} - -.pt1{ padding-top:1px;}.pt3{ padding-top:3px!important;}.pt5{ padding-top:5px!important;}.pt10{ padding-top:10px;}.pt15{ padding-top:15px;}.pt17{ padding-top:17px;}.pt20{ padding-top:20px!important;}.pt25{ padding-top:25px;}.pt30{ padding-top:30px;}.pt35{ padding-top:35px;}.pt37{ padding-top:37px;}.pt40{ padding-top:40px;}.pt47{ padding-top:47px;}.pt49{ padding-top:49px;}.pt50{ padding-top:50px;}.pt60{ padding-top:60px;}.pt70{ padding-top:70px;}.pt80{ padding-top:80px;}.pt90{ padding-top:90px;}.pt100{padding-top:100px;}.pt110{ padding-top:110px;}.pt120{ padding-top:120px;}.pt130{padding-top:130px;} -.pb3{ padding-bottom:3px!important;}.pb5{ padding-bottom:5px!important;}.pb10{ padding-bottom:10px;}.pb15{ padding-bottom:15px;}.pb20{ padding-bottom:20px;}.pb25{ padding-bottom:20px;}.pb25{ padding-bottom:20px;}.pb30{ padding-bottom:30px;}.pb35{ padding-bottom:35px;}.pb40{ padding-bottom:40px;}.pb47{ padding-bottom:47px;}.pb50{ padding-bottom:50px;}.pb60{ padding-bottom:60px;}.pb70{ padding-bottom:70px;}.pb80{ padding-bottom:80px;}.pb90{ padding-bottom:90px;}.pb100{ padding-bottom:100px;}.pb110{ padding-bottom:110px;}.pb155{ padding-bottom:155px;} -.pr2{ paddding-right:2px;}.pr5{ padding-right:5px;}.pr10{ padding-right:10px;}.pr15{ padding-right:15px;}.pr20{ padding-right:20px!important;}.pr30{ padding-right:30px!important;}.pr35{ padding-right:35px!important;}.pr42{ padding-right:42px;}.pr45{ padding-right:45px;}.pr48{ padding-right:48px;}.pr57{ padding-right:57px;}.pr60{ padding-right:60px;}.pr70{ padding-right:70px;}.pr72{ padding-right:72px;}.pr75{ padding-right:75px;}.pr88{ padding-right:88px;} - -.pl0{ padding-left:0px!important;}.pl2{ padding-left:2px;}.pl5{ padding-left:5px;}.pl7{ padding-left:7px;}.pl8{ padding-left:8px;}.pl10{ padding-left:10px;}.pl15{ padding-left:15px;}.pl20{ padding-left:20px;}.pl22{ padding-left:22px;}.pl25{ padding-left:25px;}.pl28{ padding-left:28px;}.pl30{ padding-left:30px !important;}.pl33{padding-left: 33px}.pl35{ padding-left:35px;}.pl40{ padding-left:40px;}.pl42{ padding-left:42px;}.pl45{ padding-left:45px;}.pl50{ padding-left:50px;}.pl60{ padding-left:60px;}.pl70{padding-left:70px;}.pl75{padding-left:75px;}.pl80{padding-left:80px;}.pl88{ padding-left:88px;}.pl92{padding-left:92px;}.pl100{ padding-left:100px;} -.pr2{ paddding-right:2px;}.pr5{ padding-right:5px;}.pr7{ padding-right:7px;}.pr10{ padding-right:10px;}.pr15{ padding-right:15px;}.pr20{ padding-right:20px!important;}.pr25{ padding-right:25px!important;}.pr30{ padding-right:30px!important;}.pr40{ padding-right:40px;}.pr42{ padding-right:42px;}.pr45{ padding-right:45px;}.pr60{padding-right:60px;}.pr75{padding-right:75px;} - - -.padding5-10{padding:5px 10px;box-sizing: border-box} -.padding5-20{padding:5px 20px;box-sizing: border-box} -.padding10{padding: 10px;box-sizing: border-box} -.padding15{padding: 15px;box-sizing: border-box} -.padding20{padding: 20px;box-sizing: border-box} -.padding10-20{padding: 10px 20px;box-sizing: border-box} -.padding10-15{padding: 10px 15px;box-sizing: border-box} -.padding10-25{padding: 10px 25px;box-sizing: border-box} -.padding10-30{padding: 10px 30px;box-sizing: border-box} - -.padding15-20{padding: 15px 20px;box-sizing: border-box} -.padding15-25{padding: 15px 25px;box-sizing: border-box} - -.padding20-40{padding: 20px 40px;box-sizing: border-box} -.padding20-30{padding: 20px 30px;box-sizing: border-box} -.padding20-15{padding: 20px 15px;box-sizing: border-box} -.padding20-10{padding: 20px 10px;box-sizing: border-box} - -.padding30{padding: 30px;box-sizing: border-box} -.padding30-20{padding: 30px 20px;box-sizing: border-box} -.padding30-40{padding: 30px 40px;box-sizing: border-box} - -.padding40{padding: 40px;box-sizing: border-box} -.padding40-30{padding: 40px 30px;box-sizing: border-box} -.padding40-20{padding: 40px 20px;box-sizing: border-box} - -.margin10{margin:10px;} -.margin15{margin:15px;} -.margin20{margin:20px;} - -/*行高*/ -.lineh-12{line-height: 12px} -.lineh-15{line-height: 15px} -.lineh-17{line-height: 17px} -.lineh-20{line-height: 20px} -.lineh-25{line-height: 25px} -.lineh-30{line-height: 30px} -.lineh-35{line-height: 35px} -.lineh-40{line-height: 40px} - -/*pre标签换行*/ -.break_word{word-break: break-all;word-wrap: break-word;} -.break_word_firefox{white-space: pre-wrap !important;word-break: break-all;} -/*定位*/ -.pr{position: relative} -.df {display:flex;display: -webkit-flex;display: -ms-flex;} -.flex1{flex: 1;} -/*去掉IE input框输入时自带的清除按钮*/ -input::-ms-clear{display:none;} -/*自定义滚动条宽度*/ -::-webkit-scrollbar {width:7px;height:10px;background-color: #F5F5F5; } -::-webkit-scrollbar-track {-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);background-color: #F5F5F5;} -::-webkit-scrollbar-thumb {-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);background-color: #dadada;} - - -.newContainer{ min-height:100%; height: auto !important; height: 100%; /*IE6不识别min-height*/position: relative;} -.educontent{width: 1200px;margin:0px auto;box-sizing: border-box}/*中间部分宽度固定为1200*/ -.newMain{ margin: 0 auto; padding-bottom: 235px; min-width:1200px;padding-top: 60px}/*padding-bottom根据底部的高度而定*/ - -/*高度*/ -.height-100{height: 100%;} -/*文本位置*/ -.edu-txt-center{ text-align: center!important;} -.edu-txt-left{ text-align: left!important;} -.edu-txt-right{ text-align: right!important;} - -/*背景颜色*/ -.edu-back-white{background-color:#FFFFff; } -.edu-back-greyf5{background-color: #f5f5f5!important;} -.edu-back-skyblue{background: #F4FAFF;} -.edu-back-blue{background-color:#459be6!important; } -.edu-back-blue-txt{background-color:#F7FBFF!important; } -.edu-bg-light-blue{ background:#f7f9fd; padding:5px;}/*发送实训弹框*/ -/*常用字体*/ -/*红色*/ -.color-red{color: #FF0000!important;} -/*白色*/ -.color-white{color: #ffffff!important;} -/*黑色*/ -.color-dark{color: #05101a!important;} -/*灰色*/ -.color-grey-name{color: #1A0B00!important;} -.color-grey-fa{color: #FAFAFA!important;} -.color-grey-3{color: #333!important;} -.color-grey-eb{color: #EBEBEB!important;} -.color-grey-c{color: #ccc!important;} -.color-grey-cd{color: #cdcdcd!important;} -.color-grey-9{color: #999999!important;} -.color-grey-98{color: #989898!important;} -.color-grey-8{color: #888!important;} -.color-grey-6{color: #666!important;} -.color-grey-4d{color: #4d4d4d!important;} -.color-grey-B2{color: #B2B2B2!important;} -.color-grey-B3{color: #B3B3B3!important;} -.color-grey-B4{color: #B4B4B4!important;} -.color-grey-74{color: #747A7F!important;} - - -a.color-grey-name:hover,a.color-dark:hover,a.color-grey-6:hover,a.color-grey-3:hover{color: #4cacff!important;} -a.color-grey-9:hover,a.color-grey-8:hover,a.color-grey-c:hover{color: #111C24!important;} -/*蓝色*/ -.color-blue{color: #4CACFF!important;}/*主*/ -.color-blue_4C{color: #4CACFF!important;} -a.color-blue:hover,a.color-blue_4C:hover{color: #459BE6!important;} -/*橙色*/ -.color-orange{color: #ff6800!important;}/*辅助文字*/ -.color-orange-tip{color: #FF954C!important;}/*提示文字*/ -a.color-orange:hover,a.color-orange-tip:hover{color: #F06200!important;} -/*黄色*/ -.color-yellow{color: #EFC003!important;} -.color-yellow-ff{color: #FFA800!important} -/*绿色*/ -.color-green{color: #29BD8B!important;} -a.color-green:hover{color: #28AC7F!important;} -/*红色*/ -.color-red-dd{color: #DD1717!important;} -a.color-red-dd:hover{color: #C61616!important;} -/*圆角*/ -.radius{border-radius: 50%;} -.radius4{border-radius: 4px;} -.radius2{border-radius: 2px;} - - -/*绿色圆形--例如:实训路径详情的编辑icon的背景*/ -.ring-green{width: 18px;height: 18px;display: block;border-radius: 50%;background-color: #29BD8B;text-align: center;} -.ring-op-green{width: 18px;height: 18px;display: block;border-radius: 50%;background-color: rgba(41,189,139,0.6);text-align: center;} -.ring-grey{width: 18px;height: 18px;line-height: 18px;display: block;border-radius: 50%;background-color:rgba(204,204,204,0.5);text-align: center;} -.ring-blue{width: 18px;height: 18px;display: block;border-radius: 50%;background-color: #4CACFF;text-align: center;} - -.ring-orange{background-color: #FF6800;display: block;padding: 0px 3px;height: 18px;box-sizing: border-box;min-width: 18px;text-align: center;line-height: 18px;border-radius: 50%;color:#fff;font-size: 12px;} - -/*左侧label内容右对齐*/ -.label-right{min-width:75px;text-align: right;height: 35px;line-height: 35px;float: left; } - - -/*输入框样式---------宽度为百分比*/ -.input-flex-30{flex: 1;height: 30px;padding: 5px;box-sizing: border-box;} -.input-flex-35{flex: 1;height: 35px;padding: 5px;box-sizing: border-box;} -.input-flex-40{flex: 1;height: 40px;padding: 5px;box-sizing: border-box;} -.input-100-35{width: 100%;height: 35px;padding: 5px;box-sizing: border-box;} -.input-100-40{width: 100%;height: 40px;padding: 5px;box-sizing: border-box;} -.input-100-45{width: 100%;height: 45px;padding: 5px;box-sizing: border-box;} -.input-90-35{width: 90%;height: 35px;padding: 5px;box-sizing: border-box;} -.input-60-40{width: 60%;height: 40px;padding: 5px;box-sizing: border-box;} -.input-60-35{width: 60%;height: 35px;padding: 5px;box-sizing: border-box;} -.input-50-35{width: 50%;height: 35px;padding: 5px;box-sizing: border-box;} -.input-50-40{width: 50%;height: 40px;padding: 5px;box-sizing: border-box;} -.input-50-45{width: 50%;height: 45px;padding: 5px;box-sizing: border-box;} -.input-48-45{width: 48%;height: 45px;padding: 5px;box-sizing: border-box;} -/*输入框为灰色背景,获取焦点时背景变白色*/ -.greyInput{background-color: #F5F5F5;outline: none} -.greyInput:focus{background-color: #fff; border: 1px solid #ddd;} - -/*输入框样式---------宽度为固定长度*/ -.winput-240-45{width: 240px;height: 45px;padding: 5px;box-sizing: border-box;} -.winput-240-40{width: 240px;height: 40px;padding: 5px;box-sizing: border-box;} -.winput-240-35{width: 240px;height: 35px;padding: 5px;box-sizing: border-box;} -.winput-240-30{width: 240px;height: 30px;padding: 5px;box-sizing: border-box;} -.winput-190-45{width: 190px;height: 45px;padding: 5px;box-sizing: border-box;} -.winput-200-35{width: 200px;height: 35px;padding: 5px;box-sizing: border-box;} -.winput-120-40{width: 120px;height: 40px;padding: 5px;box-sizing: border-box;} -.winput-120-35{width: 120px;height: 35px;padding: 5px;box-sizing: border-box;} -.winput-120-30{width: 120px;height: 30px;padding: 5px;box-sizing: border-box;} -.winput-115-40{width: 115px;height: 40px;padding: 5px;box-sizing: border-box;} -.winput-90-40{width: 90px;height: 40px;padding: 5px;box-sizing: border-box;} -.winput-90-35{width: 90px;height: 35px;padding: 5px;box-sizing: border-box;} -.winput-240-100{width: 240px;height: 100px;padding: 5px;box-sizing: border-box;} -/*输入框样式---------高度固定*/ -.winput-90-100{width: 90%;height: 100px;padding: 5px;box-sizing: border-box;} -.winput-100-130{width: 100%;height: 130px;padding: 5px;box-sizing: border-box;} -.winput-100-150{width: 100%;height: 150px;padding: 5px;box-sizing: border-box;} -.winput-100-200{width: 100%;height: 200px;padding: 5px;box-sizing: border-box;} -.winput-90-100{width: 90%;height: 100px;padding: 5px;box-sizing: border-box;} -/*百分比宽度*/ -.width100{width: 100%;} -.width90{width: 90%;} -.width89{width: 89%;} -.width80{width: 80%;} -.width70{width: 70%;} -.width60{width: 60%;} -.width50{width: 50%;} -.width40{width: 40%;} -.width30{width: 30%;} -.width20{width: 20%;} -.width15{width: 15%;} -.width10{width: 10%;} - -/*固定大小的宽度*/ -.wid100{width: 100px;display: block} -.wid120{width: 120px;display: block} -.wid90{min-width: 90px!important;display: block} -a.edu-txt-w280,.edu-txt-w280{ width:280px; display: inline-block;text-align: center} -a.edu-txt-w200,.edu-txt-w200{ width:200px; display: inline-block;text-align: center} -a.edu-txt-w190,.edu-txt-w190{ width:190px; display: inline-block;text-align: center} -a.edu-txt-w160,.edu-txt-w160{ width:160px; display: inline-block;text-align: center} -a.edu-txt-w140,.edu-txt-w140{ width:141px; display: inline-block;text-align: center} -a.edu-txt-w130,.edu-txt-w130{ width:130px; display: inline-block;text-align: center} -a.edu-txt-w120,.edu-txt-w120{ width:120px; display: inline-block;text-align: center} -a.edu-txt-w100,.edu-txt-w100{ width:100px; display: inline-block;text-align: center} -a.edu-txt-w90,.edu-txt-w90{ width:90px; display: inline-block;text-align: center} -a.edu-txt-w80,.edu-txt-w80{ width:80px; display: inline-block;text-align: center} -a.edu-txt-w40,.edu-txt-w40{ width:40px; display: inline-block;text-align: center} - -/*最小高度*/ -.minH-40{min-height: 490px;} -.minH-280{min-height: 280px;} -.minH-400{min-height: 400px;} -.minH-440{min-height: 440px;} -.minH-500{min-height: 500px;} -.minH-560{min-height: 560px;} -/*超出高度出现滚动条--纵向*/ -.over260{max-height: 260px;overflow-y: auto} -.over210{height: 210px;overflow-y: auto} -.over280{height: 280px;overflow-y: auto} -.over170{min-height: 170px;max-height: 170px;overflow-y: auto} - -/*---------------tab公用边框-----------------*/ -.border-bottom-orange{border-bottom: 2px solid #FC7033!important;} -.bor-bottom-orange{border-bottom: 1px solid #FF9e6a!important;} -.bor-bottom-greyE{border-bottom: 1px solid #EEEEEE!important;} -.bor-left-greyE{border-left: 1px solid #EEEEEE!important;} -.bor-top-greyE{border-top: 1px solid #EEEEEE!important;} -.bor-right-greyE{border-right: 1px solid #EEEEEE!important;} -.bor-left-greyC{border-left: 1px solid #CCC!important;} -.bor-top-greyC{border-top: 1px solid #CCC!important;} -/*---------------边框-----------------*/ -.bor-gray-c{border:1px solid #ccc;} -.bor-grey-e{border:1px solid #eee;} -.bor-grey-d{border:1px solid #ddd;} -.bor-grey01{border:1px solid #E6EAEB;} -.bor-orange{border:1px solid #FF7500;} -.bor-blue{border:1px solid #5faee3;} -.bor-red{border:1px solid #db0505;} -.bor-none{border:none;} -.bor-outnone{outline:none; border:0px;} - -a.decoration{text-decoration: underline!important;} - -/*下拉菜单*/ -.edu-menu-panel{position: relative;cursor: pointer} -.edu-menu-list{position: absolute;padding: 5px 0px;box-shadow: 0 2px 8px 0 rgba(0,0,0,.2);display: none;width: 120px;background: #FFFFff;right: -5px;border-radius:0px 0px 4px 4px;color: #05101a; font-size: 14px;z-index: 9} -.edu-menu-list li{width: 100%;padding:0px 15px;box-sizing: border-box;height: 35px;line-height: 35px;cursor: pointer;} - -.edu-menuSmall-list{position: absolute;padding: 5px 0px;box-shadow: 0 2px 8px 0 rgba(0,0,0,.2);display: none;width: 100px;background: #FFFFff;right: -5px;border-radius:0px 0px 4px 4px;color: #05101a; font-size: 14px;z-index: 9} -.edu-menuSmall-list li{width: 100%;padding:0px 10px;box-sizing: border-box;height: 30px;line-height: 30px;cursor: pointer;font-size: 12px;} - -.edu-menu-list li a,.edu-menuSmall-list li a{width: 100%;height: 100%;display: block;color: #323232;} -.edu-menu-panel:hover i,.edu-menu-panel:hover{color: #4cacff;} -.edu-menu-panel:hover .edu-menu-list,.edu-menu-panel:hover .edu-menuSmall-list{display: block} -.edu-menu-list li:hover,.edu-menuSmall-list li:hover{background: #4CACFF;} -.edu-menu-list li:hover a,.edu-menuSmall-list li:hover a{color: #fff!important;} -.currentName{display: block;width: 100%;padding:0px 15px;height: 40px;line-height: 40px;font-size: 16px;box-sizing: border-box;cursor: default} -.ul-leftline:after{position: absolute;top:0px;content: "";width: 1px;background-color: #eee;height: 100%;right: 0px;} -.overPart{width: 240px;height: 30px;position: absolute;right: 0;top: -27px;background: transparent;} -/*滑块验证*/ -.drag_slider{ position: relative; background-color: #e8e8e8; width:100%; height: 45px;color: #999999; line-height: 45px; text-align: center;border-radius: 4px;} -.drag_slider .handler{ border-radius: 4px 0px 0px 4px;position: absolute; top: 0px; left: 0px; width: 50px; height: 43px; border: 1px solid #eee; cursor: move;} -.handler_bg{ background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0ZDhlNWY5My05NmI0LTRlNWQtOGFjYi03ZTY4OGYyMTU2ZTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NTEyNTVEMURGMkVFMTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NTEyNTVEMUNGMkVFMTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo2MTc5NzNmZS02OTQxLTQyOTYtYTIwNi02NDI2YTNkOWU5YmUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NGQ4ZTVmOTMtOTZiNC00ZTVkLThhY2ItN2U2ODhmMjE1NmU2Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+YiRG4AAAALFJREFUeNpi/P//PwMlgImBQkA9A+bOnfsIiBOxKcInh+yCaCDuByoswaIOpxwjciACFegBqZ1AvBSIS5OTk/8TkmNEjwWgQiUgtQuIjwAxUF3yX3xyGIEIFLwHpKyAWB+I1xGSwxULIGf9A7mQkBwTlhBXAFLHgPgqEAcTkmNCU6AL9d8WII4HOvk3ITkWJAXWUMlOoGQHmsE45ViQ2KuBuASoYC4Wf+OUYxz6mQkgwAAN9mIrUReCXgAAAABJRU5ErkJggg==") no-repeat center;} -.handler_ok_bg{ background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0ZDhlNWY5My05NmI0LTRlNWQtOGFjYi03ZTY4OGYyMTU2ZTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDlBRDI3NjVGMkQ2MTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDlBRDI3NjRGMkQ2MTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDphNWEzMWNhMC1hYmViLTQxNWEtYTEwZS04Y2U5NzRlN2Q4YTEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NGQ4ZTVmOTMtOTZiNC00ZTVkLThhY2ItN2U2ODhmMjE1NmU2Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+k+sHwwAAASZJREFUeNpi/P//PwMyKD8uZw+kUoDYEYgloMIvgHg/EM/ptHx0EFk9I8wAoEZ+IDUPiIMY8IN1QJwENOgj3ACo5gNAbMBAHLgAxA4gQ5igAnNJ0MwAVTsX7IKyY7L2UNuJAf+AmAmJ78AEDTBiwGYg5gbifCSxFCZoaBMCy4A4GOjnH0D6DpK4IxNSVIHAfSDOAeLraJrjgJp/AwPbHMhejiQnwYRmUzNQ4VQgDQqXK0ia/0I17wJiPmQNTNBEAgMlQIWiQA2vgWw7QppBekGxsAjIiEUSBNnsBDWEAY9mEFgMMgBk00E0iZtA7AHEctDQ58MRuA6wlLgGFMoMpIG1QFeGwAIxGZo8GUhIysmwQGSAZgwHaEZhICIzOaBkJkqyM0CAAQDGx279Jf50AAAAAABJRU5ErkJggg==") no-repeat center;} -.drag_slider .drag_bg{ background-color: #29bd8b; height: 45px; width: 0px;} -.drag_slider .drag_text{border-radius: 4px 0px 0px 4px;position: absolute; top: 0px; width: 100%; -moz-user-select: none; -webkit-user-select: none; user-select: none; -o-user-select:none; -ms-user-select:none;} - -/*tip公共样式的设置:*/ -.-task-title{opacity:0;position:absolute;left:0;top:0;display:none;z-index:100000;} /*1*/ -.data-tip-down,.data-tip-left,.data-tip-right,.data-tip-top{ position:relative; box-shadow:0px 0px 8px #000; background:#000; color:#fff; max-width:300px;/*2*/ - word-wrap: break-word; text-align:center; border-radius:4px; padding:0 10px; border:1px solid #000; display:none; }/*3*/ -.data-tip-down:after,.data-tip-down:before,.data-tip-left:before,.data-tip-right:before,.data-tip-left:after,.data-tip-right:after,.data-tip-top:after,.data-tip-top:before{/*4*/ - position: absolute;content:''; width:0; height:0;}/*5*/ -.data-tip-down:after,.data-tip-down:before{left: 45%;top:-10px;/*6*/ - border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 10px solid #000; }/*7*/ -.data-tip-down:before{top:-11px;border-bottom:10px solid #000;}/*8*/ -.data-tip-left:after,.data-tip-left:before{left: -10px;top:50%; margin-top:-5px;/*9*/ - border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-right: 10px solid #000; }/*10*/ -.data-tip-left:before{ left: -12px;border-right: 10px solid #000; }/*11*/ -.data-tip-right:after,.data-tip-right:before{right: -10px; top:50%; margin-top:-5px;/*12*/ - border-top: 5px solid transparent;border-bottom: 5px solid transparent; border-left: 10px solid #000; }/*13*/ -.data-tip-right:before{ right: -10px;border-left: 10px solid #000; }/*14*/ -.data-tip-top:after,.data-tip-top:before{left: 45%;bottom:-10px;border-left: 5px solid transparent; - border-right: 5px solid transparent;border-top: 10px solid #000;} -.data-tip-top:before{bottom:-11px;} - - -/*左右两栏排列、固定左右宽度----------ul*/ -ul.abouttable{margin: 0px auto;width: 440px;} -ul.abouttable li{width: 100%;} -ul.abouttable li .rz-label{min-width: 150px;height: 45px;line-height: 45px;text-align: right;color: #adadad;} -ul.abouttable li .second-label{min-width: 150px;height: 40px;line-height: 40px;text-align: right;color: #adadad;} -ul.abouttable li .minh-label{min-width: 150px;height: 28px;line-height: 28px;text-align: right;color: #adadad;} - - - -/* table--------------------------------*/ - -/* table-1底部边框 */ -.edu-pop-table{ width: 100%; border:1px solid #eee; border-bottom:none; background:#fff; color:#888;cursor: default} -.edu-pop-table tr{ height:40px; } -.edu-pop-table tr.edu-bg-grey{ background:#f5f5f5;} -.edu-txt-center{ text-align: center;}.edu-txt-left{ text-align: left;}.edu-txt-right{ text-align: right;} -.edu-pop-table tr th{ color:#333;border-bottom:1px solid #eee; } -.edu-pop-table tr td{border-bottom:1px solid #eee;} -.edu-pop-table.table-line tr td,.edu-pop-table.table-line tr th{ border-right:1px solid #eee;} -.edu-pop-table.table-line tr td:last-child,.edu-pop-table.table-line tr th:last-child{border-right:none;} -/*th行有背景颜色且table无边框*/ -.edu-pop-table.head-color thead tr{background: #fafbfb} -.edu-pop-table.head-color{border: none} -.edu-pop-table.head-color tr:last-child td {border: none} -/*--表格行间隔背景颜色-*/ -.edu-pop-table.interval-td{border-bottom: 1px solid #eee;} -.edu-pop-table.interval-td thead tr{background: #fafbfb} -.edu-pop-table.interval-td tbody tr:nth-child(even){background: #fafbfb} -.edu-pop-table.interval-td tbody tr td{border: none} -/*--表格行间隔背景颜色(th也没有边框)-*/ -.edu-pop-table.interval-all{border:none;border-bottom: 1px solid #eee;} -.edu-pop-table.interval-all thead th{border: none} -.edu-pop-table.interval-all thead tr{background: #fafbfb} -.edu-pop-table.interval-all tbody tr:nth-child(even){background: #fafbfb} -.edu-pop-table.interval-all tbody tr td{border: none;padding:5px 0px} -/*--表格行移入背景颜色-*/ -.edu-pop-table.hover-td tbody tr:hover{background: #EFF9FD}/*悬浮颜色为天蓝色*/ -.edu-pop-table.hover-td_1 tbody tr:hover{background:#FCF2EC}/*悬浮颜色为浅橙色*/ -/* table-2全边框 */ -.edu-pop-table-all{ width: 100%; border:1px solid #eee; background:#fff; color:#888;border-collapse: collapse} -.edu-pop-table-all tr{ height:30px; } -.edu-pop-table-all tr.edu-bg-grey{ background:#f5f5f5;} -.edu-pop-table-all tr th{ color:#333;border:1px solid #eee; } -.edu-pop-table-all tr td{border:1px solid #eee;padding: 5px} -/*table无边框、无背景颜色*/ -.allNone{background: none!important;cursor: default;border-bottom:none!important;} -.allNone tr{height: 30px!important;} - -/*数据为空公共页面*/ -img.edu-nodata-img{ width:300px; margin:50px auto 20px; display: block;} -.edu-nodata-p{ font-size: 20px; text-align: center; color:#999;border-bottom:none!important;padding-left: 18px;box-sizing: border-box;} - -/*输入为空或者错误的提示*/ -.input-none{box-shadow: 0px 0px 2px rgba(0,0,0,0.1);} -.notice{height: 25px;margin-left: 150px;} -.input-none + .notice span{display: block} - -/*列表里菜单icon移入*/ -.edu-position-hide{ position: absolute; top:15px; left:-20px; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); background:#fff;z-index:1001; padding:5px 0;z-index: 999999;} -.edu-position-hide li a{ display:inline-block; height: 30px; width: 100px; line-height: 30px; text-align: center; font-size:12px!important; } -.edu-position-hide li a:hover{ background:#F1F1F1; color:#05101A;} -.edu-position-hidebox i{ color:#bcbcbc;} -.edu-position-hidebox i:hover{ color:#4CACFF;} -.edu-position-hidebox a{ color:#05101A;} -.edu-position-hidebox:hover .edu-position-hide{ display: block;} - -/*搜索(灰色背景、点击变白色)*/ -.seekPanel > input{width: 100%;height: 30px;line-height: 30px;background-color: #f4f4f4;border:1px solid #eaeaea;padding: 0px 30px 0px 5px ;box-sizing: border-box;outline: none;} -.seekPanel > input:focus{background-color: #fff;} -.seekPanel > i{position: absolute;right: 7px;top: -1px;} -/*-------------------------------------------公用按钮:以white-btn(或者edu-default-btn无padding)为基础,宽度和高度可以用padding填充,颜色用edu-color-btn,begin-----------------------------------------*/ -/*按钮*/ -/*默认按钮*/ -/*长条形按钮*/ -.default_btn{display: block;border-radius: 5px ;background: #f4f4f4;color: #cfcfcf!important;text-align: center;width: 102px;box-sizing: border-box} -/*正常按钮*/ -.white-btn{text-align:center;cursor: pointer;display: inline-block;padding: 0px 8px;border: 1px solid #ccc;color: #666;letter-spacing: 1px;font-size: 14px;height: 26px;line-height: 26px;border-radius: 3px;} -a.white-btn.orange-btn{border: 1px solid #FF7500;color: #FF7500!important;} -a.white-btn.orange-btn:hover{border: 1px solid #F06200;color: #F06200!important;} - -.defalutGreyBorder{display: block;padding: 0px 10px;border:1px solid #ccc;height: 30px;line-height: 30px;border-radius: 4px;} -a.task-btn{cursor: pointer;display: inline-block;border: none;padding: 0 12px;color: #fff;background: #CDCDCD !important;letter-spacing: 1px;text-align: center;font-size: 14px;height: 30px;line-height: 30px;border-radius: 2px; font-weight: 400;} -/*最新按钮:以个人主页为例-------------因高度和宽度都已经固定,后续不再支持使用,*/ -.user_default_btn{cursor: pointer;font-size: 14px;display: block;width: 120px;text-align: center;height: 40px;line-height: 40px!important;border-radius: 4px;box-sizing: border-box} -.user_orange_btn{color: #fff!important;background-color: #FF6800;}/*橙色签到按钮*/ -.user_orange_btn:hover{background-color:#F06200;} -.user_grey_btn{color: #fff!important;background-color: #CCCCCC;cursor: default}/*灰色已经签到按钮*/ -.user_private_btn{color:#646464!important;background-color: #fff;border: 1px solid #989898}/*灰色私信、互相关注按钮*/ -.user_private_btn:hover{color: #B2B2B2!important;border: 1px solid #B2B2B2;} -.btn_auto{border-radius: 5px ;background: #fff;padding: 0px 18px;} - -/*可共用按钮,需添加padding或者边框*/ -.edu-default-btn{display: block;border-radius: 4px;} -a.edu-focus-btn{padding: 0px 10px;height: 30px;line-height: 30px;border: 1px solid #b2b2b2;color: #b2b2b2!important;} -a.edu-focus-btn:hover{border: 1px solid #666;color: #666!important;} - -a.edu-greenback-btn{padding: 0px 10px;background: #29BD8B;color: #fff!important;border: 1px solid #29BD8B;} -a.edu-greenline-btn{padding: 0px 10px;color: #29BD8B!important;border: 1px solid #29BD8B;} -a.edu-greenback-btn:hover{background-color: #28AC7F;} -a.edu-greenline-btn:hover{border:1px solid #28AC7F;color: #28AC7F!important;} - -a.edu-blueback-btn{padding: 0px 10px;background: #4CACFF;color: #fff!important;border: 1px solid #4CACFF;} -a.edu-blueline-btn{padding: 0px 10px;color: #4CACFF!important;border: 1px solid #4CACFF;} -a.edu-blueback-btn:hover{background-color: #459BE6;} -a.edu-blueline-btn:hover{border:1px solid #459BE6;color: #459BE6!important;} - -a.edu-orangeback-btn{background-color: #ff7500;color: #fff!important;border:1px solid #FF7500} -a.edu-orangeback-btn:hover{background-color: #F06200;} -a.edu-orangeline-btn{color: #FF7500!important;border:1px solid #FF7500} -a.edu-orangeline-btn:hover{color: #F06200!important;border:1px solid #F06200} - -a.edu-greyback-btn{padding: 0px 10px;background: #CCCCCC;color: #fff!important;border: 1px solid #CCCCCC;} -a.edu-greyback-btn:hover{background-color: #B2B2B2;} -a.edu-greyshallowline-btn{padding: 0px 10px;color: #999!important;border:1px solid #CFCFCF} -a.edu-greyline-btn{padding: 0px 10px;background: #fff;color: #666!important;border: 1px solid #eaeaea;line-height: 33px;height: 33px;} -a.edu-greyline-btn:hover,a.edu-greyshallowline-btn:hover{border:1px solid #B2B2B2;color:#B2B2B2!important;} - -/*新建页面的提交和取消按钮*/ -.defalutCancelbtn{display: block;border: 1px solid #CDCDCD;background-color: #fafafa;color: #999!important;width: 120px;text-align: center;height: 30px;line-height: 30px;border-radius: 2px; - width: 130px; - height: 40px; - background: rgba(77,124,254,0); - border: 1px solid rgba(76, 172, 255, 1); - border-radius: 4px; - line-height: 40px; - font-size: 16px; - font-family: MicrosoftYaHei; - font-weight: 400; - color: rgba(76,172,255,1) !important; -} -.defalutCancelbtn:hover{border:1px solid #B2B2B2;color: #B2B2B2!important;} -.defalutSubmitbtn{ - display: block;border: 1px solid #4CACFF;background-color: #4CACFF;color: #fff!important;width: 120px;text-align: center;line-height: 40px;border-radius: 2px; - width: 130px; - height: 40px; - background: rgba(76,172,255,1); - border-radius: 4px; - font-size: 16px; - font-family: MicrosoftYaHei; - font-weight: 400; - color: rgba(255,255,255,1); -} -.defalutSubmitbtn:hover{background-color: #459BE6;border: 1px solid #459BE6;} -/*-------------------------------------------公用按钮:以white-btn(或者edu-default-btn无padding)为基础,宽度和高度可以用padding填充,颜色用edu-color-btn,end-----------------------------------------*/ - -/*可点击按钮---蓝色*/ -.use_btn{background: #4cacff;color:#fff!important;} -a.task-btn-orange{background: #4CACFF!important; color:#fff!important;} -a:hover.task-btn-orange{background: #459BE6;} -/*可点击按钮---蓝色---蓝色边框*/ -.user_blue_btn{border: 1px solid #4CACFF;color: #4CACFF!important;} -/*可点击按钮---蓝色---蓝色背景*/ -a.user_bluebg_btn{background-color:#4CACFF;color: #fff;} -a.user_orangebg_btn{background-color:#FF6800;color: #fff;} -a.user_greybg_btn{background-color:#747A7F;color: #fff;} - - -.pointer{cursor: pointer} -.cdefault{cursor: default} - - -/*md编辑器恢复被覆盖样式*/ -.new_li li{ list-style-type: disc!important; } -.new_li ol li{ list-style-type: decimal!important; } -.new_li li{ margin-bottom: 0!important; } - -/*搜索框*/ -#pollingPanel{position: relative;width: 248px;height: 32px;} -#pollingPanel > input{width: 100%;height: 100%;border:1px solid #eaeaea;border-radius: 4px;padding: 0px 30px 0px 5px;box-sizing: border-box;background-color: #F4F4F4;} -#pollingPanel > input:focus{background-color: #fff;outline: none;} -#pollingPanel > a{position: absolute;right: 10px;top:0px;} - -/* 弹框 */ -.popupAll{width: 100%;height: 100%;position: fixed;z-index: 99998;background-color: rgba(5,16,26,0.6);left: 0;top:0;} -.task-popup{ width: 30%;background: #fff; border:1px solid #e8e8e8; border-radius:10px;} -.task-popup-text-center{ text-align: center; color: #333;} -.task-popup-title{ border-bottom: 1px solid #eee; padding:0px 15px;text-align: center;box-sizing: border-box;line-height: 70px;height: 70px; border-radius: 10px 10px 0px 0px;font-size: 16px;font-weight: bold; } -.task-popup-content{ padding:15px;} -.task-popup-submit{ margin:0px auto 15px; width: 160px;} -.task-popup-sure{ margin:0px auto 15px; width: 54px;} -.task-popup-right-sure{margin:0px auto 15px;text-align: center} -.task-popup-OK{ margin:15px auto; text-align: center} -.task-popup-bggrey{ background:#fff; color:#333;} -#closeIcon{position: absolute;color:#fefefe} -/* 模板弹框 20170407byLB */ -#task_popup_box{ background:#fff;padding-bottom:15px;-webkit-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;border-radius:5px;box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);} -.task_popup_top{background:#ccc;height:40px;-webkit-border-radius: 5px 5px 0px 0px;-moz-border-radius: 5px 5px 0px 0px;-o-border-radius: 5px 5px 0px 0px;border-radius: 5px 5px 0px 0px;} -.task_popup_top h3{ font-size:14px; color:#333; line-height:40px; padding-left:10px; } -a.task_icons_close{width:20px; height:20px;display:block;background: url(../images/popup/sy_icons_close.png) 0 0px no-repeat; margin:8px 10px 0 0;} -a:hover.task_icons_close{background: url(../images/popup/sy_icons_close.png) -40px 0px no-repeat;} -.task_popup_con{ padding:20px;} -/* 模板弹框 20161013byLB */ -#muban_popup_box{ background:#fff;padding-bottom:15px;-webkit-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;border-radius:5px;box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);} -.muban_popup_top{background:#3b94d6;height:40px;-webkit-border-radius: 5px 5px 0px 0px;-moz-border-radius: 5px 5px 0px 0px;-o-border-radius: 5px 5px 0px 0px;border-radius: 5px 5px 0px 0px;} -.muban_popup_top h3{ font-size:16px; color:#fff; font-weight:normal; line-height:40px; padding-left:10px; } -a.muban_icons_close{width:20px; height:20px;display:block;background: url(/images/sy/sy_icons_close.png) 0 0px no-repeat; margin:8px 10px 0 0;} -a:hover.muban_icons_close{background: url(/images/sy/sy_icons_close.png) -40px 0px no-repeat;} -#muban_popup_box input,#muban_pwopup_box select{ border:1px solid #c8c8c8; height: 28px; color: #888;} -#muban_popup_box label.pop_box_label{width: 100px; text-align: right; display: inline-block;} -input.radio-width90{ width: 90px; } -#muban_popup_box label.pop_box_label_l {width: 100px; text-align: left; display: inline-block;} - - -/*提示条*/ -.alert{ padding:10px;border: 1px solid transparent; text-align: center;} -.alert-blue{ background-color: #d9edf7;border-color: #bce8f1; color: #3a87ad;} -.alert-orange{ background-color: #fff9e9;border-color: #f6d0b1; color:#ee4a20;} -.task-close{padding: 0;cursor: pointer; background: transparent; border: 0; -webkit-appearance: none; font-size: 21px; font-weight: bold;line-height: 1; color: #000000; text-shadow: 0 1px 0 #ffffff; opacity: 0.3;} -.taskclose:hover{opacity: 0.5;} -.alert-red{background-color: #f2dede;border-color: #eed3d7; color: #d14f4d; text-align: left!important;} - -/*搜索的下拉列表*/ -.search_down_list a{display: block;height: 28px;line-height: 28px;padding: 0px 5px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;} -.search_down_list a:hover{background: #fafafa;} - -/*白色色块--类似个人主页-学习-里面的tab*/ -.white-panel{border-radius: 2px;width: 100%;margin: 0px auto;box-sizing: border-box;padding-left: 25px;} -.white-panel li{width: 118px;height: 48px;line-height: 48px;text-align: center;color: #05101A;float: left;cursor: pointer;border:1px solid #fff;} -.white-panel li a{display: block;width: 100%;} -.white-panel li.active{border-radius: 24px;border:1px solid #4CACFF;color:#4CACFF; } -.white-panel li.active a{color:#4CACFF; } - - -/* 个人主页翻页 */ -.pages_user_show a:hover,.pages_user_show li.active a{ background-color:#4CACFF; color:#fff;border: 1px solid #4CACFF;} -.pages_user_show a{border-radius: 2px; display: inline-block;border:1px solid #d1d1d1;background-color:#fff; color:#888; float:left;text-align:center; padding:2px 10px; line-height:1.9; margin: 0 5px;} -.pages_user_show li{float: left; list-style-type: none;} -.pages_user_show ul li{list-style-type: none !important;} -.pages_user_show ul li a{color:#888} -.page_GO{text-align:center;width: 80px;border-radius: 2px;margin-left: 5px;height: 33px;padding: 0px 5px;box-sizing: border-box;float: left;border:1px solid #d1d1d1;} -/* 小翻页 */ -.pages_little_show a:hover,.pages_little_show li.active a{ background-color:#4CACFF;; color:#fff!important;border:1px solid #4CACFF} -.pages_little_show a{ display: inline-block;border:1px solid #d1d1d1; color:#888!important; float:left;text-align:center; padding:3px 3px; line-height:1.9; margin: 0 2px; font-size: 12px;} -.pages_little_show li{float: left;} - -/*左右排版结构:参考个人主页的经验值和金币等页面*/ -.leftPanel{width: 22%;float: left;} -.leftPanel li.nav{padding:10px 0px;box-sizing: border-box;} -.leftPanel li.nav a{padding-left: 40px;display: block;width: 100%;box-sizing: border-box;border-left: 2px solid #fff;height: 24px;line-height: 24px;} -.leftPanel li.nav.active a{border-left: 2px solid #4CACFF;} -.rightPanel{width:78%;float: right;} - -/*个人主页,认证的圆圈*/ -.ringauto{width: 20px;height: 20px;line-height: 20px;text-align: center;border-radius: 50%;background-color: #F4FAFF;margin-right:5px;} - -/*-------------------个人主页:右侧提示区域--------------------------*/ -.-task-sidebar{position:fixed;width:40px;height:180px;right:0;bottom:30px;z-index: 10;} -.-task-sidebar div{height: 40px;line-height: 40px;box-sizing: border-box;width:40px;background:#4CACFF;color:#fff;font-size:20px;text-align:center;margin-bottom:5px;border-radius: 4px;} -.-task-sidebar div i{ color:#fff;} -.-task-sidebar div i:hover{color: #fff!important;} -.gotop{background-color: rgba(208,207,207,0.5)!important;padding: 0px!important;} -.-task-desc{background:#494949;width:90px;line-height: 36px;text-align: center; - position: absolute;color: #fff;font-size: 13px;z-index: 999999;opacity: 0;} -.-task-desc div{position: absolute;top:10px;right: -7px;height: 13px;} -.-task-desc div img{float: left} - - -/***** loading ******/ -/*****载入中******/ -#ajax-indicator { - position: absolute; /* fixed not supported by IE*/ - background-color:#eee; - border: 1px solid #bbb; - top:35%; - left:40%; - width:20%; - /*height:5%;*/ - font-weight:bold; - text-align:center; - padding:0.6em; - z-index:100000; - opacity: 0.5; -} - -html>body #ajax-indicator { position: fixed; } - -#ajax-indicator span{ - color:#fff; - color: #333333; - background-position: 0% 40%; - background-repeat: no-repeat; - background-image: url(/images/loading.gif); - padding-left: 26px; - vertical-align: bottom; - z-index:100000; -} -/*最新、最热*/ -.bestChoose.active{color: #4CACFF;} - - -/*实训路径选择实训*/ -.edu-filter-cir-grey{color: #666!important;width: auto;padding:0px 15px; font-size:14px !important; text-align: center;background: #f3f3f3;border-radius: 10px;display: block; height:25px; line-height:25px;} -.edu-filter-cir-grey:hover{background: #4cacff; color: #ffffff!important;} -.edu-filter-cir-grey.active{background: #4cacff; color: #ffffff!important; font-size: 14px !important;} - - -.with10{ width: 10%;box-sizing: border-box}.with12{ width: 12%;box-sizing: border-box}.with13{ width: 13%;box-sizing: border-box}.with14{ width: 14%;box-sizing: border-box}.with15{ width: 15%;box-sizing: border-box} -.with20{ width: 20%;box-sizing: border-box}.with22{ width: 22%;box-sizing: border-box}.with23{ width: 23%;box-sizing: border-box}.with25{ width: 25%;box-sizing: border-box} -.with30{ width: 30%;box-sizing: border-box}.with35{ width: 35%;box-sizing: border-box} -.with40{ width: 40%;box-sizing: border-box}.with45{ width: 45%;box-sizing: border-box}.with49{ width: 49%;box-sizing: border-box} -.with50{ width: 50%;box-sizing: border-box}.with55{ width: 55%;box-sizing: border-box} -.with52{ width: 52%;box-sizing: border-box}.with48{ width: 48%;box-sizing: border-box} -.with60{ width: 60%;box-sizing: border-box}.with65{ width: 65%;box-sizing: border-box} -.with70{ width: 70%;box-sizing: border-box}.with73{ width: 73%;box-sizing: border-box}.with75{ width: 75%;box-sizing: border-box}.with77{ width: 77%;box-sizing: border-box}.with78{ width: 78%;box-sizing: border-box} -.with80{ width: 80%;box-sizing: border-box}.with85{ width: 85%;box-sizing: border-box} -.with87{ width: 87%;box-sizing: border-box}.with90{ width: 90%;box-sizing: border-box}.with95{ width: 95%;box-sizing: border-box} -.with100{ width: 100%;} - -.transform-90{ - transform:rotate(-90deg); - -ms-transform:rotate(-90deg); /* IE 9 */ - -moz-transform:rotate(-90deg); /* Firefox */ - -webkit-transform:rotate(-90deg); /* Safari 和 Chrome */ - -o-transform:rotate(-90deg); -} - -.newplayVedio{ - font-size: 86px !important; -} -.icon-qizhi{ - font-size:30px !important; -} -.icon-31{ - font-size: 68px !important; -} - -/*置顶*/ -.btn-cir {display: inline-block;padding: 0px 5px;border-radius: 25px;line-height: 20px;font-size: 12px;} -.btn-cir-red{background:red;color: #fff; font-weight: normal;cursor: default} -.btn-cir-red:hover{background:red;color: #fff!important;} -.btn-cir-grey{background: #e1e1e1;color: #8c8c8c;font-weight: normal;border: 1px solid #e1e1e1} - -/*动态标签*/ -.edu-filter-btn{cursor: default;display: inline-block; padding:0px 9px; color:#666; background:#fff; text-align: center; border-radius:10px; font-size:12px; height:18px; line-height:18px;} -.edu-filter-btn-blue{border:1px solid #3498db; color:#3498db;} -.edu-filter-btn-orange{border:1px solid #ff6800; color:#ff6800!important;}/*提交中、评阅中*/ -.edu-filter-btn-red{border:1px solid #DD1717; color:#DD1717;}/*已截止、未开启补交*/ -.edu-filter-btn-green{border:1px solid #29BD8B; color:#29BD8B!important;}/*申诉中、已开启补交*/ -.edu-filter-btn-appeal{border:1px solid #FF4343; color:#FF4343!important;}/*申诉中*/ -.edu-filter-btn-yellow{border:1px solid #ef9324; color:#ef9324;} -.edu-filter-btn-danger{background:#d72e36; color:#fff;} -.edu-filter-btn-late{border:1px solid #3fbcff; color: #3fbcff;} -.edu-filter-btn-no-late{border:1px solid #747A7F;color: #747A7F;}/*未发布*/ -.edu-filter-btn-end{border: 1px solid #999999;color: #999999;}/*已结束*/ -/*动态按钮*/ -.edu-activity-orange{background-color:#FF6800;color:#fff!important;cursor: pointer;border: 1px solid #ff6800;}/*修改作品、补交作品、立即补交、补交附件*/ -.edu-activity-blue{background-color:#4CACFF;color:#fff!important;cursor: pointer;border: 1px solid #4CACFF;}/*开始实战、开始答题、继续答题、继续实战、提交作品*/ -.edu-activity-grey{background-color:#747A7F;color:#fff!important;cursor: pointer;border: 1px solid #747A7F;}/*匿评作品*/ -.edu-activity-green{background-color:#29BD8B;color:#fff!important;cursor: pointer;border: 1px solid #29BD8B;}/*查看作品、查看实战、查看答题*/ -.edu-activity-light-grey{background-color:#cbcbcb;color:#fff!important;cursor: pointer;border: 1px solid #cbcbcb;}/*取消关联*/ -/*课堂设置页面*/ -.course-ul-nav{width: 100%;border-bottom: 1px solid #EBEBEB;} -.course-ul-nav a{display: inline-block;padding: 20px;font-size: 18px;text-align: center;width: 94px;position: relative} -.course-ul-nav a.active,.course-ul-nav a:hover{color: #4CACFF;} -.course-ul-nav a.active:after{content: '';width: 94px;left: 20px;bottom: 0px;height: 2px;background-color: #4CACFF;position: absolute} - -/*-----下拉框--------*/ -.down-select{display:none;position: absolute;z-index: 10;left: 0px;width: 100%;overflow-y: auto;background: #fff;max-height: 200px;border:1px solid #eee;} -.down-select p{height: 35px;line-height: 35px;padding-left: 5px;cursor: pointer} -.down-select p:hover{background: #f3f4f6} - - - -.paddingLeft28{padding-left:28px;} - -.ant-modal-header{ - border-radius: 10px; -} - -.color656565{ - color:#656565; -} - -.colorC8161D{ - color:#C8161D; -} - -.bor-reds{ - border:1px solid #FF0000!important; - border-radius: 4px; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; - border-bottom-left-radius: 4px; +/*整体公用样式--------------主题颜色为蓝色#459be5,字体颜色为#05101a*/ +@charset "utf-8"; +body{font-size:14px; line-height:2.0;background:#fafafa!important;font-family: "微软雅黑","宋体"; color:#05101a;height: 100%;position: relative; +} +html,body{height:100%;} +body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td,span{ margin:0; padding:0;} +table,input,textarea,select,button {outline: none;border-radius: 3px; font-family: "微软雅黑","宋体"; font-size:14px;line-height:1.9;border:1px solid #eaeaea;background: #FFFFff; color:#05101A;} +textarea{resize: none;} +/*设置input框的placehoder的字体颜色*/ +input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color: #cccccc} +input::-moz-placeholder,textarea::-moz-placeholder { color:#cccccc;} +input::-moz-placeholder,textarea::-moz-placeholder { color:#cccccc;} +input::-ms-input-placeholder,textarea::-ms-input-placeholder {color:#cccccc;} + +div,img,tr,td,table{ border:0;} +a:link,a:visited{text-decoration:none; color:#05101a;} +a:hover {color:#459be5;} +ol, ul, li {list-style-type: none;} +select:disabled,input:disabled{background-color: #EEEEEE;} +/*万能清除浮动*/ +.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden;} +.clearfix{clear:both;zoom:1} +.cl{ clear: both; overflow: hidden;} +/*通用浮动*/ +.fl{ float: left!important;} +.fr{ float: right!important;} +/*pre标签换行*/ +.break-word{word-break: break-all;word-wrap: break-word;} +.break-word-firefox{white-space: pre-wrap !important;word-break: break-all;} +/*文字左右两端对齐*/ +.justify{text-align: justify} +.indent{text-indent: 2em;} + +.edu-name-dark{ max-width:100px; display: block; } +.edu-info-dark{ max-width:345px; display: block; } +.edu-max-h200{ height:200px; overflow: auto;} +.edu-h260{ height:260px;} +.edu-h270{ height:270px;} +.edu-h310{ height:310px;} +.edu-position{ position: relative;} +.edu-h200-auto{ max-height:200px; overflow:auto;} +.edu-h300-auto{ max-height:300px; overflow:auto;} +.edu-h350-auto{ max-height:350px; overflow:auto;} +.edu-h280-auto{ height:280px; overflow:auto;} +.edu-txt-w240{ width:240px; display: block;} +.edu-txt-w280{ width:280px; display: block;} +.edu-txt-w320{ width:320px; display: block;} +.edu-txt-w200{ width:200px; display: block;} +a.edu-txt-w280,.edu-txt-w280{ width:280px; display: inline-block;text-align: center} +a.edu-txt-w190,.edu-txt-w190{ width:190px; display: inline-block;text-align: center} +a.edu-txt-w160,.edu-txt-w160{ width:160px; display: inline-block;text-align: center} +a.edu-txt-w140,.edu-txt-w140{ width:141px; display: inline-block;text-align: center} +a.edu-txt-w130,.edu-txt-w130{ width:130px; display: inline-block;text-align: center} +a.edu-txt-w120,.edu-txt-w120{ width:120px; display: inline-block;text-align: center} +a.edu-txt-w100,.edu-txt-w100{ width:100px; display: inline-block;text-align: center} +a.edu-txt-w90,.edu-txt-w90{ width:90px; display: inline-block;text-align: center} +a.edu-txt-w80,.edu-txt-w80{ width:80px; display: inline-block;text-align: center} + +/*超过隐藏*/ +.overellipsis{overflow: hidden;white-space: nowrap;text-overflow: ellipsis;} +.task-hide{overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} +.task-hide-2{overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;} +/*隐藏*/ +.none{display: none} +.block{ display:block;} + +.boxsizing{box-sizing: border-box} + + +/*字体icon均为18px*/ +.iconfont{font-size: 18px!important;} +/*通用文字大小样式*/ +.font-n{font-weight: normal!important;} +.font-bd{font-weight: bold;} +.font-n{font-weight: normal;} +.font-12{ font-size: 12px!important;} +.font-13{ font-size: 13px!important;} +.font-14{ font-size: 14px!important;} +.font-15{ font-size: 15px!important;} +.font-16{ font-size: 16px!important;} +.font-17{ font-size: 17px!important;} +.font-18{ font-size: 18px!important;} +.font-20{ font-size: 20px!important;} +.font-22{ font-size: 22px!important;} +.font-24{ font-size: 24px!important;} +.font-26{ font-size: 26px!important;} +.font-28{ font-size: 28px!important;} +.font-30{ font-size: 30px!important;} +.font-32{ font-size: 32px!important;} +.font-36{ font-size: 36px!important;} +.font-50{ font-size: 50px!important;} +.font-60{ font-size: 60px!important;} +.font-70{ font-size: 70px!important;} + +/*a标签的下划线*/ +a.decoration{text-decoration: underline} + +/*表单*/ +.panel-form-label{ display:inline-block; width:10%; min-width:90px; text-align:right; line-height:40px; font-weight: normal; } + +/*通用内外边距*/ +.mt-10{ margin-top:-10px;}.mt-3{ margin-top:-3px;}.mt0{ margin-top:0px!important;} .mt1{ margin-top:1px;}.mt2{ margin-top:2px;}.mt3{ margin-top:3px;}.mt4{ margin-top:4px;}.mt5{ margin-top:5px!important;}.mt6{ margin-top:6px;}.mt7{ margin-top:7px!important;}.mt8{ margin-top:8px;}.mt9{ margin-top:9px;}.mt10{ margin-top:10px!important;}.mt12{ margin-top:12px;}.mt13{ margin-top:13px;}.mt14{ margin-top:14px;}.mt15{ margin-top:15px!important;}.mt16{ margin-top:16px;}.mt17{ margin-top:17px;}.mt18{ margin-top:18px;}.mt20{ margin-top:20px!important;}.mt22{ margin-top:22px!important;}.mt23{ margin-top:23px!important;}.mt24{ margin-top:24px!important;}.mt25{ margin-top:25px;}.mt28{ margin-top:28px;}.mt30{ margin-top:30px!important;}.mt34{ margin-top:34px!important;}.mt35{ margin-top:35px!important;}.mt36{ margin-top:36px!important;}.mt40{ margin-top:40px;}.mt45{ margin-top:45px;}.mt46{ margin-top:46px;}.mt50{ margin-top:50px;!important;}.mt56{ margin-top:56px;!important;}.mt60{ margin-top:60px;}.mt70{ margin-top:70px;}.mt80{ margin-top:80px;}.mt95{ margin-top:95px;}.mt100{ margin-top:100px;}.mt110{ margin-top:110px;}.mt120{ margin-top:120px;}.mt130{ margin-top:130px;}.mt140{ margin-top:140px;}.mt150{ margin-top:150px;}.mt160{ margin-top:160px;} +.mb0{margin-bottom: 0px!important;}.mb3{ margin-bottom: 3px;}.mb5{ margin-bottom: 5px;}.mb7{ margin-bottom: 7px;}.mb10{ margin-bottom: 10px;}.mb11{ margin-bottom: 11px;}.mb14{ margin-bottom: 14px;}.mb15{ margin-bottom: 15px;}.mb16{ margin-bottom: 16px;}.mb20{ margin-bottom: 20px!important;}.mb25{ margin-bottom: 25px;}.mb26{ margin-bottom: 26px;}.mb28{ margin-bottom: 28px;}.mb30{ margin-bottom: 30px!important;}.mb40{ margin-bottom: 40px!important;}.mb50{ margin-bottom: 50px!important;}.mb60{ margin-bottom: 60px!important;}.mb70{ margin-bottom: 70px!important;}.mb80{ margin-bottom: 80px!important;}.mb90{ margin-bottom: 90px!important;}.mb100{ margin-bottom: 100px!important;}.mb110{ margin-bottom: 110px;} +.ml-3{ margin-left: -3px;}.ml1{margin-left: 1px;}.ml2{margin-left: 2px;}.ml3{margin-left: 3px;}.ml4{margin-left: 4px;}.ml5{ margin-left: 5px;}.ml6{ margin-left: 6px;}.ml10{ margin-left: 10px;}.ml12{ margin-left:12px!important;}.ml13{ margin-left:13px!important;}.ml15{ margin-left: 15px;}.ml18{ margin-left: 18px;}.ml20{ margin-left: 20px;}.ml22{ margin-left: 22px;}.ml25{ margin-left: 25px;}.ml30{ margin-left: 30px;}.ml33{ margin-left: 33px;}.ml35{ margin-left:35px;}.ml40{margin-left:40px;}.ml42{margin-left:42px;}.ml45{ margin-left: 45px;}.ml50{ margin-left: 50px;}.ml55{ margin-left: 55px;}.ml60{ margin-left: 60px;}.ml72{ margin-left: 72px;}.ml73{ margin-left: 73px;}.ml75{ margin-left: 75px;}.ml80{ margin-left: 80px;}.ml85{margin-left:85px;}.ml95{ margin-left: 95px;}.ml115{margin-left: 115px}.ml123{ margin-left: 123px;}.ml150{ margin-left: 150px;}.ml180{ margin-left: 180px;}.ml230{ margin-left: 230px;}.ml240{margin-left: 240px;}.ml250{ margin-left: 250px;}.ml290{ margin-left: 290px;} +.mr3{margin-right: 3px}.mr4{margin-right: 4px}.mr5{ margin-right: 5px;}.mr8{ margin-right: 8px;}.mr10{ margin-right: 10px;}.mr12{ margin-right:12px!important;}.mr15{ margin-right: 15px;}.mr18{ margin-right: 18px;}.mr20{ margin-right: 20px;}.mr24{ margin-right: 24px;}.mr25{ margin-right: 25px;}.mr30{ margin-right:30px;}.mr35{margin-right:35px;}.mr40{margin-right:40px;}.mr45{margin-right:45px;}.mr50{ margin-right: 50px;}.mr60{ margin-right:60px;}.mr70{ margin-right: 70px;}.mr75{ margin-right: 75px;}.mr80{ margin-right:80px;}.mr90{ margin-right:90px;}.mr100{ margin-right: 100px;}.mr110{ margin-right:110px;}.mr350{ margin-right:350px;} + +.pt1{ padding-top:1px;}.pt3{ padding-top:3px!important;}.pt5{ padding-top:5px!important;}.pt10{ padding-top:10px;}.pt15{ padding-top:15px;}.pt17{ padding-top:17px;}.pt20{ padding-top:20px!important;}.pt25{ padding-top:25px;}.pt30{ padding-top:30px;}.pt35{ padding-top:35px;}.pt37{ padding-top:37px;}.pt40{ padding-top:40px;}.pt47{ padding-top:47px;}.pt49{ padding-top:49px;}.pt50{ padding-top:50px;}.pt60{ padding-top:60px;}.pt70{ padding-top:70px;}.pt80{ padding-top:80px;}.pt90{ padding-top:90px;}.pt100{padding-top:100px;}.pt110{ padding-top:110px;}.pt120{ padding-top:120px;}.pt130{padding-top:130px;} +.pb3{ padding-bottom:3px!important;}.pb5{ padding-bottom:5px!important;}.pb10{ padding-bottom:10px;}.pb15{ padding-bottom:15px;}.pb20{ padding-bottom:20px;}.pb25{ padding-bottom:20px;}.pb25{ padding-bottom:20px;}.pb30{ padding-bottom:30px;}.pb35{ padding-bottom:35px;}.pb40{ padding-bottom:40px;}.pb47{ padding-bottom:47px;}.pb50{ padding-bottom:50px;}.pb60{ padding-bottom:60px;}.pb70{ padding-bottom:70px;}.pb80{ padding-bottom:80px;}.pb90{ padding-bottom:90px;}.pb100{ padding-bottom:100px;}.pb110{ padding-bottom:110px;}.pb155{ padding-bottom:155px;} +.pr2{ paddding-right:2px;}.pr5{ padding-right:5px;}.pr10{ padding-right:10px;}.pr15{ padding-right:15px;}.pr20{ padding-right:20px!important;}.pr30{ padding-right:30px!important;}.pr35{ padding-right:35px!important;}.pr42{ padding-right:42px;}.pr45{ padding-right:45px;}.pr48{ padding-right:48px;}.pr57{ padding-right:57px;}.pr60{ padding-right:60px;}.pr70{ padding-right:70px;}.pr72{ padding-right:72px;}.pr75{ padding-right:75px;}.pr88{ padding-right:88px;} + +.pl0{ padding-left:0px!important;}.pl2{ padding-left:2px;}.pl5{ padding-left:5px;}.pl7{ padding-left:7px;}.pl8{ padding-left:8px;}.pl10{ padding-left:10px;}.pl15{ padding-left:15px;}.pl20{ padding-left:20px;}.pl22{ padding-left:22px;}.pl25{ padding-left:25px;}.pl28{ padding-left:28px;}.pl30{ padding-left:30px !important;}.pl33{padding-left: 33px}.pl35{ padding-left:35px;}.pl40{ padding-left:40px;}.pl42{ padding-left:42px;}.pl45{ padding-left:45px;}.pl50{ padding-left:50px;}.pl60{ padding-left:60px;}.pl70{padding-left:70px;}.pl75{padding-left:75px;}.pl80{padding-left:80px;}.pl88{ padding-left:88px;}.pl92{padding-left:92px;}.pl100{ padding-left:100px;} +.pr2{ paddding-right:2px;}.pr5{ padding-right:5px;}.pr7{ padding-right:7px;}.pr10{ padding-right:10px;}.pr15{ padding-right:15px;}.pr20{ padding-right:20px!important;}.pr25{ padding-right:25px!important;}.pr30{ padding-right:30px!important;}.pr40{ padding-right:40px;}.pr42{ padding-right:42px;}.pr45{ padding-right:45px;}.pr60{padding-right:60px;}.pr75{padding-right:75px;} + + +.padding5-10{padding:5px 10px;box-sizing: border-box} +.padding5-20{padding:5px 20px;box-sizing: border-box} +.padding10{padding: 10px;box-sizing: border-box} +.padding15{padding: 15px;box-sizing: border-box} +.padding20{padding: 20px;box-sizing: border-box} +.padding10-20{padding: 10px 20px;box-sizing: border-box} +.padding10-15{padding: 10px 15px;box-sizing: border-box} +.padding10-25{padding: 10px 25px;box-sizing: border-box} +.padding10-30{padding: 10px 30px;box-sizing: border-box} + +.padding15-20{padding: 15px 20px;box-sizing: border-box} +.padding15-25{padding: 15px 25px;box-sizing: border-box} + +.padding20-40{padding: 20px 40px;box-sizing: border-box} +.padding20-30{padding: 20px 30px;box-sizing: border-box} +.padding20-15{padding: 20px 15px;box-sizing: border-box} +.padding20-10{padding: 20px 10px;box-sizing: border-box} + +.padding30{padding: 30px;box-sizing: border-box} +.padding30-20{padding: 30px 20px;box-sizing: border-box} +.padding30-40{padding: 30px 40px;box-sizing: border-box} + +.padding40{padding: 40px;box-sizing: border-box} +.padding40-30{padding: 40px 30px;box-sizing: border-box} +.padding40-20{padding: 40px 20px;box-sizing: border-box} + +.margin10{margin:10px;} +.margin15{margin:15px;} +.margin20{margin:20px;} + +/*行高*/ +.lineh-12{line-height: 12px} +.lineh-15{line-height: 15px} +.lineh-17{line-height: 17px} +.lineh-20{line-height: 20px} +.lineh-25{line-height: 25px} +.lineh-30{line-height: 30px} +.lineh-35{line-height: 35px} +.lineh-40{line-height: 40px} + +/*pre标签换行*/ +.break_word{word-break: break-all;word-wrap: break-word;} +.break_word_firefox{white-space: pre-wrap !important;word-break: break-all;} +/*定位*/ +.pr{position: relative} +.df {display:flex;display: -webkit-flex;display: -ms-flex;} +.flex1{flex: 1;} +/*去掉IE input框输入时自带的清除按钮*/ +input::-ms-clear{display:none;} +/*自定义滚动条宽度*/ +::-webkit-scrollbar {width:7px;height:10px;background-color: #F5F5F5; } +::-webkit-scrollbar-track {-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);background-color: #F5F5F5;} +::-webkit-scrollbar-thumb {-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);background-color: #dadada;} + + +.newContainer{ min-height:100%; height: auto !important; height: 100%; /*IE6不识别min-height*/position: relative;} +.educontent{width: 1200px;margin:0px auto;box-sizing: border-box}/*中间部分宽度固定为1200*/ +.newMain{ margin: 0 auto; padding-bottom: 235px; min-width:1200px;}/*padding-bottom根据底部的高度而定*/ + +/*高度*/ +.height-100{height: 100%;} +/*文本位置*/ +.edu-txt-center{ text-align: center!important;} +.edu-txt-left{ text-align: left!important;} +.edu-txt-right{ text-align: right!important;} + +/*背景颜色*/ +.edu-back-white{background-color:#FFFFff; } +.edu-back-greyf5{background-color: #f5f5f5!important;} +.edu-back-skyblue{background: #F4FAFF;} +.edu-back-blue{background-color:#459be6!important; } +.edu-back-blue-txt{background-color:#F7FBFF!important; } +.edu-bg-light-blue{ background:#f7f9fd; padding:5px;}/*发送实训弹框*/ +/*常用字体*/ +/*红色*/ +.color-red{color: #FF0000!important;} +/*白色*/ +.color-white{color: #ffffff!important;} +/*黑色*/ +.color-dark{color: #05101a!important;} +/*灰色*/ +.color-grey-name{color: #1A0B00!important;} +.color-grey-fa{color: #FAFAFA!important;} +.color-grey-3{color: #333!important;} +.color-grey-eb{color: #EBEBEB!important;} +.color-grey-c{color: #ccc!important;} +.color-grey-cd{color: #cdcdcd!important;} +.color-grey-9{color: #999999!important;} +.color-grey-98{color: #989898!important;} +.color-grey-8{color: #888!important;} +.color-grey-6{color: #666!important;} +.color-grey-4d{color: #4d4d4d!important;} +.color-grey-B2{color: #B2B2B2!important;} +.color-grey-B3{color: #B3B3B3!important;} +.color-grey-B4{color: #B4B4B4!important;} +.color-grey-74{color: #747A7F!important;} + + +a.color-grey-name:hover,a.color-dark:hover,a.color-grey-6:hover,a.color-grey-3:hover{color: #4cacff!important;} +a.color-grey-9:hover,a.color-grey-8:hover,a.color-grey-c:hover{color: #111C24!important;} +/*蓝色*/ +.color-blue{color: #4CACFF!important;}/*主*/ +.color-blue_4C{color: #4CACFF!important;} +a.color-blue:hover,a.color-blue_4C:hover{color: #459BE6!important;} +/*橙色*/ +.color-orange{color: #ff6800!important;}/*辅助文字*/ +.color-orange-tip{color: #FF954C!important;}/*提示文字*/ +a.color-orange:hover,a.color-orange-tip:hover{color: #F06200!important;} +/*黄色*/ +.color-yellow{color: #EFC003!important;} +.color-yellow-ff{color: #FFA800!important} +/*绿色*/ +.color-green{color: #29BD8B!important;} +a.color-green:hover{color: #28AC7F!important;} +/*红色*/ +.color-red-dd{color: #DD1717!important;} +a.color-red-dd:hover{color: #C61616!important;} +/*圆角*/ +.radius{border-radius: 50%;} +.radius4{border-radius: 4px;} +.radius2{border-radius: 2px;} + + +/*绿色圆形--例如:实训路径详情的编辑icon的背景*/ +.ring-green{width: 18px;height: 18px;display: block;border-radius: 50%;background-color: #29BD8B;text-align: center;} +.ring-op-green{width: 18px;height: 18px;display: block;border-radius: 50%;background-color: rgba(41,189,139,0.6);text-align: center;} +.ring-grey{width: 18px;height: 18px;line-height: 18px;display: block;border-radius: 50%;background-color:rgba(204,204,204,0.5);text-align: center;} +.ring-blue{width: 18px;height: 18px;display: block;border-radius: 50%;background-color: #4CACFF;text-align: center;} + +.ring-orange{background-color: #FF6800;display: block;padding: 0px 3px;height: 18px;box-sizing: border-box;min-width: 18px;text-align: center;line-height: 18px;border-radius: 50%;color:#fff;font-size: 12px;} + +/*左侧label内容右对齐*/ +.label-right{min-width:75px;text-align: right;height: 35px;line-height: 35px;float: left; } + + +/*输入框样式---------宽度为百分比*/ +.input-flex-30{flex: 1;height: 30px;padding: 5px;box-sizing: border-box;} +.input-flex-35{flex: 1;height: 35px;padding: 5px;box-sizing: border-box;} +.input-flex-40{flex: 1;height: 40px;padding: 5px;box-sizing: border-box;} +.input-100-35{width: 100%;height: 35px;padding: 5px;box-sizing: border-box;} +.input-100-40{width: 100%;height: 40px;padding: 5px;box-sizing: border-box;} +.input-100-45{width: 100%;height: 45px;padding: 5px;box-sizing: border-box;} +.input-90-35{width: 90%;height: 35px;padding: 5px;box-sizing: border-box;} +.input-60-40{width: 60%;height: 40px;padding: 5px;box-sizing: border-box;} +.input-60-35{width: 60%;height: 35px;padding: 5px;box-sizing: border-box;} +.input-50-35{width: 50%;height: 35px;padding: 5px;box-sizing: border-box;} +.input-50-40{width: 50%;height: 40px;padding: 5px;box-sizing: border-box;} +.input-50-45{width: 50%;height: 45px;padding: 5px;box-sizing: border-box;} +.input-48-45{width: 48%;height: 45px;padding: 5px;box-sizing: border-box;} +/*输入框为灰色背景,获取焦点时背景变白色*/ +.greyInput{background-color: #F5F5F5;outline: none} +.greyInput:focus{background-color: #fff; border: 1px solid #ddd;} + +/*输入框样式---------宽度为固定长度*/ +.winput-240-45{width: 240px;height: 45px;padding: 5px;box-sizing: border-box;} +.winput-240-40{width: 240px;height: 40px;padding: 5px;box-sizing: border-box;} +.winput-240-35{width: 240px;height: 35px;padding: 5px;box-sizing: border-box;} +.winput-240-30{width: 240px;height: 30px;padding: 5px;box-sizing: border-box;} +.winput-190-45{width: 190px;height: 45px;padding: 5px;box-sizing: border-box;} +.winput-200-35{width: 200px;height: 35px;padding: 5px;box-sizing: border-box;} +.winput-120-40{width: 120px;height: 40px;padding: 5px;box-sizing: border-box;} +.winput-120-35{width: 120px;height: 35px;padding: 5px;box-sizing: border-box;} +.winput-120-30{width: 120px;height: 30px;padding: 5px;box-sizing: border-box;} +.winput-115-40{width: 115px;height: 40px;padding: 5px;box-sizing: border-box;} +.winput-90-40{width: 90px;height: 40px;padding: 5px;box-sizing: border-box;} +.winput-90-35{width: 90px;height: 35px;padding: 5px;box-sizing: border-box;} +.winput-240-100{width: 240px;height: 100px;padding: 5px;box-sizing: border-box;} +/*输入框样式---------高度固定*/ +.winput-90-100{width: 90%;height: 100px;padding: 5px;box-sizing: border-box;} +.winput-100-130{width: 100%;height: 130px;padding: 5px;box-sizing: border-box;} +.winput-100-150{width: 100%;height: 150px;padding: 5px;box-sizing: border-box;} +.winput-100-200{width: 100%;height: 200px;padding: 5px;box-sizing: border-box;} +.winput-90-100{width: 90%;height: 100px;padding: 5px;box-sizing: border-box;} +/*百分比宽度*/ +.width100{width: 100%;} +.width90{width: 90%;} +.width89{width: 89%;} +.width80{width: 80%;} +.width70{width: 70%;} +.width60{width: 60%;} +.width50{width: 50%;} +.width40{width: 40%;} +.width30{width: 30%;} +.width20{width: 20%;} +.width15{width: 15%;} +.width10{width: 10%;} + +/*固定大小的宽度*/ +.wid100{width: 100px;display: block} +.wid120{width: 120px;display: block} +.wid90{min-width: 90px!important;display: block} +a.edu-txt-w280,.edu-txt-w280{ width:280px; display: inline-block;text-align: center} +a.edu-txt-w200,.edu-txt-w200{ width:200px; display: inline-block;text-align: center} +a.edu-txt-w190,.edu-txt-w190{ width:190px; display: inline-block;text-align: center} +a.edu-txt-w160,.edu-txt-w160{ width:160px; display: inline-block;text-align: center} +a.edu-txt-w140,.edu-txt-w140{ width:141px; display: inline-block;text-align: center} +a.edu-txt-w130,.edu-txt-w130{ width:130px; display: inline-block;text-align: center} +a.edu-txt-w120,.edu-txt-w120{ width:120px; display: inline-block;text-align: center} +a.edu-txt-w100,.edu-txt-w100{ width:100px; display: inline-block;text-align: center} +a.edu-txt-w90,.edu-txt-w90{ width:90px; display: inline-block;text-align: center} +a.edu-txt-w80,.edu-txt-w80{ width:80px; display: inline-block;text-align: center} +a.edu-txt-w40,.edu-txt-w40{ width:40px; display: inline-block;text-align: center} + +/*最小高度*/ +.minH-40{min-height: 490px;} +.minH-280{min-height: 280px;} +.minH-400{min-height: 400px;} +.minH-440{min-height: 440px;} +.minH-500{min-height: 500px;} +.minH-560{min-height: 560px;} +/*超出高度出现滚动条--纵向*/ +.over260{max-height: 260px;overflow-y: auto} +.over210{height: 210px;overflow-y: auto} +.over280{height: 280px;overflow-y: auto} +.over170{min-height: 170px;max-height: 170px;overflow-y: auto} + +/*---------------tab公用边框-----------------*/ +.border-bottom-orange{border-bottom: 2px solid #FC7033!important;} +.bor-bottom-orange{border-bottom: 1px solid #FF9e6a!important;} +.bor-bottom-greyE{border-bottom: 1px solid #EEEEEE!important;} +.bor-left-greyE{border-left: 1px solid #EEEEEE!important;} +.bor-top-greyE{border-top: 1px solid #EEEEEE!important;} +.bor-right-greyE{border-right: 1px solid #EEEEEE!important;} +.bor-left-greyC{border-left: 1px solid #CCC!important;} +.bor-top-greyC{border-top: 1px solid #CCC!important;} +/*---------------边框-----------------*/ +.bor-gray-c{border:1px solid #ccc;} +.bor-grey-e{border:1px solid #eee;} +.bor-grey-d{border:1px solid #ddd;} +.bor-grey01{border:1px solid #E6EAEB;} +.bor-orange{border:1px solid #FF7500;} +.bor-blue{border:1px solid #5faee3;} +.bor-red{border:1px solid #db0505;} +.bor-none{border:none;} +.bor-outnone{outline:none; border:0px;} + +a.decoration{text-decoration: underline!important;} + +/*下拉菜单*/ +.edu-menu-panel{position: relative;cursor: pointer} +.edu-menu-list{position: absolute;padding: 5px 0px;box-shadow: 0 2px 8px 0 rgba(0,0,0,.2);display: none;width: 120px;background: #FFFFff;right: -5px;border-radius:0px 0px 4px 4px;color: #05101a; font-size: 14px;z-index: 9} +.edu-menu-list li{width: 100%;padding:0px 15px;box-sizing: border-box;height: 35px;line-height: 35px;cursor: pointer;} + +.edu-menuSmall-list{position: absolute;padding: 5px 0px;box-shadow: 0 2px 8px 0 rgba(0,0,0,.2);display: none;width: 100px;background: #FFFFff;right: -5px;border-radius:0px 0px 4px 4px;color: #05101a; font-size: 14px;z-index: 9} +.edu-menuSmall-list li{width: 100%;padding:0px 10px;box-sizing: border-box;height: 30px;line-height: 30px;cursor: pointer;font-size: 12px;} + +.edu-menu-list li a,.edu-menuSmall-list li a{width: 100%;height: 100%;display: block;color: #323232;} +.edu-menu-panel:hover i,.edu-menu-panel:hover{color: #4cacff;} +.edu-menu-panel:hover .edu-menu-list,.edu-menu-panel:hover .edu-menuSmall-list{display: block} +.edu-menu-list li:hover,.edu-menuSmall-list li:hover{background: #4CACFF;} +.edu-menu-list li:hover a,.edu-menuSmall-list li:hover a{color: #fff!important;} +.currentName{display: block;width: 100%;padding:0px 15px;height: 40px;line-height: 40px;font-size: 16px;box-sizing: border-box;cursor: default} +.ul-leftline:after{position: absolute;top:0px;content: "";width: 1px;background-color: #eee;height: 100%;right: 0px;} +.overPart{width: 240px;height: 30px;position: absolute;right: 0;top: -27px;background: transparent;} +/*滑块验证*/ +.drag_slider{ position: relative; background-color: #e8e8e8; width:100%; height: 45px;color: #999999; line-height: 45px; text-align: center;border-radius: 4px;} +.drag_slider .handler{ border-radius: 4px 0px 0px 4px;position: absolute; top: 0px; left: 0px; width: 50px; height: 43px; border: 1px solid #eee; cursor: move;} +.handler_bg{ background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0ZDhlNWY5My05NmI0LTRlNWQtOGFjYi03ZTY4OGYyMTU2ZTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NTEyNTVEMURGMkVFMTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NTEyNTVEMUNGMkVFMTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo2MTc5NzNmZS02OTQxLTQyOTYtYTIwNi02NDI2YTNkOWU5YmUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NGQ4ZTVmOTMtOTZiNC00ZTVkLThhY2ItN2U2ODhmMjE1NmU2Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+YiRG4AAAALFJREFUeNpi/P//PwMlgImBQkA9A+bOnfsIiBOxKcInh+yCaCDuByoswaIOpxwjciACFegBqZ1AvBSIS5OTk/8TkmNEjwWgQiUgtQuIjwAxUF3yX3xyGIEIFLwHpKyAWB+I1xGSwxULIGf9A7mQkBwTlhBXAFLHgPgqEAcTkmNCU6AL9d8WII4HOvk3ITkWJAXWUMlOoGQHmsE45ViQ2KuBuASoYC4Wf+OUYxz6mQkgwAAN9mIrUReCXgAAAABJRU5ErkJggg==") no-repeat center;} +.handler_ok_bg{ background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0ZDhlNWY5My05NmI0LTRlNWQtOGFjYi03ZTY4OGYyMTU2ZTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDlBRDI3NjVGMkQ2MTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDlBRDI3NjRGMkQ2MTFFNEI5NDBCMjQ2M0ExMDQ1OUYiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDphNWEzMWNhMC1hYmViLTQxNWEtYTEwZS04Y2U5NzRlN2Q4YTEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NGQ4ZTVmOTMtOTZiNC00ZTVkLThhY2ItN2U2ODhmMjE1NmU2Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+k+sHwwAAASZJREFUeNpi/P//PwMyKD8uZw+kUoDYEYgloMIvgHg/EM/ptHx0EFk9I8wAoEZ+IDUPiIMY8IN1QJwENOgj3ACo5gNAbMBAHLgAxA4gQ5igAnNJ0MwAVTsX7IKyY7L2UNuJAf+AmAmJ78AEDTBiwGYg5gbifCSxFCZoaBMCy4A4GOjnH0D6DpK4IxNSVIHAfSDOAeLraJrjgJp/AwPbHMhejiQnwYRmUzNQ4VQgDQqXK0ia/0I17wJiPmQNTNBEAgMlQIWiQA2vgWw7QppBekGxsAjIiEUSBNnsBDWEAY9mEFgMMgBk00E0iZtA7AHEctDQ58MRuA6wlLgGFMoMpIG1QFeGwAIxGZo8GUhIysmwQGSAZgwHaEZhICIzOaBkJkqyM0CAAQDGx279Jf50AAAAAABJRU5ErkJggg==") no-repeat center;} +.drag_slider .drag_bg{ background-color: #29bd8b; height: 45px; width: 0px;} +.drag_slider .drag_text{border-radius: 4px 0px 0px 4px;position: absolute; top: 0px; width: 100%; -moz-user-select: none; -webkit-user-select: none; user-select: none; -o-user-select:none; -ms-user-select:none;} + +/*tip公共样式的设置:*/ +.-task-title{opacity:0;position:absolute;left:0;top:0;display:none;z-index:100000;} /*1*/ +.data-tip-down,.data-tip-left,.data-tip-right,.data-tip-top{ position:relative; box-shadow:0px 0px 8px #000; background:#000; color:#fff; max-width:300px;/*2*/ + word-wrap: break-word; text-align:center; border-radius:4px; padding:0 10px; border:1px solid #000; display:none; }/*3*/ +.data-tip-down:after,.data-tip-down:before,.data-tip-left:before,.data-tip-right:before,.data-tip-left:after,.data-tip-right:after,.data-tip-top:after,.data-tip-top:before{/*4*/ + position: absolute;content:''; width:0; height:0;}/*5*/ +.data-tip-down:after,.data-tip-down:before{left: 45%;top:-10px;/*6*/ + border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 10px solid #000; }/*7*/ +.data-tip-down:before{top:-11px;border-bottom:10px solid #000;}/*8*/ +.data-tip-left:after,.data-tip-left:before{left: -10px;top:50%; margin-top:-5px;/*9*/ + border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-right: 10px solid #000; }/*10*/ +.data-tip-left:before{ left: -12px;border-right: 10px solid #000; }/*11*/ +.data-tip-right:after,.data-tip-right:before{right: -10px; top:50%; margin-top:-5px;/*12*/ + border-top: 5px solid transparent;border-bottom: 5px solid transparent; border-left: 10px solid #000; }/*13*/ +.data-tip-right:before{ right: -10px;border-left: 10px solid #000; }/*14*/ +.data-tip-top:after,.data-tip-top:before{left: 45%;bottom:-10px;border-left: 5px solid transparent; + border-right: 5px solid transparent;border-top: 10px solid #000;} +.data-tip-top:before{bottom:-11px;} + + +/*左右两栏排列、固定左右宽度----------ul*/ +ul.abouttable{margin: 0px auto;width: 440px;} +ul.abouttable li{width: 100%;} +ul.abouttable li .rz-label{min-width: 150px;height: 45px;line-height: 45px;text-align: right;color: #adadad;} +ul.abouttable li .second-label{min-width: 150px;height: 40px;line-height: 40px;text-align: right;color: #adadad;} +ul.abouttable li .minh-label{min-width: 150px;height: 28px;line-height: 28px;text-align: right;color: #adadad;} + + + +/* table--------------------------------*/ + +/* table-1底部边框 */ +.edu-pop-table{ width: 100%; border:1px solid #eee; border-bottom:none; background:#fff; color:#888;cursor: default} +.edu-pop-table tr{ height:40px; } +.edu-pop-table tr.edu-bg-grey{ background:#f5f5f5;} +.edu-txt-center{ text-align: center;}.edu-txt-left{ text-align: left;}.edu-txt-right{ text-align: right;} +.edu-pop-table tr th{ color:#333;border-bottom:1px solid #eee; } +.edu-pop-table tr td{border-bottom:1px solid #eee;} +.edu-pop-table.table-line tr td,.edu-pop-table.table-line tr th{ border-right:1px solid #eee;} +.edu-pop-table.table-line tr td:last-child,.edu-pop-table.table-line tr th:last-child{border-right:none;} +/*th行有背景颜色且table无边框*/ +.edu-pop-table.head-color thead tr{background: #fafbfb} +.edu-pop-table.head-color{border: none} +.edu-pop-table.head-color tr:last-child td {border: none} +/*--表格行间隔背景颜色-*/ +.edu-pop-table.interval-td{border-bottom: 1px solid #eee;} +.edu-pop-table.interval-td thead tr{background: #fafbfb} +.edu-pop-table.interval-td tbody tr:nth-child(even){background: #fafbfb} +.edu-pop-table.interval-td tbody tr td{border: none} +/*--表格行间隔背景颜色(th也没有边框)-*/ +.edu-pop-table.interval-all{border:none;border-bottom: 1px solid #eee;} +.edu-pop-table.interval-all thead th{border: none} +.edu-pop-table.interval-all thead tr{background: #fafbfb} +.edu-pop-table.interval-all tbody tr:nth-child(even){background: #fafbfb} +.edu-pop-table.interval-all tbody tr td{border: none;padding:5px 0px} +/*--表格行移入背景颜色-*/ +.edu-pop-table.hover-td tbody tr:hover{background: #EFF9FD}/*悬浮颜色为天蓝色*/ +.edu-pop-table.hover-td_1 tbody tr:hover{background:#FCF2EC}/*悬浮颜色为浅橙色*/ +/* table-2全边框 */ +.edu-pop-table-all{ width: 100%; border:1px solid #eee; background:#fff; color:#888;border-collapse: collapse} +.edu-pop-table-all tr{ height:30px; } +.edu-pop-table-all tr.edu-bg-grey{ background:#f5f5f5;} +.edu-pop-table-all tr th{ color:#333;border:1px solid #eee; } +.edu-pop-table-all tr td{border:1px solid #eee;padding: 5px} +/*table无边框、无背景颜色*/ +.allNone{background: none!important;cursor: default;border-bottom:none!important;} +.allNone tr{height: 30px!important;} + +/*数据为空公共页面*/ +img.edu-nodata-img{ width:300px; margin:50px auto 20px; display: block;} +.edu-nodata-p{ font-size: 20px; text-align: center; color:#999;border-bottom:none!important;padding-left: 18px;box-sizing: border-box;} + +/*输入为空或者错误的提示*/ +.input-none{box-shadow: 0px 0px 2px rgba(0,0,0,0.1);} +.notice{height: 25px;margin-left: 150px;} +.input-none + .notice span{display: block} + +/*列表里菜单icon移入*/ +.edu-position-hide{ position: absolute; top:15px; left:-20px; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); background:#fff;z-index:1001; padding:5px 0;z-index: 999999;} +.edu-position-hide li a{ display:inline-block; height: 30px; width: 100px; line-height: 30px; text-align: center; font-size:12px!important; } +.edu-position-hide li a:hover{ background:#F1F1F1; color:#05101A;} +.edu-position-hidebox i{ color:#bcbcbc;} +.edu-position-hidebox i:hover{ color:#4CACFF;} +.edu-position-hidebox a{ color:#05101A;} +.edu-position-hidebox:hover .edu-position-hide{ display: block;} + +/*搜索(灰色背景、点击变白色)*/ +.seekPanel > input{width: 100%;height: 30px;line-height: 30px;background-color: #f4f4f4;border:1px solid #eaeaea;padding: 0px 30px 0px 5px ;box-sizing: border-box;outline: none;} +.seekPanel > input:focus{background-color: #fff;} +.seekPanel > i{position: absolute;right: 7px;top: -1px;} +/*-------------------------------------------公用按钮:以white-btn(或者edu-default-btn无padding)为基础,宽度和高度可以用padding填充,颜色用edu-color-btn,begin-----------------------------------------*/ +/*按钮*/ +/*默认按钮*/ +/*长条形按钮*/ +.default_btn{display: block;border-radius: 5px ;background: #f4f4f4;color: #cfcfcf!important;text-align: center;width: 102px;box-sizing: border-box} +/*正常按钮*/ +.white-btn{text-align:center;cursor: pointer;display: inline-block;padding: 0px 8px;border: 1px solid #ccc;color: #666;letter-spacing: 1px;font-size: 14px;height: 26px;line-height: 26px;border-radius: 3px;} +a.white-btn.orange-btn{border: 1px solid #FF7500;color: #FF7500!important;} +a.white-btn.orange-btn:hover{border: 1px solid #F06200;color: #F06200!important;} + +.defalutGreyBorder{display: block;padding: 0px 10px;border:1px solid #ccc;height: 30px;line-height: 30px;border-radius: 4px;} +a.task-btn{cursor: pointer;display: inline-block;border: none;padding: 0 12px;color: #fff;background: #CDCDCD !important;letter-spacing: 1px;text-align: center;font-size: 14px;height: 30px;line-height: 30px;border-radius: 2px; font-weight: 400;} +/*最新按钮:以个人主页为例-------------因高度和宽度都已经固定,后续不再支持使用,*/ +.user_default_btn{cursor: pointer;font-size: 14px;display: block;width: 120px;text-align: center;height: 40px;line-height: 40px!important;border-radius: 4px;box-sizing: border-box} +.user_orange_btn{color: #fff!important;background-color: #FF6800;}/*橙色签到按钮*/ +.user_orange_btn:hover{background-color:#F06200;} +.user_grey_btn{color: #fff!important;background-color: #CCCCCC;cursor: default}/*灰色已经签到按钮*/ +.user_private_btn{color:#646464!important;background-color: #fff;border: 1px solid #989898}/*灰色私信、互相关注按钮*/ +.user_private_btn:hover{color: #B2B2B2!important;border: 1px solid #B2B2B2;} +.btn_auto{border-radius: 5px ;background: #fff;padding: 0px 18px;} + +/*可共用按钮,需添加padding或者边框*/ +.edu-default-btn{display: block;border-radius: 4px;} +a.edu-focus-btn{padding: 0px 10px;height: 30px;line-height: 30px;border: 1px solid #b2b2b2;color: #b2b2b2!important;} +a.edu-focus-btn:hover{border: 1px solid #666;color: #666!important;} + +a.edu-greenback-btn{padding: 0px 10px;background: #29BD8B;color: #fff!important;border: 1px solid #29BD8B;} +a.edu-greenline-btn{padding: 0px 10px;color: #29BD8B!important;border: 1px solid #29BD8B;} +a.edu-greenback-btn:hover{background-color: #28AC7F;} +a.edu-greenline-btn:hover{border:1px solid #28AC7F;color: #28AC7F!important;} + +a.edu-blueback-btn{padding: 0px 10px;background: #4CACFF;color: #fff!important;border: 1px solid #4CACFF;} +a.edu-blueline-btn{padding: 0px 10px;color: #4CACFF!important;border: 1px solid #4CACFF;} +a.edu-blueback-btn:hover{background-color: #459BE6;} +a.edu-blueline-btn:hover{border:1px solid #459BE6;color: #459BE6!important;} + +a.edu-orangeback-btn{background-color: #ff7500;color: #fff!important;border:1px solid #FF7500} +a.edu-orangeback-btn:hover{background-color: #F06200;} +a.edu-orangeline-btn{color: #FF7500!important;border:1px solid #FF7500} +a.edu-orangeline-btn:hover{color: #F06200!important;border:1px solid #F06200} + +a.edu-greyback-btn{padding: 0px 10px;background: #CCCCCC;color: #fff!important;border: 1px solid #CCCCCC;} +a.edu-greyback-btn:hover{background-color: #B2B2B2;} +a.edu-greyshallowline-btn{padding: 0px 10px;color: #999!important;border:1px solid #CFCFCF} +a.edu-greyline-btn{padding: 0px 10px;background: #fff;color: #666!important;border: 1px solid #eaeaea;line-height: 33px;height: 33px;} +a.edu-greyline-btn:hover,a.edu-greyshallowline-btn:hover{border:1px solid #B2B2B2;color:#B2B2B2!important;} + +/*新建页面的提交和取消按钮*/ +.defalutCancelbtn{display: block;border: 1px solid #CDCDCD;background-color: #fafafa;color: #999!important;width: 120px;text-align: center;height: 30px;line-height: 30px;border-radius: 2px; + width: 130px; + height: 40px; + background: rgba(77,124,254,0); + border: 1px solid rgba(76, 172, 255, 1); + border-radius: 4px; + line-height: 40px; + font-size: 16px; + font-family: MicrosoftYaHei; + font-weight: 400; + color: rgba(76,172,255,1) !important; +} +.defalutCancelbtn:hover{border:1px solid #B2B2B2;color: #B2B2B2!important;} +.defalutSubmitbtn{ + display: block;border: 1px solid #4CACFF;background-color: #4CACFF;color: #fff!important;width: 120px;text-align: center;line-height: 40px;border-radius: 2px; + width: 130px; + height: 40px; + background: rgba(76,172,255,1); + border-radius: 4px; + font-size: 16px; + font-family: MicrosoftYaHei; + font-weight: 400; + color: rgba(255,255,255,1); +} +.defalutSubmitbtn:hover{background-color: #459BE6;border: 1px solid #459BE6;} +/*-------------------------------------------公用按钮:以white-btn(或者edu-default-btn无padding)为基础,宽度和高度可以用padding填充,颜色用edu-color-btn,end-----------------------------------------*/ + +/*可点击按钮---蓝色*/ +.use_btn{background: #4cacff;color:#fff!important;} +a.task-btn-orange{background: #4CACFF!important; color:#fff!important;} +a:hover.task-btn-orange{background: #459BE6;} +/*可点击按钮---蓝色---蓝色边框*/ +.user_blue_btn{border: 1px solid #4CACFF;color: #4CACFF!important;} +/*可点击按钮---蓝色---蓝色背景*/ +a.user_bluebg_btn{background-color:#4CACFF;color: #fff;} +a.user_orangebg_btn{background-color:#FF6800;color: #fff;} +a.user_greybg_btn{background-color:#747A7F;color: #fff;} + + +.pointer{cursor: pointer} +.cdefault{cursor: default} + + +/*md编辑器恢复被覆盖样式*/ +.new_li li{ list-style-type: disc!important; } +.new_li ol li{ list-style-type: decimal!important; } +.new_li li{ margin-bottom: 0!important; } + +/*搜索框*/ +#pollingPanel{position: relative;width: 248px;height: 32px;} +#pollingPanel > input{width: 100%;height: 100%;border:1px solid #eaeaea;border-radius: 4px;padding: 0px 30px 0px 5px;box-sizing: border-box;background-color: #F4F4F4;} +#pollingPanel > input:focus{background-color: #fff;outline: none;} +#pollingPanel > a{position: absolute;right: 10px;top:0px;} + +/* 弹框 */ +.popupAll{width: 100%;height: 100%;position: fixed;z-index: 99998;background-color: rgba(5,16,26,0.6);left: 0;top:0;} +.task-popup{ width: 30%;background: #fff; border:1px solid #e8e8e8; border-radius:10px;} +.task-popup-text-center{ text-align: center; color: #333;} +.task-popup-title{ border-bottom: 1px solid #eee; padding:0px 15px;text-align: center;box-sizing: border-box;line-height: 70px;height: 70px; border-radius: 10px 10px 0px 0px;font-size: 16px;font-weight: bold; } +.task-popup-content{ padding:15px;} +.task-popup-submit{ margin:0px auto 15px; width: 160px;} +.task-popup-sure{ margin:0px auto 15px; width: 54px;} +.task-popup-right-sure{margin:0px auto 15px;text-align: center} +.task-popup-OK{ margin:15px auto; text-align: center} +.task-popup-bggrey{ background:#fff; color:#333;} +#closeIcon{position: absolute;color:#fefefe} +/* 模板弹框 20170407byLB */ +#task_popup_box{ background:#fff;padding-bottom:15px;-webkit-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;border-radius:5px;box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);} +.task_popup_top{background:#ccc;height:40px;-webkit-border-radius: 5px 5px 0px 0px;-moz-border-radius: 5px 5px 0px 0px;-o-border-radius: 5px 5px 0px 0px;border-radius: 5px 5px 0px 0px;} +.task_popup_top h3{ font-size:14px; color:#333; line-height:40px; padding-left:10px; } +a.task_icons_close{width:20px; height:20px;display:block;background: url(../images/popup/sy_icons_close.png) 0 0px no-repeat; margin:8px 10px 0 0;} +a:hover.task_icons_close{background: url(../images/popup/sy_icons_close.png) -40px 0px no-repeat;} +.task_popup_con{ padding:20px;} +/* 模板弹框 20161013byLB */ +#muban_popup_box{ background:#fff;padding-bottom:15px;-webkit-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;border-radius:5px;box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);} +.muban_popup_top{background:#3b94d6;height:40px;-webkit-border-radius: 5px 5px 0px 0px;-moz-border-radius: 5px 5px 0px 0px;-o-border-radius: 5px 5px 0px 0px;border-radius: 5px 5px 0px 0px;} +.muban_popup_top h3{ font-size:16px; color:#fff; font-weight:normal; line-height:40px; padding-left:10px; } +a.muban_icons_close{width:20px; height:20px;display:block;background: url(/images/sy/sy_icons_close.png) 0 0px no-repeat; margin:8px 10px 0 0;} +a:hover.muban_icons_close{background: url(/images/sy/sy_icons_close.png) -40px 0px no-repeat;} +#muban_popup_box input,#muban_pwopup_box select{ border:1px solid #c8c8c8; height: 28px; color: #888;} +#muban_popup_box label.pop_box_label{width: 100px; text-align: right; display: inline-block;} +input.radio-width90{ width: 90px; } +#muban_popup_box label.pop_box_label_l {width: 100px; text-align: left; display: inline-block;} + + +/*提示条*/ +.alert{ padding:10px;border: 1px solid transparent; text-align: center;} +.alert-blue{ background-color: #d9edf7;border-color: #bce8f1; color: #3a87ad;} +.alert-orange{ background-color: #fff9e9;border-color: #f6d0b1; color:#ee4a20;} +.task-close{padding: 0;cursor: pointer; background: transparent; border: 0; -webkit-appearance: none; font-size: 21px; font-weight: bold;line-height: 1; color: #000000; text-shadow: 0 1px 0 #ffffff; opacity: 0.3;} +.taskclose:hover{opacity: 0.5;} +.alert-red{background-color: #f2dede;border-color: #eed3d7; color: #d14f4d; text-align: left!important;} + +/*搜索的下拉列表*/ +.search_down_list a{display: block;height: 28px;line-height: 28px;padding: 0px 5px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;} +.search_down_list a:hover{background: #fafafa;} + +/*白色色块--类似个人主页-学习-里面的tab*/ +.white-panel{border-radius: 2px;width: 100%;margin: 0px auto;box-sizing: border-box;padding-left: 25px;} +.white-panel li{width: 118px;height: 48px;line-height: 48px;text-align: center;color: #05101A;float: left;cursor: pointer;border:1px solid #fff;} +.white-panel li a{display: block;width: 100%;} +.white-panel li.active{border-radius: 24px;border:1px solid #4CACFF;color:#4CACFF; } +.white-panel li.active a{color:#4CACFF; } + + +/* 个人主页翻页 */ +.pages_user_show a:hover,.pages_user_show li.active a{ background-color:#4CACFF; color:#fff;border: 1px solid #4CACFF;} +.pages_user_show a{border-radius: 2px; display: inline-block;border:1px solid #d1d1d1;background-color:#fff; color:#888; float:left;text-align:center; padding:2px 10px; line-height:1.9; margin: 0 5px;} +.pages_user_show li{float: left; list-style-type: none;} +.pages_user_show ul li{list-style-type: none !important;} +.pages_user_show ul li a{color:#888} +.page_GO{text-align:center;width: 80px;border-radius: 2px;margin-left: 5px;height: 33px;padding: 0px 5px;box-sizing: border-box;float: left;border:1px solid #d1d1d1;} +/* 小翻页 */ +.pages_little_show a:hover,.pages_little_show li.active a{ background-color:#4CACFF;; color:#fff!important;border:1px solid #4CACFF} +.pages_little_show a{ display: inline-block;border:1px solid #d1d1d1; color:#888!important; float:left;text-align:center; padding:3px 3px; line-height:1.9; margin: 0 2px; font-size: 12px;} +.pages_little_show li{float: left;} + +/*左右排版结构:参考个人主页的经验值和金币等页面*/ +.leftPanel{width: 22%;float: left;} +.leftPanel li.nav{padding:10px 0px;box-sizing: border-box;} +.leftPanel li.nav a{padding-left: 40px;display: block;width: 100%;box-sizing: border-box;border-left: 2px solid #fff;height: 24px;line-height: 24px;} +.leftPanel li.nav.active a{border-left: 2px solid #4CACFF;} +.rightPanel{width:78%;float: right;} + +/*个人主页,认证的圆圈*/ +.ringauto{width: 20px;height: 20px;line-height: 20px;text-align: center;border-radius: 50%;background-color: #F4FAFF;margin-right:5px;} + +/*-------------------个人主页:右侧提示区域--------------------------*/ +.-task-sidebar{position:fixed;width:40px;height:180px;right:0;bottom:30px;z-index: 10;} +.-task-sidebar div{height: 40px;line-height: 40px;box-sizing: border-box;width:40px;background:#4CACFF;color:#fff;font-size:20px;text-align:center;margin-bottom:5px;border-radius: 4px;} +.-task-sidebar div i{ color:#fff;} +.-task-sidebar div i:hover{color: #fff!important;} +.gotop{background-color: rgba(208,207,207,0.5)!important;padding: 0px!important;} +.-task-desc{background:#494949;width:90px;line-height: 36px;text-align: center; + position: absolute;color: #fff;font-size: 13px;z-index: 999999;opacity: 0;} +.-task-desc div{position: absolute;top:10px;right: -7px;height: 13px;} +.-task-desc div img{float: left} + + +/***** loading ******/ +/*****载入中******/ +#ajax-indicator { + position: absolute; /* fixed not supported by IE*/ + background-color:#eee; + border: 1px solid #bbb; + top:35%; + left:40%; + width:20%; + /*height:5%;*/ + font-weight:bold; + text-align:center; + padding:0.6em; + z-index:100000; + opacity: 0.5; +} + +html>body #ajax-indicator { position: fixed; } + +#ajax-indicator span{ + color:#fff; + color: #333333; + background-position: 0% 40%; + background-repeat: no-repeat; + background-image: url(/images/loading.gif); + padding-left: 26px; + vertical-align: bottom; + z-index:100000; +} +/*最新、最热*/ +.bestChoose.active{color: #4CACFF;} + + +/*实训路径选择实训*/ +.edu-filter-cir-grey{color: #666!important;width: auto;padding:0px 15px; font-size:14px !important; text-align: center;background: #f3f3f3;border-radius: 10px;display: block; height:25px; line-height:25px;} +.edu-filter-cir-grey:hover{background: #4cacff; color: #ffffff!important;} +.edu-filter-cir-grey.active{background: #4cacff; color: #ffffff!important; font-size: 14px !important;} + + +.with10{ width: 10%;box-sizing: border-box}.with12{ width: 12%;box-sizing: border-box}.with13{ width: 13%;box-sizing: border-box}.with14{ width: 14%;box-sizing: border-box}.with15{ width: 15%;box-sizing: border-box} +.with20{ width: 20%;box-sizing: border-box}.with22{ width: 22%;box-sizing: border-box}.with23{ width: 23%;box-sizing: border-box}.with25{ width: 25%;box-sizing: border-box} +.with30{ width: 30%;box-sizing: border-box}.with35{ width: 35%;box-sizing: border-box} +.with40{ width: 40%;box-sizing: border-box}.with45{ width: 45%;box-sizing: border-box}.with49{ width: 49%;box-sizing: border-box} +.with50{ width: 50%;box-sizing: border-box}.with55{ width: 55%;box-sizing: border-box} +.with52{ width: 52%;box-sizing: border-box}.with48{ width: 48%;box-sizing: border-box} +.with60{ width: 60%;box-sizing: border-box}.with65{ width: 65%;box-sizing: border-box} +.with70{ width: 70%;box-sizing: border-box}.with73{ width: 73%;box-sizing: border-box}.with75{ width: 75%;box-sizing: border-box}.with77{ width: 77%;box-sizing: border-box}.with78{ width: 78%;box-sizing: border-box} +.with80{ width: 80%;box-sizing: border-box}.with85{ width: 85%;box-sizing: border-box} +.with87{ width: 87%;box-sizing: border-box}.with90{ width: 90%;box-sizing: border-box}.with95{ width: 95%;box-sizing: border-box} +.with100{ width: 100%;} + +.transform-90{ + transform:rotate(-90deg); + -ms-transform:rotate(-90deg); /* IE 9 */ + -moz-transform:rotate(-90deg); /* Firefox */ + -webkit-transform:rotate(-90deg); /* Safari 和 Chrome */ + -o-transform:rotate(-90deg); +} + +.newplayVedio{ + font-size: 86px !important; +} +.icon-qizhi{ + font-size:30px !important; +} +.icon-31{ + font-size: 68px !important; +} + +/*置顶*/ +.btn-cir {display: inline-block;padding: 0px 5px;border-radius: 25px;line-height: 20px;font-size: 12px;} +.btn-cir-red{background:red;color: #fff; font-weight: normal;cursor: default} +.btn-cir-red:hover{background:red;color: #fff!important;} +.btn-cir-grey{background: #e1e1e1;color: #8c8c8c;font-weight: normal;border: 1px solid #e1e1e1} + +/*动态标签*/ +.edu-filter-btn{cursor: default;display: inline-block; padding:0px 9px; color:#666; background:#fff; text-align: center; border-radius:10px; font-size:12px; height:18px; line-height:18px;} +.edu-filter-btn-blue{border:1px solid #3498db; color:#3498db;} +.edu-filter-btn-orange{border:1px solid #ff6800; color:#ff6800!important;}/*提交中、评阅中*/ +.edu-filter-btn-red{border:1px solid #DD1717; color:#DD1717;}/*已截止、未开启补交*/ +.edu-filter-btn-green{border:1px solid #29BD8B; color:#29BD8B!important;}/*申诉中、已开启补交*/ +.edu-filter-btn-appeal{border:1px solid #FF4343; color:#FF4343!important;}/*申诉中*/ +.edu-filter-btn-yellow{border:1px solid #ef9324; color:#ef9324;} +.edu-filter-btn-danger{background:#d72e36; color:#fff;} +.edu-filter-btn-late{border:1px solid #3fbcff; color: #3fbcff;} +.edu-filter-btn-no-late{border:1px solid #747A7F;color: #747A7F;}/*未发布*/ +.edu-filter-btn-end{border: 1px solid #999999;color: #999999;}/*已结束*/ +/*动态按钮*/ +.edu-activity-orange{background-color:#FF6800;color:#fff!important;cursor: pointer;border: 1px solid #ff6800;}/*修改作品、补交作品、立即补交、补交附件*/ +.edu-activity-blue{background-color:#4CACFF;color:#fff!important;cursor: pointer;border: 1px solid #4CACFF;}/*开始实战、开始答题、继续答题、继续实战、提交作品*/ +.edu-activity-grey{background-color:#747A7F;color:#fff!important;cursor: pointer;border: 1px solid #747A7F;}/*匿评作品*/ +.edu-activity-green{background-color:#29BD8B;color:#fff!important;cursor: pointer;border: 1px solid #29BD8B;}/*查看作品、查看实战、查看答题*/ +.edu-activity-light-grey{background-color:#cbcbcb;color:#fff!important;cursor: pointer;border: 1px solid #cbcbcb;}/*取消关联*/ +/*课堂设置页面*/ +.course-ul-nav{width: 100%;border-bottom: 1px solid #EBEBEB;} +.course-ul-nav a{display: inline-block;padding: 20px;font-size: 18px;text-align: center;width: 94px;position: relative} +.course-ul-nav a.active,.course-ul-nav a:hover{color: #4CACFF;} +.course-ul-nav a.active:after{content: '';width: 94px;left: 20px;bottom: 0px;height: 2px;background-color: #4CACFF;position: absolute} + +/*-----下拉框--------*/ +.down-select{display:none;position: absolute;z-index: 10;left: 0px;width: 100%;overflow-y: auto;background: #fff;max-height: 200px;border:1px solid #eee;} +.down-select p{height: 35px;line-height: 35px;padding-left: 5px;cursor: pointer} +.down-select p:hover{background: #f3f4f6} + + + +.paddingLeft28{padding-left:28px;} + +.ant-modal-header{ + border-radius: 10px; +} + +.color656565{ + color:#656565; +} + +.colorC8161D{ + color:#C8161D; +} + +.bor-reds{ + border:1px solid #FF0000!important; + border-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px; } \ No newline at end of file diff --git a/app/views/challenges/edit.json.jbuilder b/app/views/challenges/edit.json.jbuilder index 2774b5a05..5ae15cf67 100644 --- a/app/views/challenges/edit.json.jbuilder +++ b/app/views/challenges/edit.json.jbuilder @@ -13,6 +13,7 @@ elsif @tab == 1 # 评测设置的编辑模式 json.(@challenge, :id, :path, :exec_path, :show_type, :original_picture_path, :expect_picture_path, :picture_path, :web_route, :test_set_score, :test_set_average) + json.has_web_route @shixun.has_web_route? json.test_sets @challenge.test_sets do |set| json.hidden (set.is_public ? 0 : 1) json.(set, :input, :output, :score) diff --git a/app/views/courses/create.json.jbuilder b/app/views/courses/create.json.jbuilder index baf14da46..be20a994b 100644 --- a/app/views/courses/create.json.jbuilder +++ b/app/views/courses/create.json.jbuilder @@ -1 +1,2 @@ -json.course_id @course.id \ No newline at end of file +json.course_id @course.id +json.first_category_url module_url(@course.none_hidden_course_modules.first, @course) \ No newline at end of file diff --git a/app/views/courses/index.json.jbuilder b/app/views/courses/index.json.jbuilder index 32a7047b7..7b404211b 100644 --- a/app/views/courses/index.json.jbuilder +++ b/app/views/courses/index.json.jbuilder @@ -4,7 +4,7 @@ json.courses @courses do |course| json.avatar_url url_to_avatar(course.teacher) json.creator course.teacher.real_name json.school course.school&.name - json.technical_title course.teacher.identity + json.technical_title "" # course.teacher.identity json.course_members_count course.course_members_count json.tasks_count get_tasks_count course json.visits course.visits diff --git a/app/views/courses/search_teacher_candidate.json.jbuilder b/app/views/courses/search_teacher_candidate.json.jbuilder index 49109b729..af3310fb7 100644 --- a/app/views/courses/search_teacher_candidate.json.jbuilder +++ b/app/views/courses/search_teacher_candidate.json.jbuilder @@ -3,6 +3,7 @@ json.candidates do json.id user.id json.name user.real_name json.nickname user.nickname + json.login user.login json.school_name user.user_extension.school.try(:name) json.school_id user.user_extension.school.try(:id) json.added @course.course_member?(user.id, [1, 2, 3]) diff --git a/app/views/discusses/forum_discusses.json.jbuilder b/app/views/discusses/forum_discusses.json.jbuilder new file mode 100644 index 000000000..3b1aefd89 --- /dev/null +++ b/app/views/discusses/forum_discusses.json.jbuilder @@ -0,0 +1,27 @@ +json.memo_list @memos +# do |memo| +# json.(memo, :id, :updated_at, :reward) +# json.subject message_content(memo.content) +# json.praise_count memo.praises_count +# json.replies_count memo.child_discuss_count +# json.shixun_tag memo.dis.tag_repertoires.map(&:name) +# json.username memo.user.full_name +# json.login memo.user.login +# json.image_url url_to_avatar(memo.user) +# json.tpm_url "/shixuns/#{memo.dis.identifier}/shixun_discuss" +# end + +json.memo_count @memo_count + +json.hot_memos do + json.array! @hot_memos do |hm| + json.(hm, :id, :subject, :language, :forum_id) + json.replies_count hm.all_replies_count + # json.praise_count hm.praise_tread.praise_count + json.tag hm.tag_repertoires.map(&:name) + end +end + +json.hot_tags @hot_tags + +json.recommend_shixuns @recommend_shixuns \ No newline at end of file diff --git a/app/views/discusses/reward_code.json.jbuilder b/app/views/discusses/reward_code.json.jbuilder index e5e0e9152..e2a98192b 100644 --- a/app/views/discusses/reward_code.json.jbuilder +++ b/app/views/discusses/reward_code.json.jbuilder @@ -1 +1,2 @@ +json.status 0 json.code @code \ No newline at end of file diff --git a/app/views/exercise_questions/_exercise_questions.json.jbuilder b/app/views/exercise_questions/_exercise_questions.json.jbuilder index 51c30ad92..bbdf45440 100644 --- a/app/views/exercise_questions/_exercise_questions.json.jbuilder +++ b/app/views/exercise_questions/_exercise_questions.json.jbuilder @@ -17,7 +17,8 @@ if question.question_type <= 2 #当为选择题或判断题时,只显示选 end json.question_choices do json.array! exercise_choices.each_with_index.to_a do |a,index| - standard_answer_b = standard_answers_array.include?(a.choice_position) + #TODO: 旧版本来一个题只有一个标准答案的,新版又做成了一个题有多个标准答案(exercise_choice_id存放的是标准答案的位置..) + standard_answer_b = standard_answers_array.join("").include?(a.choice_position.to_s) user_answer_b = user_answer.include?(a.id) json.c_position (index+1) if ex_choice_random_boolean #当选项随机时,选项位置以此为准,否则不出现 json.choice_id a.id diff --git a/app/views/games/picture_display.json.jbuilder b/app/views/games/picture_display.json.jbuilder index b43efa57e..770f0d71b 100644 --- a/app/views/games/picture_display.json.jbuilder +++ b/app/views/games/picture_display.json.jbuilder @@ -25,29 +25,28 @@ elsif @type == "txt" elsif @type =="qrcode" json.qrcode_str @qrcode_str elsif @type == "mp3" || @type == "mp4" - if @type == "mp4" - json.orignal_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378171/123.mp4"}] - json.user_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378172/456.mp4"}] - json.answer_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378173/789.mp4"}] - else - json.orignal_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378174/58099.mp3"}] - json.user_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378175/654058514.mp3"}] - json.answer_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378175/654058514.mp3"}] - end - - # json.orignal_file do - # json.array! @orignal_picture do |file| - # json.file_url attachment_show_users_path(:file_name => file, :path => @original_path) - # end - # end - # json.user_file do - # json.array! @user_picture do |file| - # json.file_url attachment_show_users_path(:file_name => file, :path => @user_path, :time => Time.now.to_i) - # end - # end - # json.answer_file do - # json.array! @answer_picture do |file| - # json.file_url attachment_show_users_path(:file_name => file, :path => @answer_path) - # end + # if @type == "mp4" + # json.orignal_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378171/123.mp4"}] + # json.user_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378172/456.mp4"}] + # json.answer_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378173/789.mp4"}] + # else + # json.orignal_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378174/58099.mp3"}] + # json.user_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378175/654058514.mp3"}] + # json.answer_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378175/654058514.mp3"}] # end + json.orignal_file do + json.array! @orignal_picture do |file| + json.file_url attachment_show_users_path(:file_name => file, :path => @original_path) + end + end + json.user_file do + json.array! @user_picture do |file| + json.file_url attachment_show_users_path(:file_name => file, :path => @user_path, :time => Time.now.to_i) + end + end + json.answer_file do + json.array! @answer_picture do |file| + json.file_url attachment_show_users_path(:file_name => file, :path => @answer_path) + end + end end \ No newline at end of file diff --git a/app/views/graduation_topics/_graduation_comments.json.jbuilder b/app/views/graduation_topics/_graduation_comments.json.jbuilder index 1d49d450f..51551d95d 100644 --- a/app/views/graduation_topics/_graduation_comments.json.jbuilder +++ b/app/views/graduation_topics/_graduation_comments.json.jbuilder @@ -10,7 +10,7 @@ json.hidden message.hidden if message.m_parent_id json.can_delete message.can_delete(identity) else - json.praise_count message.praise_treads.liker.count - json.user_praise message.praise_treads.user_liker(current_user).count + json.praise_count message.praise_treads.select{|pt| pt.praise_or_tread == 1}.count + json.user_praise message.praise_treads.select{|pt| pt.praise_or_tread == 1 && pt.user_id == current_user.id}.count json.child_message_count message.m_reply_count end diff --git a/app/views/homework_commons/group_list.json.jbuilder b/app/views/homework_commons/group_list.json.jbuilder index aa951bf7d..61464f2c1 100644 --- a/app/views/homework_commons/group_list.json.jbuilder +++ b/app/views/homework_commons/group_list.json.jbuilder @@ -7,7 +7,8 @@ json.group_list do end end # 未分班展示情况放在最后 -if @course_groups.count != (@page.to_i - 1)*@limit.to_i && @course_groups.count < @limit.to_i +if (@course_groups.count != 0 && @course_groups.count < @limit.to_i) || + ((@page.to_i - 1)*@limit.to_i == @course_member_count && @course_groups.count == 0) ungroup_work_count = homework_ungroup_works_count(@homework, @ungroup_user_ids) if ungroup_work_count > 0 json.ungroup_list do diff --git a/app/views/libraries/index.json.jbuilder b/app/views/libraries/index.json.jbuilder index c58d390b0..8774b72ae 100644 --- a/app/views/libraries/index.json.jbuilder +++ b/app/views/libraries/index.json.jbuilder @@ -5,12 +5,17 @@ json.libraries do json.cover_url library.cover_id.present? ? download_url(library.cover) : nil - json.praise_count library.praise_tread_cache&.praise_num || 0 + json.praise_count library.praises_count json.download_count @download_count_map.fetch(library.id, 0) json.published_at library.display_published_at json.created_at library.display_created_at - json.tags library.library_tags.map(&:name) + # 标签 + json.tags do + json.array! library.library_tags.each do |tag| + json.extract! tag, :id, :name + end + end end end \ No newline at end of file diff --git a/app/views/libraries/show.json.jbuilder b/app/views/libraries/show.json.jbuilder index 0f4b6ea17..fd20d7bf2 100644 --- a/app/views/libraries/show.json.jbuilder +++ b/app/views/libraries/show.json.jbuilder @@ -2,7 +2,7 @@ library = current_library json.extract! library, :id, :uuid, :title, :content, :author_name, :author_school_name, :status, :visited_count -json.praise_count library.praise_tread_cache&.praise_num || 0 +json.praise_count library.praises_count json.published_at library.display_published_at json.created_at library.display_created_at @@ -10,6 +10,7 @@ json.created_at library.display_created_at # 创建者 json.creator do json.partial! 'users/user_simple', user: library.user + json.school_name library.user.school_name end # 封面 @@ -37,7 +38,7 @@ json.operation do json.can_deletable manageable json.can_editable manageable - json.user_praised PraiseTread.exists?(user_id: current_user&.id) + json.user_praised library.praise_treads.exists?(user_id: current_user&.id) else json.can_deletable false json.can_editable false diff --git a/app/views/memos/_memo.json.jbuilder b/app/views/memos/_memo.json.jbuilder index 22adba5fc..a09b7f293 100644 --- a/app/views/memos/_memo.json.jbuilder +++ b/app/views/memos/_memo.json.jbuilder @@ -1,8 +1,15 @@ -json.(memo, :id, :subject, :is_md, :content, :sticky, :reward, :viewed_count) - -json.tag memo.tag_repertoires.map(&:name) -json.time memo.created_at -json.replies_count memo.all_replies_count -json.attachments_list [] -json.user_praise memo.praise_tread.user_liker(@user.try(:id)) ? true : false -json.memo_praise_count = memo.praise_tread.liker.count +json.memo do + json.id memo.id + json.forum_id memo.forum_id + json.subject memo.subject + json.is_md memo.is_md + json.content memo.content + json.sticky memo.sticky + json.reward memo.reward + json.viewed_count memo.viewed_count + json.tag memo.tag_repertoires.map(&:name) + json.time memo.created_at + json.replies_count memo.all_replies_count + json.user_praise memo.praise_treads.user_liker(@user.try(:id)).count > 0 + json.memo_praise_count memo.praise_treads.liker.count +end diff --git a/app/views/memos/_memo_list.json.jbuilder b/app/views/memos/_memo_list.json.jbuilder index 8da056e92..1f45070a1 100644 --- a/app/views/memos/_memo_list.json.jbuilder +++ b/app/views/memos/_memo_list.json.jbuilder @@ -1,7 +1,7 @@ json.(memo, :id, :subject, :author_id, :sticky, :updated_at, :language, :reward, :all_replies_count, :viewed_count, :forum_id) -json.praise_count memo.praise_tread.praise_count +json.praise_count memo.praise_treads.liker.count json.replies_count memo.all_replies_count json.tag memo.tag_repertoires.map(&:name) json.user_name memo.author.full_name diff --git a/app/views/memos/_replies_list.json.jbuilder b/app/views/memos/_replies_list.json.jbuilder index 3dae61813..9ec6976c2 100644 --- a/app/views/memos/_replies_list.json.jbuilder +++ b/app/views/memos/_replies_list.json.jbuilder @@ -7,10 +7,10 @@ json.username memo.author.full_name json.reward memo.reward json.hidden memo.hidden json.permission @user.manager_of_memo?(memo) -json.praise_count memo.praise_tread.liker.count -json.user_praise memo.praise_tread.select{|pt| pt.user_id == @user.id}.length > 0 +json.praise_count memo.praise_treads.select{|pt| pt.praise_or_tread == 1}.count +json.user_praise memo.praise_treads.select{|pt| pt.praise_or_tread == 1 && pt.user_id == @user.id}.length > 0 json.user_login memo.author.login -json.admin @user.admin +json.admin @user.admin? || @user.business? json.children do json.array! memo.children_of_reply do |child| diff --git a/app/views/memos/edit.json.jbuilder b/app/views/memos/edit.json.jbuilder new file mode 100644 index 000000000..f3d3f3724 --- /dev/null +++ b/app/views/memos/edit.json.jbuilder @@ -0,0 +1,7 @@ +json.(@memo, :subject, :content, :forum_id) +json.memo_tags @memo_tags +json.attachments @attachments do |attachment| + json.partial! "attachments/attachment_simple", locals: {attachment: attachment} +end +json.tag_list @tag_list +json.forums forum_list diff --git a/app/views/memos/index.json.jbuilder b/app/views/memos/index.json.jbuilder index 8a90e374a..e004f7ea7 100644 --- a/app/views/memos/index.json.jbuilder +++ b/app/views/memos/index.json.jbuilder @@ -8,22 +8,30 @@ # tidding_count: 消息数 # # -json.memo_list do - json.array! @memos do |memo| - json.partial! "memos/memo_list", locals: {memo: memo} - end +json.memo_list @memos do |memo| + json.(memo, :id, :subject, :sticky, + :updated_at, :language, :reward, + :viewed_count, :forum_id) + json.praise_count memo.praise_treads.select{|pt| pt.praise_or_tread == 1}.count + json.replies_count memo.all_replies_count + json.tag memo.tag_repertoires.map(&:name) + json.user_name memo.author.full_name + json.login memo.author.login + json.image_url url_to_avatar(memo.author) end json.memo_count @memos_count json.hot_memos do json.array! @hot_memos do |hm| - json.(hm, :id, :subject, :language, :forum_id, :all_replies_count) + json.(hm, :id, :subject, :language, :forum_id) json.replies_count hm.all_replies_count - json.praise_count hm.praise_tread.praise_count + # json.praise_count hm.praise_tread.praise_count json.tag hm.tag_repertoires.map(&:name) end end json.hot_tags @tags_info.map{|o| o.attributes.dup.except("cnt", "id")} +json.recommend_shixuns @recommend_shixuns + diff --git a/app/views/memos/more_reply.json.jbuilder b/app/views/memos/more_reply.json.jbuilder new file mode 100644 index 000000000..af1a9f1ac --- /dev/null +++ b/app/views/memos/more_reply.json.jbuilder @@ -0,0 +1,7 @@ +json.memo_replies do + json.array! @memos do |memo| + json.partial! "memos/replies_list", memo: memo + end +end + +json.memos_count @memos_count \ No newline at end of file diff --git a/app/views/memos/new.json.jbuilder b/app/views/memos/new.json.jbuilder index 47c023ea0..c35066023 100644 --- a/app/views/memos/new.json.jbuilder +++ b/app/views/memos/new.json.jbuilder @@ -1,3 +1,2 @@ json.tag_list @tag_list -json.forums @csrf_token - +json.forums forum_list \ No newline at end of file diff --git a/app/views/memos/reply.json.jbuilder b/app/views/memos/reply.json.jbuilder new file mode 100644 index 000000000..c117d2d24 --- /dev/null +++ b/app/views/memos/reply.json.jbuilder @@ -0,0 +1,2 @@ +json.(@reply, :id, :subject, :content, :hidden, :forum_id, :author_id, :all_replies_count, :is_md, :parent_id, :root_id, + :reward, :sticky, :updated_at, :created_at, :viewed_count) \ No newline at end of file diff --git a/app/views/memos/show.json.jbuilder b/app/views/memos/show.json.jbuilder index 7acd6ba4a..1f7840983 100644 --- a/app/views/memos/show.json.jbuilder +++ b/app/views/memos/show.json.jbuilder @@ -1,5 +1,9 @@ json.partial! "memos/memo", memo: @memo +json.attachments_list @attachments do |attachment| + json.partial! "attachments/attachment_simple", locals: {attachment: attachment} +end + json.memo_replies do json.array! @memos do |memo| json.partial! "memos/replies_list", memo: memo @@ -9,10 +13,11 @@ end json.author_info do json.username @memo.author.full_name # TODO watched_by 插件没法用,等把lib文件载入后在打开代码 - #json.watched @memo.author.watched_by?(@user) + json.watched @user.watched?(@memo.author) json.image_url url_to_avatar(@memo.author) json.identity @memo.author.identity json.login @memo.author.login json.user_id @memo.author.id end +json.recommend_shixuns @recommend_shixuns \ No newline at end of file diff --git a/app/views/subjects/show.json.jbuilder b/app/views/subjects/show.json.jbuilder index 25c2962cc..dd4244a15 100644 --- a/app/views/subjects/show.json.jbuilder +++ b/app/views/subjects/show.json.jbuilder @@ -1,19 +1,20 @@ -json.(@subject, :id, :name, :description, :learning_notes, :stages_count, :stage_shixuns_count) +json.(@subject, :id, :name, :description, :learning_notes, :stages_count, :stage_shixuns_count, :shixuns_count) json.challenge_choose_count @subject.subject_challenge_choose_count json.challenges_count @subject.subject_challenge_count json.subject_score @subject.all_score json.member_count @subject.member_count -json.allow_delete @is_creator && (@subject.status != 2 || @user.admin?) -json.publish_status publish_status(@subject, @is_creator, @user, @shixuns) -json.allow_statistics @user.manager_of_subject?(@subject) +json.allow_delete (@subject.status != 2 && @is_creator) || @user.admin? +json.publish_status publish_status(@subject, @is_manager, @user, @shixuns) +json.allow_statistics @is_manager json.allow_send @user.logged? -json.allow_visit @user.manager_of_subject?(@subject) || @user.admin? || @subject.status > 1 -json.allow_add_member @user.manager_of_subject?(@subject) +json.allow_visit @subject.status > 1 || @is_manager +json.allow_add_member @is_manager json.members @members do |member| json.partial! 'subject_member', locals: { user: member.user } + json.role member.role end # 技能标签 diff --git a/app/views/subjects/up_member_position.json.jbuilder b/app/views/subjects/up_member_position.json.jbuilder index 410b5641b..64038f419 100644 --- a/app/views/subjects/up_member_position.json.jbuilder +++ b/app/views/subjects/up_member_position.json.jbuilder @@ -1,3 +1,4 @@ json.members @subject.subject_members do |member| json.partial! 'subject_member', locals: { user: member.user } + json.role member.role end \ No newline at end of file diff --git a/app/views/tidings/_tiding.json.jbuilder b/app/views/tidings/_tiding.json.jbuilder index 34b06320d..3b70f66f1 100644 --- a/app/views/tidings/_tiding.json.jbuilder +++ b/app/views/tidings/_tiding.json.jbuilder @@ -1,11 +1,31 @@ -json.extract! tiding, :id, :status, :viewed, :user_id, :tiding_type, :container_id, :container_type, :parent_container_id, :parent_container_type +json.extract! tiding, :id, :status, :viewed, :user_id, :tiding_type, :container_id, :container_type, + :parent_container_id, :parent_container_type, :belong_container_id, :belong_container_type json.content tiding.content + json.identifier tiding.identifier +json.auth_type tiding.container_type == 'ApplyUserAuthentication' ? tiding.container.auth_type : nil + +homework_type = nil +if tiding.container_type == 'HomeworkCommon' + homework_type = tiding.container.homework_type rescue nil +end +if homework_type.blank? && tiding.parent_container_type == 'HomeworkCommon' + homework_type = tiding.parent_container.homework_type rescue nil +end +json.homework_type homework_type + json.time tiding.how_long_time json.new_tiding tiding.unread?(@onclick_time) json.trigger_user do - json.partial! 'users/user_simple', user: tiding.trigger_user_id.zero? ? User.find(1) : tiding.trigger_user + if tiding.trigger_user_id.zero? + json.id 0 + json.name "系统" + json.login "" + json.image_url "educoder/systemLogo.png" + else + json.partial! 'users/user_simple', user: tiding.trigger_user + end end json.attachments tiding.attachments, partial: 'attachments/attachment_small', as: :attachment diff --git a/app/views/users/get_navigation_info.json.jbuilder b/app/views/users/get_navigation_info.json.jbuilder index 96f54d3d0..377913ccc 100644 --- a/app/views/users/get_navigation_info.json.jbuilder +++ b/app/views/users/get_navigation_info.json.jbuilder @@ -1,20 +1,20 @@ json.top do json.shixun_url "/shixuns" - json.shixun_paths_url "#{@old_domain}/paths" - json.course_url "#{@old_domain}/courses" + json.shixun_paths_url "/paths" + json.course_url "/courses" json.competitions_url "#{@old_domain}/competitions" - json.topic_url "#{@old_domain}/forums" - json.new_course_url "#{@old_domain}/courses/new" - json.new_shixun_url "#{@old_domain}/shixuns/new" - json.new_shixun_path_url "#{@old_domain}/paths/new" + json.topic_url "/forums" + json.new_course_url "/courses/new" + json.new_shixun_url "/shixuns/new" + json.new_shixun_path_url "/paths/new" json.new_project_url "#{@old_domain}/projects/new" - json.join_course_url "#{@old_domain}/courses/join_course_multi_role" + json.join_course_url "/courses/join_course_multi_role" json.join_project_url "#{@old_domain}/applied_project/applied_project_info" - json.message_url "#{@old_domain}#{@user_url}/user_tidings" + json.message_url "#{@user_url}/user_tidings" json.new_message @new_message json.moop_cases_url "#{@old_domain}/moop_cases" - json.crowdsourcing_url "#{@old_domain}/crowdsourcing" + json.crowdsourcing_url "/crowdsourcing" json.career_url do json.array! @career.to_a do |c| diff --git a/app/views/users/get_user_info.json.jbuilder b/app/views/users/get_user_info.json.jbuilder index d12b950f9..fc2eca762 100644 --- a/app/views/users/get_user_info.json.jbuilder +++ b/app/views/users/get_user_info.json.jbuilder @@ -1,4 +1,5 @@ json.username @user.full_name +json.real_name @user.real_name json.login @user.login json.user_id @user.id json.image_url url_to_avatar(@user) diff --git a/app/views/users/homepage_info.json.jbuilder b/app/views/users/homepage_info.json.jbuilder index 1621448f3..3fabd110b 100644 --- a/app/views/users/homepage_info.json.jbuilder +++ b/app/views/users/homepage_info.json.jbuilder @@ -16,7 +16,7 @@ json.college_identifier @user.college_identifier json.followed User.current.watched?(@user) if @user.logged_user? - json.can_apply_trial @user.can_apply_trial? + #json.can_apply_trial @user.can_apply_trial? json.attendance_signed @user.attendance_signed? json.tomorrow_attendance_gold @user.tomorrow_attendance_gold end diff --git a/app/views/users/private_message_details/show.json.jbuilder b/app/views/users/private_message_details/show.json.jbuilder index 065767fb4..17d1a5e38 100644 --- a/app/views/users/private_message_details/show.json.jbuilder +++ b/app/views/users/private_message_details/show.json.jbuilder @@ -1,9 +1,13 @@ json.count @count +json.target do + json.partial! 'users/user_simple', user: target_user +end json.messages do json.array! @messages.each do |message| json.extract! message, :id, :user_id, :receiver_id, :sender_id, :content json.send_time message.display_send_time + json.send_day message.send_time.strftime('%Y-%m-%d') json.sender do json.partial! 'users/user_simple', user: message.sender end diff --git a/app/views/users/private_messages/create.json.jbuilder b/app/views/users/private_messages/create.json.jbuilder index 888cfeff6..2d5b4e7bf 100644 --- a/app/views/users/private_messages/create.json.jbuilder +++ b/app/views/users/private_messages/create.json.jbuilder @@ -3,6 +3,7 @@ json.message 'success' json.private_message do json.extract! @message, :id, :user_id, :receiver_id, :sender_id, :content + json.send_day @message.send_time.strftime('%Y-%m-%d') json.send_time @message.display_send_time json.sender do json.partial! 'users/user_simple', user: @message.sender diff --git a/app/views/users/project_packages/index.json.jbuilder b/app/views/users/project_packages/index.json.jbuilder index a2574d558..ad56be7d2 100644 --- a/app/views/users/project_packages/index.json.jbuilder +++ b/app/views/users/project_packages/index.json.jbuilder @@ -16,5 +16,11 @@ json.project_packages do json.deadline_at package.display_deadline_at json.published_at package.display_published_at + + json.operation do + can_manage = current_user&.id == observed_user.id || current_user&.admin_or_business? + json.can_edit can_manage && package.editable? + json.can_delete can_manage && package.deletable? + end end end \ No newline at end of file diff --git a/app/views/projects/search.json.jbuilder b/app/views/users/projects/search.json.jbuilder similarity index 100% rename from app/views/projects/search.json.jbuilder rename to app/views/users/projects/search.json.jbuilder diff --git a/app/views/users/videos/_video.json.jbuilder b/app/views/users/videos/_video.json.jbuilder new file mode 100644 index 000000000..9b91c5e94 --- /dev/null +++ b/app/views/users/videos/_video.json.jbuilder @@ -0,0 +1,5 @@ +json.extract! video, :id, :title, :cover_url, :file_url + +json.published_at video.display_published_at +json.created_at video.display_created_at +json.updated_at video.display_updated_at \ No newline at end of file diff --git a/app/views/users/videos/index.json.jbuilder b/app/views/users/videos/index.json.jbuilder new file mode 100644 index 000000000..f4a34aa00 --- /dev/null +++ b/app/views/users/videos/index.json.jbuilder @@ -0,0 +1,2 @@ +json.count @count +json.videos @videos, partial: 'video', as: :video \ No newline at end of file diff --git a/app/views/users/videos/review.json.jbuilder b/app/views/users/videos/review.json.jbuilder new file mode 100644 index 000000000..3e0fe8b93 --- /dev/null +++ b/app/views/users/videos/review.json.jbuilder @@ -0,0 +1,7 @@ +json.count @count +json.videos do + json.array! @videos.each do |video| + json.partial! 'video', video: video + json.file_url nil + end +end \ No newline at end of file diff --git a/app/views/users/videos/update.json.jbuilder b/app/views/users/videos/update.json.jbuilder new file mode 100644 index 000000000..ed69a174c --- /dev/null +++ b/app/views/users/videos/update.json.jbuilder @@ -0,0 +1 @@ +json.partial! 'video', video: current_video \ No newline at end of file diff --git a/config/aliyun_vod.yml.example b/config/aliyun_vod.yml.example new file mode 100644 index 000000000..aa6547a62 --- /dev/null +++ b/config/aliyun_vod.yml.example @@ -0,0 +1,16 @@ +defaults: &defaults + access_key_id: 'test' + access_key_secret: 'test' + base_url: 'http://vod.cn-shanghai.aliyuncs.com' + cate_id: '-1' + callback_url: 'http://47.96.87.25:48080/api/callbacks/aliyun_vod.json' + signature_key: 'test12345678' + +development: + <<: *defaults + +test: + <<: *defaults + +production: + <<: *defaults \ No newline at end of file diff --git a/config/initializers/aliyun_vod_init.rb b/config/initializers/aliyun_vod_init.rb new file mode 100644 index 000000000..d133fffbf --- /dev/null +++ b/config/initializers/aliyun_vod_init.rb @@ -0,0 +1,7 @@ +config = Rails.application.config_for(:aliyun_vod) +AliyunVod.access_key_id = config['access_key_id'] +AliyunVod.access_key_secret = config['access_key_secret'] +AliyunVod.base_url = config['base_url'] || 'http://vod.cn-shanghai.aliyuncs.com'.freeze +AliyunVod.cate_id = config['cate_id'] +AliyunVod.callback_url = config['callback_url'] +AliyunVod.signature_key = config['signature_key'] diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index b8d29a52c..06ba35f6e 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -4,5 +4,5 @@ # Rails.application.config.session_store :active_record_store # Be sure to restart your server when you modify this file. -Rails.application.config.session_store :cache_store, :expire_after => 10.hours, key: '_educoder_session', domain: :all +Rails.application.config.session_store :cache_store, :expire_after => 24.hours, key: '_educoder_session', domain: :all diff --git a/config/locales/tidings/zh-CN.yml b/config/locales/tidings/zh-CN.yml index 07e3c2f6d..a4d213161 100644 --- a/config/locales/tidings/zh-CN.yml +++ b/config/locales/tidings/zh-CN.yml @@ -6,9 +6,9 @@ "2_end": "申请职业认证:%s %s" System: "1_1_end": "你提交的实名认证申请,审核已通过" - "1_2_end": "你提交的实名认证申请,审核未通过    原因:%{reason}" + "1_2_end": "你提交的实名认证申请,审核未通过
原因:%{reason}" "2_1_end": "你提交的职业认证申请,审核已通过" - "2_2_end": "你提交的职业认证申请,审核未通过    原因:%{reason}" + "2_2_end": "你提交的职业认证申请,审核未通过
原因:%{reason}" CancelUserAuthentication_end: "取消了你的实名认证:%s %s" CancelUserProCertification_end: "取消了你的实名认证:%s %s" JoinCourse: @@ -21,6 +21,9 @@ "7_2_end": "你提交的加入课堂申请:%s(助教), 审核未通过" StudentJoinCourse_end: "加入了课堂:%s(学生)" TeacherJoinCourse: + "2_end": "%s将你加入课堂:%s(教师)" + "3_end": "%s将你加入课堂:%s(助教)" + "4_end": "%s将你加入课堂:%s(学生)" "9_end": "%s将你加入课堂:%s(教师)" "7_end": "%s将你加入课堂:%s(助教)" "10_end": "%s将你加入课堂:%s(学生)" @@ -28,35 +31,37 @@ Apply_end: "申请添加二级单位:%s(%s)" System: "1_end": "你提交的添加二级单位申请:%s(%s),审核已通过" - "2_false_end": "你提交的添加二级单位申请:%s(%s),审核未通过    原因:%{reason}" + "2_false_end": "你提交的添加二级单位申请:%s(%s),审核未通过
原因:%{reason}" "2_true_end": "你提交的添加二级单位申请:%s(%s),审核未通过" "3_end": "你提交的添加二级单位申请:%s(%s),已被更改为%{reason}" ApplyAddSchools: Apply_end: "申请添加单位:%s" System: "1_end": "你提交的添加单位申请:%{name},审核已通过" - "2_reason_end": "你提交的添加单位申请:%{name},审核未通过    原因:%{reason}" - "2_no_reason_end": "你提交的添加单位申请:%{name},审核未通过" + "2_false_end": "你提交的添加单位申请:%{name},审核未通过
原因:%{reason}" + "2_true_end": "你提交的添加单位申请:%{name},审核未通过" "3_end": "你提交的添加单位申请:%{name},已被更改为:%{reason}" ApplyAction: ApplyShixun: System: "1_end": "你提交的实训发布申请:%{name},审核已通过" - "2_end": "你提交的实训发布申请:%{name},审核未通过    原因:%{reason}" + "2_end": "你提交的实训发布申请:%{name},审核未通过
原因:%{reason}" Apply_end: "申请发布实训:%{name}" ApplySubject: System: "1_end": "你提交的实训课程发布申请:%{name},审核已通过" - "2_end": "你提交的实训课程发布申请:%{name},审核未通过    原因:%{reason}" + "2_end": "你提交的实训课程发布申请:%{name},审核未通过
原因:%{reason}" Apply_end: "申请发布实训课程:%{name}" TrialAuthorization: System: "1_end": "你提交的试用授权申请,审核已通过" - "2_end": "你提交的试用授权申请,审核未通过    原因:%{reason}" + "2_end": "你提交的试用授权申请,审核未通过
原因:%{reason}" Apply_end: "提交了试用授权申请" - Course_end: "成功创建了课堂:%s" - Shixun_end: "成功创建了实训:%s" - Subject_end: "成功创建了实训课程:%s" + Course_end: "你创建了课堂:%s" + Course: + Delete_end: "你删除了课堂:%s" + Shixun_end: "你创建了实训:%s" + Subject_end: "你创建了实训课程:%s" ArchiveCourse_end: "你的课堂已经归档:%s" JournalsForMessage: Mentioned_end: "@了你:%s" @@ -159,7 +164,7 @@ NearlyEnd_end: "试卷的截止时间快到啦:%s" CommitExercise_end: "提交了试卷答题:%s" ExerciseScore_end: "评阅了你的试卷:%s" - StudentGraduationTopic_end: "选择了毕设选题:%s" + StudentGraduationTopic_end: "申请选择毕设选题:%s" DealStudentTopicSelect: 1_end: "你提交的选题申请:%s,审核已通过" 2_end: "你提交的选题申请:%s,审核未通过" @@ -174,7 +179,7 @@ GraduationWorkScore_end: "评阅了你的作品:%s" HomeworkCommon: AnonymousComment_end: "开启了作业匿评:%{name}" - AnonymousCommentFail_end: "开启作业匿评失败:%{name},
原因:%{reason}" + AnonymousCommentFail_end: "开启作业匿评失败:%{name}
原因:%{reason}" AnonymousAppeal_end: "开启了匿评申诉:%{name}" HomeworkPublish_end: "发布了作业:%{name}" NearlyEnd_end: "作业的提交截止时间快到啦:%{name}" @@ -190,28 +195,33 @@ ChallengeWorkScore_end: "调整了你的作品分数:%s" StudentWorksScoresAppeal: UserAppealResult: - 1_end: "同意了你提交的匿评申诉申请:%s" - 2_end: "拒绝了你提交的匿评申诉:%s" + 1_end: "你提交的匿评申诉申请:%s,审核已通过" + 2_end: "你提交的匿评申诉:%s,审核未通过" AppealResult: - 1_end: "同意了他人对你的匿评申诉申请:%s" - 2_end: "拒绝了他人对你的匿评申诉:%s" + 1_end: "别人对你的匿评发起的申诉申请:%s,审核已通过" + 2_end: "别人对你的匿评发起的申诉申请:%s,审核未通过" StudentWork: Apply_end: "发起了匿评申诉申请:%s" - HomeworkCommon_end: "有人对你的匿评发起了申诉:%s" + System_end: "有人对你的匿评发起了申诉:%s" Department_end: "你选填的二级单位:%s(%s)因不符合规范,已被系统删除.请重新选择" Library: Apply_end: "申请发布教学案例:%s" System: 1_end: "你提交的发布教学案例申请:%s,审核已通过" - 2_end: "你提交的发布教学案例申请:%s,审核未通过,原因:%{reason}" + 2_end: "你提交的发布教学案例申请:%s,审核未通过
原因:%{reason}" ProjectPackage: Apply_end: "申请发布众包需求:%s" System: 1_end: "你提交的众包需求申请:%s,审核已通过" - 2_end: "你提交的众包需求申请:%s,审核未通过,原因:%{reason}" + 2_end: "你提交的众包需求申请:%s,审核未通过
原因:%{reason}" Created_end: "你创建了众包需求:%s" Destroyed_end: "你删除了众包需求:%s" Bidding_end: "应征了你发布的众包任务:%s" BiddingEnd_end: "你发布的众包任务:%s,已进入选标阶段,请尽快进行选择确认!" BiddingWon_end: "恭喜,你应征的众包任务:%s,在评选环节中标了" BiddingLost_end: "很遗憾,你应征投稿的众包任务:%s,未中标" + Video: + Apply_end: "申请发布视频:%s" + System: + 1_end: "你提交的发布视频申请:%s,审核已通过" + 2_end: "你提交的发布视频申请:%s,审核未通过
原因:%{reason}" diff --git a/config/routes.rb b/config/routes.rb index 2f9eed61b..9e115c3a9 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -5,6 +5,7 @@ Rails.application.routes.draw do mount Sidekiq::Web => '/sidekiq', :constraints => AdminConstraint.new get 'attachments/download/:id', to: 'attachments#show' + get 'attachments/download/:id/:filename', to: 'attachments#show' resources :edu_settings scope '/api' do @@ -20,7 +21,18 @@ Rails.application.routes.draw do put 'commons/unhidden', to: 'commons#unhidden' delete 'commons/delete', to: 'commons#delete' - resources :memos + resources :memos do + member do + post :sticky_or_cancel + post :hidden + get :more_reply + end + + collection do + post :reply + end + end + resources :tem_tests # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html # @@ -58,6 +70,16 @@ Rails.application.routes.draw do resources :recent_contacts, only: [:index] resource :private_message_details, only: [:show] resource :unread_message_info, only: [:show] + + # 视频 + resources :videos, only: [:index, :update] do + collection do + get :review + post :batch_publish + post :cancel + end + end + resource :video_auths, only: [:create, :update] end @@ -75,7 +97,7 @@ Rails.application.routes.draw do get :system_update resource :trial_apply, only: [:create] - resources :projects, only: [] do + resources :projects, module: :users, only: [] do get :search, on: :collection end @@ -222,6 +244,7 @@ Rails.application.routes.draw do resources :discusses do collection do get :new_message + get :forum_discusses end member do @@ -703,8 +726,10 @@ Rails.application.routes.draw do resources :libraries, only: [:index, :show, :create, :update, :destroy] scope module: :projects do - resources :applied_projects, only: [:create] + resources :project_applies, only: [:create] end + + post 'callbacks/aliyun_vod', to: 'callbacks/aliyun_vods#create' end #git 认证回调 diff --git a/db/migrate/20190730024112_add_index_to_user.rb b/db/migrate/20190730024112_add_index_to_user.rb deleted file mode 100644 index fa198cffa..000000000 --- a/db/migrate/20190730024112_add_index_to_user.rb +++ /dev/null @@ -1,7 +0,0 @@ -class AddIndexToUser < ActiveRecord::Migration[5.2] - def change - # add_index :users, :login, unique: true - # add_index :users, :mail, unique: true - # add_index :users, :phone, unique: true - end -end diff --git a/db/migrate/20190801075337_add_praises_count_to_memos.rb b/db/migrate/20190801075337_add_praises_count_to_memos.rb new file mode 100644 index 000000000..0cc2259e2 --- /dev/null +++ b/db/migrate/20190801075337_add_praises_count_to_memos.rb @@ -0,0 +1,12 @@ +class AddPraisesCountToMemos < ActiveRecord::Migration[5.2] + def change + add_column :memos, :praises_count, :integer, :default => 0 + + memos = Memo.includes(:praise_treads).all + memos.find_each do |m| + puts("####{m.id}") + praises_count = m.praise_treads.select{|pt| pt.praise_or_tread == 1}.count + m.update_column(:praises_count, praises_count) + end + end +end diff --git a/db/migrate/20190801084533_add_praises_count_to_libraries.rb b/db/migrate/20190801084533_add_praises_count_to_libraries.rb new file mode 100644 index 000000000..b773cf918 --- /dev/null +++ b/db/migrate/20190801084533_add_praises_count_to_libraries.rb @@ -0,0 +1,10 @@ +class AddPraisesCountToLibraries < ActiveRecord::Migration[5.2] + def change + # add_column :libraries, :praises_count, :integer, :default => 0 + # + # Library.find_each do |library| + # praises_count = library.praise_treads.count + # library.update_column(:praises_count, praises_count) + # end + end +end diff --git a/db/migrate/20190802105008_tranfer_tiding_data.rb b/db/migrate/20190802105008_tranfer_tiding_data.rb new file mode 100644 index 000000000..ef7682530 --- /dev/null +++ b/db/migrate/20190802105008_tranfer_tiding_data.rb @@ -0,0 +1,5 @@ +class TranferTidingData < ActiveRecord::Migration[5.2] + def change + Tiding.where(container_type: 'ApplyAddSchool').update_all(container_type: 'ApplyAddSchools') + end +end diff --git a/db/migrate/20190805004505_sync_index_to_users.rb b/db/migrate/20190805004505_sync_index_to_users.rb new file mode 100644 index 000000000..33adca30c --- /dev/null +++ b/db/migrate/20190805004505_sync_index_to_users.rb @@ -0,0 +1,7 @@ +class SyncIndexToUsers < ActiveRecord::Migration[5.2] + def change + add_index :users, :login, unique: true + add_index :users, :mail, unique: true + add_index :users, :phone, unique: true + end +end diff --git a/db/migrate/20190805010562_modify_ke_contents_for_markdown.rb b/db/migrate/20190805010562_modify_ke_contents_for_markdown.rb new file mode 100644 index 000000000..958b70448 --- /dev/null +++ b/db/migrate/20190805010562_modify_ke_contents_for_markdown.rb @@ -0,0 +1,51 @@ +class ModifyKeContentsForMarkdown < ActiveRecord::Migration[5.2] + include ActionView::Helpers::SanitizeHelper + def change + # def ke_transform_to_md content + # return content if content.blank? + # s_contents = sanitize(content, tags: %w(img a table td tr tbody pre), attributes: %w(src href target style)) + # s_contents.gsub(">\n<", "><").gsub(/^\n/, "").gsub(" ", "").gsub(/(\n)+/, "
") + # .gsub("\t", "").gsub("\n", "").gsub(" ", "    ").gsub(/()+/, "
") + # s_contents.gsub("\n", "
").gsub(/()+/, "
") + # end + # + # # 课程讨论区 + # MessageDetail.find_each do |m| + # content = ke_transform_to_md m.content + # m.update_column(:content, content) + # end + + #试卷的标题 + # ExerciseQuestion.where(:exercise_id => 1892).find_each do |eq| + # puts("#eq.question_title: #{eq.question_title}") + # question_title = ke_transform_to_md eq.question_title + # puts("#question_title: #{question_title}") + # eq.update_column(:question_title, question_title) + # end + + # # 试卷的答案 + # ExerciseStandardAnswer.find_each do |esa| + # answer_text = ke_transform_to_md esa.answer_text + # esa.update_column(:answer_text, answer_text) + # end + # + # 试卷题库的问题标题 + # ExerciseBankQuestion.find_each do |ebq| + # question_title = ke_transform_to_md ebq.question_title + # ebq.update_column(:question_title, question_title) + # end + # + # # 试卷答案 + # ExerciseBankStandardAnswer.find_each do |ebsa| + # answer_text = ke_transform_to_md ebsa.answer_text + # ebsa.update_column(:answer_text, answer_text) + # end + + # # 问卷的标题 + # PollQuestion.find_each do |pq| + # question_title = ke_transform_to_md pq.question_title + # pq.update_column(:question_title, question_title) + # end + + end +end diff --git a/db/migrate/20190805014624_migrate_anonymous_tiding_type.rb b/db/migrate/20190805014624_migrate_anonymous_tiding_type.rb new file mode 100644 index 000000000..cd45ec196 --- /dev/null +++ b/db/migrate/20190805014624_migrate_anonymous_tiding_type.rb @@ -0,0 +1,6 @@ +class MigrateAnonymousTidingType < ActiveRecord::Migration[5.2] + def change + Tiding.where(container_type: "StudentWorksScore", extra: "3").update_all(tiding_type: "System", trigger_user_id: 0) + Tiding.where(container_type: "StudentWorksScoresAppeal", parent_container_type: "StudentWork", tiding_type: "HomeworkCommon").update_all(tiding_type: "System", trigger_user_id: 0) + end +end diff --git a/db/migrate/20190805061306_add_exec_time_to_evaluate_records.rb b/db/migrate/20190805061306_add_exec_time_to_evaluate_records.rb new file mode 100644 index 000000000..95edeb7d5 --- /dev/null +++ b/db/migrate/20190805061306_add_exec_time_to_evaluate_records.rb @@ -0,0 +1,7 @@ +class AddExecTimeToEvaluateRecords < ActiveRecord::Migration[5.2] + def change + # remove_columns :evaluate_records, :exec_time if EvaluateRecord.first.attributes.include?("exec_time") + # + # add_column :evaluate_records, :exec_time, :integer + end +end diff --git a/db/migrate/20190806062209_second_mofidy_ke_contents_for_md.rb b/db/migrate/20190806062209_second_mofidy_ke_contents_for_md.rb new file mode 100644 index 000000000..c8068e049 --- /dev/null +++ b/db/migrate/20190806062209_second_mofidy_ke_contents_for_md.rb @@ -0,0 +1,64 @@ +class SecondMofidyKeContentsForMd < ActiveRecord::Migration[5.2] + include ActionView::Helpers::SanitizeHelper + def change + # def ke_transform_to_md content + # return content if content.blank? + # s_contents = sanitize(content, tags: %w(img a span table td tr tbody pre), attributes: %w(src href target style)) + # s_contents.gsub(">\n<", "><").gsub(/^\n/, "").gsub(" ", " ").gsub(/(\n)+/, "
") + # .gsub("\t", "    ").gsub("\n", "").gsub(" ", " ").gsub(/()+/, "
") + # + # end + # + # # 作业 + # HomeworkCommon.find_each do |hc| + # description = ke_transform_to_md hc.description + # reference_answer = ke_transform_to_md hc.reference_answer + # explanation = ke_transform_to_md hc.explanation + # hc.update_attributes(description: description, reference_answer: reference_answer, explanation: explanation) + # end + # + # # 作业题库 + # HomeworkBank.find_each do |hb| + # description = ke_transform_to_md hb.description + # reference_answer = ke_transform_to_md hb.reference_answer + # hb.update_attributes(description: description, reference_answer: reference_answer) + # end + # + # # 毕业任务 + # GraduationTask.find_each do |gt| + # description = ke_transform_to_md gt.description + # gt.update_column(:description, description) + # end + # + # # 毕设选题 + # GraduationTopic.find_each do |gt| + # description = ke_transform_to_md gt.description + # gt.update_column(:description, description) + # end + # + # # 毕设作品 + # GraduationWork.find_each do |gw| + # description = ke_transform_to_md gw.description + # gw.update_column(:description, description) + # end + # + # # 毕设任务题库 + # GtaskBank.find_each do |gb| + # description = ke_transform_to_md gb.description + # gb.update_column(:description, description) + # end + # + # # 毕设选题题库 + # GtopicBank.find_each do |gb| + # description = ke_transform_to_md gb.description + # gb.update_column(:description, description) + # end + # + # # 交流问答 + # Memo.find_each do |m| + # content = ke_transform_to_md m.content + # m.update_column(:content, content) + # end + + end +end diff --git a/db/migrate/20190806063903_third_modify_ke_for_student_work.rb b/db/migrate/20190806063903_third_modify_ke_for_student_work.rb new file mode 100644 index 000000000..0b1be8d00 --- /dev/null +++ b/db/migrate/20190806063903_third_modify_ke_for_student_work.rb @@ -0,0 +1,17 @@ +class ThirdModifyKeForStudentWork < ActiveRecord::Migration[5.2] + include ActionView::Helpers::SanitizeHelper + def change + # def ke_transform_to_md content + # return content if content.blank? + # s_contents = sanitize(content, tags: %w(img a span table td tr tbody pre), attributes: %w(src href target style)) + # s_contents.gsub(">\n<", "><").gsub(/^\n/, "").gsub(" ", " ").gsub(/(\n)+/, "
") + # .gsub("\t", "    ").gsub("\n", "").gsub(" ", " ").gsub(/()+/, "
") + # end + # + # # 学生的作品 过滤掉一些描述的ke图片的作品 + # StudentWork.where("description is not null and LENGTH(description) < 1000000").find_each do |sw| + # description = ke_transform_to_md sw.description + # sw.update_column(:description, description) + # end + end +end diff --git a/db/migrate/20190808025851_create_videos.rb b/db/migrate/20190808025851_create_videos.rb new file mode 100644 index 000000000..e7d89f7eb --- /dev/null +++ b/db/migrate/20190808025851_create_videos.rb @@ -0,0 +1,20 @@ +class CreateVideos < ActiveRecord::Migration[5.2] + def change + create_table :videos do |t| + t.references :user, index: true, type: :integer + t.string :title + t.string :uuid, comment: 'Aliyun媒体ID' + t.string :cover_url, comment: '视频封面' + t.string :file_url, comment: '视频地址' + + t.string :status + t.string :vod_status, comment: 'Aliyun媒体状态' + + t.datetime :published_at, index: true + + t.timestamps + + t.index :uuid, unique: true + end + end +end diff --git a/db/migrate/20190809010636_create_video_applies.rb b/db/migrate/20190809010636_create_video_applies.rb new file mode 100644 index 000000000..e8b4037c5 --- /dev/null +++ b/db/migrate/20190809010636_create_video_applies.rb @@ -0,0 +1,10 @@ +class CreateVideoApplies < ActiveRecord::Migration[5.2] + def change + create_table :video_applies do |t| + t.references :video, index: true, type: :integer + t.string :status + t.string :reason + t.timestamps + end + end +end diff --git a/dump.rdb b/dump.rdb index a799840b1..63b8abb0a 100644 Binary files a/dump.rdb and b/dump.rdb differ diff --git a/lib/educoder/sms.rb b/lib/educoder/sms.rb index 7fa1c0edb..a98ebf493 100644 --- a/lib/educoder/sms.rb +++ b/lib/educoder/sms.rb @@ -21,7 +21,7 @@ module Educoder def self.notify_admin(opt) opt[:name] = '管理员' - opt[:mobile] = ENV['NOTIFY_ADMIN_PHONE'] || EduSetting.get('notify_admin_phone') || '17680641960' + opt[:mobile] = ENV['NOTIFY_ADMIN_PHONE'] || EduSetting.get('notify_admin_phone') || '18711085785' send(opt) end @@ -39,25 +39,22 @@ module Educoder params['text'] = "【Edu实训】" + code + "(手机验证码),有效期为10分钟。如非本人操作,请忽略。" elsif send_type == 'competition_start' params['text'] = "【Edu实训】亲爱的#{user_name},你参与的#{name}将于#{result}开始,请及时参赛" - Rails.logger.info "#{params['text']}" + elsif send_type == "teacher_register" + params['mobile'] = EduSetting.get('teacher_register_phone') || '17680641960' + params['text'] = "【Edu实训】亲爱的#{user_name},有新的老师#{name}注册啦,请尽快处理" elsif send_type == 'subject_authorization' || send_type == 'shixun_authorization' params['text'] = "【Edu实训】亲爱的#{user_name},您提交的#{name}#{send_type=='subject_authorization'?'实训路径':'实训'}发布申请#{result},请登录平台查看详情" - Rails.logger.info "#{params['text']}" elsif send_type == 'authentication_pro' || send_type == 'authentication'|| send_type == 'trial_authorization' || send_type == 'project_info' params['text'] = "【Edu实训】亲爱的#{user_name},您提交的#{send_type == 'authentication_pro'?'职业认证':(send_type == 'authentication'? '实名认证' : (send_type == 'project_info'?'加入申请':'试用申请' ))}#{result},请登录平台查看详情" - Rails.logger.info "#{params['text']}" elsif send_type == "apply_pro_certification" || send_type == "apply_auth" params['text'] = "【Edu实训】亲爱的#{name},有新的#{send_type == 'apply_pro_certification'?'职业':'实名'}认证申请,请尽快处理" - Rails.logger.info "#{params['text']}" elsif send_type == "publish_subject" ||send_type == "publish_shixun"|| send_type == "user_apply_auth" || send_type == "discuss" + params['mobile'] = EduSetting.get('subject_shixun_notify_phone') || '18711011226' if send_type == "publish_subject" || send_type == "publish_shixun" params['text'] = "【Edu实训】亲爱的#{name},有新的#{send_type == 'publish_subject'?'实训路径':(send_type == 'publish_shixun' ? '实训' : (send_type == 'discuss' ? '实训评论':'试用'))}申请发布,请尽快处理" - Rails.logger.info "#{params['text']}" elsif send_type == 'join_course_multi_role' params['text'] = "【Edu实训】亲爱的#{user_name},您的课堂#{name}有助教或者教师申请加入,请尽快审核" - Rails.logger.info "#{params['text']}" elsif send_type == 'applied_project_info' params['text'] = "【Edu实训】亲爱的#{user_name},您的项目#{name}有成员申请加入,请尽快审核" - Rails.logger.info "#{params['text']}" end http = Net::HTTP.new(send_tpl_sms_uri.host, send_tpl_sms_uri.port) diff --git a/lib/tasks/check_reponame.rake b/lib/tasks/check_reponame.rake new file mode 100644 index 000000000..35ca56ad4 --- /dev/null +++ b/lib/tasks/check_reponame.rake @@ -0,0 +1,27 @@ +namespace :myshixun do + task check_reponame: :environment do + # 如果是选择题的则跳过,否则reponame 为空的则为异常 + myshixuns = Myshixun.where("repo_name is null and created_at > '2019-07-20 00:00:00'") + myshixuns.each do |myshixun| + shixun = myshixun.shixun + challenges = shixun.challenges + # 不是纯选择题的情况 + if challenges.select{|challenge| challenge.st.to_i == 0}.size > 0 + puts myshixun.games.first.try(:identifier) + end + end + end + + task choose_repo: :environment do + myshixuns = Myshixun.where("repo_name is null and created_at > '2019-07-20 00:00:00'") + myshixuns.each do |myshixun| + shixun = myshixun.shixun + challenges = shixun.challenges + # 如果是选择题,则把myshixuns表的repo_name改成-1 + if challenges.select{|challenge| challenge.st.to_i == 1}.size == challenges.count + myshixun.update_attributes(:repo_name => "-1") + end + end + end +end + diff --git a/lib/tasks/publick_course.rake b/lib/tasks/publick_course.rake new file mode 100644 index 000000000..532e32369 --- /dev/null +++ b/lib/tasks/publick_course.rake @@ -0,0 +1,25 @@ +#coding=utf-8 +# 执行示例 bundle exec rake public_course:student args=149,2903 +# args 第一个参数是subject_id,第二个参数是课程course_id + +desc "同步精品课数据" +namespace :public_course do + task :student => :environment do + + + subject_id = ENV['args'].split(",").first + course_id = ENV['args'].split(",").last + puts "subject_id is #{subject_id}" + puts "course_id is #{course_id}" + + user_ids = Myshixun.find_by_sql("select distinct(user_id) from myshixuns where shixun_id in (select shixun_id from stage_shixuns + where stage_id in (select id from stages where subject_id=#{subject_id}))").map(&:user_id) + puts user_ids + if user_ids.present? + user_ids.each do |user_id| + puts user_id + CourseMember.create!(course_id: course_id, user_id: user_id, role: 4) + end + end + end +end \ No newline at end of file diff --git a/public/admin/Coco/.idea/Coco.iml b/public/admin/Coco/.idea/Coco.iml new file mode 100644 index 000000000..db3c98a62 --- /dev/null +++ b/public/admin/Coco/.idea/Coco.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/public/admin/Coco/.idea/encodings.xml b/public/admin/Coco/.idea/encodings.xml new file mode 100644 index 000000000..15a15b218 --- /dev/null +++ b/public/admin/Coco/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/public/admin/Coco/.idea/misc.xml b/public/admin/Coco/.idea/misc.xml new file mode 100644 index 000000000..ebba9e77e --- /dev/null +++ b/public/admin/Coco/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/public/admin/Coco/.idea/modules.xml b/public/admin/Coco/.idea/modules.xml new file mode 100644 index 000000000..aef16b14d --- /dev/null +++ b/public/admin/Coco/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/public/admin/Coco/.idea/vcs.xml b/public/admin/Coco/.idea/vcs.xml new file mode 100644 index 000000000..b2bdec2d7 --- /dev/null +++ b/public/admin/Coco/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/public/admin/Coco/.idea/workspace.xml b/public/admin/Coco/.idea/workspace.xml new file mode 100644 index 000000000..bafcf03cb --- /dev/null +++ b/public/admin/Coco/.idea/workspace.xml @@ -0,0 +1,492 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1564991764284 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/admin/Coco/404.html b/public/admin/Coco/404.html new file mode 100644 index 000000000..e7883c951 --- /dev/null +++ b/public/admin/Coco/404.html @@ -0,0 +1,156 @@ + + + + + 404 Not Found | Coco - Responsive Bootstrap Admin Template + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Task Progress Information

+
+

CLEANING BUGS

+
+
+ 80% Complete +
+
+

POSTING SOME STUFF

+
+
+ 65% Complete +
+
+

BACKUP DATA FROM SERVER

+
+
+ 95% Complete +
+
+

RE-DESIGNING WEB APPLICATION

+
+
+ 100% Complete +
+
+

+ +

+
+
+
+ + +
+
+

Logout Confirmation

+
+

Are you sure want to logout from this awesome system?

+

+ + Yeah, I'm sure +

+
+
+
+ + +
+
+

404

+

The page you are looking for is definitely not this!


+

You better try our awesome search:

+
+
+ + + + + +
+

+ Back to Dashboard +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/admin/Coco/500.html b/public/admin/Coco/500.html new file mode 100644 index 000000000..424b3fbd4 --- /dev/null +++ b/public/admin/Coco/500.html @@ -0,0 +1,156 @@ + + + + + 500 Internal Server Error | Coco - Responsive Bootstrap Admin Template + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Task Progress Information

+
+

CLEANING BUGS

+
+
+ 80% Complete +
+
+

POSTING SOME STUFF

+
+
+ 65% Complete +
+
+

BACKUP DATA FROM SERVER

+
+
+ 95% Complete +
+
+

RE-DESIGNING WEB APPLICATION

+
+
+ 100% Complete +
+
+

+ +

+
+
+
+ + +
+
+

Logout Confirmation

+
+

Are you sure want to logout from this awesome system?

+

+ + Yeah, I'm sure +

+
+
+
+ + +
+
+

500

+

We are unable to show this page to you correctly!


+

You better try our awesome search:

+
+
+ + + + + +
+

+ Back to Dashboard +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/admin/Coco/advanced-forms.html b/public/admin/Coco/advanced-forms.html new file mode 100644 index 000000000..99172efe4 --- /dev/null +++ b/public/admin/Coco/advanced-forms.html @@ -0,0 +1,864 @@ + + + + + Advanced Forms | Coco - Responsive Bootstrap Admin Template + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Task Progress Information

+
+

CLEANING BUGS

+
+
+ 80% Complete +
+
+

POSTING SOME STUFF

+
+
+ 65% Complete +
+
+

BACKUP DATA FROM SERVER

+
+
+ 95% Complete +
+
+

RE-DESIGNING WEB APPLICATION

+
+
+ 100% Complete +
+
+

+ +

+
+
+
+ + +
+
+

Logout Confirmation

+
+

Are you sure want to logout from this awesome system?

+

+ + Yeah, I'm sure +

+
+
+
+ +
+ + + + + + + +
+ +
+
+ + + +
+
+
+

Preferences

+
+
+ Live data updates +
+
+ +
+
+
+
+ Live feeds +
+
+ +
+
+
+
+ Sync data to cloud +
+
+ +
+
+
+
+ Keep activity record +
+
+ +
+
+

Other Settings

+
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+ + +
+ + + +
+ +
+

Advanced Forms

+
+ + + +
+ +
+ +
+
+

Inline Editing

+
+ + + +
+
+
+

Click to edit

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Simple text fieldsuperuser
Empty text field, required
Select, local array, custom display
Select, remote array, no buttonsAdmin
Select, error while loadingActive
Datepicker + + not implemented for Bootstrap 3 yet + +
Combodate (date)
Combodate (datetime)
Textarea, buttons below. Submit by ctrl+enterawesome user!
Checklist
Select2 (tags mode)html, javascript
Select2 (dropdown mode)
+
+
+ +
+
+

IOS 7 Switches

+
+ + + +
+
+
+

Large Size

+ + + + + + + +

Default Size

+ + + + + + + +

Small Size

+ + + + + + +
+
+ +
+
+

WYSIWYG Editor

+
+ + + +
+
+
+ +
+
+ +
+
+

Inline WYSIWYG Editor

+
+ + + +
+
+
+
+ +
+
+
+

+ Fusce vitae porttitor +

+

+ + Lorem ipsum dolor sit amet dolor. Duis blandit vestibulum faucibus a, tortor. + +

+

+ Proin nunc justo felis mollis tincidunt, risus risus pede, posuere cubilia Curae, Nullam euismod, enim. Etiam nibh ultricies dolor ac dignissim erat volutpat. Vivamus fermentum nisl nulla sem in metus. Maecenas wisi. Donec nec erat volutpat. +

+
+

+ Fusce vitae porttitor a, euismod convallis nisl, blandit risus tortor, pretium. + Vehicula vitae, imperdiet vel, ornare enim vel sodales rutrum +

+
+
+

+ Libero nunc, rhoncus ante ipsum non ipsum. Nunc eleifend pede turpis id sollicitudin fringilla. Phasellus ultrices, velit ac arcu. +

+
+

Pellentesque nunc. Donec suscipit erat. Pellentesque habitant morbi tristique ullamcorper.

+

Mauris mattis feugiat lectus nec mauris. Nullam vitae ante.

+
+
+
+
+

+ Integer condimentum sit amet +

+

+ Aenean nonummy a, mattis varius. Cras aliquet. + Praesent magna non mattis ac, rhoncus nunc, rhoncus eget, cursus pulvinar mollis.

+

Proin id nibh. Sed eu libero posuere sed, lectus. Phasellus dui gravida gravida feugiat mattis ac, felis.

+

Integer condimentum sit amet, tempor elit odio, a dolor non ante at sapien. Sed ac lectus. Nulla ligula quis eleifend mi, id leo velit pede cursus arcu id nulla ac lectus. Phasellus vestibulum. Nunc viverra enim quis diam.

+
+
+

+ Praesent wisi accumsan sit amet nibh +

+

Donec ullamcorper, risus tortor, pretium porttitor. Morbi quam quis lectus non leo.

+

Integer faucibus scelerisque. Proin faucibus at, aliquet vulputate, odio at eros. Fusce gravida, erat vitae augue. Fusce urna fringilla gravida.

+

In hac habitasse platea dictumst. Praesent wisi accumsan sit amet nibh. Maecenas orci luctus a, lacinia quam sem, posuere commodo, odio condimentum tempor, pede semper risus. Suspendisse pede. In hac habitasse platea dictumst. Nam sed laoreet sit amet erat. Integer.

+
+
+
+
+

+ CKEditor logo +

+

Quisque justo neque, mattis sed, fermentum ultrices posuere cubilia Curae, Vestibulum elit metus, quis placerat ut, lectus. Ut sagittis, nunc libero, egestas consequat lobortis velit rutrum ut, faucibus turpis. Fusce porttitor, nulla quis turpis. Nullam laoreet vel, consectetuer tellus suscipit ultricies, hendrerit wisi. Donec odio nec velit ac nunc sit amet, accumsan cursus aliquet. Vestibulum ante sit amet sagittis mi.

+

+ Nullam laoreet vel consectetuer tellus suscipit +

+
    +
  • Ut sagittis, nunc libero, egestas consequat lobortis velit rutrum ut, faucibus turpis.
  • +
  • Fusce porttitor, nulla quis turpis. Nullam laoreet vel, consectetuer tellus suscipit ultricies, hendrerit wisi.
  • +
  • Mauris eget tellus. Donec non felis. Nam eget dolor. Vestibulum enim. Donec.
  • +
+

Quisque justo neque, mattis sed, fermentum ultrices posuere cubilia Curae, Vestibulum elit metus, quis placerat ut, lectus.

+

Nullam laoreet vel, consectetuer tellus suscipit ultricies, hendrerit wisi. Ut sagittis, nunc libero, egestas consequat lobortis velit rutrum ut, faucibus turpis. Fusce porttitor, nulla quis turpis.

+

Donec odio nec velit ac nunc sit amet, accumsan cursus aliquet. Vestibulum ante sit amet sagittis mi. Sed in nonummy faucibus turpis. Mauris eget tellus. Donec non felis. Nam eget dolor. Vestibulum enim. Donec.

+
+
+
+
+ Tags of this article: +

+ inline, editing, floating, CKEditor +

+
+
+
+
+
+
+ + + + + +
+ + + + +
+ + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/admin/Coco/alerts.html b/public/admin/Coco/alerts.html new file mode 100644 index 000000000..a045085b8 --- /dev/null +++ b/public/admin/Coco/alerts.html @@ -0,0 +1,672 @@ + + + + + Alerts | Coco - Responsive Bootstrap Admin Template + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Task Progress Information

+
+

CLEANING BUGS

+
+
+ 80% Complete +
+
+

POSTING SOME STUFF

+
+
+ 65% Complete +
+
+

BACKUP DATA FROM SERVER

+
+
+ 95% Complete +
+
+

RE-DESIGNING WEB APPLICATION

+
+
+ 100% Complete +
+
+

+ +

+
+
+
+ + +
+
+

Logout Confirmation

+
+

Are you sure want to logout from this awesome system?

+

+ + Yeah, I'm sure +

+
+
+
+ + +
+ + + + + + + +
+ +
+
+ + + +
+
+
+

Preferences

+
+
+ Live data updates +
+
+ +
+
+
+
+ Live feeds +
+
+ +
+
+
+
+ Sync data to cloud +
+
+ +
+
+
+
+ Keep activity record +
+
+ +
+
+

Other Settings

+
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+ + +
+ + + +
+ +
+

Alerts

+

Inner Alert & Notification Elements

+
+
+
+
+

Standard Alert Elements

+
+ + + +
+
+
+ +
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alert Link. +
+
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alert Link. +
+
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alert Link. +
+
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alert Link. +
+ +
+
+
+
+
+
+

Dismissable Alert Elements

+
+ + + +
+
+
+ +
+ + Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alert Link. +
+
+ + Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alert Link. +
+
+ + Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alert Link. +
+
+ + Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alert Link. +
+ +
+ +

Big one!

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.

+

+ + +

+
+ +
+
+
+
+ + + + +
+ + + + +
+ +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/admin/Coco/assets/css/style-responsive.css b/public/admin/Coco/assets/css/style-responsive.css new file mode 100644 index 000000000..01ec72eef --- /dev/null +++ b/public/admin/Coco/assets/css/style-responsive.css @@ -0,0 +1,263 @@ +/*Large Desktop*/ +@media (min-width: 1200px) { + +} + +/*Desktop*/ +@media (min-width: 992px) and (max-width: 1199px) { + +} + +/*Small desktop or tablet*/ +@media (min-width: 768px) and (max-width: 991px) { + body{overflow-x: hidden;} + .table-responsive { + width: 100%; + margin-bottom: 15px; + overflow-x: scroll; + overflow-y: hidden; + border: 1px solid #dddddd; + -ms-overflow-style: -ms-autohiding-scrollbar; + -webkit-overflow-scrolling: touch; + } + .table-responsive > .table { + margin-bottom: 0; + } + .table-responsive > .table > thead > tr > th, + .table-responsive > .table > tbody > tr > th, + .table-responsive > .table > tfoot > tr > th, + .table-responsive > .table > thead > tr > td, + .table-responsive > .table > tbody > tr > td, + .table-responsive > .table > tfoot > tr > td { + white-space: nowrap; + } + .table-responsive > .table-bordered { + border: 0; + } + .table-responsive > .table-bordered > thead > tr > th:first-child, + .table-responsive > .table-bordered > tbody > tr > th:first-child, + .table-responsive > .table-bordered > tfoot > tr > th:first-child, + .table-responsive > .table-bordered > thead > tr > td:first-child, + .table-responsive > .table-bordered > tbody > tr > td:first-child, + .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; + } + .table-responsive > .table-bordered > thead > tr > th:last-child, + .table-responsive > .table-bordered > tbody > tr > th:last-child, + .table-responsive > .table-bordered > tfoot > tr > th:last-child, + .table-responsive > .table-bordered > thead > tr > td:last-child, + .table-responsive > .table-bordered > tbody > tr > td:last-child, + .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; + } + .table-responsive > .table-bordered > tbody > tr:last-child > th, + .table-responsive > .table-bordered > tfoot > tr:last-child > th, + .table-responsive > .table-bordered > tbody > tr:last-child > td, + .table-responsive > .table-bordered > tfoot > tr:last-child > td { + border-bottom: 0; + } + .button-menu-mobile{display: block;} + .navbar{margin: 0 0 0 40px;} + .mobile-sidebar{left: 0px;} + .mobile-content{left: 225px;right: -225px;} + .box-info .icon-box{ + width: 45px; + font-size: 20px; + margin-top: 5px + } + .box-info .text-box p{font-size: 11px;} + .toolbar-btn-action{text-align: center;} + .gallery-wrap .column .inner .img-wrap{ + height: 60px; + overflow: hidden; + background: #ddd; + } + .gallery-wrap .column-3 .inner .img-wrap{ + height: 140px; + overflow: hidden; + background: #ddd; + } + .gallery-wrap .column-4 .inner .img-wrap{ + height: 100px; + overflow: hidden; + background: #ddd; + } + .user-profile-sidebar{text-align: center;} + +} + +/*Phone*/ +@media (max-width: 767px) { + body{overflow-x: hidden;} + + .mobile-sidebar{left: 0px;} + .mobile-content{left: 250px;right: -250px;} + .box-info table{margin: 0 0 0 0;} + .box-info .table-responsive{border: none;} + .nav.navbar-nav.top-navbar li span.absolute {left: 25px;} + .box-info .additional .list-group{margin-bottom: -10px;} + .toolbar-btn-action{text-align: center;} + .gallery-wrap .column{width: 25%;} + .gallery-wrap .column-4{width: 33.33333333333333%;} + .gallery-wrap .column-3{width: 50%;} + .gallery-wrap .column .inner .img-wrap{ + height: 70px; + overflow: hidden; + background: #ddd; + } + .gallery-wrap .column-3 .inner .img-wrap{ + height: 140px; + overflow: hidden; + background: #ddd; + } + .gallery-wrap .column-4 .inner .img-wrap{ + height: 105px; + overflow: hidden; + background: #ddd; + } + .widget.box-messages{ + margin-top:0px; + } + + footer{text-align: center;} + .navbar-nav{ + float:left; + margin:0px; + } + .navbar{ + border:none; + } + + .navbar-nav .open .dropdown-menu{ + float:left; + position: absolute; + background:#fff; + right:0px; + left:auto; + box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); + } + + .navbar-nav.navbar-right:last-child { + margin-right: -15px; + height:50px; + } + + .open > .dropdown-menu { + display: block; + } + + .nav-tabs.nav-justified > li { + display: table-cell; + width: 1%; + } + + .navbar-nav > li > a{ + padding-top: 15px; + padding-bottom: 15px; + } + + .navbar-right{ + float: right; + } + .navbar-nav > li{ + display: inline-block; + } + .lock-screen{text-align: center;} + + .profile-actions{ + bottom:auto; + top:60px; + } + .widget-tabbed{ + margin-top:40px; + } + .widget-tabbed .nav-tabs a{ + font-size:0px !important; + } + .widget-tabbed .nav-tabs a i{ + font-size:18px !important; + } + .the-timeline ul li.the-year{ + font-size:30px; + } + .ava-lock-screen{text-align: center; margin-bottom: 20px;} + .ava-lock-screen img{ + width: 100px; + margin: 0; + } + .open-right-sidebar .hide-phone{ + display: none; + } + + .la-pricing-table .la-col-4{width: 50%;} + .user-profile-sidebar{text-align: center;} +} + +@media (max-width: 480px){ + .box-info .icon-box{ + width: 100%; + display: block; + } + .box-info .icon-box,.box-info .text-box{text-align: center;} + .gallery-wrap .column,.gallery-wrap .column-3,.gallery-wrap .column-4{width: 33.33333333333333%;} + .gallery-wrap .column .inner .img-wrap,.gallery-wrap .column-3 .inner .img-wrap,.gallery-wrap .column-4 .inner .img-wrap{height: 70px;} + .login-wrap{margin: 20px 0 0 0;} + + .navbar-default { + border: none; + } + .open-right-sidebar .topbar-profile,.open-right-sidebar .hide-phone{ + display: none; + } + .the-timeline ul li.the-year{ + font-size:20px; + margin-left: 37%; + } + #wrapper:not(.enlarged) .topbar-profile,#wrapper:not(.enlarged) .hide-phone{ + display: none; + } + #wrapper .content-page{ + margin-left:0px !important; + padding-left:50px; + width:100%; + display: inline-block; + } + .open-right-sidebar .content-page > .content{ + opacity: 0; + } + .side-menu{ + z-index: 10 !important; + } + #weather h2{ + top:90px; + } + #weather .w-region{ + top:250px; + } + #stock-widget #stock-title{ + display: none; + } + #stock-widget .stock-options{ + margin-left: 15px; + } + .button-menu-mobile{display: block;} +} + +@media (max-width: 420px){ + .hide-phone{ + display: none !important; + } + + +} + +@media (max-width: 360px){ + .gallery-wrap .column,.gallery-wrap .column-3,.gallery-wrap .column-4{width: 50%;} + .gallery-wrap .column .inner .img-wrap,.gallery-wrap .column-3 .inner .img-wrap,.gallery-wrap .column-4 .inner .img-wrap{height: 80px;} + .la-pricing-table .la-col-4{width: 100%;} +} + +@media (max-width: 320px){ + .gallery-wrap .column,.gallery-wrap .column-3,.gallery-wrap .column-4{width: 50%;} + .gallery-wrap .column .inner .img-wrap,.gallery-wrap .column-3 .inner .img-wrap,.gallery-wrap .column-4 .inner .img-wrap{height: 70px;} +} \ No newline at end of file diff --git a/public/admin/Coco/assets/css/style.css b/public/admin/Coco/assets/css/style.css new file mode 100644 index 000000000..f52dd4771 --- /dev/null +++ b/public/admin/Coco/assets/css/style.css @@ -0,0 +1,5507 @@ +@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700); +.bg-white-1 { + background-color: #ffffff !important; +} +.border-white-1 { + border-color: #ffffff !important; +} +.btn-white-1 { + background-color: #ffffff; + color: #fff; +} +.btn-white-1:hover { + background-color: #f2f2f2 !important; + color: #fff; +} +.text-white-1 { + color: #ffffff !important; +} +.panel-white-1 { + border-color: #f2f2f2 !important; +} +.panel-white-1 .panel-heading { + background-color: #ffffff !important; + border-color: #f2f2f2 !important; + border-radius: 0px; +} +.panel-white-1 .panel-heading a, +.panel-white-1 .panel-title { + color: #333; +} +.widget.white-1 { + background-color: #ffffff; + color: #333; +} +.widget.white-1 .widget-header h2 { + color: #333; +} +.bg-red-1 { + background-color: #eb5055 !important; +} +.border-red-1 { + border-color: #eb5055 !important; +} +.btn-red-1 { + background-color: #eb5055; + color: #fff; +} +.btn-red-1:hover { + background-color: #dd4449 !important; + color: #fff; +} +.text-red-1 { + color: #eb5055 !important; +} +.panel-red-1 { + border-color: #dd4449 !important; +} +.panel-red-1 .panel-heading { + background-color: #eb5055 !important; + border-color: #dd4449 !important; + border-radius: 0px; +} +.panel-red-1 .panel-heading a, +.panel-red-1 .panel-title { + color: #fff; +} +.widget.red-1 { + background-color: #eb5055; + color: #fff; +} +.widget.red-1 .widget-header h2 { + color: #fff; +} +.bg-blue-1 { + background-color: #3c989e !important; +} +.border-blue-1 { + border-color: #3c989e !important; +} +.btn-blue-1 { + background-color: #3c989e; + color: #fff; +} +.btn-blue-1:hover { + background-color: #3f7e82 !important; + color: #fff; +} +.text-blue-1 { + color: #3c989e !important; +} +.panel-blue-1 { + border-color: #3f7e82 !important; +} +.panel-blue-1 .panel-heading { + background-color: #3c989e !important; + border-color: #3f7e82 !important; + border-radius: 0px; +} +.panel-blue-1 .panel-heading a, +.panel-blue-1 .panel-title { + color: #fff; +} +.widget.blue-1 { + background-color: #3c989e; + color: #fff; +} +.widget.blue-1 .widget-header h2 { + color: #fff; +} +.bg-blue-2 { + background-color: #3498db !important; +} +.border-blue-2 { + border-color: #3498db !important; +} +.btn-blue-2 { + background-color: #3498db; + color: #fff; +} +.btn-blue-2:hover { + background-color: #3189c4 !important; + color: #fff; +} +.text-blue-2 { + color: #3498db !important; +} +.panel-blue-2 { + border-color: #3189c4 !important; +} +.panel-blue-2 .panel-heading { + background-color: #3498db !important; + border-color: #3189c4 !important; + border-radius: 0px; +} +.panel-blue-2 .panel-heading a, +.panel-blue-2 .panel-title { + color: #fff; +} +.widget.blue-2 { + background-color: #3498db; + color: #fff; +} +.widget.blue-2 .widget-header h2 { + color: #fff; +} +.bg-blue-3 { + background-color: #2980b9 !important; +} +.border-blue-3 { + border-color: #2980b9 !important; +} +.btn-blue-3 { + background-color: #2980b9; + color: #fff; +} +.btn-blue-3:hover { + background-color: #2e6f9a !important; + color: #fff; +} +.text-blue-3 { + color: #2980b9 !important; +} +.panel-blue-3 { + border-color: #2e6f9a !important; +} +.panel-blue-3 .panel-heading { + background-color: #2980b9 !important; + border-color: #2e6f9a !important; + border-radius: 0px; +} +.panel-blue-3 .panel-heading a, +.panel-blue-3 .panel-title { + color: #fff; +} +.widget.blue-3 { + background-color: #2980b9; + color: #fff; +} +.widget.blue-3 .widget-header h2 { + color: #fff; +} +.bg-darkblue-1 { + background-color: #252932 !important; +} +.border-darkblue-1 { + border-color: #252932 !important; +} +.btn-darkblue-1 { + background-color: #252932; + color: #fff; +} +.btn-darkblue-1:hover { + background-color: #1d1e20 !important; + color: #fff; +} +.text-darkblue-1 { + color: #252932 !important; +} +.panel-darkblue-1 { + border-color: #1d1e20 !important; +} +.panel-darkblue-1 .panel-heading { + background-color: #252932 !important; + border-color: #1d1e20 !important; + border-radius: 0px; +} +.panel-darkblue-1 .panel-heading a, +.panel-darkblue-1 .panel-title { + color: #fff; +} +.widget.darkblue-1 { + background-color: #252932; + color: #fff; +} +.widget.darkblue-1 .widget-header h2 { + color: #fff; +} +.bg-darkblue-2 { + background-color: #4a525f !important; +} +.border-darkblue-2 { + border-color: #4a525f !important; +} +.btn-darkblue-2 { + background-color: #4a525f; + color: #fff; +} +.btn-darkblue-2:hover { + background-color: #464749 !important; + color: #fff; +} +.text-darkblue-2 { + color: #4a525f !important; +} +.panel-darkblue-2 { + border-color: #464749 !important; +} +.panel-darkblue-2 .panel-heading { + background-color: #4a525f !important; + border-color: #464749 !important; + border-radius: 0px; +} +.panel-darkblue-2 .panel-heading a, +.panel-darkblue-2 .panel-title { + color: #fff; +} +.widget.darkblue-2 { + background-color: #4a525f; + color: #fff; +} +.widget.darkblue-2 .widget-header h2 { + color: #fff; +} +.bg-darkblue-3 { + background-color: #38464a !important; +} +.border-darkblue-3 { + border-color: #38464a !important; +} +.btn-darkblue-3 { + background-color: #38464a; + color: #fff; +} +.btn-darkblue-3:hover { + background-color: #323536 !important; + color: #fff; +} +.text-darkblue-3 { + color: #38464a !important; +} +.panel-darkblue-3 { + border-color: #323536 !important; +} +.panel-darkblue-3 .panel-heading { + background-color: #38464a !important; + border-color: #323536 !important; + border-radius: 0px; +} +.panel-darkblue-3 .panel-heading a, +.panel-darkblue-3 .panel-title { + color: #fff; +} +.widget.darkblue-3 { + background-color: #38464a; + color: #fff; +} +.widget.darkblue-3 .widget-header h2 { + color: #fff; +} +.bg-lightblue-1 { + background-color: #abb7b7 !important; +} +.border-lightblue-1 { + border-color: #abb7b7 !important; +} +.btn-lightblue-1 { + background-color: #abb7b7; + color: #fff; +} +.btn-lightblue-1:hover { + background-color: #a4a4a4 !important; + color: #fff; +} +.text-lightblue-1 { + color: #abb7b7 !important; +} +.panel-lightblue-1 { + border-color: #a4a4a4 !important; +} +.panel-lightblue-1 .panel-heading { + background-color: #abb7b7 !important; + border-color: #a4a4a4 !important; + border-radius: 0px; +} +.panel-lightblue-1 .panel-heading a, +.panel-lightblue-1 .panel-title { + color: #fff; +} +.widget.lightblue-1 { + background-color: #abb7b7; + color: #fff; +} +.widget.lightblue-1 .widget-header h2 { + color: #fff; +} +.bg-lightblue-2 { + background-color: #7a868f !important; +} +.border-lightblue-2 { + border-color: #7a868f !important; +} +.btn-lightblue-2 { + background-color: #7a868f; + color: #fff; +} +.btn-lightblue-2:hover { + background-color: #787878 !important; + color: #fff; +} +.text-lightblue-2 { + color: #7a868f !important; +} +.panel-lightblue-2 { + border-color: #787878 !important; +} +.panel-lightblue-2 .panel-heading { + background-color: #7a868f !important; + border-color: #787878 !important; + border-radius: 0px; +} +.panel-lightblue-2 .panel-heading a, +.panel-lightblue-2 .panel-title { + color: #fff; +} +.widget.lightblue-2 { + background-color: #7a868f; + color: #fff; +} +.widget.lightblue-2 .widget-header h2 { + color: #fff; +} +.bg-orange-1 { + background-color: #e84c3d !important; +} +.border-orange-1 { + border-color: #e84c3d !important; +} +.btn-orange-1 { + background-color: #e84c3d; + color: #fff; +} +.btn-orange-1:hover { + background-color: #d94132 !important; + color: #fff; +} +.text-orange-1 { + color: #e84c3d !important; +} +.panel-orange-1 { + border-color: #d94132 !important; +} +.panel-orange-1 .panel-heading { + background-color: #e84c3d !important; + border-color: #d94132 !important; + border-radius: 0px; +} +.panel-orange-1 .panel-heading a, +.panel-orange-1 .panel-title { + color: #fff; +} +.widget.orange-1 { + background-color: #e84c3d; + color: #fff; +} +.widget.orange-1 .widget-header h2 { + color: #fff; +} +.bg-orange-2 { + background-color: #de745e !important; +} +.border-orange-2 { + border-color: #de745e !important; +} +.btn-orange-2 { + background-color: #de745e; + color: #fff; +} +.btn-orange-2:hover { + background-color: #cf6954 !important; + color: #fff; +} +.text-orange-2 { + color: #de745e !important; +} +.panel-orange-2 { + border-color: #cf6954 !important; +} +.panel-orange-2 .panel-heading { + background-color: #de745e !important; + border-color: #cf6954 !important; + border-radius: 0px; +} +.panel-orange-2 .panel-heading a, +.panel-orange-2 .panel-title { + color: #fff; +} +.widget.orange-2 { + background-color: #de745e; + color: #fff; +} +.widget.orange-2 .widget-header h2 { + color: #fff; +} +.bg-orange-3 { + background-color: #e27a3f !important; +} +.border-orange-3 { + border-color: #e27a3f !important; +} +.btn-orange-3 { + background-color: #e27a3f; + color: #fff; +} +.btn-orange-3:hover { + background-color: #d26e35 !important; + color: #fff; +} +.text-orange-3 { + color: #e27a3f !important; +} +.panel-orange-3 { + border-color: #d26e35 !important; +} +.panel-orange-3 .panel-heading { + background-color: #e27a3f !important; + border-color: #d26e35 !important; + border-radius: 0px; +} +.panel-orange-3 .panel-heading a, +.panel-orange-3 .panel-title { + color: #fff; +} +.widget.orange-3 { + background-color: #e27a3f; + color: #fff; +} +.widget.orange-3 .widget-header h2 { + color: #fff; +} +.bg-orange-4 { + background-color: #edce8c !important; +} +.border-orange-4 { + border-color: #edce8c !important; +} +.btn-orange-4 { + background-color: #edce8c; + color: #fff; +} +.btn-orange-4:hover { + background-color: #e2c27e !important; + color: #fff; +} +.text-orange-4 { + color: #edce8c !important; +} +.panel-orange-4 { + border-color: #e2c27e !important; +} +.panel-orange-4 .panel-heading { + background-color: #edce8c !important; + border-color: #e2c27e !important; + border-radius: 0px; +} +.panel-orange-4 .panel-heading a, +.panel-orange-4 .panel-title { + color: #333; +} +.widget.orange-4 { + background-color: #edce8c; + color: #333; +} +.widget.orange-4 .widget-header h2 { + color: #333; +} +.bg-green-1 { + background-color: #68c39f !important; +} +.border-green-1 { + border-color: #68c39f !important; +} +.btn-green-1 { + background-color: #68c39f; + color: #fff; +} +.btn-green-1:hover { + background-color: #62b091 !important; + color: #fff; +} +.text-green-1 { + color: #68c39f !important; +} +.panel-green-1 { + border-color: #62b091 !important; +} +.panel-green-1 .panel-heading { + background-color: #68c39f !important; + border-color: #62b091 !important; + border-radius: 0px; +} +.panel-green-1 .panel-heading a, +.panel-green-1 .panel-title { + color: #fff; +} +.widget.green-1 { + background-color: #68c39f; + color: #fff; +} +.widget.green-1 .widget-header h2 { + color: #fff; +} +.bg-green-2 { + background-color: #9ec789 !important; +} +.border-green-2 { + border-color: #9ec789 !important; +} +.btn-green-2 { + background-color: #9ec789; + color: #fff; +} +.btn-green-2:hover { + background-color: #93b582 !important; + color: #fff; +} +.text-green-2 { + color: #9ec789 !important; +} +.panel-green-2 { + border-color: #93b582 !important; +} +.panel-green-2 .panel-heading { + background-color: #9ec789 !important; + border-color: #93b582 !important; + border-radius: 0px; +} +.panel-green-2 .panel-heading a, +.panel-green-2 .panel-title { + color: #fff; +} +.widget.green-2 { + background-color: #9ec789; + color: #fff; +} +.widget.green-2 .widget-header h2 { + color: #fff; +} +.bg-green-3 { + background-color: #209c83 !important; +} +.border-green-3 { + border-color: #209c83 !important; +} +.btn-green-3 { + background-color: #209c83; + color: #fff; +} +.btn-green-3:hover { + background-color: #247f6c !important; + color: #fff; +} +.text-green-3 { + color: #209c83 !important; +} +.panel-green-3 { + border-color: #247f6c !important; +} +.panel-green-3 .panel-heading { + background-color: #209c83 !important; + border-color: #247f6c !important; + border-radius: 0px; +} +.panel-green-3 .panel-heading a, +.panel-green-3 .panel-title { + color: #fff; +} +.widget.green-3 { + background-color: #209c83; + color: #fff; +} +.widget.green-3 .widget-header h2 { + color: #fff; +} +.bg-pink-1 { + background-color: #f57a82 !important; +} +.border-pink-1 { + border-color: #f57a82 !important; +} +.btn-pink-1 { + background-color: #f57a82; + color: #fff; +} +.btn-pink-1:hover { + background-color: #eb6b73 !important; + color: #fff; +} +.text-pink-1 { + color: #f57a82 !important; +} +.panel-pink-1 { + border-color: #eb6b73 !important; +} +.panel-pink-1 .panel-heading { + background-color: #f57a82 !important; + border-color: #eb6b73 !important; + border-radius: 0px; +} +.panel-pink-1 .panel-heading a, +.panel-pink-1 .panel-title { + color: #333; +} +.widget.pink-1 { + background-color: #f57a82; + color: #333; +} +.widget.pink-1 .widget-header h2 { + color: #333; +} +.bg-pink-2 { + background-color: #f56f6c !important; +} +.border-pink-2 { + border-color: #f56f6c !important; +} +.btn-pink-2 { + background-color: #f56f6c; + color: #fff; +} +.btn-pink-2:hover { + background-color: #ea605d !important; + color: #fff; +} +.text-pink-2 { + color: #f56f6c !important; +} +.panel-pink-2 { + border-color: #ea605d !important; +} +.panel-pink-2 .panel-heading { + background-color: #f56f6c !important; + border-color: #ea605d !important; + border-radius: 0px; +} +.panel-pink-2 .panel-heading a, +.panel-pink-2 .panel-title { + color: #fff; +} +.widget.pink-2 { + background-color: #f56f6c; + color: #fff; +} +.widget.pink-2 .widget-header h2 { + color: #fff; +} +.bg-yellow-1 { + background-color: #f4cda5 !important; +} +.border-yellow-1 { + border-color: #f4cda5 !important; +} +.btn-yellow-1 { + background-color: #f4cda5; + color: #fff; +} +.btn-yellow-1:hover { + background-color: #ebc095 !important; + color: #fff; +} +.text-yellow-1 { + color: #f4cda5 !important; +} +.panel-yellow-1 { + border-color: #ebc095 !important; +} +.panel-yellow-1 .panel-heading { + background-color: #f4cda5 !important; + border-color: #ebc095 !important; + border-radius: 0px; +} +.panel-yellow-1 .panel-heading a, +.panel-yellow-1 .panel-title { + color: #333; +} +.widget.yellow-1 { + background-color: #f4cda5; + color: #333; +} +.widget.yellow-1 .widget-header h2 { + color: #333; +} +.bg-yellow-2 { + background-color: #eae696 !important; +} +.border-yellow-2 { + border-color: #eae696 !important; +} +.btn-yellow-2 { + background-color: #eae696; + color: #fff; +} +.btn-yellow-2:hover { + background-color: #deda88 !important; + color: #fff; +} +.text-yellow-2 { + color: #eae696 !important; +} +.panel-yellow-2 { + border-color: #deda88 !important; +} +.panel-yellow-2 .panel-heading { + background-color: #eae696 !important; + border-color: #deda88 !important; + border-radius: 0px; +} +.panel-yellow-2 .panel-heading a, +.panel-yellow-2 .panel-title { + color: #333; +} +.widget.yellow-2 { + background-color: #eae696; + color: #333; +} +.widget.yellow-2 .widget-header h2 { + color: #333; +} +body { + background: #f3f3f3; + margin: 0; + -webkit-font-smoothing: antialiased; + text-rendering: optimizelegibility; + -webkit-text-size-adjust: 100%; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 10px 0; +} +h1 { + line-height: 43px; +} +h2 { + line-height: 35px; +} +h3 { + line-height: 30px; +} +h4 { + line-height: 22px; +} +h3 small, +h4 small, +h5 small { + font-family: 'Open Sans'; + font-weight: 300; + color: #444; +} +h1, +h2, +h3, +h4, +h5, +h6 { + font-family: 'Open Sans'; + font-weight: 300; + color: #505458; +} +* { + outline: none !important; +} +a:hover, +a:active, +a:focus { + outline: 0; + text-decoration: none; +} +:focus { + outline: none; +} +::-moz-focus-inner { + border: 0; +} +.label { + padding: 0.3em 0.6em; +} +.container { + width: auto; +} +.navbar { + margin: 0 0 0 -15px; +} +.navbar-collapse { + padding: 0; + margin: 0; +} +.navbar-default { + background-color: transparent; + border: none; +} +.nav.navbar-nav.top-navbar .dropdown-menu > li { + position: relative; +} +.nav.navbar-nav.top-navbar .dropdown-menu > li > a { + cursor: pointer; + color: #4C5264; +} +.nav.navbar-nav.top-navbar > li span.absolute { + position: absolute; + top: 5px; + left: 25px; + font-size: 10px; + line-height: 7px !important; + font-weight: 400 ! important; + border-radius: 15px; + padding: 4px; + z-index: 4; +} +.table-noborder td { + border: 0px !important; +} +.badge { + vertical-align: bottom; +} +.btn-group.spaced .btn { + border-left: 1px solid rgba(0,0,0,0.1); +} +.btn-group.open { + z-index: 2 !important; +} +.bold { + font-weight: 700 !important; +} +.semibold { + font-weight: 600 !important; +} +.input-invis { + background: none !important; + border: none !important; +} +span.new-circle { + border-radius: 10px; + padding: 5px; +} +img.xs-avatar { + width: 50px; + padding: 2px; + background: #fff; + border: 1px solid #ddd; + margin: 0px 4px 0 0; + -webkit-border-radius: 100px !important; + -moz-border-radius: 100px !important; + border-radius: 100px !important; +} +img.ava-dropdown { + float: left; + margin: 0px 10px 0 0; +} +label { + font-family: "Open Sans"; + font-size: 13px; + font-weight: 600; +} +.no-left-padding { + padding-left: 0px; +} +.no-right-padding { + padding-right: 0px; +} +.nomargin { + margin: 0px !important; +} +.no-rounded { + -webkit-border-radius: 0px !important; + border-radius: 0px !important; +} +.full-rounded { + -webkit-border-radius: 20px !important; + -moz-border-radius: 20px !important; + border-radius: 20px !important; +} +.stacked { + margin: 0px; +} +.stacked > [class*="col-"] { + padding-left: 0px; + padding-right: 0px; + margin: 0px !important; +} +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"] { + -webkit-transition: background 0.2s linear; + -moz-transition: background 0.2s linear; + -ms-transition: background 0.2s linear; + -o-transition: background 0.2s linear; + transition: background 0.2s linear; +} +textarea:focus, +select:focus, +input[type="text"]:focus, +input[type="password"]:focus, +input[type="datetime"]:focus, +input[type="datetime-local"]:focus, +input[type="date"]:focus, +input[type="month"]:focus, +input[type="time"]:focus, +input[type="week"]:focus, +input[type="number"]:focus, +input[type="email"]:focus, +input[type="url"]:focus, +input[type="search"]:focus, +input[type="tel"]:focus, +input[type="color"]:focus, +.m-uneditable-input:focus { + background: #f1f1f1; + border-color: #eee; + -webkit-transition: background 0.2s linear; + -moz-transition: background 0.2s linear; + -ms-transition: background 0.2s linear; + -o-transition: background 0.2s linear; + transition: background 0.2s linear; +} +.icon-added input { + padding-left: 32px !important; +} +.icon-added i:first-child { + color: rgba(0,0,0,0.2); + display: block; + margin: 10px; + z-index: 3; + position: absolute; + text-align: center; +} +.loading { + display: block; + z-index: 2000; + width: 14px; + height: 14px; + border: solid 2px transparent; + border-top-color: #68C39F; + border-left-color: #68C39F; + border-radius: 10px; + -webkit-animation: pace-spinner 400ms linear infinite; + -moz-animation: pace-spinner 400ms linear infinite; + -ms-animation: pace-spinner 400ms linear infinite; + -o-animation: pace-spinner 400ms linear infinite; + animation: pace-spinner 400ms linear infinite; + -moz-border-bottom-colors: none; + -moz-border-left-colors: none; + -moz-border-right-colors: none; + -moz-border-top-colors: none; +} +.dropdown-menu { + -webkit-box-shadow: 0 0 0 0 rgba(0,0,0,0); + box-shadow: 0 0 0 0 rgba(0,0,0,0); + -webkit-border-radius: 2px; + border-radius: 2px; + font-size: 12px; + padding: 5px; + background: #fff; + border: 1px solid rgba(0,0,0,0.1); + border-bottom: 1px solid #d2d2d2; + box-shadow: inset 0px 1px 2px #fff; + top: 100%; +} +.dropdown-menu > li > a { + padding: 5px 7px; + -webkit-border-radius: 2px; + border-radius: 2px; + font-size: 13px; + color: #555; +} +.dropdown-menu > li > a:hover { + background: #aaa; + color: #fff; +} +.nav .dropdown-menu { + z-index: 8; +} +.dropdown-menu.dropdown-message ul { + white-space: inherit; +} +.dropdown-menu.dropdown-message > li > a { + word-wrap: break-word; + white-space: inherit; + width: 300px; + border-bottom: 1px solid #eee; +} +.dropdown-menu.dropdown-message li.dropdown-footer a { + display: block; +} +.dropdown-menu.dropdown-message li p { + font-size: 11px; + margin-bottom: 5px; +} +.dropdown-menu.dropdown-message li i.msg-time { + color: #7A868F; + font-size: 11px; + font-style: normal; +} +.dropdown-menu.dropdown-message li p i { + color: #7A868F; + font-size: 11px; + font-style: normal; +} +.dropdown-menu.dropdown-message .dropdown-message-scroll { + padding: 0px; +} +.dropdown-menu.dropdown-message .dropdown-message-scroll li { + padding: 5px 20px; +} +.dropdown-menu.dropdown-message .dropdown-message-scroll a, +.dropdown-menu.dropdown-message .dropdown-message-scroll strong { + text-decoration: none; + border-bottom: none; +} +.dropdown-menu.dropdown-message .dropdown-message-scroll .unread { + background: #FFFCE0; +} +.dropdown-menu.dropdown-message .dropdown-message-scroll a:hover { + color: #000; +} +.dropdown-header.notif-header { + font-size: 14px; + padding: 6px 8px 5px; +} +.dropdown-header.notif-header .pull-right { + margin-top: -19px; +} +.iradio, +.icheckbox { + margin-bottom: 10px; + margin-top: 10px; + min-height: 20px; + padding-left: 0px; +} +.icheckbox_square-aero { + margin-right: 5px; +} +.input-group-addon { + padding: 5px 12px; +} +i.i-xs { + font-size: 10px; +} +.widget-tabbed .nav-tabs:first-child { + margin-top: -39px; +} +.navbar-default .navbar-nav > .active > a, +.navbar-default .navbar-nav > .active > a:hover, +.navbar-default .navbar-nav > .active > a:focus { + color: #fff; + background-color: #545e6c; + border-bottom: none; +} +.navbar-default .navbar-nav > .open > a, +.navbar-default .navbar-nav > .open > a:hover, +.navbar-default .navbar-nav > .open > a:focus { + color: #fff; + background-color: #545e6c; +} +.navbar-nav > li > .dropdown-menu:before { + border-bottom: 6px solid #ABB7B7; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + right: 18px; + content: ""; + height: 0; + margin-right: -3px; + pointer-events: none; + position: absolute; + width: 0; + bottom: 100%; +} +.navbar-nav > li > .dropdown-menu { + z-index: 8; + border-radius: 2px; + -webkit-border-radius: 2px; + padding: 0px; + border: 0px; + box-shadow: 0 2px 6px rgba(0,0,0,0.1); +} +.navbar-nav > li > .dropdown-menu > li > a { + -webkit-transition: all 200ms ease-in; + -moz-transition: all 200ms ease-in; + -ms-transition: all 200ms ease-in; + -o-transition: all 200ms ease-in; + transition: all 200ms ease-in; + -webkit-border-radius: 0px; + border-radius: 0px; +} +.navbar-nav > li > .dropdown-menu > li > a:hover, +.navbar-nav > li > .dropdown-menu > li > a:focus { + background: rgba(0,0,0,0.06); +} +.navbar-nav > li > .dropdown-menu .dropdown-header { + background: #ABB7B7; + color: #fff; + -webkit-border-radius: 2px 2px 0 0; + border-radius: 2px 2px 0 0; +} +.navbar-nav > li > .dropdown-menu .dropdown-header a { + display: inline-block; + width: auto; + padding: 0px; + border: none; + margin-right: 7px; +} +.navbar-nav > li > .dropdown-menu .dropdown-footer { + background: #ABB7B7; + color: #fff; + -webkit-border-radius: 0 0 2px 2px; + border-radius: 0 0 2px 2px; +} +.navbar-nav > li.language_bar > .dropdown-menu > li > a:hover, +.navbar-nav > li.language_bar > .dropdown-menu > li > a:focus { + background: rgba(0,0,0,0.3); +} +.navbar-nav > li.language_bar > .dropdown-menu:before, +.navbar-nav > li > .dropdown-menu.grid-dropdown:before { + border-bottom: 6px solid #fff; +} +.navbar-nav > li > .dropdown-menu.grid-dropdown { + width: 300px; + text-align: center; + font-size: 16px; + color: #252932; +} +.navbar-nav > li > .dropdown-menu.grid-dropdown a { + font-size: 13px; + color: #38464A; + width: 100%; + padding: 10px; + line-height: 30px; + display: block; + font-weight: 300; + font-family: "Open Sans"; + vertical-align: middle; + opacity: 0.7; + cursor: default; +} +.navbar-nav > li > .dropdown-menu.grid-dropdown a.clickable:hover { + background: #ABB7B7; + color: #fff; +} +.navbar-nav > li > .dropdown-menu.grid-dropdown a.clickable:hover i { + color: #fff; +} +.navbar-nav > li > .dropdown-menu.grid-dropdown a i { + font-size: 25px; + line-height: 30px; + height: 30px; + display: block; + color: #697a7a; +} +.navbar-nav > li > .dropdown-menu.grid-dropdown a.clickable { + opacity: 1; + cursor: pointer; +} +.navbar-nav > li > .dropdown-menu.grid-dropdown:before { + right: auto; + left: 18px; +} +.navbar-nav > li.topbar-profile > .dropdown-menu { + background: #7A868F; + color: #fff; +} +.navbar-nav > li.topbar-profile > .dropdown-menu > li > a { + color: #eee !important; + padding-left: 10px; + padding-right: 10px; + font-family: "Open Sans"; +} +.navbar-nav > li.topbar-profile > .dropdown-menu > li.divider { + background: rgba(0,0,0,0.1); + height: 2px; + border-bottom: 1px solid rgba(255,255,255,0.2); + margin: 4px 0; +} +.navbar-nav > li.topbar-profile > .dropdown-menu > li:hover > a, +.navbar-nav > li.topbar-profile > .dropdown-menu > li:focus > a { + color: #fff !important; +} +.navbar-nav > li.topbar-profile > .dropdown-menu:before { + border-bottom: 6px solid #7A868F; +} +.navbar-form { + margin: 0px; + padding: 0px; + position: relative; + margin-bottom: 10px; + border: none; + box-shadow: none; + border-bottom: 1px solid rgba(0,0,0,0.03); +} +.navbar-form .search-button { + background: none; + border: none; + position: absolute; + right: 5px; + top: 0px; + color: #ccc; + -webkit-box-shadow: 0px 0px 0px 0px !important; + box-shadow: 0px 0px 0px 0px !important; + -webkit-border-radius: 0px; + border-radius: 0px; + -webkit-transition: all 100ms ease-in; + -moz-transition: all 100ms ease-in; + -ms-transition: all 100ms ease-in; + -o-transition: all 100ms ease-in; + transition: all 100ms ease-in; +} +.navbar-form .search-button:hover { + color: #777 !important; + -webkit-transition: all 300ms ease-in; + -moz-transition: all 300ms ease-in; + -ms-transition: all 300ms ease-in; + -o-transition: all 300ms ease-in; + transition: all 300ms ease-in; +} +.navbar-form .form-control:focus + .search-button { + color: #ccc; +} +.navbar-form .form-group { + display: block; +} +.navbar-form .form-control { + background-color: transparent !important; + border: none; + color: #aaa; + box-shadow: none; + display: block; + width: 100%; + -webkit-border-radius: 0px; + border-radius: 0px; + -webkit-transition: all 300ms ease-in; + -moz-transition: all 300ms ease-in; + -ms-transition: all 300ms ease-in; + -o-transition: all 300ms ease-in; + transition: all 300ms ease-in; +} +.navbar-form .form-control:focus { + background-color: #f2f2f2 !important; + border-color: #888; + color: #888; + -webkit-transition: all 300ms ease-in; + -moz-transition: all 300ms ease-in; + -ms-transition: all 300ms ease-in; + -o-transition: all 300ms ease-in; + transition: all 300ms ease-in; +} +.navbar-form .form-control::-webkit-input-placeholder { + color: #ccc !important; + text-overflow: ellipsis; +} +.navbar-form .form-control:-moz-placeholder { + color: #ccc !important; + text-overflow: ellipsis; +} +.navbar-form .form-control::-moz-placeholder { + color: #ccc !important; + text-overflow: ellipsis; +} +.navbar-form .form-control:-ms-input-placeholder { + color: #ccc !important; + text-overflow: ellipsis; +} +.enlarged .navbar-form .form-control { + color: transparent; +} +.enlarged .navbar-form .form-control:hover, +.enlarged .navbar-form .form-control:focus { + color: #aaa; +} +.enlarged .navbar-form .form-control::-webkit-input-placeholder { + color: transparent !important; + text-overflow: ellipsis; +} +.enlarged .navbar-form .form-control:-moz-placeholder { + color: transparent !important; + text-overflow: ellipsis; +} +.enlarged .navbar-form .form-control::-moz-placeholder { + color: transparent !important; + text-overflow: ellipsis; +} +.enlarged .navbar-form .form-control:-ms-input-placeholder { + color: transparent !important; + text-overflow: ellipsis; +} +.rounded-image { + -webkit-border-radius: 100px; + border-radius: 100px; + overflow: hidden; + display: inline-block; +} +.rounded-image img { + width: 100%; +} +.profile-image { + border: 4px double rgba(0,0,0,0.2); +} +.profile-info .col-xs-4 { + padding: 0px 0px 0px 10px; +} +.profile-text { + color: #4A525F; + font-family: "Open Sans"; + font-size: 18px; +} +.profile-buttons { + margin-top: 5px; +} +.profile-buttons a { + color: #606b7c; + font-size: 13px; + line-height: 22px; + padding: 4px 10px 6px; + vertical-align: middle; + display: inline-block; +} +.profile-buttons a i { + font-size: 16px; + line-height: 25px; +} +.profile-buttons a:hover { + color: #fff; + background: rgba(0,0,0,0.2); + -webkit-border-radius: 3px; + border-radius: 3px; +} +.profile-status i { + color: #444; + font-size: 14px; + float: right; + margin-top: -14px; +} +i.online { + color: #00AC65; +} +hr.divider { + border-color: rgba(255,255,255,0.1); + width: 90%; + margin: 10px 5%; + display: block; + clear: both; +} +.the-timeline { + margin-bottom: 40px; +} +.the-timeline .post-to-timeline { + margin: 15px 0; +} +.the-timeline .post-to-timeline textarea { + height: 50px; + resize: none; + margin-bottom: 10px; +} +.the-timeline ul { + padding: 0; + list-style: none; + margin: 0 15px 0 30px; + border-left: 2px solid #ddd; +} +.the-timeline ul li.the-year { + background: transparent; + height: 100px; + line-height: 90px; + min-height: 100px; + left: -32px; + border-left: 4px solid transparent !important; + text-align: center; + font-size: 50px; + font-family: "Open Sans"; + font-weight: 700; +} +.the-timeline ul li.the-year p { + width: 20%; + margin-left: 41%; +} +.the-timeline ul li.the-year:before { + display: block; + border: 0px; + width: 40%; + top: 50px; + border-top: 2px solid #ddd !important; +} +.the-timeline ul li.the-year:after { + display: block; + border: 0px; + right: -32px; + content: " "; + top: 50px; + position: absolute; + left: auto; + width: 40%; + border-top: 2px solid #ddd; +} +.the-timeline ul li:before { + width: 10px; + height: 10px; + border-style: solid; + content: " "; + position: absolute; + left: -14px; + top: 19px; + border-width: 7.5px 8px 7.5px 0; + border-color: transparent #efefef transparent transparent; + display: block; +} +.the-timeline ul li { + padding: 5px 15px; + display: block; + min-height: 54px; + -webkit-border-radius: 3px; + border-radius: 3px; + margin: 20px 0 20px 40px; + background: #efefef; + position: relative; + border-left: 4px solid transparent; +} +.the-timeline ul li:hover { + border-left-color: #4A525F; +} +.the-timeline ul li:hover:before { + border-color: transparent #4A525F transparent transparent; +} +.the-timeline ul li p { + margin: 0; + padding: 0; +} +.the-timeline ul li .the-date { + position: absolute; + left: -69px; + top: 0; + width: 50px; + height: 50px; + background: #EB5055; + border-radius: 50%; + text-align: center; + line-height: 130%; +} +.the-timeline ul li .the-date span { + color: #fff; + font-size: 18px; + display: block; + margin-top: 8px; +} +.the-timeline ul li .the-date small { + color: #fff; + font-size: 12px; + display: block; +} +.videoWrapper { + position: relative; + padding-bottom: 56.25%; + padding-top: 25px; + height: 0; + margin-bottom: 15px; +} +.videoWrapper iframe { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + border: none; +} +iframe { + width: 100%; + border: none; +} +.breadcrumb { + padding: 0; + background: transparent; + font-size: 12px; + margin: 0; +} +.progress.progress-xs { + height: 5px; + margin-top: 25px; + margin-bottom: 20px; + border-radius: 0px; + -webkit-box-shadow: none; + box-shadow: none; +} +.progress.progress-xs.for-modal { + margin-top: 10px; + margin-bottom: 20px; +} +.progress.progress-xs .progress-bar { + font-size: 11px; + line-height: 16px; + color: #ffffff; + -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,0); + box-shadow: inset 0 -1px 0 rgba(0,0,0,0); +} +.progress.progress-xs.progress-striped .progress-bar { + background-size: 10px 10px; +} +.progress.progress-sm { + height: 10px; + margin-top: 20px; + margin-bottom: 20px; + border-radius: 0px; + -webkit-box-shadow: none; + box-shadow: none; +} +.progress.progress-sm.progress-striped .progress-bar { + background-size: 15px 15px; +} +.table > thead > tr > th { + vertical-align: middle; + border-bottom: 1px solid #dddddd; +} +.form-control { + font-size: 13px; + border-radius: 0; + border-color: #ddd; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0); + box-shadow: inset 0 1px 1px rgba(0,0,0,0); +} +.form-control:focus { + border-color: #dadada; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0), 0 0 8px rgba(102,175,233,0); + box-shadow: inset 0 1px 1px rgba(0,0,0,0), 0 0 8px rgba(102,175,233,0); +} +.form-group .checkbox { + margin-left: 0; + padding-left: 0; +} +.btn { + border-radius: 2px; +} +.list-group-item:first-child { + border-top-right-radius: 0px; + border-top-left-radius: 0px; +} +.list-group-item:last-child { + border-bottom-right-radius: 0px; + border-bottom-left-radius: 0px; +} +.alert { + border-radius: 0px; +} +.btn-facebook { + background: #45619D; + border-color: #4D6CAD; +} +.btn-facebook:hover { + background: #395289; + border-color: #4D6CAD; +} +.btn-twitter { + background: #00ACEE; + border-color: #00B7FC; +} +.btn-twitter:hover { + background: #03A0DE; + border-color: #00B7FC; +} +.btn-gplus { + background: #D54636; + border-color: #B22E21; +} +.btn-gplus:hover { + background: #BF392E; + border-color: #B22E21; +} +.btn-vimeo { + background: #1BB6EC; + border-color: #0AA0D3; +} +.btn-vimeo:hover { + background: #12ADE3; + border-color: #0AA0D3; +} +.btn-pinterest { + background: #CD1F28; + border-color: #B70F17; +} +.btn-pinterest:hover { + background: #C9121A; + border-color: #B70F17; +} +.btn-instagram { + background: #4E3D35; + border-color: #392C24; +} +.btn-instagram:hover { + background: #483931; + border-color: #392C24; +} +.clear { + clear: both; +} +#wrapper { + width: 100%; + height: 100%; + background: #f3f3f3; + position: relative; +} +.page { + left: 0; + right: 0; + top: 0; + bottom: 0; +} +.rows, +.col, +.page { + position: absolute; +} +.rows { + left: 0; + right: 0; +} +.topbar { + left: 0px; + right: 0; + top: 0px; + height: 50px; + z-index: 11; + background: #424a55; + position: fixed; +} +.topbar .topbar-left { + float: left; + height: 50px; + position: relative; + z-index: 1; + width: 240px; + background: #424a55; +} +.logo h1 { + margin: 0px auto; + height: 50px; + text-align: center; +} +.logo h1 img { + height: 50%; +} +.topbar-profile .topbar-profile-image { + width: 35px; + position: relative; + margin-right: 5px; + margin-top: -15px; + margin-bottom: -12px; + border: 1px solid rgba(0,0,0,0.2); +} +.navbar-default .navbar-nav .topbar-profile > a { + font-family: "Open Sans"; +} +.navbar-right .iconify > a > i { + font-size: 18px; + color: #fff; + line-height: 17px; +} +.navbar-right .iconify > a:focus > i { + font-size: 18px; + color: #fff; + line-height: 17px; +} +.navbar-default .navbar-nav > li > a { + color: #fff; +} +.navbar-default .navbar-nav > li > a:hover, +.navbar-default .navbar-nav > li > a:focus { + color: #fff; +} +.right-opener { + border-left: 1px solid rgba(0,0,0,0.1); +} +.right-opener i { + color: rgba(255,255,255,0.8); +} +.right-opener .fa-angle-double-right { + display: none; +} +.open-right-sidebar .right-opener .fa-angle-double-right { + display: inline-block; +} +.open-right-sidebar .right-opener .fa-angle-double-left { + display: none; +} +.col { + top: 0; + bottom: 0; +} +.scroll-x { + overflow-x: auto; + -webkit-overflow-scrolling: touch; +} +.scroll-y { + overflow-y: auto; + -webkit-overflow-scrolling: touch; +} +.fill, +.pane { + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; + width: 100%; + height: 100%; +} +.pane { + display: none; +} +.side-menu { + width: 240px; + top: 0; + bottom: 0; + z-index: 2; +} +.side-menu.left { + background: #fff; + position: absolute; + top: 50px; + border-right: 1px solid #eee; +} +body.fixed-left .side-menu.left { + margin-top: 0px; + position: fixed; + height: 100%; + bottom: 50px; + margin-bottom: -50px; + padding-bottom: 50px; +} +.side-menu.left .scroll-y { + direction: rtl; + overflow-x: visible; +} +body.mobile .slimscrollleft, +body.mobile .slimscroller { + overflow-y: scroll; +} +.side-menu.left .scroll-y .sidebar-inner { + direction: ltr; +} +.content-page { + margin-left: 240px; + overflow: hidden; + position: relative; +} +.content-page > .content { + margin-top: 50px; + padding: 20px; + position: relative; +} +.side-menu.right { + width: 240px; + right: -240px; + position: fixed; + z-index: 15; + background: #fff; +} +.side-menu.right .tab-inner { + height: 100%; +} +#wrapper.open-right-sidebar { + padding-right: 240px; +} +.open-right-sidebar .topbar { + margin-right: 240px; +} +.open-right-sidebar .right { + right: 0px !important; +} +.header.rows { + height: 50px; +} +.header.rows-content-header { + height: 50px; +} +.header.left.side-menu { + background: #343838; +} +.header.content { + background: #FFFFFF; + border-bottom: 1px solid #E5E9EC; +} +.body.rows { + top: 0px; + bottom: 50px; +} +.body.content.rows { + top: 50px; + bottom: 0px; + background: #f3f3f3; + padding: 20px; + font-size: 13px; +} +body.fixed-left .left-footer { + bottom: 50px; +} +.left-footer { + height: 50px; + bottom: 0px; + display: none; + position: absolute; + width: 100%; + background: rgba(0,0,0,0.3); + color: #E8EAED; + padding: 15px; +} +.left-footer .progress.progress-xs { + margin: 9px 70px 9px 0; + overflow: visible; + position: relative; +} +.left-footer .progress.progress-xs .progress-precentage { + display: block; + position: absolute; + right: -20px; + top: -12px; + padding: 7px 5px; + border-radius: 50%; + background: #555; + color: #f3f3f3; +} +.left-footer .progress.progress-xs { + background: rgba(0,0,0,0.6); +} +.left-footer .progress.progress-xs .btn { + display: block; + position: absolute; + right: -70px; + top: -14px; + background: #555; + color: #f3f3f3; + border: none; +} +.button-menu-mobile { + position: absolute; + right: 0; + float: left; + top: 0px; + z-index: 2; + padding: 10px 18px; + height: 50px; + font-size: 21px; + background: transparent; + color: #fff; + border: none; +} +.button-menu-mobile:hover { + color: #aaa; +} +button.navbar-toggle { + padding: 5px 20px; +} +.breadcrumb { + top: 50px; + line-height: 30px; + padding: 0px 15px; + background: rgba(0,0,0,0.05); + position: relative; + font-family: "Open Sans"; + -webkit-border-radius: 0px !important; + -moz-border-radius: 0px !important; + border-radius: 0px !important; +} +.breadcrumb li a { + font-family: "Open Sans"; + color: #9dabab; +} +.breadcrumb li.active { + color: #7A868F; +} +.breadcrumb > li + li:before { + color: #9dabab; + padding: 0px 10px; + content: ""; + font-family: FontAwesome; +} +.sidebar-inner { + height: 100%; +} +#sidebar-menu, +#sidebar-menu ul, +#sidebar-menu li, +#sidebar-menu a { + margin: 0; + padding: 0; + border: 0; + list-style: none; + font-weight: normal; + text-decoration: none; + line-height: 1; + font-size: 13px; + position: relative; +} +#sidebar-menu a { + line-height: 1.3; +} +#sidebar-menu { + width: 100%; + font-family: "Open Sans"; +} +#sidebar-menu > ul > li { + background: #fff; + display: block; +} +#sidebar-menu > ul > li > a { + font-size: 13px; + display: block; + color: #555; + padding: 10px; + padding-right: 22px; +} +#sidebar-menu > ul > li > a > span { + vertical-align: middle; +} +#sidebar-menu > ul > li > a:hover { + color: #555; + background: #ffffff; + padding-left: 10px; +} +#sidebar-menu > ul > li > a > i { + color: rgba(0,0,0,0.4); + display: inline-block; + font-size: 15px; + line-height: 17px; + margin-left: 3px; + margin-right: 7px; + text-align: center; + vertical-align: middle; + width: 20px; +} +#sidebar-menu > ul > li > a > i.i-right { + margin: 3px 0 0 0; + float: right; +} +#sidebar-menu > ul > li > a:hover { + text-decoration: none; +} +#sidebar-menu > ul > li > a.subdrop { + background: #ffffff; +} +#sidebar-menu > ul > li > a.active, +#sidebar-menu > ul > li > a.active.subdrop { + color: #fff; + background: #7eccad !important; + font-weight: 600; + border-left: 0px solid rgba(0,0,0,0.3); +} +#sidebar-menu > ul > li > a.active i, +#sidebar-menu > ul > li > a.active.subdrop i { + color: #fff; +} +#sidebar-menu > ul > li > a span.label { + float: right; +} +#sidebar-menu > ul > li > a span.label.span-left { + float: none; + margin-left: 5px; +} +#sidebar-menu span.cnt { + position: absolute; + top: 8px; + right: 15px; + padding: 0; + margin: 0; + background: none; +} +#sidebar-menu ul ul { + display: none; + background: #ebebeb; +} +#sidebar-menu ul ul ul { + border-top: 1px solid rgba(0,0,0,0.1); + background: rgba(0,0,0,0.2); +} +#sidebar-menu ul ul li { + border-top: 0; +} +#sidebar-menu ul ul a { + padding: 10px 25px; + display: block; + color: #555; + font-family: "Open Sans"; + font-size: 12px; +} +#sidebar-menu ul ul ul a { + padding-left: 35px; +} +#sidebar-menu ul ul ul ul a { + padding-left: 45px; +} +#sidebar-menu ul ul a:hover { + color: #222; + background: #d9d9d9; +} +#sidebar-menu ul ul li a.active { + color: #222; + background: #dedede; +} +#sidebar-menu ul ul a i { + margin-right: 5px; +} +#wrapper.enlarged #sidebar-menu ul ul { + border: none; +} +#wrapper.enlarged .left.side-menu .widget { + display: none; +} +#wrapper.enlarged .profile-text { + display: none; +} +#wrapper.enlarged .profile-info .col-xs-4 { + width: 100%; + padding: 5px; +} +#wrapper.enlarged .profile-info .col-xs-8 { + width: 100%; + padding: 0 7px; +} +#wrapper.enlarged .left.side-menu { + width: 50px; + z-index: 5; +} +#wrapper.enlarged .content-page { + margin-left: 50px; +} +#wrapper.enlarged .left.side-menu .navbar-form input::-webkit-input-placeholder { + color: transparent !important; +} +#wrapper.enlarged .left.side-menu .navbar-form input:-moz-placeholder { + color: transparent !important; +} +#wrapper.enlarged .left.side-menu .navbar-form input::-moz-placeholder { + color: transparent !important; +} +#wrapper.enlarged .left.side-menu .navbar-form input:-ms-input-placeholder { + color: transparent !important; +} +#wrapper.enlarged .left.side-menu .navbar-form:hover { + width: 240px; + position: relative; + z-index: 5; +} +#wrapper.enlarged .topbar .topbar-left { + width: 50px !important; +} +#wrapper.enlarged .topbar .topbar-left .logo { + opacity: 0; + display: none; +} +#wrapper.enlarged .left.side-menu #sidebar-menu ul > li { + white-space: nowrap; +} +#wrapper.enlarged .left.side-menu #sidebar-menu ul > li > ul { + display: none; +} +#wrapper.enlarged .left.side-menu #sidebar-menu ul > li:hover > a { + background: #ffffff; +} +#wrapper.enlarged #sidebar-menu ul ul li a.active { + background: #dedede !important; +} +#wrapper.enlarged #sidebar-menu > ul > li:hover > a.open:after, +#wrapper.enlarged #sidebar-menu > ul > li:hover > a.active:after { + display: none; +} +#wrapper.enlarged .left.side-menu #sidebar-menu ul > li:hover > ul { + position: absolute; + left: 50px; + width: 190px; + display: block; +} +#wrapper.enlarged .left.side-menu #sidebar-menu ul ul li:hover > a { + background: #ababab !important; + color: #fff; +} +#wrapper.enlarged .left.side-menu #sidebar-menu ul ul li:hover > a i { + background: #ababab !important; + color: #fff; +} +#wrapper.enlarged .left.side-menu #sidebar-menu ul ul li:hover > ul { + position: absolute; + left: 190px; + margin-top: -36px; + width: 190px; + display: block; +} +#wrapper.enlarged .left.side-menu #sidebar-menu ul > li:hover > ul a { + background: #ebebeb; + padding-left: 10px; + border: none; + width: 190px; + box-shadow: none; + z-index: 6; + position: relative; +} +#wrapper.enlarged .left.side-menu #sidebar-menu ul ul li > a span.pull-right { + position: absolute; + right: 10px; + top: 12px; + -ms-transform: rotate(270deg); + -webkit-transform: rotate(270deg); + transform: rotate(270deg); +} +#wrapper.enlarged .left.side-menu #sidebar-menu ul > li > a span { + display: none; + padding-left: 10px; +} +#wrapper.enlarged .left.side-menu #sidebar-menu ul > li:hover > a span.pull-right { + position: absolute; + right: 10px; + top: 12px; +} +#wrapper.enlarged .left.side-menu #sidebar-menu ul > li:hover > a { + width: 240px; + position: relative; +} +#wrapper.enlarged .left.side-menu #sidebar-menu ul > li { + position: relative; +} +#wrapper.enlarged .left.side-menu #sidebar-menu ul > li:hover a span { + display: inline; +} +#wrapper.enlarged .left.side-menu .navbar-form .search-button { + right: 7px; +} +.side-menu.right .nav-tabs { + background: rgba(0,0,0,0.4); + border: none; +} +.side-menu.right .nav-tabs li { + text-align: center; +} +.side-menu.right .nav-tabs > li > a { + border-radius: 0px !important; + margin: 0px !important; + padding: 14px 15px 15px; + font-size: 13px; + color: rgba(255,255,255,0.9); + font-family: "Open Sans"; + border-bottom: 1px solid transparent; +} +.side-menu.right .nav > li > a:hover, +.side-menu.right .nav > li > a:focus { + background: rgba(255,255,255,0.1); + color: rgba(255,255,255,0.7); + border-color: rgba(255,255,255,0); +} +.side-menu.right .nav-tabs > li.active > a { + color: #777; +} +.side-menu.right .nav-tabs > li.active > a, +.side-menu.right .nav-tabs > li.active > a:hover, +.side-menu.right .nav-tabs > li.active > a:focus { + background: #fff; + border-color: #fff; + border-radius: 0px; +} +.side-menu.right .right-toolbar { + margin: 5px 15px 15px; +} +.side-menu.right .right-toolbar a { + color: #777; + font-size: 12px; +} +.side-menu.right .panel-group .panel { + border-radius: 0px; + border: none; + color: #f3f3f3; + background: transparent; +} +.side-menu.right .panel-default > .panel-heading { + background: transparent; + border: none; + border-radius: 0px; +} +.side-menu.right .panel-default > .panel-heading + .panel-collapse .panel-body { + border-top: none; +} +.side-menu.right .panel-title > a { + color: #fff; +} +.side-menu.right .panel-title > a .label { + margin-top: 2px; +} +.side-menu.right .tab-content, +.side-menu.right .tab-content > .tab-pane, +.side-menu.right .tab-content > .tab-pane.active { + height: 100%; + padding-bottom: 20px; +} +.accordion-toggle .panel-heading { + padding: 0px; +} +.accordion-toggle .panel-title a { + color: #fff; + font-size: 14px; + font-family: "Open Sans"; + display: block; + line-height: 22px; + padding: 9px 35px 9px 20px; + position: relative; +} +.accordion-toggle .panel-title a:after { + content: "\f106"; + display: block; + font-family: FontAwesome; + font-size: 10px; + line-height: 36px; + position: absolute; + top: 3px; + right: 15px; +} +.accordion-toggle .panel-title a.collapsed:after { + content: "\f107"; +} +.accordion-toggle .panel.panel-default .panel-title a { + color: #555; +} +.panel-group .panel { + border-radius: 3px; +} +.not-logged-avatar { + width: 100px; + margin: 0px auto; + display: block; + margin-bottom: 20px; + text-align: center; + box-shadow: 1px 1px 3px rgba(0,0,0,0.1); +} +.search-right { + padding: 10px 15px; +} +.search-right input { + background: rgba(0,0,0,0.1); + border: none; + color: #eee; +} +#notification-list a { + color: #555; + font-size: 13px; + font-weight: 600; + vertical-align: text-top; +} +#notification-list li { + margin-bottom: 10px; + padding-bottom: 10px; + border-bottom: 1px solid rgba(0,0,0,0.1); + font-family: "Open Sans"; +} +#notification-list a .muted { + display: block; + font-size: 12px; + font-weight: 300; + color: rgba(0,0,0,0.5); +} +#notification-list .icon-wrapper { + border-radius: 150px; + font-size: 20px; + width: 35px; + line-height: 29px; + text-align: center; + height: 35px; + margin-right: 10px; + float: left; + color: #555; + display: inline-block; + border: 2px solid #4EA6A6; +} +#inbox-list li { + margin-bottom: 15px; +} +#inbox-list a { + color: #555; +} +#inbox-list a .datetime { + font-size: 12px; + font-weight: 400; + color: rgba(0,0,0,0.4); + float: right; + font-family: "Open Sans"; +} +#inbox-list a .sender { + font-size: 13px; + display: block; + float: left; + font-weight: 600; + font-family: "Open Sans"; +} +#inbox-list a .title { + clear: both; + display: block; + font-size: 12px; + font-weight: 600; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + height: 15px; + color: rgba(0,0,0,0.6); +} +#inbox-list a .content { + clear: both; + display: block; + font-size: 11px; + font-weight: 300; + overflow: hidden; + color: rgba(0,0,0,0.5); +} +#updates-list li { + margin-bottom: 10px; +} +#updates-list a { + color: #555; + font-family: "Open Sans"; + font-size: 13px; +} +#updates-list .icon-wrapper { + border-radius: 50px; + font-size: 14px; + width: 24px; + line-height: 25px; + text-align: center; + height: 24px; + margin-right: 10px; + float: left; + color: #555; + display: inline-block; +} +#chat-panel .panel-body { + padding: 0px; +} +#chat-list li { + clear: both; + height: 55px; + opacity: 0.9; + padding: 7px 15px 10px; +} +#chat-list li:hover { + background: rgba(0,0,0,0.1); + opacity: 1; +} +#chat-list a { + font-size: 13px; + font-family: "Open Sans"; + color: #555; +} +#chat-list a.online .chat-user-avatar { + box-shadow: 0 0 0 2px #68C39F; +} +#chat-list a.away .chat-user-avatar { + box-shadow: 0 0 0 2px orange; +} +#chat-list a.offline .chat-user-avatar img { + filter: url("data:image/svg+xml;utf8,#grayscale"); + filter: gray; + -webkit-filter: grayscale(100%); +} +#chat-list .chat-user-avatar { + border-radius: 50px; + width: 34px; + height: 34px; + display: inline-block; + float: left; + margin-right: 10px; + margin-top: 3px; + border: 2px solid rgba(0,0,0,0); + box-shadow: 0 0 0 2px #555; + overflow: hidden; +} +#chat-list .chat-user-avatar img { + width: 100%; + height: 100%; +} +#chat-list .chat-user-msg { + font-size: 12px; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + color: rgba(0,0,0,0.3); + display: block; +} +#settings .tab-inner { + color: rgba(0,0,0,0.8); +} +#settings .tab-inner h3 { + color: rgba(0,0,0,0.6); + margin-bottom: 20px; +} +#settings .tab-inner h4 { + color: rgba(0,0,0,0.6); + margin-bottom: 15px; +} +#settings .tab-inner .row { + margin-bottom: 10px; + font-size: 12px; +} +.page-heading { + margin: 0px 0 20px; + padding: 5px 0; +} +.page-heading h1 { + margin: 0; + padding: 0; + font-weight: 400; + font-size: 24px; + margin-bottom: 0px; +} +.page-heading h3 { + font-size: 15px; + margin-top: 0px; +} +.widget { + position: relative; + background: #fff; + color: #5b5b5b; + margin-bottom: 20px; +} +.widget-header, +.widget-content { + display: block; + width: 100%; + clear: both; +} +.portlets { + min-height: 50px; +} +.portlets .widget-header { + cursor: move; +} +.widget-footer { + -webkit-border-radius: 0 0 2px 2px; + border-radius: 0 0 2px 2px; + overflow: hidden; +} +.widget-header.transparent { + background: transparent; + border: none; +} +.widget-header.centered { + text-align: center; +} +.widget-header .left-btn { + position: absolute; + left: 10px; + top: 6px; +} +.widget-content { + -webkit-border-radius: 0 0 2px 2px; + border-radius: 0 0 2px 2px; +} +.widget-content.padding { + padding: 15px; +} +.widget-content.padding-sm { + padding: 10px; +} +.widget-content.padding-xs { + padding: 1%; +} +.widget.maximized { + position: fixed; + -webkit-border-radius: 0; + border-radius: 0; + top: 50px; + left: 240px; + right: 0px; + bottom: 0px; + z-index: 10; + margin: 0px; +} +#wrapper.enlarged .widget.maximized { + left: 50px; +} +#wrapper.open-right-sidebar .widget.maximized { + right: 240px; +} +.widget.modal-widget { + position: absolute; + display: block; + z-index: 10; + box-shadow: 0px 0px 2px rgba(0,0,0,0.2), 0px 10px 15px rgba(0,0,0,0.2); +} +.widget.modal-widget.modalize .widget-header { + background: #efefef; +} +.widget:before, +.widget:after { + display: table; + content: " "; +} +.widget:after { + clear: both; +} +.widget .des-thumbnail { + padding: 20px; +} +.widget .img-wrap { + width: 100%; + height: auto; + overflow: hidden; +} +.widget .img-wrap img { + width: 100%; +} +.widget .widget-header { + height: 43px; + display: block; +} +.widget .widget-header h2 { + padding: 4px 13px 4px 13px; + margin: 0px; + font-weight: 400; + font-size: 16px; + display: block; + color: #5b5b5b; +} +.widget .widget-header h2.no-style { + padding: 0px; + margin: 20px 0px 10px 0px; + margin-top: 20px; + margin-bottom: 10px; + font-size: 30px; + border-bottom: none; +} +.widget.box-messages { + margin-top: -50px; +} +.widget.box-messages h2 { + border-bottom: none; +} +.widget .statistic-chart { + padding: 0 0 0px 0; +} +.widget .statistic-chart .toolbar { + padding: 10px; + padding-top: 0px; +} +.widget.full { + padding: 0px; +} +.widget.full .box-footer { + padding: 20px 20px 15px 20px; +} +.widget.full .box-footer a, +.widget.full .box-footer a:hover { + color: #1B1E24; + text-decoration: none; +} +.widget .nav-tabs > li > a { + line-height: 1.428571429; + border: none; + margin-right: 6px; + background: rgba(0,0,0,0.04); + font-family: "Open Sans"; + color: #555; + font-size: 13px; +} +.widget .tab-content { + padding-top: 10px; + font-size: 13px; +} +.widget .tab-boxed { + padding: 10px; + border: 1px solid #ddd; + border-top: 0px; +} +.widget .nav-tabs > li > a i { + color: #555; +} +.widget .media-list { + margin-top: 30px; +} +.widget .media-list a { + color: #1B1E24; +} +.widget .media-list a:hover { + color: #212121; + text-decoration: none; +} +.widget .media-list .media { + padding: 5px 20px; + border-bottom: 1px solid #eaeaea; +} +.widget .media-list li:last-child.media { + border-bottom: none; +} +.widget .media-list .media .media-heading a { + font-size: 14px; + font-weight: 600; + color: #1B1E24; + margin-right: 5px; +} +.widget .media-list .media .media-heading small { + color: #65BD77; + font-size: 11px; +} +.widget .media-list .media p { + color: #909090; +} +.widget .media-list .media .media-object { + width: 50px; +} +.widget .nav-tabs > li.active > a, +.widget .nav-tabs > li.active > a:hover, +.widget .nav-tabs > li.active > a:focus { + cursor: default; + border-top: none; + border-right: none; + border-left: none; + border-bottom: none; + background-color: #7A868F; + color: #fff; +} +.widget .nav-tabs > li.active > a i, +.widget .nav-tabs > li.active > a:hover i, +.widget .nav-tabs > li.active > a:focus i { + color: #fff; +} +.widget .nav-tabs.nav-simple li a { + background: none; +} +.widget .nav-tabs.nav-simple > li.active > a, +.widget .nav-tabs.nav-simple > li.active > a:hover, +.widget .nav-tabs.nav-simple > li.active > a:focus { + border: 1px solid #ddd; + border-bottom: 1px solid #fff; + background: none; + color: #555; +} +.widget .nav-tabs.nav-simple > li.active > a i, +.widget .nav-tabs.nav-simple > li.active > a:hover i, +.widget .nav-tabs.nav-simple > li.active > a:focus i { + color: #555; +} +.widget .additional-box { + position: absolute; + top: 10px; + right: 15px; + z-index: 2; +} +.widget .additional-btn { + position: absolute; + top: 10px; + right: 13px; + z-index: 2; +} +.widget .left-toolbar { + position: absolute; + top: 10px; + left: 13px; + z-index: 2; +} +.widget:hover .additional-btn > a.hidden { + display: inline-block !important; + visibility: visible !important; +} +.widget:hover .additional-btn > a.hidden.nevershow, +.widget:hover .additional-btn > a.nevershow, +.widget .additional-btn > a.nevershow { + display: none !important; +} +.widget .widget-header:hover .additional-btn > a { + color: #909090; + -webkit-transition: All 0.4s ease; + -moz-transition: All 0.4s ease; + -o-transition: All 0.4s ease; +} +.widget.modal-widget.modalize .widget-header .additional-btn > a { + color: #909090; +} +.widget .btn-group { + z-index: 1; +} +.widget table .btn-group { + z-index: 1; +} +.widget .additional-btn .dropdown-menu { + z-index: 2; +} +.widget .widget-close, +.widget .widget-toggle { + font-size: 15px; +} +.widget .widget-close:hover { + color: #EB5055 !important; +} +.widget .additional-btn > a, +.widget .widget-header .additional-btn .btn-group > a { + color: #ccc; + margin-left: 7px; + margin-right: 0px; + cursor: pointer; + -webkit-transition: All 0.4s ease; + -moz-transition: All 0.4s ease; + -o-transition: All 0.4s ease; +} +.widget .additional-btn > a:hover { + text-decoration: none; + -webkit-transition: All 0.4s ease; + -moz-transition: All 0.4s ease; + -o-transition: All 0.4s ease; +} +.ui-sortable-placeholder { + background: #cdcdcd !important; + display: block; + visibility: visible !important; + min-height: 100%; + -webkit-box-shadow: inset 0 0 5px 0 rgba(0,0,0,0.1); + box-shadow: inset 0 0 5px 0 rgba(0,0,0,0.1); +} +.widget.ui-sortable-placeholder * { + visibility: hidden; +} +.transparent { + background: rgba(0,0,0,0); + color: #fff; +} +.white { + background: #ffffff; + color: #555; +} +.widget.success { + background: #65BD77; + color: #fff; +} +.widget.success h2 { + color: #2C7439; + border-bottom-color: #3B934B; +} +.widget.success:hover { + color: #DEFFE5; +} +.widget.success .additional-btn a.additional-icon { + color: #3B934B; +} +.widget.success .additional-btn a:hover.additional-icon { + color: #2C7439; +} +.widget.success .text-box h3 { + color: #215F2E; +} +.widget.success .progress-bar-success { + background-color: #215F2E; +} +.widget.success i.success { + color: #215F2E; +} +.widget.danger { + background: #D9534F; + color: #fff; +} +.widget.danger h2 { + color: #791C1A; + border-bottom-color: #791C1A; +} +.widget.danger:hover { + color: #fff; +} +.widget.danger .additional-btn a.additional-icon { + color: #791C1A; +} +.widget.danger .additional-btn a:hover.additional-icon { + color: #791C1A; +} +.widget.danger .text-box h3 { + color: #791C1A; +} +.widget.danger .progress-bar-danger { + background-color: #791C1A; +} +.widget.danger i.danger { + color: #791C1A; +} +.widget.info { + background: #4393D8; + color: #fff; +} +.widget.info h2 { + color: #15558B; + border-bottom-color: #15558B; +} +.widget.info:hover { + color: #DEFFE5; +} +.widget.info .additional-btn a.additional-icon { + color: #15558B; +} +.widget.info .additional-btn a:hover.additional-icon { + color: #15558B; +} +.widget.info .text-box h3 { + color: #15558B; +} +.widget.info .progress-bar-info { + background-color: #15558B; +} +.widget.info i.info { + color: #15558B; +} +.widget.warning { + background: #F7CB17; + color: #fff; +} +.widget.warning h2 { + color: #9D5D03; + border-bottom-color: #9D5D03; +} +.widget.warning:hover { + color: #DEFFE5; +} +.widget.warning .additional-btn a.additional-icon { + color: #9D5D03; +} +.widget.warning .additional-btn a:hover.additional-icon { + color: #9D5D03; +} +.widget.warning .text-box h3 { + color: #9D5D03; +} +.widget.warning .progress-bar-warning { + background-color: #9D5D03; +} +.widget .progress-bar-semi-transparent { + background-color: rgba(255,255,255,0.4); +} +.widget.warning i.warning { + color: #9D5D03; +} +.widget .additional { + padding: 0 15px; + background: #fff; + color: #909090; + margin: 15px -15px -15px -15px; +} +.widget .additional .list-box-info { + margin: 0 -15px; +} +.widget .additional .list-box-info ul { + list-style: none; + margin: 0; + padding: 0; +} +.widget .additional .list-box-info ul li { + background: #fff; + padding: 15px 20px; + color: #909090; + border-bottom: 1px solid #ddd; +} +.widget .additional .list-box-info ul li span.label { + float: right; + font-size: 13px; +} +.widget .additional .list-box-info ul li:last-child { + border-bottom: 1px solid #fff; +} +.left .widget { + margin: 10px; +} +.left .widget-header h2 { + color: #fff; + padding: 4px; +} +.left .widget .additional-btn { + right: 4px; +} +.widget.full h2 { + padding: 15px; + margin: 5px 0px 20px 0px; +} +.widget table { + margin: 0; +} +.widget table tr th, +.widget table tr td { + padding-left: 15px; + padding-right: 15px; +} +.widget .widget-icon { + font-size: 50px; + position: absolute; + right: 4%; + top: 10px; + color: #ffffff; +} +.widget .text-box h2 { + padding: 0; + margin: 0px 0; + font-weight: 300; + font-size: 32px; + display: block; + color: #fff; +} +.widget .text-box .maindata { + font-size: 11px; + color: #fff; + font-family: "Open Sans"; +} +.widget .text-box .maindata b { + font-size: 12px; +} +.top-summary .widget .progress { + margin: 0px; + background: rgba(0,0,0,0.2); +} +.top-summary .widget .widget-footer { + background: rgba(0,0,0,0.1); + padding: 4px 15px; + font-size: 12px; + color: rgba(255,255,255,0.9); +} +.top-summary .widget .widget-footer .rel-change { + font-size: 14px; + color: #fff; + margin-right: 7px; +} +.flip { + perspective: 600px; + perspective-origin: 50% 50%; + position: relative; +} +.flip:hover .widget-flip, +.flip.hover .widget-flip { + transform: rotateY(180deg); +} +.flip, +.widget-front, +.widget-back { + width: 100%; + height: 110px; +} +.widget-flip { + transition: all 600ms ease 0s, opacity 200ms ease 0s; + transform-style: preserve-3d; + position: relative; +} +.widget-front, +.widget-back { + backface-visibility: hidden; + transform-origin: 50% 50% 0; + position: absolute; + top: 0; + left: 0; +} +.widget-front { + z-index: 2; + background: #ff0000; +} +.widget-back { + background: #333; + transform: rotateY(180deg); +} +.dropdown-toggle.btn-sm { + padding-right: 6px; +} +.dropdown-toggle.btn-xs { + padding-right: 3px; +} +.btn-default { + background-color: #ABB7B7; + border-color: #ABB7B7; + color: #fff; +} +.btn-default:hover, +.btn-default:focus, +.btn-default:active, +.btn-default.active, +.open .dropdown-toggle.btn-default { + background-color: #98A3A3; + border-color: #98A3A3; + color: #fff; +} +.btn-primary { + background-color: #4A525F; + border-color: #4A525F; + color: #FFFFFF; +} +.btn-primary:hover, +.btn-primary:focus, +.btn-primary:active, +.btn-primary.active, +.open .dropdown-toggle.btn-primary { + background-color: #3E444F; + border-color: #3E444F; + color: #FFFFFF; +} +.btn-success { + background-color: #68C39F; + border-color: #68C39F; + color: #FFFFFF; +} +.btn-success:hover, +.btn-success:focus, +.btn-success:active, +.btn-success.active, +.open .dropdown-toggle.btn-success { + background-color: #5CAD8D; + border-color: #5CAD8D; + color: #FFFFFF; +} +.btn-info { + background-color: #65BBD6; + border-color: #65BBD6; + color: #FFFFFF; +} +.btn-info:hover, +.btn-info:focus, +.btn-info:active, +.btn-info.active, +.open .dropdown-toggle.btn-info { + background-color: #5BA9C2; + border-color: #5BA9C2; + color: #FFFFFF; +} +.btn-warning { + background-color: #FFC052; + border-color: #FFC052; + color: #FFFFFF; +} +.btn-warning:hover, +.btn-warning:focus, +.btn-warning:active, +.btn-warning.active, +.open .dropdown-toggle.btn-warning { + background-color: #F5B84F; + border-color: #F5B84F; + color: #FFFFFF; +} +.btn-danger { + background-color: #E15554; + border-color: #E15554; + color: #FFFFFF; +} +.btn-danger:hover, +.btn-danger:focus, +.btn-danger:active, +.btn-danger.active, +.open .dropdown-toggle.btn-danger { + background-color: #C74B4A; + border-color: #C74B4A; + color: #FFFFFF; +} +i.success { + color: #68C39F; +} +i.warning { + color: #FFC052; +} +i.info { + color: #65BBD6; +} +i.danger { + color: #E15554; +} +.label.label-success { + background: #68C39F; +} +.label.label-warning { + background: #FFC052; +} +.label.label-info { + background: #65BBD6; +} +.label.label-danger { + background: #E15554; +} +p.quick-post { + margin: 10px 5px; +} +p.quick-post i { + color: #909090; + margin: 5px; + cursor: pointer; +} +p.quick-post.message i { + margin: 0 2px; +} +p.quick-post.message { + margin: 3px 0px; + padding: 0; + text-align: right; +} +.chat-widget { + height: 300px; + margin-bottom: 20px; +} +form.input-chat { + margin-top: 20px; +} +.chat-widget .media-list { + margin: 0; +} +.chat-widget .media-list .media { + border-bottom: none; +} +.chat-widget .media-list .media .media-object { + width: 50px; + padding: 4px; + border: 1px solid #eaeaea; +} +.chat-widget .media-list .media .media-body { + background: #f7f7f7; + border-radius: 3px; + padding: 10px; + color: #677179; +} +.chat-widget .media-list .media .media-body p.time { + text-align: right; + color: #909090; + font-size: 11px; + font-style: italic; +} +.chat-widget .media-list .media .media-body.success { + background: #EDFFED; +} +.chat-widget .media-list .media .media-body.warning { + background: #FFFCE0; +} +.chat-widget .media-list .media .media-body.danger { + background: #FFE8E8; +} +.chat-widget .media-list .media .media-body.info { + background: #E5F5FF; +} +.selectpicker { + border-radius: 0; + font-size: 13px; +} +.icon-showcase i { + margin-right: 5px; +} +.bs-glyphicons { + padding-left: 0; + padding-bottom: 1px; + margin-bottom: 20px; + list-style: none; + overflow: hidden; +} +.bs-glyphicons li { + float: left; + width: 25%; + height: 115px; + padding: 10px; + margin: 0 -1px -1px 0; + font-size: 12px; + line-height: 1.4; + text-align: center; + border: 1px solid #ddd; +} +.bs-glyphicons .glyphicon { + margin-top: 5px; + margin-bottom: 10px; + font-size: 24px; +} +.bs-glyphicons .glyphicon-class { + display: block; + text-align: center; + word-wrap: break-word; +} +.bs-glyphicons li:hover { + background-color: rgba(86,61,124,0.1); +} +@media (min-width: 768px) { + .bs-glyphicons li { + width: 12.5%; + } +} +.search-box.has-feedback .form-control-feedback { + right: 5px; +} +.btn-toolbar .rows-check-cont { + margin-top: 6px; + margin-right: 15px; +} +.mail-list { + background: #fff; + color: #777; + box-shadow: 0px 0px 3px rgba(0,0,0,0.1); +} +.mail-reply { + font-size: 13px; + color: #777; +} +.sender-photo { + height: 30px; + margin-top: 5px; + float: left; + margin-right: 10px; +} +.menu-message { + margin: 20px 0; +} +.menu-message .list-group-item { + border: 0px; + border-left: 4px solid transparent; + background: rgba(255,255,255,0.8); + margin-bottom: 0px; + color: #666; +} +.menu-message .list-group-item.active { + background: rgba(255,255,255,0.4); + border-left: 4px solid #68C39F; + color: #666; +} +.menu-message .list-group-item.active .badge { + color: #fff; + background: #7A868F; +} +.menu-folders { + margin: 20px 0; +} +.menu-folders .list-group-item { + border: 0px; + background: rgba(255,255,255,0.8); + margin-bottom: 0px; + color: #666; + font-size: 13px; +} +.menu-folders .list-group-item i { + font-size: 14px; + margin-right: 5px; +} +.table-message tr.unread { + font-weight: 500; +} +.table-message tr.unread a { + font-weight: 500; +} +.table-message > tbody > tr > td { + border-bottom: 1px solid #f3f3f3 !important; +} +.table-message > tbody > tr > td > a { + display: block; + font-weight: 300; + color: #5b5b5b; +} +.table-message > tbody > tr > td > a:hover { + text-decoration: none; +} +.data-table-toolbar span.paging-status { + font-weight: bold; + margin: 10px 10px 0 0; +} +.input-message { + margin-top: -1px; +} +.new-message-btns { + width: 100%; +} +hr.dashed { + height: 1px; + background: transparent; + border-top: none; + border-bottom: 1px dashed #ddd; +} +.data-table-toolbar { + margin: 0px; + padding: 15px; + background: rgba(0,0,0,0.03); +} +.data-table-toolbar-footer { + margin-top: 15px; + padding: 0px; +} +.toolbar-btn-action { + text-align: right; +} +.gallery-wrap { + margin: 10px -10px; +} +.gallery-wrap:before, +.gallery-wrap:after { + display: table; + content: " "; +} +.gallery-wrap:after { + clear: both; +} +.gallery-wrap .column { + float: left; + width: 20%; + margin: 0; + padding: 0; +} +.gallery-wrap .column-4 { + float: left; + width: 25%; + margin: 0; + padding: 0; +} +.gallery-wrap .column-3 { + float: left; + width: 33.33333333333333%; + margin: 0; + padding: 0; +} +.gallery-wrap .column .inner, +.gallery-wrap .column-4 .inner, +.gallery-wrap .column-3 .inner { + margin: 10px; + position: relative; + overflow: hidden; + -webkit-transition: All 0.4s ease; + -moz-transition: All 0.4s ease; + -o-transition: All 0.4s ease; +} +.gallery-wrap .column .inner:hover, +.gallery-wrap .column-4 .inner:hover, +.gallery-wrap .column-3 .inner:hover { + -webkit-box-shadow: 0px 2px 3px 0px rgba(0,0,0,0.25); + -moz-box-shadow: 0px 2px 3px 0px rgba(0,0,0,0.25); + box-shadow: 0px 2px 3px 0px rgba(0,0,0,0.25); +} +.gallery-wrap .column .inner a .img-wrap, +.gallery-wrap .column-3 .inner a .img-wrap, +.gallery-wrap .column-4 .inner a .img-wrap { + cursor: pointer; + cursor: -webkit-zoom-in; + cursor: -moz-zoom-in; + cursor: zoom-in; +} +.gallery-wrap .column .inner .img-wrap { + height: 140px; + overflow: hidden; + background: #ddd; +} +.gallery-wrap .column-3 .inner .img-wrap { + height: 200px; + overflow: hidden; + background: #ddd; +} +.gallery-wrap .column-4 .inner .img-wrap { + height: 180px; + overflow: hidden; + background: #ddd; +} +.gallery-wrap .column .inner .img-frame, +.gallery-wrap .column-3 .inner .img-frame, +.gallery-wrap .column-4 .inner .img-frame { + padding: 5px; + background: #fff; + display: block; + position: relative; + -webkit-transition: All 0.4s ease; + -moz-transition: All 0.4s ease; + -o-transition: All 0.4s ease; +} +.gallery-wrap .column .inner:hover .img-frame, +.gallery-wrap .column-3 .inner:hover .img-frame, +.gallery-wrap .column-4 .inner:hover .img-frame { + background: #fff; +} +.gallery-wrap .column .inner:hover .img-frame.success, +.gallery-wrap .column-3 .inner:hover .img-frame.success, +.gallery-wrap .column-4 .inner:hover .img-frame.success { + background: #65BD77; +} +.gallery-wrap .column .inner:hover .img-frame.warning, +.gallery-wrap .column-3 .inner:hover .img-frame.warning, +.gallery-wrap .column-4 .inner:hover .img-frame.warning { + background: #FFCE00; +} +.gallery-wrap .column .inner:hover .img-frame.danger, +.gallery-wrap .column-3 .inner:hover .img-frame.danger, +.gallery-wrap .column-4 .inner:hover .img-frame.danger { + background: #D73D3D; +} +.gallery-wrap .column .inner:hover .img-frame.info, +.gallery-wrap .column-3 .inner:hover .img-frame.info, +.gallery-wrap .column-4 .inner:hover .img-frame.info { + background: #428BCA; +} +.gallery-wrap .column .inner .img-wrap img, +.gallery-wrap .column-4 .inner .img-wrap img, +.gallery-wrap .column-3 .inner .img-wrap img { + width: 100%; +} +.gallery-wrap .column .inner .caption-hover, +.gallery-wrap .column-4 .inner .caption-hover, +.gallery-wrap .column-3 .inner .caption-hover { + position: absolute; + bottom: -100px; + left: 0; + right: 0; + text-align: center; + color: #909090; + padding: 10px; + background: #fff; + -webkit-transition: All 0.4s ease; + -moz-transition: All 0.4s ease; + -o-transition: All 0.4s ease; +} +.gallery-wrap .column .inner .caption-hover.success, +.gallery-wrap .column-4 .inner .caption-hover.success, +.gallery-wrap .column-3 .inner .caption-hover.success { + color: #2C7439; + background: #65BD77; +} +.gallery-wrap .column .inner .caption-hover.danger, +.gallery-wrap .column-4 .inner .caption-hover.danger, +.gallery-wrap .column-3 .inner .caption-hover.danger { + color: #790D0D; + background: #D73D3D; +} +.gallery-wrap .column .inner .caption-hover.warning, +.gallery-wrap .column-4 .inner .caption-hover.warning, +.gallery-wrap .column-3 .inner .caption-hover.warning { + color: #B27C05; + background: #FFCE00; +} +.gallery-wrap .column .inner .caption-hover.info, +.gallery-wrap .column-4 .inner .caption-hover.info, +.gallery-wrap .column-3 .inner .caption-hover.info { + color: #0A487C; + background: #428BCA; +} +.gallery-wrap .column .inner:hover .caption-hover, +.gallery-wrap .column-4 .inner:hover .caption-hover, +.gallery-wrap .column-3 .inner:hover .caption-hover { + bottom: 0px; +} +.gallery-wrap .column .inner .caption-static, +.gallery-wrap .column-4 .inner .caption-static, +.gallery-wrap .column-3 .inner .caption-static { + position: absolute; + text-align: left; + font-weight: 300; + font-size: 12px; + color: #fff; + padding: 10px; + left: 0px; + bottom: 0px; + width: 100%; + background: -moz-linear-gradient(top,rgba(0,0,0,0) 0%,rgba(0,0,0,0.34) 100%); + background: -webkit-gradient(linear,left top,left bottom,color-stop(0%,rgba(0,0,0,0)),color-stop(100%,rgba(0,0,0,0.34))); + background: -webkit-linear-gradient(top,rgba(0,0,0,0) 0%,rgba(0,0,0,0.34) 100%); + background: -o-linear-gradient(top,rgba(0,0,0,0) 0%,rgba(0,0,0,0.34) 100%); + background: -ms-linear-gradient(top,rgba(0,0,0,0) 0%,rgba(0,0,0,0.34) 100%); + background: linear-gradient(to bottom,rgba(0,0,0,0) 0%,rgba(0,0,0,0.34) 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000',endColorstr='#57000000',GradientType=0); + cursor: -webkit-zoom-in; + cursor: -moz-zoom-in; + cursor: zoom-in; + margin: 0; +} +.gallery-wrap .column .inner a:hover, +.gallery-wrap .column-4 .inner a:hover, +.gallery-wrap .column-3 .inner a:hover { + text-decoration: none; +} +.gallery-wrap .column .inner .caption-static.success, +.gallery-wrap .column-4 .inner .caption-static.success, +.gallery-wrap .column-3 .inner .caption-static.success { + color: #2C7439; + background: #65BD77; +} +.gallery-wrap .column .inner .caption-static.danger, +.gallery-wrap .column-4 .inner .caption-static.danger, +.gallery-wrap .column-3 .inner .caption-static.danger { + color: #790D0D; + background: #D73D3D; +} +.gallery-wrap .column .inner .caption-static.warning, +.gallery-wrap .column-4 .inner .caption-static.warning, +.gallery-wrap .column-3 .inner .caption-static.warning { + color: #B27C05; + background: #FFCE00; +} +.gallery-wrap .column .inner .caption-static.info, +.gallery-wrap .column-4 .inner .caption-static.info, +.gallery-wrap .column-3 .inner .caption-static.info { + color: #0A487C; + background: #428BCA; +} +.btn-facebook { + background: #45619D; + border-color: #4D6CAD; +} +.btn-facebook:hover { + background: #395289; + border-color: #4D6CAD; +} +.btn-twitter { + background: #00ACEE; + border-color: #00B7FC; +} +.btn-twitter:hover { + background: #03A0DE; + border-color: #00B7FC; +} +.btn-gplus { + background: #D54636; + border-color: #B22E21; +} +.btn-gplus:hover { + background: #BF392E; + border-color: #B22E21; +} +.btn-vimeo { + background: #1BB6EC; + border-color: #0AA0D3; +} +.btn-vimeo:hover { + background: #12ADE3; + border-color: #0AA0D3; +} +.btn-pinterest { + background: #CD1F28; + border-color: #B70F17; +} +.btn-pinterest:hover { + background: #C9121A; + border-color: #B70F17; +} +.btn-instagram { + background: #4E3D35; + border-color: #392C24; +} +.btn-instagram:hover { + background: #483931; + border-color: #392C24; +} +i.success { + color: #65BD77; +} +i.warning { + color: #F39C12; +} +i.info { + color: #3498DB; +} +i.danger { + color: #E85344; +} +.btn-facebook { + background-color: #4B66A0; + border-color: #4B66A0; + color: #fff; +} +.btn-facebook:hover, +.btn-facebook:focus, +.btn-facebook:active, +.btn-facebook.active, +.open .dropdown-toggle.btn-facebook { + background-color: #3B5A98; + border-color: #3B5A98; + color: #fff; +} +.btn-facebook:active, +.btn-facebook.active, +.open .dropdown-toggle.btn-facebook { + background-image: none; +} +.btn-facebook.disabled, +.btn-facebook[disabled], +fieldset[disabled] .btn-facebook, +.btn-facebook.disabled:hover, +.btn-facebook[disabled]:hover, +fieldset[disabled] .btn-facebook:hover, +.btn-facebook.disabled:focus, +.btn-facebook[disabled]:focus, +fieldset[disabled] .btn-facebook:focus, +.btn-facebook.disabled:active, +.btn-facebook[disabled]:active, +fieldset[disabled] .btn-facebook:active, +.btn-facebook.disabled.active, +.btn-facebook[disabled].active, +fieldset[disabled] .btn-facebook.active { + background-color: #6C89C1; + border-color: #6C89C1; + color: #fff; +} +.btn-facebook .badge { + color: #3B5A98; +} +.btn-twitter { + background-color: #55ACEE; + border-color: #55ACEE; + color: #fff; +} +.btn-twitter:hover, +.btn-twitter:focus, +.btn-twitter:active, +.btn-twitter.active, +.open .dropdown-toggle.btn-twitter { + background-color: #3490D3; + border-color: #3490D3; + color: #fff; +} +.btn-twitter:active, +.btn-twitter.active, +.open .dropdown-toggle.btn-twitter { + background-image: none; +} +.btn-twitter.disabled, +.btn-twitter[disabled], +fieldset[disabled] .btn-twitter, +.btn-twitter.disabled:hover, +.btn-twitter[disabled]:hover, +fieldset[disabled] .btn-twitter:hover, +.btn-twitter.disabled:focus, +.btn-twitter[disabled]:focus, +fieldset[disabled] .btn-twitter:focus, +.btn-twitter.disabled:active, +.btn-twitter[disabled]:active, +fieldset[disabled] .btn-twitter:active, +.btn-twitter.disabled.active, +.btn-twitter[disabled].active, +fieldset[disabled] .btn-twitter.active { + background-color: #7CC1F5; + border-color: #7CC1F5; + color: #fff; +} +.btn-twitter .badge { + color: #3490D3; +} +.btn-google-plus { + background-color: #D24333; + border-color: #D24333; + color: #fff; +} +.btn-google-plus:hover, +.btn-google-plus:focus, +.btn-google-plus:active, +.btn-google-plus.active, +.open .dropdown-toggle.btn-google-plus { + background-color: #BC2C1F; + border-color: #BC2C1F; + color: #fff; +} +.btn-google-plus:active, +.btn-google-plus.active, +.open .dropdown-toggle.btn-google-plus { + background-image: none; +} +.btn-google-plus.disabled, +.btn-google-plus[disabled], +fieldset[disabled] .btn-google-plus, +.btn-google-plus.disabled:hover, +.btn-google-plus[disabled]:hover, +fieldset[disabled] .btn-google-plus:hover, +.btn-google-plus.disabled:focus, +.btn-google-plus[disabled]:focus, +fieldset[disabled] .btn-google-plus:focus, +.btn-google-plus.disabled:active, +.btn-google-plus[disabled]:active, +fieldset[disabled] .btn-google-plus:active, +.btn-google-plus.disabled.active, +.btn-google-plus[disabled].active, +fieldset[disabled] .btn-google-plus.active { + background-color: #F0675A; + border-color: #F0675A; + color: #fff; +} +.btn-google-plus .badge { + color: #BC2C1F; +} +.btn-dribbble { + background-color: #E04C86; + border-color: #E04C86; + color: #fff; +} +.btn-dribbble:hover, +.btn-dribbble:focus, +.btn-dribbble:active, +.btn-dribbble.active, +.open .dropdown-toggle.btn-dribbble { + background-color: #D33471; + border-color: #D33471; + color: #fff; +} +.btn-dribbble:active, +.btn-dribbble.active, +.open .dropdown-toggle.btn-dribbble { + background-image: none; +} +.btn-dribbble.disabled, +.btn-dribbble[disabled], +fieldset[disabled] .btn-dribbble, +.btn-dribbble.disabled:hover, +.btn-dribbble[disabled]:hover, +fieldset[disabled] .btn-dribbble:hover, +.btn-dribbble.disabled:focus, +.btn-dribbble[disabled]:focus, +fieldset[disabled] .btn-dribbble:focus, +.btn-dribbble.disabled:active, +.btn-dribbble[disabled]:active, +fieldset[disabled] .btn-dribbble:active, +.btn-dribbble.disabled.active, +.btn-dribbble[disabled].active, +fieldset[disabled] .btn-dribbble.active { + background-color: #F571A5; + border-color: #F571A5; + color: #fff; +} +.btn-dribbble .badge { + color: #D33471; +} +.btn-flickr { + background-color: #0162DB; + border-color: #0162DB; + color: #fff; +} +.btn-flickr:hover, +.btn-flickr:focus, +.btn-flickr:active, +.btn-flickr.active, +.open .dropdown-toggle.btn-flickr { + background-color: #0555BF; + border-color: #0555BF; + color: #fff; +} +.btn-flickr:active, +.btn-flickr.active, +.open .dropdown-toggle.btn-flickr { + background-image: none; +} +.btn-flickr.disabled, +.btn-flickr[disabled], +fieldset[disabled] .btn-flickr, +.btn-flickr.disabled:hover, +.btn-flickr[disabled]:hover, +fieldset[disabled] .btn-flickr:hover, +.btn-flickr.disabled:focus, +.btn-flickr[disabled]:focus, +fieldset[disabled] .btn-flickr:focus, +.btn-flickr.disabled:active, +.btn-flickr[disabled]:active, +fieldset[disabled] .btn-flickr:active, +.btn-flickr.disabled.active, +.btn-flickr[disabled].active, +fieldset[disabled] .btn-flickr.active { + background-color: #2983F7; + border-color: #2983F7; + color: #fff; +} +.btn-flickr .badge { + color: #0555BF; +} +.btn-pinterest { + background-color: #CC2127; + border-color: #CC2127; + color: #fff; +} +.btn-pinterest:hover, +.btn-pinterest:focus, +.btn-pinterest:active, +.btn-pinterest.active, +.open .dropdown-toggle.btn-pinterest { + background-color: #B70F12; + border-color: #B70F12; + color: #fff; +} +.btn-pinterest:active, +.btn-pinterest.active, +.open .dropdown-toggle.btn-pinterest { + background-image: none; +} +.btn-pinterest.disabled, +.btn-pinterest[disabled], +fieldset[disabled] .btn-pinterest, +.btn-pinterest.disabled:hover, +.btn-pinterest[disabled]:hover, +fieldset[disabled] .btn-pinterest:hover, +.btn-pinterest.disabled:focus, +.btn-pinterest[disabled]:focus, +fieldset[disabled] .btn-pinterest:focus, +.btn-pinterest.disabled:active, +.btn-pinterest[disabled]:active, +fieldset[disabled] .btn-pinterest:active, +.btn-pinterest.disabled.active, +.btn-pinterest[disabled].active, +fieldset[disabled] .btn-pinterest.active { + background-color: #E53B3E; + border-color: #E53B3E; + color: #fff; +} +.btn-pinterest .badge { + color: #B70F12; +} +.btn-youtube { + background-color: #D92623; + border-color: #D92623; + color: #fff; +} +.btn-youtube:hover, +.btn-youtube:focus, +.btn-youtube:active, +.btn-youtube.active, +.open .dropdown-toggle.btn-youtube { + background-color: #C91212; + border-color: #C91212; + color: #fff; +} +.btn-youtube:active, +.btn-youtube.active, +.open .dropdown-toggle.btn-youtube { + background-image: none; +} +.btn-youtube.disabled, +.btn-youtube[disabled], +fieldset[disabled] .btn-youtube, +.btn-youtube.disabled:hover, +.btn-youtube[disabled]:hover, +fieldset[disabled] .btn-youtube:hover, +.btn-youtube.disabled:focus, +.btn-youtube[disabled]:focus, +fieldset[disabled] .btn-youtube:focus, +.btn-youtube.disabled:active, +.btn-youtube[disabled]:active, +fieldset[disabled] .btn-youtube:active, +.btn-youtube.disabled.active, +.btn-youtube[disabled].active, +fieldset[disabled] .btn-youtube.active { + background-color: #F04343; + border-color: #F04343; + color: #fff; +} +.btn-youtube .badge { + color: #C91212; +} +.btn-dropbox { + background-color: #1473C3; + border-color: #1473C3; + color: #fff; +} +.btn-dropbox:hover, +.btn-dropbox:focus, +.btn-dropbox:active, +.btn-dropbox.active, +.open .dropdown-toggle.btn-dropbox { + background-color: #0864B2; + border-color: #0864B2; + color: #fff; +} +.btn-dropbox:active, +.btn-dropbox.active, +.open .dropdown-toggle.btn-dropbox { + background-image: none; +} +.btn-dropbox.disabled, +.btn-dropbox[disabled], +fieldset[disabled] .btn-dropbox, +.btn-dropbox.disabled:hover, +.btn-dropbox[disabled]:hover, +fieldset[disabled] .btn-dropbox:hover, +.btn-dropbox.disabled:focus, +.btn-dropbox[disabled]:focus, +fieldset[disabled] .btn-dropbox:focus, +.btn-dropbox.disabled:active, +.btn-dropbox[disabled]:active, +fieldset[disabled] .btn-dropbox:active, +.btn-dropbox.disabled.active, +.btn-dropbox[disabled].active, +fieldset[disabled] .btn-dropbox.active { + background-color: #2E90E3; + border-color: #2E90E3; + color: #fff; +} +.btn-dropbox .badge { + color: #0864B2; +} +.btn-foursquare { + background-color: #0086BE; + border-color: #0086BE; + color: #fff; +} +.btn-foursquare:hover, +.btn-foursquare:focus, +.btn-foursquare:active, +.btn-foursquare.active, +.open .dropdown-toggle.btn-foursquare { + background-color: #0571A0; + border-color: #0571A0; + color: #fff; +} +.btn-foursquare:active, +.btn-foursquare.active, +.open .dropdown-toggle.btn-foursquare { + background-image: none; +} +.btn-foursquare.disabled, +.btn-foursquare[disabled], +fieldset[disabled] .btn-foursquare, +.btn-foursquare.disabled:hover, +.btn-foursquare[disabled]:hover, +fieldset[disabled] .btn-foursquare:hover, +.btn-foursquare.disabled:focus, +.btn-foursquare[disabled]:focus, +fieldset[disabled] .btn-foursquare:focus, +.btn-foursquare.disabled:active, +.btn-foursquare[disabled]:active, +fieldset[disabled] .btn-foursquare:active, +.btn-foursquare.disabled.active, +.btn-foursquare[disabled].active, +fieldset[disabled] .btn-foursquare.active { + background-color: #2CA0CE; + border-color: #2CA0CE; + color: #fff; +} +.btn-foursquare .badge { + color: #0571A0; +} +.btn-github { + background-color: #3B3B3B; + border-color: #3B3B3B; + color: #fff; +} +.btn-github:hover, +.btn-github:focus, +.btn-github:active, +.btn-github.active, +.open .dropdown-toggle.btn-github { + background-color: #212121; + border-color: #212121; + color: #fff; +} +.btn-github:active, +.btn-github.active, +.open .dropdown-toggle.btn-github { + background-image: none; +} +.btn-github.disabled, +.btn-github[disabled], +fieldset[disabled] .btn-github, +.btn-github.disabled:hover, +.btn-github[disabled]:hover, +fieldset[disabled] .btn-github:hover, +.btn-github.disabled:focus, +.btn-github[disabled]:focus, +fieldset[disabled] .btn-github:focus, +.btn-github.disabled:active, +.btn-github[disabled]:active, +fieldset[disabled] .btn-github:active, +.btn-github.disabled.active, +.btn-github[disabled].active, +fieldset[disabled] .btn-github.active { + background-color: #5F5F5F; + border-color: #5F5F5F; + color: #fff; +} +.btn-github .badge { + color: #212121; +} +.btn-linkedin { + background-color: #0085AE; + border-color: #0085AE; + color: #fff; +} +.btn-linkedin:hover, +.btn-linkedin:focus, +.btn-linkedin:active, +.btn-linkedin.active, +.open .dropdown-toggle.btn-linkedin { + background-color: #036C8E; + border-color: #036C8E; + color: #fff; +} +.btn-linkedin:active, +.btn-linkedin.active, +.open .dropdown-toggle.btn-linkedin { + background-image: none; +} +.btn-linkedin.disabled, +.btn-linkedin[disabled], +fieldset[disabled] .btn-linkedin, +.btn-linkedin.disabled:hover, +.btn-linkedin[disabled]:hover, +fieldset[disabled] .btn-linkedin:hover, +.btn-linkedin.disabled:focus, +.btn-linkedin[disabled]:focus, +fieldset[disabled] .btn-linkedin:focus, +.btn-linkedin.disabled:active, +.btn-linkedin[disabled]:active, +fieldset[disabled] .btn-linkedin:active, +.btn-linkedin.disabled.active, +.btn-linkedin[disabled].active, +fieldset[disabled] .btn-linkedin.active { + background-color: #24A7D3; + border-color: #24A7D3; + color: #fff; +} +.btn-linkedin .badge { + color: #036C8E; +} +.btn-tumblr { + background-color: #3E5A70; + border-color: #3E5A70; + color: #fff; +} +.btn-tumblr:hover, +.btn-tumblr:focus, +.btn-tumblr:active, +.btn-tumblr.active, +.open .dropdown-toggle.btn-tumblr { + background-color: #2E485D; + border-color: #2E485D; + color: #fff; +} +.btn-tumblr:active, +.btn-tumblr.active, +.open .dropdown-toggle.btn-tumblr { + background-image: none; +} +.btn-tumblr.disabled, +.btn-tumblr[disabled], +fieldset[disabled] .btn-tumblr, +.btn-tumblr.disabled:hover, +.btn-tumblr[disabled]:hover, +fieldset[disabled] .btn-tumblr:hover, +.btn-tumblr.disabled:focus, +.btn-tumblr[disabled]:focus, +fieldset[disabled] .btn-tumblr:focus, +.btn-tumblr.disabled:active, +.btn-tumblr[disabled]:active, +fieldset[disabled] .btn-tumblr:active, +.btn-tumblr.disabled.active, +.btn-tumblr[disabled].active, +fieldset[disabled] .btn-tumblr.active { + background-color: #586F81; + border-color: #586F81; + color: #fff; +} +.btn-tumblr .badge { + color: #2E485D; +} +.btn-vimeo { + background-color: #1BB6EC; + border-color: #1BB6EC; + color: #fff; +} +.btn-vimeo:hover, +.btn-vimeo:focus, +.btn-vimeo:active, +.btn-vimeo.active, +.open .dropdown-toggle.btn-vimeo { + background-color: #0D9DD1; + border-color: #0D9DD1; + color: #fff; +} +.btn-vimeo:active, +.btn-vimeo.active, +.open .dropdown-toggle.btn-vimeo { + background-image: none; +} +.btn-vimeo.disabled, +.btn-vimeo[disabled], +fieldset[disabled] .btn-vimeo, +.btn-vimeo.disabled:hover, +.btn-vimeo[disabled]:hover, +fieldset[disabled] .btn-vimeo:hover, +.btn-vimeo.disabled:focus, +.btn-vimeo[disabled]:focus, +fieldset[disabled] .btn-vimeo:focus, +.btn-vimeo.disabled:active, +.btn-vimeo[disabled]:active, +fieldset[disabled] .btn-vimeo:active, +.btn-vimeo.disabled.active, +.btn-vimeo[disabled].active, +fieldset[disabled] .btn-vimeo.active { + background-color: #4BCBFA; + border-color: #4BCBFA; + color: #fff; +} +.btn-vimeo .badge { + color: #0D9DD1; +} +.icon-facebook { + color: #4B66A0; +} +a .icon-facebook { + color: #4B66A0; +} +a:hover .icon-facebook, +a:focus .icon-facebook { + text-decoration: none; + color: #3B5A98; +} +.icon-twitter { + color: #55ACEE; +} +a .icon-twitter { + color: #55ACEE; +} +a:hover .icon-twitter, +a:focus .icon-twitter { + text-decoration: none; + color: #3490D3; +} +.icon-google-plus { + color: #D24333; +} +a .icon-google-plus { + color: #D24333; +} +a:hover .icon-google-plus, +a:focus .icon-google-plus { + text-decoration: none; + color: #BC2C1F; +} +.icon-dribbble { + color: #E04C86; +} +a .icon-dribbble { + color: #E04C86; +} +a:hover .icon-dribbble, +a:focus .icon-dribbble { + text-decoration: none; + color: #D33471; +} +.icon-flickr { + color: #0162DB; +} +a .icon-flickr { + color: #0162DB; +} +a:hover .icon-flickr, +a:focus .icon-flickr { + text-decoration: none; + color: #0555BF; +} +.icon-pinterest { + color: #CC2127; +} +a .icon-pinterest { + color: #CC2127; +} +a:hover .icon-pinterest, +a:focus .icon-pinterest { + text-decoration: none; + color: #B70F12; +} +.icon-youtube { + color: #D92623; +} +a .icon-youtube { + color: #D92623; +} +a:hover .icon-youtube, +a:focus .icon-youtube { + text-decoration: none; + color: #C91212; +} +.icon-dropbox { + color: #1473C3; +} +a .icon-dropbox { + color: #1473C3; +} +a:hover .icon-dropbox, +a:focus .icon-dropbox { + text-decoration: none; + color: #0864B2; +} +.icon-foursquare { + color: #0086BE; +} +a .icon-foursquare { + color: #0086BE; +} +a:hover .icon-foursquare, +a:focus .icon-foursquare { + text-decoration: none; + color: #0571A0; +} +.icon-github { + color: #3B3B3B; +} +a .icon-github { + color: #3B3B3B; +} +a:hover .icon-github, +a:focus .icon-github { + text-decoration: none; + color: #212121; +} +.icon-linkedin { + color: #0085AE; +} +a .icon-linkedin { + color: #0085AE; +} +a:hover .icon-linkedin, +a:focus .icon-linkedin { + text-decoration: none; + color: #036C8E; +} +.icon-tumblr { + color: #3E5A70; +} +a .icon-tumblr { + color: #3E5A70; +} +a:hover .icon-tumblr, +a:focus .icon-tumblr { + text-decoration: none; + color: #2E485D; +} +.icon-vimeo { + color: #1BB6EC; +} +a .icon-vimeo { + color: #1BB6EC; +} +a:hover .icon-vimeo, +a:focus .icon-vimeo { + text-decoration: none; + color: #0D9DD1; +} +.mfp-fade.mfp-bg { + opacity: 0; + -webkit-transition: all 0.4s ease-out; + -moz-transition: all 0.4s ease-out; + transition: all 0.4s ease-out; +} +.mfp-fade.mfp-bg.mfp-ready { + opacity: 0.8; +} +.mfp-fade.mfp-bg.mfp-removing { + opacity: 0; +} +.mfp-fade.mfp-wrap .mfp-content { + opacity: 0; + -webkit-transition: all 0.4s ease-out; + -moz-transition: all 0.4s ease-out; + transition: all 0.4s ease-out; +} +.mfp-fade.mfp-wrap.mfp-ready .mfp-content { + opacity: 1; +} +.mfp-fade.mfp-wrap.mfp-removing .mfp-content { + opacity: 0; +} +.login-page { + background: #7A868F; +} +.signup-page { + background: #7A868F; +} +.lock-page { + background: #252932; +} +.lock-page .container { + background: #7A868F; +} +.internal-error h1 { + -webkit-transform: rotate(10); + -moz-transform: rotate(10); + -ms-transform: rotate(10); + -o-transform: rotate(10); + transform: rotate(10); + -webkit-transform: rotate(10deg); + -moz-transform: rotate(10deg); + transform: rotate(10deg); + -o-transform: rotate(10deg); +} +.internal-error h2 { + -webkit-transform: rotate(-185); + -moz-transform: rotate(-185); + -ms-transform: rotate(-185); + -o-transform: rotate(-185); + transform: rotate(-185); + -webkit-transform: rotate(-185deg); + -moz-transform: rotate(-185deg); + transform: rotate(-185deg); + -o-transform: rotate(-185deg); +} +.internal-error .backbtn { + -webkit-transform: rotate(-44); + -moz-transform: rotate(-44); + -ms-transform: rotate(-44); + -o-transform: rotate(-44); + transform: rotate(-44); + -webkit-transform: rotate(-44deg); + -moz-transform: rotate(-44deg); + transform: rotate(-44deg); + -o-transform: rotate(-44deg); +} +.internal-error .searchbtn { + -webkit-transform: rotate(-44); + -moz-transform: rotate(-44); + -ms-transform: rotate(-44); + -o-transform: rotate(-44); + transform: rotate(-44); + -webkit-transform: rotate(-44deg); + -moz-transform: rotate(-44deg); + transform: rotate(-44deg); + -o-transform: rotate(-44deg); +} +.full-content-center { + width: 100%; + padding: 5px 0px; + max-width: 500px; + margin: 6% auto; + text-align: center; +} +.full-content { + background: #E5E9EC; +} +.full-content-center h1 { + font-size: 150px; + font-family: "Open Sans"; + line-height: 150px; + font-weight: 700; + color: #252932; +} +.maintenance h1 i { + font-size: 150px; + color: #252932; +} +.maintenance h1 { + font-size: 50px; + line-height: 100px; + color: #fff; + text-shadow: 1px 1px 0px rgba(0,0,0,0.1); +} +.login-wrap { + margin: 20px 10%; + text-align: left; + background: rgba(0,0,0,0.1); + padding: 20px 20px; + color: #fff; +} +.login-wrap a { + color: #fff; +} +.login-wrap i { + margin-right: 5px; +} +.login-wrap .checkbox { + margin-left: 0; + padding-left: 0; +} +.login-wrap .btn-block { + margin: 5px 0; +} +.login-wrap .login-input { + position: relative; +} +.login-wrap .login-input .text-input { + padding-left: 30px; +} +.login-wrap .login-input i.overlay { + position: absolute; + left: 10px; + top: 10px; + color: #aaa; +} +.widget .media-list.search-result .media a { + color: #46C45F; +} +.widget .media-list.search-result .media .media-heading a { + color: #1279D1; +} +.widget .media-list.search-result .media .media-heading span { + font-size: 12px; + font-weight: 400; + padding: 3px 5px; +} +.widget .media-list.search-result .media .media-object { + width: 100px; +} +ul.faq { + list-style: none; + padding-left: 10px; + margin: 20px 0 50px; +} +ul.faq li i { + margin-right: 5px; +} +ul.faq li { + margin: 10px 0; +} +ul.faq li a.faq-question { + cursor: pointer; + display: block; + font-size: 14px; +} +ul.faq li .faq-answer { + margin: 10px 15px; +} +table.pricing-table-style-1 { + text-align: center; + background: #fff; +} +table.pricing-table-style-1 thead tr th { + padding: 15px; + font-size: 18px; + font-weight: 600; + text-align: center; +} +table.pricing-table-style-1 thead tr th.best-choice { + color: #A2A7B7; + background: #0F1215; + border-bottom-color: #000; +} +table.pricing-table-style-1 tbody tr td.best-choice { + background: #1B1E24; + font-weight: 600; + font-size: 15px; + color: #fafafa; + border-top-color: #000; +} +table.pricing-table-style-1 tbody tr td.td-success { + background: #65BD77; + font-weight: 600; + color: #2C7439; + text-align: right; + border-top-color: #55AD67; +} +table.pricing-table-style-1 thead tr th.th-success { + color: #65BD77; + background: #55AD67; + border-bottom-color: #55AD67; +} +.la-pricing-table { + margin: 30px 0; + text-align: center; +} +.la-pricing-table:before, +.la-pricing-table:after { + display: table; + content: " "; +} +.la-pricing-table:after { + clear: both; +} +.la-pricing-table .la-col-4 { + float: left; + margin: 20px 0 20px 0; + padding: 0; + width: 25%; + border: 3px solid transparent; + -webkit-transition: all 0.4s ease-out; + -moz-transition: all 0.4s ease-out; + transition: all 0.4s ease-out; + position: relative; + overflow: hidden; +} +.la-pricing-table .la-col-4:hover { + border-color: #434D58; +} +.la-pricing-table .la-col-4 i.bg-big { + position: absolute; + font-size: 210px; + opacity: .05; + top: 20%; + left: 0; + right: 0; + -webkit-transition: all 0.4s ease-out; + -moz-transition: all 0.4s ease-out; + transition: all 0.4s ease-out; +} +.la-pricing-table .la-col-4:hover i.bg-big { + -webkit-transform: scale(2); + -moz-transform: scale(2); + -o-transform: scale(2); + -ms-transform: scale(2); + transform: scale(2); + opacity: 0; +} +.la-pricing-table .la-col-4 ul { + list-style: none; + padding: 0; + margin: 0; + background: #fff; +} +.la-pricing-table .la-col-4 ul li { + padding: 10px 20px; + display: block; + font-size: 13px; +} +.la-pricing-table .la-col-4 ul li.la-package { + font-size: 24px; + font-weight: 600; + background: #121515; + color: #fff; +} +.la-pricing-table .la-col-4 ul li.la-price { + font-size: 18px; + font-weight: 600; + color: #8E98AD; + background: #434D58; + margin: 0 20px; +} +.la-pricing-table .la-col-4 ul li.la-price i { + font-size: 13px; +} +.la-pricing-table .la-col-4:hover.success { + border-color: #2C7439; +} +.la-pricing-table .la-col-4.success ul { + background: #65BD77; +} +.la-pricing-table .la-col-4.success ul li { + color: #fff; +} +.la-pricing-table .la-col-4.success ul li.la-package { + color: #BCF5C6; + background: #2C7439; +} +.la-pricing-table .la-col-4.success ul li.la-price { + color: #fff; + background: #3E984D; +} +.la-pricing-table .la-col-4:hover.danger { + border-color: #B42424; +} +.la-pricing-table .la-col-4.danger ul { + background: #D73D3D; +} +.la-pricing-table .la-col-4.danger ul li { + color: #fff; +} +.la-pricing-table .la-col-4.danger ul li.la-package { + color: #FFB4B4; + background: #B42424; +} +.la-pricing-table .la-col-4.danger ul li.la-price { + color: #fff; + background: #C42E2E; +} +.la-pricing-table .la-col-4:hover.info { + border-color: #1F6AAA; +} +.la-pricing-table .la-col-4.info ul { + background: #529DDE; +} +.la-pricing-table .la-col-4.info ul li { + color: #fff; +} +.la-pricing-table .la-col-4.info ul li.la-package { + color: #C6E5FF; + background: #1F6AAA; +} +.la-pricing-table .la-col-4.info ul li.la-price { + color: #fff; + background: #2E71AD; +} +.la-pricing-table .la-col-4:hover.warning { + border-color: #F08600; +} +.la-pricing-table .la-col-4.warning ul { + background: #FFCE00; +} +.la-pricing-table .la-col-4.warning ul li { + color: #fff; +} +.la-pricing-table .la-col-4.warning ul li.la-package { + color: #FFF5C9; + background: #F08600; +} +.la-pricing-table .la-col-4.warning ul li.la-price { + color: #fff; + background: #FFAA00; +} +.invoice .widget-content.padding { + padding: 70px 30px; + color: #7A868F; +} +.payment-methods { + font-size: 30px; +} +.company-column { + padding: 15px; + margin-bottom: 20px; +} +.company-column address { + color: #7A868F; +} +.bill-to { + padding: 15px; + margin-bottom: 20px; + margin-top: 20px; + border: 1px dashed #E5E9EC; +} +.btn-default.disabled, +.btn-default[disabled], +fieldset[disabled] .btn-default, +.btn-default.disabled:hover, +.btn-default[disabled]:hover, +fieldset[disabled] .btn-default:hover, +.btn-default.disabled:focus, +.btn-default[disabled]:focus, +fieldset[disabled] .btn-default:focus, +.btn-default.disabled:active, +.btn-default[disabled]:active, +fieldset[disabled] .btn-default:active, +.btn-default.disabled.active, +.btn-default.active[disabled], +fieldset[disabled] .btn-default.active { + background-color: #ABB7B7; + border-color: #ABB7B7; + color: #fff; +} +#calculator { + height: auto; + font: bold 17px "Open Sans", Arial, sans-serif; + padding: 20px; +} +#calculator .col-xs-3, +#calculator .col-xs-9 { + padding: 0px 2%; +} +.calc-top .calc-screen { + height: 47px; + width: 100%; + overflow: hidden; + padding: 0 10px; + background: rgba(0,0,0,0.2); + border-radius: 2px; + box-shadow: inset 0px 4px rgba(0,0,0,0.1); + margin-bottom: 10px; + font-size: 21px; + line-height: 47px; + color: white; + text-shadow: 1px 1px 2px rgba(0,0,0,0.8); + text-align: right; + letter-spacing: 1px; +} +.calc-keys, +.calc-top { + overflow: hidden; +} +.calc-keys span, +.calc-top span.calc-clean { + float: left; + position: relative; + top: 0; + cursor: pointer; + width: 100%; + margin-bottom: 10px; + height: 46px; + background: white; + border-radius: 2px; + color: #666; + line-height: 46px; + text-align: center; + user-select: none; + transition: all 0.2s ease; +} +.calc-keys span.calc-operator { + background: #999; + margin-right: 0; + color: #fff; + font-size: 22px; +} +.calc-keys span.calc-eval { + background: #f1ff92; + color: #888e5f; +} +.calc-top span.calc-clean { + background: #EB5055; + color: white; +} +.calc-keys span:hover { + background: #9c89f6; + color: white; +} +.profile-banner { + width: 100%; + height: 300px; + background-position: center center; + background-size: cover; + position: relative; + background-color: #252932; + border-bottom: 4px solid #fff; + box-shadow: 2px 0px 4px rgba(0,0,0,0.1); +} +.avatar-container { + height: 300px; + text-align: center; +} +.profile-avatar { + width: 200px; + position: relative; + margin: 0px auto; + margin-top: 196px; + border: 4px solid #f3f3f3; +} +.profile-actions { + position: absolute; + bottom: 20px; +} +.user-profile-2 { + margin-top: 50px; +} +.user-profile-sidebar { + margin: 0 0 20px 0; +} +.user-profile-sidebar .user-identity { + margin: 20px 0 0 0; +} +.user-profile-sidebar img { + width: 90px; +} +.account-status-data { + text-align: center; + padding: 10px 0; + border-top: 1px dashed #ddd; + border-bottom: 1px dashed #ddd; + margin: 10px 0 20px 0; +} +.account-status-data h5 { + font-size: 11px; + line-height: 150%; + color: #909090; +} +.user-button { + margin: 15px 0; +} +.user-button .btn { + margin: 5px 0; +} +#social { + padding: 10px; + background: #E5E9EC; + text-align: center; +} +#social a:hover { + text-decoration: none; +} +.fa-circle.facebook { + color: #5471AE; +} +.fa-circle.twitter { + color: #4EC6F6; +} +.fa-circle.gplus { + color: #E24E3E; +} +.fa-circle.tumblr { + color: #4D77A3; +} +.fa-circle.linkedin { + color: #3097CE; +} +.user-profile-content { + margin: 30px 15px; +} +.easyWizardSteps { + list-style: none; + width: 100%; + overflow: hidden; + margin: 0; + padding: 0; + border-bottom: 0px solid rgba(0,0,0,0.1); + margin-bottom: 20px; + background: #7A868F; +} +.easyWizardSteps li { + font-size: 18px; + font-family: "Open Sans"; + display: inline-block; + padding: 10px 20px; + color: #eee; + border-right: 1px solid rgba(0,0,0,0.1); + margin-right: 0px; +} +.easyWizardSteps li:last-child { + border-right: 0px; +} +.easyWizardSteps li span { + font-size: 15px; + padding: 2px 9px; + border-radius: 50%; + margin-top: -5px; + color: #eee; + font-weight: 700; + margin-right: 5px; + border: 2px solid #eee; +} +.easyWizardSteps li.current span { + border: 2px solid #68C39F; + color: #68C39F; +} +.easyWizardSteps li.current { + color: #38464A; + background: #fff; +} +.easyWizardButtons { + overflow: hidden; + padding: 10px; +} +.easyWizardButtons button, +.easyWizardButtons .submit { + cursor: pointer; +} +.easyWizardButtons .prev { + float: left; +} +.easyWizardButtons .next, +.easyWizardButtons .submit { + float: right; +} +.notes { + padding: 15px; + border: 1px dashed #ddd; +} +section.step { + padding: 0 30px; +} +.the-notes { + padding: 15px 15px 15px 30px; + border-left: 4px solid #909090; + margin-bottom: 20px; +} +.the-notes.default { + background: #fff; +} +.the-notes.success { + background: #fff; + border-left-color: #65BD77; +} +.the-notes.warning { + background: #fff; + border-left-color: #F7CB17; +} +.the-notes.danger { + background: #fff; + border-left-color: #D9534F; +} +.the-notes.info { + background: #fff; + border-left-color: #4393D8; +} +.the-notes.success h4 { + color: #65BD77; +} +.the-notes.warning h4 { + color: #F7CB17; +} +.the-notes.danger h4 { + color: #D9534F; +} +.the-notes.inf h4 { + color: #4393D8; +} +.popover { + border-radius: 3px; + box-shadow: none; + opacity: 0.9; + border: none; +} +.popover .arrow { + border-top: none; +} +.popover .popover-title { + background: none repeat scroll 0 0 rgba(0,0,0,0.025); + font-family: "Open Sans"; +} +.popover .popover-content { + padding: 6px 11px; + font-family: Helvetica, Arial; + font-size: 12px; +} +.modal { + direction: rtl; + overflow-y: auto; +} +.modal .modal-dialog { + direction: ltr; +} +.modal-open { + overflow: auto; +} +.mini-stats { + font-size: 12px; + color: #555; +} +#website-statistics1 .widget-footer { + border-top: 1px solid #eee; +} +#website-statistics1 .widget-footer > .col-sm-4 { + padding-top: 25px; + padding-bottom: 20px; + font-size: 13px; +} +.status-data { + font-size: 12px; + font-family: "Open Sans"; + color: rgba(255,255,255,0.5); + padding-left: 30px; +} +.status-data .animate-number { + color: rgba(255,255,255,0.85); + font-size: 14px; + font-weight: 700; +} +.status-data .right-border { + border-right: 1px solid rgba(0,0,0,0.2); +} +#home-chart-2 { + margin-top: 24px; +} +.morris-chart svg { + width: 100% !important; +} +#website-statistic2 h4 { + color: #fff; +} +#website-statistic2 .progress { + background: rgba(0,0,0,0.2); +} +#website-statistic3 { + color: #fff; + padding: 20px; +} +#website-statistic3 h2 { + color: #fff; +} +#website-statistic3 .stock-status { + font-size: 21px; + font-family: "Open Sans"; + line-height: 35px; + display: block; + margin: 10px 0px; +} +.sales-report-data { + padding: 20px; +} +#chat_groups h2 { + color: rgba(0,0,0,0.7); + border-top: 1px solid rgba(0,0,0,0.1); + font-size: 13px; + font-weight: 600; + margin-bottom: 0px; + padding: 0px 15px; +} +#chat_groups li a { + display: block; + padding: 5px 15px; + font-size: 13px; + font-family: "Open Sans"; + color: rgba(0,0,0,0.5); +} +#chat_groups li a i { + margin-right: 5px; + font-size: 12px; +} +#recent_tickets { + display: none; +} +#recent_tickets h2 { + color: rgba(0,0,0,0.7); + border-top: 1px solid rgba(0,0,0,0.1); + font-size: 13px; + font-weight: 400; + margin-bottom: 0px; + padding: 0px 15px; +} +#recent_tickets li a { + display: block; + padding: 5px 15px; + font-size: 13px; + font-family: "Open Sans"; + color: rgba(0,0,0,0.5); +} +#recent_tickets li a i { + margin-right: 5px; +} +#recent_tickets li a span { + display: block; + color: rgba(0,0,0,0.4); + font-size: 12px; +} +#stock-widget .widget-content h4 { + position: absolute; + left: 15px; + top: 40px; +} +#stock-widget #stock-chart svg { + margin-top: -20px; +} +#stock-widget .stock-options { + margin-right: 15px; +} +#notes-app { + background: #fdfdbe; + overflow: hidden; +} +#note-data { + width: 100%; + position: absolute; + left: -100%; + padding-left: 55px; + -webkit-transition: all 300ms ease-in-out; + -moz-transition: all 300ms ease-in-out; + -o-transition: all 300ms ease-in-out; + transition: all 300ms ease-in-out; +} +#notes-app.new-item #notes-list { + left: -100%; + -webkit-transition: all 300ms ease-in-out; + -moz-transition: all 300ms ease-in-out; + -o-transition: all 300ms ease-in-out; + transition: all 300ms ease-in-out; +} +#notes-list { + left: 0%; + padding-left: 60px; + width: 100%; + height: 340px; + overflow: hidden; + padding-top: 7px; + position: absolute; + -webkit-transition: all 300ms ease-in-out; + -moz-transition: all 300ms ease-in-out; + -o-transition: all 300ms ease-in-out; + transition: all 300ms ease-in-out; +} +#notes-list a { + color: #555; +} +#notes-list ul li { + line-height: 31px; +} +#note-text { + min-height: 300px; + height: 100%; + background: none !important; + border: none !important; + line-height: 31px; + resize: none; +} +#notes-app .status-indicator { + position: absolute; + bottom: 15px; + right: 15px; + background: rgba(0,0,0,0.4); + color: #fff; + opacity: 0; + -webkit-transition: all 800ms ease-in-out; + -moz-transition: all 800ms ease-in-out; + -o-transition: all 800ms ease-in-out; + transition: all 800ms ease-in-out; + padding: 1px 6px 2px; +} +#notes-app.saved .status-indicator { + -webkit-transition: all 800ms ease-in-out; + -moz-transition: all 800ms ease-in-out; + -o-transition: all 800ms ease-in-out; + transition: all 800ms ease-in-out; + opacity: 1; +} +#notes-app .widget-content { + background: repeating-linear-gradient(0deg,transparent,transparent 30px,#f3f3f3 30px,#f3f3f3 31px); + height: 342px; + padding-top: 0px; +} +#notes-app .notes-line { + border-left: 3px double rgba(238,150,122,0.55); + position: absolute; + z-index: 0; + display: block; + height: 100%; + left: 50px; +} +#notes-app.new-item #note-data { + left: 0px; + -webkit-transition: all 300ms ease-in-out; + -moz-transition: all 300ms ease-in-out; + -o-transition: all 300ms ease-in-out; + transition: all 300ms ease-in-out; +} +.todo-list { + list-style: none; + padding: 0px; + margin: 0px; +} +.todo-list li { + list-style: none; + padding: 10px; + text-overflow: ellipsis; + width: 100%; + position: relative; + white-space: nowrap; + margin-bottom: 4px; + border-left: 4px solid rgba(0,0,0,0.04); + background: #f8f8f8; +} +.todo-list li.done { + opacity: 0.5; +} +.todo-list li.done .todo-item { + text-decoration: line-through; +} +.todo-list li > span { + line-height: 24px; + height: 25px; + display: inline-block; + text-overflow: ellipsis; + overflow: hidden; + max-width: 70%; + vertical-align: middle; +} +.todo-list .check-icon { + width: 30px; + margin-top: -2px; + display: inline-block; +} +.todo-list .todo-item { + font-size: 12px; + border-bottom: 1px dashed rgba(0,0,0,0) !important; +} +.todo-list .todo-item:hover { + border-bottom: 1px dashed rgba(0,0,0,0.2) !important; +} +.todo-list .todo-options { + font-size: 16px; + display: none; +} +.todo-list .editable-buttons { + display: inline-block; +} +.todo-list .todo-tags { + display: inline; + line-height: auto; + position: absolute; + top: 9px; + right: 9px; + font-family: "Open Sans"; +} +.todo-list .todo-options a { + color: #888; +} +.todo-list li:hover .todo-tags { + display: none; +} +.todo-list li:hover .todo-options { + display: inline; + position: absolute; + top: 9px; + right: 9px; +} +.todo-list li.done .todo-tags { + display: inline !important; +} +.todo-list li.done .todo-options { + display: none !important; +} +.todo-list li .editable-container.editable-inline { + margin-top: -4px; + overflow: visible; +} +.todo-list li.high { + border-left: 4px solid #EB5055; +} +.todo-list li.medium { + border-left: 4px solid #E27A3F; +} +.todo-list li.low { + border-left: 4px solid #FFC052; +} +#contextMenu { + position: absolute; + display: none; + z-index: 1000; +} +#weather-widget { + background: url(../../images/weather/weather-bg.jpg); + background-size: cover; + min-height: 364px; +} +#weather-widget h2 { + color: #fff; +} +#weather h2 { + position: absolute; + top: 60px; + right: 30px; + font-size: 50px; +} +#weather .w-region { + position: absolute; + top: 100px; + left: 20px; + font-size: 30px; + color: rgba(255,255,255,0.9); + font-family: "Open Sans"; +} +#weather .w-currently { + display: block; + font-size: 20px; + color: rgba(255,255,255,0.8); +} +#weather .w-temp2 { + font-size: 24px; + color: rgba(255,255,255,0.8); +} +.bic_calendar { + border: none; + background: none; + font-family: "Open Sans"; +} +.bic_calendar a { + color: #fff; +} +.bic_calendar .table tbody > tr > td { + padding: 2px 0px; + border: none !important; + line-height: 2.429; +} +.bic_calendar td > div { + padding: 4px; +} +.bic_calendar .button-month-next, +.bic_calendar .button-month-previous { + padding: 5px 15px !important; +} +.bic_calendar .days-month td { + background: rgba(0,0,0,0.1); + font-weight: 600; +} +.fc-event { + border: 0px; + padding: 1px 4px; +} +.dataTables_length, +div.dataTables_info { + margin-left: 15px; +} +.dataTables_filter, +.dataTables_paginate { + margin-right: 15px !important; +} +.dataTables_filter input { + margin-left: 6px; +} +.pagination li a, +.pagination li.disabled a { + background-color: #abb7b7; + border-color: #abb7b7; + border-radius: 2px !important; + color: #fff; +} +.pagination li.active a, +.pagination li:hover a, +.pagination > li > a:hover, +.pagination > li > span:hover, +.pagination > li > a:focus, +.pagination > li > span:focus { + background-color: #98a3a3 !important; + border-color: #98a3a3 !important; + color: #fff; +} +.pagination li.disabled a { + color: #ddd; +} +.pagination li.active a { + box-shadow: 0 3px 5px rgba(0,0,0,0.125) inset; +} +.streetview { + height: 300px; +} +.cluster { + color: #FFF; + text-align: center; + font-family: 'Arial,Helvetica'; + font-size: 11px; + font-weight: bold; +} +.cluster-1 { + background-image: url(../img/gmap/m1.png); + line-height: 53px; + width: 53px; + height: 52px; +} +.cluster-2 { + background-image: url(../img/gmap/m2.png); + line-height: 53px; + width: 56px; + height: 55px; +} +.cluster-3 { + background-image: url(../img/gmap/m3.png); + line-height: 66px; + width: 66px; + height: 65px; +} +.modal-content { + -webkit-border-radius: 2px; + border-radius: 2px; +} +.notification-positions { + border: 2px dashed #ddd; + padding: 2px; +} +.notification-positions div, +.notification-positions a { + height: 50px; + margin-bottom: 20px; + display: block; +} +.notification-positions .row:last-child, +.notification-positions .row:last-child div, +.notification-positions .row:last-child div a { + margin-bottom: 0px !important; +} +.jqstooltip { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + -webkit-border-radius: 2px; + border-radius: 2px; + border-color: rgba(0,0,0,0.1) !important; + background: rgba(0,0,0,0.5) !important; +} +.rickshaw_graph .detail .x_label { + color: #333; +} +.echart { + position: relative; + display: inline-block; + vertical-align: middle; +} +.echart canvas { + display: block; +} +.percent { + position: absolute; + display: block; + vertical-align: middle; + width: 100%; + line-height: 0px; + text-align: center; + height: 100%; + left: 0px; + top: 50%; + font-weight: bold; + z-index: 2; + font-family: "Open Sans"; +} +.percent:after { + content: '%'; + color: rgba(255,255,255,0.7); + font-weight: normal; + margin-left: 0.1em; + margin-right: -5px; + font-size: 9px; +} +.jvectormap-zoomin, +.jvectormap-zoomout { + width: 18px; + height: 18px; + background: #68C39F; +} +.jvectormap-zoomin:hover, +.jvectormap-zoomout:hover { + background: #5CAD8D; +} +.jvectormap-zoomin { + top: auto; + bottom: 10px; +} +.jvectormap-zoomout { + top: auto; + left: 30px; + bottom: 10px; +} +.grid-example [class*="col-"] { + background: #fff; + border: 1px solid #f3f3f3; + padding-bottom: 10px; + padding-top: 10px; + text-align: center; + transition: all 0.3s ease 0s; +} +span.i-code { + display: none; +} +.icon-showcase p { + font-size: 14px; + vertical-align: middle; + line-height: 30px; +} +.icon-showcase p i { + font-size: 24px; + line-height: 30px; + text-align: center; + vertical-align: middle; + width: 24px; +} +#icons .the-icons i { + font-size: 24px; + line-height: 30px; + position: relative; + top: auto; + right: auto; +} +#icons .the-icons .i-name { + font-size: 14px; + line-height: 30px; +} +.ios-switch-default .on-background { + background: #ABB7B7; +} +.ios-switch-primary .on-background { + background: #2980B9; +} +.ios-switch-success .on-background { + background: #68C39F; +} +.ios-switch-warning .on-background { + background: #E27A3F; +} +.ios-switch-info .on-background { + background: #7A868F; +} +.ios-switch-danger .on-background { + background: #EB5055; +} +.ios-switch-lg { + height: 45px; + width: 75px; +} +.ios-switch-lg .handle { + height: 41px; + width: 41px; +} +.ios-switch-lg.on .handle { + -o-transform: translate3d(30px,0,0); + -ms-transform: translate3d(30px,0,0); + -moz-transform: translate3d(30px,0,0); + -webkit-transform: translate3d(30px,0,0); + transform: translate3d(30px,0,0); +} +.ios-switch-sm { + height: 25px; + width: 45px; +} +.ios-switch-sm .handle { + height: 21px; + width: 21px; +} +.ios-switch-sm.on .handle { + -o-transform: translate3d(20px,0,0); + -ms-transform: translate3d(20px,0,0); + -moz-transform: translate3d(20px,0,0); + -webkit-transform: translate3d(20px,0,0); + transform: translate3d(20px,0,0); +} +footer { + padding: 20px 0; + font-size: 12px; + border-top: 1px solid #B9C1CB; + margin-top: 40px; + color: #7A868F; +} +footer .footer-links a { + color: #7A868F; + padding: 1px 10px; + border-right: 1px solid rgba(0,0,0,0.1); +} +footer .footer-links a:hover { + color: #4A525F; +} +footer .footer-links a:last-child { + border: none; +} diff --git a/public/admin/Coco/assets/img/apple-touch-icon-114x114.png b/public/admin/Coco/assets/img/apple-touch-icon-114x114.png new file mode 100644 index 000000000..8730cf3ca Binary files /dev/null and b/public/admin/Coco/assets/img/apple-touch-icon-114x114.png differ diff --git a/public/admin/Coco/assets/img/apple-touch-icon-120x120.png b/public/admin/Coco/assets/img/apple-touch-icon-120x120.png new file mode 100644 index 000000000..842e5d630 Binary files /dev/null and b/public/admin/Coco/assets/img/apple-touch-icon-120x120.png differ diff --git a/public/admin/Coco/assets/img/apple-touch-icon-144x144.png b/public/admin/Coco/assets/img/apple-touch-icon-144x144.png new file mode 100644 index 000000000..f3bd3a329 Binary files /dev/null and b/public/admin/Coco/assets/img/apple-touch-icon-144x144.png differ diff --git a/public/admin/Coco/assets/img/apple-touch-icon-152x152.png b/public/admin/Coco/assets/img/apple-touch-icon-152x152.png new file mode 100644 index 000000000..09345fb2b Binary files /dev/null and b/public/admin/Coco/assets/img/apple-touch-icon-152x152.png differ diff --git a/public/admin/Coco/assets/img/apple-touch-icon-57x57.png b/public/admin/Coco/assets/img/apple-touch-icon-57x57.png new file mode 100644 index 000000000..66b0a45e7 Binary files /dev/null and b/public/admin/Coco/assets/img/apple-touch-icon-57x57.png differ diff --git a/public/admin/Coco/assets/img/apple-touch-icon-72x72.png b/public/admin/Coco/assets/img/apple-touch-icon-72x72.png new file mode 100644 index 000000000..da5e7b51c Binary files /dev/null and b/public/admin/Coco/assets/img/apple-touch-icon-72x72.png differ diff --git a/public/admin/Coco/assets/img/apple-touch-icon-76x76.png b/public/admin/Coco/assets/img/apple-touch-icon-76x76.png new file mode 100644 index 000000000..7961a8b58 Binary files /dev/null and b/public/admin/Coco/assets/img/apple-touch-icon-76x76.png differ diff --git a/public/admin/Coco/assets/img/apple-touch-icon.png b/public/admin/Coco/assets/img/apple-touch-icon.png new file mode 100644 index 000000000..66b0a45e7 Binary files /dev/null and b/public/admin/Coco/assets/img/apple-touch-icon.png differ diff --git a/public/admin/Coco/assets/img/favicon.ico b/public/admin/Coco/assets/img/favicon.ico new file mode 100644 index 000000000..182b54de8 Binary files /dev/null and b/public/admin/Coco/assets/img/favicon.ico differ diff --git a/public/admin/Coco/assets/img/gmap/m1.png b/public/admin/Coco/assets/img/gmap/m1.png new file mode 100644 index 000000000..329ff524c Binary files /dev/null and b/public/admin/Coco/assets/img/gmap/m1.png differ diff --git a/public/admin/Coco/assets/img/gmap/m2.png b/public/admin/Coco/assets/img/gmap/m2.png new file mode 100644 index 000000000..b999cbcf6 Binary files /dev/null and b/public/admin/Coco/assets/img/gmap/m2.png differ diff --git a/public/admin/Coco/assets/img/gmap/m3.png b/public/admin/Coco/assets/img/gmap/m3.png new file mode 100644 index 000000000..9f30b3092 Binary files /dev/null and b/public/admin/Coco/assets/img/gmap/m3.png differ diff --git a/public/admin/Coco/assets/img/inv-logo.png b/public/admin/Coco/assets/img/inv-logo.png new file mode 100644 index 000000000..8c08d7fdd Binary files /dev/null and b/public/admin/Coco/assets/img/inv-logo.png differ diff --git a/public/admin/Coco/assets/img/login-logo.png b/public/admin/Coco/assets/img/login-logo.png new file mode 100644 index 000000000..700722146 Binary files /dev/null and b/public/admin/Coco/assets/img/login-logo.png differ diff --git a/public/admin/Coco/assets/img/logo.png b/public/admin/Coco/assets/img/logo.png new file mode 100644 index 000000000..dd8e2667c Binary files /dev/null and b/public/admin/Coco/assets/img/logo.png differ diff --git a/public/admin/Coco/assets/js/apps/calculator.js b/public/admin/Coco/assets/js/apps/calculator.js new file mode 100644 index 000000000..42bd6bba0 --- /dev/null +++ b/public/admin/Coco/assets/js/apps/calculator.js @@ -0,0 +1,85 @@ +// Get all the keys from document +var keys = document.querySelectorAll('#calculator span'); +var operators = ['+', '-', 'x', '÷']; +var decimalAdded = false; + +// Add onclick event to all the keys and perform operations +for(var i = 0; i < keys.length; i++) { + keys[i].onclick = function(e) { + // Get the input and button values + var input = document.querySelector('.calc-screen'); + var inputVal = input.innerHTML; + var btnVal = this.innerHTML; + + // Now, just append the key values (btnValue) to the input string and finally use javascript's eval function to get the result + // If clear key is pressed, erase everything + if(btnVal == 'C') { + input.innerHTML = ''; + decimalAdded = false; + } + + // If eval key is pressed, calculate and display the result + else if(btnVal == '=') { + var equation = inputVal; + var lastChar = equation[equation.length - 1]; + + // Replace all instances of x and ÷ with * and / respectively. This can be done easily using regex and the 'g' tag which will replace all instances of the matched character/substring + equation = equation.replace(/x/g, '*').replace(/÷/g, '/'); + + // Final thing left to do is checking the last character of the equation. If it's an operator or a decimal, remove it + if(operators.indexOf(lastChar) > -1 || lastChar == '.') + equation = equation.replace(/.$/, ''); + + if(equation) + input.innerHTML = eval(equation); + + decimalAdded = false; + } + + // Basic functionality of the calculator is complete. But there are some problems like + // 1. No two operators should be added consecutively. + // 2. The equation shouldn't start from an operator except minus + // 3. not more than 1 decimal should be there in a number + + // We'll fix these issues using some simple checks + + // indexOf works only in IE9+ + else if(operators.indexOf(btnVal) > -1) { + // Operator is clicked + // Get the last character from the equation + var lastChar = inputVal[inputVal.length - 1]; + + // Only add operator if input is not empty and there is no operator at the last + if(inputVal != '' && operators.indexOf(lastChar) == -1) + input.innerHTML += btnVal; + + // Allow minus if the string is empty + else if(inputVal == '' && btnVal == '-') + input.innerHTML += btnVal; + + // Replace the last operator (if exists) with the newly pressed operator + if(operators.indexOf(lastChar) > -1 && inputVal.length > 1) { + // Here, '.' matches any character while $ denotes the end of string, so anything (will be an operator in this case) at the end of string will get replaced by new operator + input.innerHTML = inputVal.replace(/.$/, btnVal); + } + + decimalAdded =false; + } + + // Now only the decimal problem is left. We can solve it easily using a flag 'decimalAdded' which we'll set once the decimal is added and prevent more decimals to be added once it's set. It will be reset when an operator, eval or clear key is pressed. + else if(btnVal == '.') { + if(!decimalAdded) { + input.innerHTML += btnVal; + decimalAdded = true; + } + } + + // if any other key is pressed, just append it + else { + input.innerHTML += btnVal; + } + + // prevent page jumps + e.preventDefault(); + } +} \ No newline at end of file diff --git a/public/admin/Coco/assets/js/apps/notes.js b/public/admin/Coco/assets/js/apps/notes.js new file mode 100644 index 000000000..00f289eeb --- /dev/null +++ b/public/admin/Coco/assets/js/apps/notes.js @@ -0,0 +1,104 @@ +var autosave; +var autosave_time = 5000; // miliseconds + +$(document).ready(function(){ + load_list(); + + $("#notes-list .scroller").slimscroll({ + height: '330px', + size: "5px" + }); + + $(".add-note").click(function(){ + save_note(); + $("#notes-app").addClass("new-item"); + $("#note-text").val(""); + $("#note-text").attr("rel",guidGenerator()); + }); + + $(".back-note-list").click(function(){ + save_note(); + $("#notes-app").removeClass("new-item"); + }); + + $(document).on("click", "#notes-list .note-trunc", function(e){ + e.preventDefault(); + var id = $(this).attr("rel"); + $("#note-text").attr("rel",id); + $("#note-text").val(localStorage.getItem(id)); + $("#notes-app").addClass("new-item"); + }); + + $(document).on("blur change", "#note-text", function(){ + save_note(); + }); + + $(document).on("click", "#notes-list .kill-note", function(e){ + e.preventDefault(); + var id = $(this).attr("rel"); + bootbox.confirm("Are you sure to remove this note?", function(result) { + if(result === true){ + localStorage.removeItem(id); + load_list(); + } + }); + }); + + autosave = window.setInterval(function(){ + if($("#notes-app").hasClass("new-item")){ + save_note(); + } + },autosave_time); +}); + +function save_note(){ + if($("#note-text").val() != ""){ + $("#notes-app").addClass("saved"); + localStorage.setItem($("#note-text").attr("rel"),$("#note-text").val()); + console.log("Note saved!"); + load_list(); + window.setTimeout(function(){ + $("#notes-app").removeClass("saved"); + },1000); + return true; + } + return false; +} + +function load_list(){ + $("#notes-list ul").html(""); + var ids = []; + for (var i = 0; i < localStorage.length; i++) { + var id = localStorage.length-i-1; + if(localStorage.key(id).startsWith("coco-note-")){ + ids.push(id); + } + } + ids = ids.sort(); + for (var x = 0;x < ids.length;x++){ + var note = localStorage.getItem(localStorage.key(ids[x])).truncate(40); + $("#notes-list ul").append("
  • "+note+"
  • "); + } +} + +function guidGenerator() { + var d = new Date().getTime(); + d = 9999999999999-d; + var S4 = function() { + return (((1+Math.random())*0x10000)|0).toString(16).substring(1); + }; + return "coco-note-"+(d+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4()); +} + +if (typeof String.prototype.startsWith != 'function') { + // see below for better implementation! + String.prototype.startsWith = function (str){ + return this.indexOf(str) == 0; + }; +} + +String.prototype.truncate = function(m) { + return (this.length > m) + ? jQuery.trim(this).substring(0, m) + "..." + : this; +}; \ No newline at end of file diff --git a/public/admin/Coco/assets/js/apps/todo.js b/public/admin/Coco/assets/js/apps/todo.js new file mode 100644 index 000000000..cbdf9bcf4 --- /dev/null +++ b/public/admin/Coco/assets/js/apps/todo.js @@ -0,0 +1,80 @@ +$(document).ready(function(){ + $.fn.editable.defaults.mode = 'inline'; + $(".todo-list").sortable({ + cancel: ".done", + axis: "y", + cursor: "move", + forcePlaceholderSize: true + }); + + $(document).on("ifChecked", ".check-icon input", function(){ + var parent = $(this).parents("li:first"); + $(parent).addClass("done"); + $(parent).data("orig-order",$(parent).index()).insertAfter($(".todo-list li:last")); + $('.todo-item',parent).editable("toggleDisabled"); + }); + + $(document).on("ifUnchecked", ".check-icon input", function(){ + var parent = $(this).parents("li:first"); + $(parent).removeClass("done"); + if($(parent).data("orig-order")){ + $(parent).insertAfter($(".todo-list li:eq("+($(parent).data("orig-order")-1)+")")); + } + $('.todo-item',parent).editable("toggleDisabled"); + }); + + $(document).on("click",".add-todo", function(){ + var $item = '
  • '+ + ''+ + 'New item'+ + ''+ + ''+ + ''+ + '
  • '; + $(".todo-list").append($item); + + $('input').iCheck({ + checkboxClass: 'icheckbox_square-aero', + radioClass: 'iradio_square-aero', + increaseArea: '20%' + }); + + $('.todo-list .todo-item').editable({ + type: 'text' + }); + window.setTimeout(function () { + $(".todo-list li").removeClass("animated"); + }, 500); + }); + + $(document).on("click", ".todo-delete", function(){ + var parent = $(this).parents("li:first"); + $(parent).hide(200); + }) + + var $contextMenu = $("#contextMenu"); + var $rowClicked; + + $(document).on("contextmenu", ".todo-list li", function (e) { + $rowClicked = $(this) + $contextMenu.css({ + display: "block", + left: e.pageX, + top: e.pageY + }); + return false; + }); + + $contextMenu.on("click", "a", function () { + $rowClicked.removeAttr("class").addClass($(this).data("priority")); + $contextMenu.hide(); + }); + + $(document).click(function () { + $contextMenu.hide(); + }); + + $('.todo-list .todo-item').editable({ + type: 'text' + }); +}); \ No newline at end of file diff --git a/public/admin/Coco/assets/js/init.js b/public/admin/Coco/assets/js/init.js new file mode 100644 index 000000000..460eb0e03 --- /dev/null +++ b/public/admin/Coco/assets/js/init.js @@ -0,0 +1,408 @@ +var w; +var h; +var dw; +var dh; + +function executeFunctionByName(functionName, context /*, args */) { + var args = [].slice.call(arguments).splice(2); + var namespaces = functionName.split("."); + var func = namespaces.pop(); + for(var i = 0; i < namespaces.length; i++) { + context = context[namespaces[i]]; + } + return context[func].apply(this, args); +} + +var changeptype = function(){ + w = $(window).width(); + h = $(window).height(); + dw = $(document).width(); + dh = $(document).height(); + + if(jQuery.browser.mobile === true){ + $("body").addClass("mobile").removeClass("fixed-left"); + } + + if(!$("#wrapper").hasClass("forced")){ + if(w > 990){ + $("body").removeClass("smallscreen").addClass("widescreen"); + $("#wrapper").removeClass("enlarged"); + }else{ + $("body").removeClass("widescreen").addClass("smallscreen"); + $("#wrapper").addClass("enlarged"); + $(".left ul").removeAttr("style"); + } + if($("#wrapper").hasClass("enlarged") && $("body").hasClass("fixed-left")){ + $("body").removeClass("fixed-left").addClass("fixed-left-void"); + }else if(!$("#wrapper").hasClass("enlarged") && $("body").hasClass("fixed-left-void")){ + $("body").removeClass("fixed-left-void").addClass("fixed-left"); + } + + } + toggle_slimscroll(".slimscrollleft"); +} + +$(document).ready(function(){ + FastClick.attach(document.body); + resizefunc.push("initscrolls"); + resizefunc.push("changeptype"); + $('.sparkline').sparkline('html', { enableTagOptions: true }); + + $('.animate-number').each(function(){ + $(this).animateNumbers($(this).attr("data-value"), true, parseInt($(this).attr("data-duration"))); + }) + +//TOOLTIP +$('body').tooltip({ + selector: "[data-toggle=tooltip]", + container: "body" +}); + +//RESPONSIVE SIDEBAR + + +$(".open-right").click(function(e){ + $("#wrapper").toggleClass("open-right-sidebar"); + e.stopPropagation(); + $("body").trigger("resize"); +}); + + +$(".open-left").click(function(e){ + e.stopPropagation(); + $("#wrapper").toggleClass("enlarged"); + $("#wrapper").addClass("forced"); + + if($("#wrapper").hasClass("enlarged") && $("body").hasClass("fixed-left")){ + $("body").removeClass("fixed-left").addClass("fixed-left-void"); + }else if(!$("#wrapper").hasClass("enlarged") && $("body").hasClass("fixed-left-void")){ + $("body").removeClass("fixed-left-void").addClass("fixed-left"); + } + if($("#wrapper").hasClass("enlarged")){ + $(".left ul").removeAttr("style"); + }else{ + $(".subdrop").siblings("ul:first").show(); + } + toggle_slimscroll(".slimscrollleft"); + $("body").trigger("resize"); +}); + +// LEFT SIDE MAIN NAVIGATION +$("#sidebar-menu a").on('click',function(e){ + if(!$("#wrapper").hasClass("enlarged")){ + + if($(this).parent().hasClass("has_sub")) { + e.preventDefault(); + } + + if(!$(this).hasClass("subdrop")) { + // hide any open menus and remove all other classes + $("ul",$(this).parents("ul:first")).slideUp(350); + $("a",$(this).parents("ul:first")).removeClass("subdrop"); + $("#sidebar-menu .pull-right i").removeClass("fa-angle-up").addClass("fa-angle-down"); + + // open our new menu and add the open class + $(this).next("ul").slideDown(350); + $(this).addClass("subdrop"); + $(".pull-right i",$(this).parents(".has_sub:last")).removeClass("fa-angle-down").addClass("fa-angle-up"); + $(".pull-right i",$(this).siblings("ul")).removeClass("fa-angle-up").addClass("fa-angle-down"); + }else if($(this).hasClass("subdrop")) { + $(this).removeClass("subdrop"); + $(this).next("ul").slideUp(350); + $(".pull-right i",$(this).parent()).removeClass("fa-angle-up").addClass("fa-angle-down"); + //$(".pull-right i",$(this).parents("ul:eq(1)")).removeClass("fa-chevron-down").addClass("fa-chevron-left"); + } + } +}); + +// NAVIGATION HIGHLIGHT & OPEN PARENT +$("#sidebar-menu ul li.has_sub a.active").parents("li:last").children("a:first").addClass("active").trigger("click"); + +//WIDGET ACTIONS +$(".widget-header .widget-close").on("click",function(event){ + event.preventDefault(); + $item = $(this).parents(".widget:first"); + bootbox.confirm("Are you sure to remove this widget?", function(result) { + if(result === true){ + $item.addClass("animated bounceOutUp"); + window.setTimeout(function () { + if($item.data("is-app")){ + + $item.removeClass("animated bounceOutUp"); + if($item.hasClass("ui-draggable")){ + $item.find(".widget-popout").click(); + } + $item.hide(); + $("a[data-app='"+$item.attr("id")+"']").addClass("clickable"); + }else{ + $item.remove(); + } + }, 300); + } + }); +}); + +$(document).on("click", ".widget-header .widget-toggle", function(event){ + event.preventDefault(); + $(this).toggleClass("closed").parents(".widget:first").find(".widget-content").slideToggle(); +}); + +$(document).on("click", ".widget-header .widget-popout", function(event){ + event.preventDefault(); + var widget = $(this).parents(".widget:first"); + if(widget.hasClass("modal-widget")){ + $("i",this).removeClass("icon-window").addClass("icon-publish"); + widget.removeAttr("style").removeClass("modal-widget"); + widget.find(".widget-maximize,.widget-toggle").removeClass("nevershow"); + widget.draggable("destroy").resizable("destroy"); + }else{ + widget.removeClass("maximized"); + widget.find(".widget-maximize,.widget-toggle").addClass("nevershow"); + $("i",this).removeClass("icon-publish").addClass("icon-window"); + var w = widget.width(); + var h = widget.height(); + widget.addClass("modal-widget").removeAttr("style").width(w).height(h); + $(widget).draggable({ handle: ".widget-header",containment: ".content-page" }).css({"left":widget.position().left-2,"top":widget.position().top-2}).resizable({minHeight: 150,minWidth: 200}); + } + window.setTimeout(function () { + $("body").trigger("resize"); + },300); +}); + +$("a[data-app]").each(function(e){ + var app = $(this).data("app"); + var status = $(this).data("status"); + $("#"+app).data("is-app",true); + if(status == "inactive"){ + $("#"+app).hide(); + $(this).addClass("clickable"); + } +}); + +$(document).on("click", "a[data-app].clickable", function(event){ + event.preventDefault(); + $(this).removeClass("clickable"); + var app = $(this).data("app"); + $("#"+app).show(); + $("#"+app+" .widget-popout").click(); + topd = $("#"+app).offset().top - $(window).scrollTop(); + $("#"+app).css({"left":"10","top":-(topd-60)+"px"}).addClass("fadeInDown animated"); + window.setTimeout(function () { + $("#"+app).removeClass("fadeInDown animated"); + }, 300); +}); + +$(document).on("click", ".widget", function(){ + if($(this).hasClass("modal-widget")){ + $(".modal-widget").css("z-index",5); + $(this).css("z-index",6); + } +}); + +$(document).on("click", '.widget .reload', function (event) { + event.preventDefault(); + var el = $(this).parents(".widget:first"); + blockUI(el); + window.setTimeout(function () { + unblockUI(el); + }, 1000); +}); + +$(document).on("click", ".widget-header .widget-maximize", function(event){ + event.preventDefault(); + $(this).parents(".widget:first").removeAttr("style").toggleClass("maximized"); + $("i",this).toggleClass("icon-resize-full-1").toggleClass("icon-resize-small-1"); + $(this).parents(".widget:first").find(".widget-toggle").toggleClass("nevershow"); + $("body").trigger("resize"); + return false; +}); + +$( ".portlets" ).sortable({ + connectWith: ".portlets", + handle: ".widget-header", + cancel: ".modal-widget", + opacity: 0.5, + dropOnEmpty: true, + forcePlaceholderSize: true, + receive: function(event, ui) {$("body").trigger("resize")} +}); + +// Init Code Highlighter +prettyPrint(); + +//RUN RESIZE ITEMS +$(window).resize(debounce(resizeitems,100)); +$("body").trigger("resize"); + +//SELECT +$('.selectpicker').selectpicker(); + + +//FILE INPUT +$('input[type=file]').bootstrapFileInput(); + + +//DATE PICKER +$('.datepicker-input').datepicker(); + + +//ICHECK +$('input:not(.ios-switch)').iCheck({ + checkboxClass: 'icheckbox_square-aero', + radioClass: 'iradio_square-aero', + increaseArea: '20%' // optional +}); + +// IOS7 SWITCH +$(".ios-switch").each(function(){ + mySwitch = new Switch(this); +}); + +//GALLERY +$('.gallery-wrap').each(function() { // the containers for all your galleries + $(this).magnificPopup({ + delegate: 'a.zooming', // the selector for gallery item + type: 'image', + removalDelay: 300, + mainClass: 'mfp-fade', + gallery: { + enabled:true + } + }); +}); + + + +}); + +var debounce = function(func, wait, immediate) { + var timeout, result; + return function() { + var context = this, args = arguments; + var later = function() { + timeout = null; + if (!immediate) result = func.apply(context, args); + }; + var callNow = immediate && !timeout; + clearTimeout(timeout); + timeout = setTimeout(later, wait); + if (callNow) result = func.apply(context, args); + return result; + }; +} + +function resizeitems(){ + if($.isArray(resizefunc)){ + for (i = 0; i < resizefunc.length; i++) { + window[resizefunc[i]](); + } + } +} + +function initscrolls(){ + if(jQuery.browser.mobile !== true){ + //SLIM SCROLL + $('.slimscroller').slimscroll({ + height: 'auto', + size: "5px" + }); + + $('.slimscrollleft').slimScroll({ + height: 'auto', + position: 'left', + size: "5px", + color: '#7A868F' + }); + } +} +function toggle_slimscroll(item){ + if($("#wrapper").hasClass("enlarged")){ + $(item).css("overflow","inherit").parent().css("overflow","inherit"); + $(item). siblings(".slimScrollBar").css("visibility","hidden"); + }else{ + $(item).css("overflow","hidden").parent().css("overflow","hidden"); + $(item). siblings(".slimScrollBar").css("visibility","visible"); + } +} + +function nifty_modal_alert(effect,header,text){ + + var randLetter = String.fromCharCode(65 + Math.floor(Math.random() * 26)); + var uniqid = randLetter + Date.now(); + + $modal = '
    '; + $modal += '
    '; + $modal += '

    '+header+'

    '; + $modal += '
    '+text; + $modal += '
    '; + $modal += '
    '; + $modal += '
    '; + + $("body").prepend($modal); + + window.setTimeout(function () { + $("#"+uniqid).addClass("md-show"); + $(".md-overlay,.md-close").click(function(){ + $("#"+uniqid).removeClass("md-show"); + window.setTimeout(function () {$("#"+uniqid).remove();},500); + }); + },100); + + return false; +} + +function blockUI(item) { + $(item).block({ + message: '
    ', + css: { + border: 'none', + width: '14px', + backgroundColor: 'none' + }, + overlayCSS: { + backgroundColor: '#fff', + opacity: 0.4, + cursor: 'wait' + } + }); +} + +function unblockUI(item) { + $(item).unblock(); +} + +function toggle_fullscreen(){ + var fullscreenEnabled = document.fullscreenEnabled || document.mozFullScreenEnabled || document.webkitFullscreenEnabled; + if(fullscreenEnabled){ + if(!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement) { + launchIntoFullscreen(document.documentElement); + }else{ + exitFullscreen(); + } + } +} + + +// Thanks to http://davidwalsh.name/fullscreen + +function launchIntoFullscreen(element) { + if(element.requestFullscreen) { + element.requestFullscreen(); + } else if(element.mozRequestFullScreen) { + element.mozRequestFullScreen(); + } else if(element.webkitRequestFullscreen) { + element.webkitRequestFullscreen(); + } else if(element.msRequestFullscreen) { + element.msRequestFullscreen(); + } +} + +function exitFullscreen() { + if(document.exitFullscreen) { + document.exitFullscreen(); + } else if(document.mozCancelFullScreen) { + document.mozCancelFullScreen(); + } else if(document.webkitExitFullscreen) { + document.webkitExitFullscreen(); + } +} \ No newline at end of file diff --git a/public/admin/Coco/assets/js/pages/advanced-forms.js b/public/admin/Coco/assets/js/pages/advanced-forms.js new file mode 100644 index 000000000..e32ee550c --- /dev/null +++ b/public/admin/Coco/assets/js/pages/advanced-forms.js @@ -0,0 +1,173 @@ +$(function(){ + + $('#ckeditor').ckeditor({skin : 'bootstrapck'}); + + $.fn.editable.defaults.mode = 'inline'; + //defaults + $.fn.editable.defaults.url = '/post'; + + //enable / disable + $('#enable').click(function() { + $('#user .editable').editable('toggleDisabled'); + }); + + + + //editables + $('#username').editable({ + url: '/post', + type: 'text', + pk: 1, + name: 'username', + title: 'Enter username' + }); + + $('#firstname').editable({ + validate: function(value) { + if($.trim(value) == '') return 'This field is required'; + } + }); + + $('#sex').editable({ + prepend: "not selected", + source: [ + {value: 1, text: 'Male'}, + {value: 2, text: 'Female'} + ], + display: function(value, sourceData) { + var colors = {"": "gray", 1: "green", 2: "blue"}, + elem = $.grep(sourceData, function(o){return o.value == value;}); + + if(elem.length) { + $(this).text(elem[0].text).css("color", colors[value]); + } else { + $(this).empty(); + } + } + }); + + $('#status').editable(); + + $('#group').editable({ + showbuttons: false + }); + + $('#vacation').editable({ + datepicker: { + todayBtn: 'linked' + } + }); + + $('#dob').editable(); + + $('#event').editable({ + placement: 'right', + combodate: { + firstItem: 'name' + } + }); + + $('#meeting_start').editable({ + format: 'yyyy-mm-dd hh:ii', + viewformat: 'dd/mm/yyyy hh:ii', + validate: function(v) { + if(v && v.getDate() == 10) return 'Day cant be 10!'; + }, + datetimepicker: { + todayBtn: 'linked', + weekStart: 1 + } + }); + + $('#comments').editable({ + showbuttons: 'bottom' + }); + + $('#note').editable(); + $('#pencil').click(function(e) { + e.stopPropagation(); + e.preventDefault(); + $('#note').editable('toggle'); + }); + + $('#state').editable({ + source: ["Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Dakota","North Carolina","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming"] + }); + + $('#state2').editable({ + value: 'California', + typeahead: { + name: 'state', + local: ["Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Dakota","North Carolina","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming"] + } + }); + + $('#fruits').editable({ + pk: 1, + limit: 3, + source: [ + {value: 1, text: 'banana'}, + {value: 2, text: 'peach'}, + {value: 3, text: 'apple'}, + {value: 4, text: 'watermelon'}, + {value: 5, text: 'orange'} + ] + }); + + $('#tags').editable({ + inputclass: 'input-large', + select2: { + tags: ['html', 'javascript', 'css', 'ajax'], + tokenSeparators: [",", " "] + } + }); + + var countries = []; + $.each({"BD": "Bangladesh", "BE": "Belgium", "BF": "Burkina Faso", "BG": "Bulgaria", "BA": "Bosnia and Herzegovina", "BB": "Barbados", "WF": "Wallis and Futuna", "BL": "Saint Bartelemey", "BM": "Bermuda", "BN": "Brunei Darussalam", "BO": "Bolivia", "BH": "Bahrain", "BI": "Burundi", "BJ": "Benin", "BT": "Bhutan", "JM": "Jamaica", "BV": "Bouvet Island", "BW": "Botswana", "WS": "Samoa", "BR": "Brazil", "BS": "Bahamas", "JE": "Jersey", "BY": "Belarus", "O1": "Other Country", "LV": "Latvia", "RW": "Rwanda", "RS": "Serbia", "TL": "Timor-Leste", "RE": "Reunion", "LU": "Luxembourg", "TJ": "Tajikistan", "RO": "Romania", "PG": "Papua New Guinea", "GW": "Guinea-Bissau", "GU": "Guam", "GT": "Guatemala", "GS": "South Georgia and the South Sandwich Islands", "GR": "Greece", "GQ": "Equatorial Guinea", "GP": "Guadeloupe", "JP": "Japan", "GY": "Guyana", "GG": "Guernsey", "GF": "French Guiana", "GE": "Georgia", "GD": "Grenada", "GB": "United Kingdom", "GA": "Gabon", "SV": "El Salvador", "GN": "Guinea", "GM": "Gambia", "GL": "Greenland", "GI": "Gibraltar", "GH": "Ghana", "OM": "Oman", "TN": "Tunisia", "JO": "Jordan", "HR": "Croatia", "HT": "Haiti", "HU": "Hungary", "HK": "Hong Kong", "HN": "Honduras", "HM": "Heard Island and McDonald Islands", "VE": "Venezuela", "PR": "Puerto Rico", "PS": "Palestinian Territory", "PW": "Palau", "PT": "Portugal", "SJ": "Svalbard and Jan Mayen", "PY": "Paraguay", "IQ": "Iraq", "PA": "Panama", "PF": "French Polynesia", "BZ": "Belize", "PE": "Peru", "PK": "Pakistan", "PH": "Philippines", "PN": "Pitcairn", "TM": "Turkmenistan", "PL": "Poland", "PM": "Saint Pierre and Miquelon", "ZM": "Zambia", "EH": "Western Sahara", "RU": "Russian Federation", "EE": "Estonia", "EG": "Egypt", "TK": "Tokelau", "ZA": "South Africa", "EC": "Ecuador", "IT": "Italy", "VN": "Vietnam", "SB": "Solomon Islands", "EU": "Europe", "ET": "Ethiopia", "SO": "Somalia", "ZW": "Zimbabwe", "SA": "Saudi Arabia", "ES": "Spain", "ER": "Eritrea", "ME": "Montenegro", "MD": "Moldova, Republic of", "MG": "Madagascar", "MF": "Saint Martin", "MA": "Morocco", "MC": "Monaco", "UZ": "Uzbekistan", "MM": "Myanmar", "ML": "Mali", "MO": "Macao", "MN": "Mongolia", "MH": "Marshall Islands", "MK": "Macedonia", "MU": "Mauritius", "MT": "Malta", "MW": "Malawi", "MV": "Maldives", "MQ": "Martinique", "MP": "Northern Mariana Islands", "MS": "Montserrat", "MR": "Mauritania", "IM": "Isle of Man", "UG": "Uganda", "TZ": "Tanzania, United Republic of", "MY": "Malaysia", "MX": "Mexico", "IL": "Israel", "FR": "France", "IO": "British Indian Ocean Territory", "FX": "France, Metropolitan", "SH": "Saint Helena", "FI": "Finland", "FJ": "Fiji", "FK": "Falkland Islands (Malvinas)", "FM": "Micronesia, Federated States of", "FO": "Faroe Islands", "NI": "Nicaragua", "NL": "Netherlands", "NO": "Norway", "NA": "Namibia", "VU": "Vanuatu", "NC": "New Caledonia", "NE": "Niger", "NF": "Norfolk Island", "NG": "Nigeria", "NZ": "New Zealand", "NP": "Nepal", "NR": "Nauru", "NU": "Niue", "CK": "Cook Islands", "CI": "Cote d'Ivoire", "CH": "Switzerland", "CO": "Colombia", "CN": "China", "CM": "Cameroon", "CL": "Chile", "CC": "Cocos (Keeling) Islands", "CA": "Canada", "CG": "Congo", "CF": "Central African Republic", "CD": "Congo, The Democratic Republic of the", "CZ": "Czech Republic", "CY": "Cyprus", "CX": "Christmas Island", "CR": "Costa Rica", "CV": "Cape Verde", "CU": "Cuba", "SZ": "Swaziland", "SY": "Syrian Arab Republic", "KG": "Kyrgyzstan", "KE": "Kenya", "SR": "Suriname", "KI": "Kiribati", "KH": "Cambodia", "KN": "Saint Kitts and Nevis", "KM": "Comoros", "ST": "Sao Tome and Principe", "SK": "Slovakia", "KR": "Korea, Republic of", "SI": "Slovenia", "KP": "Korea, Democratic People's Republic of", "KW": "Kuwait", "SN": "Senegal", "SM": "San Marino", "SL": "Sierra Leone", "SC": "Seychelles", "KZ": "Kazakhstan", "KY": "Cayman Islands", "SG": "Singapore", "SE": "Sweden", "SD": "Sudan", "DO": "Dominican Republic", "DM": "Dominica", "DJ": "Djibouti", "DK": "Denmark", "VG": "Virgin Islands, British", "DE": "Germany", "YE": "Yemen", "DZ": "Algeria", "US": "United States", "UY": "Uruguay", "YT": "Mayotte", "UM": "United States Minor Outlying Islands", "LB": "Lebanon", "LC": "Saint Lucia", "LA": "Lao People's Democratic Republic", "TV": "Tuvalu", "TW": "Taiwan", "TT": "Trinidad and Tobago", "TR": "Turkey", "LK": "Sri Lanka", "LI": "Liechtenstein", "A1": "Anonymous Proxy", "TO": "Tonga", "LT": "Lithuania", "A2": "Satellite Provider", "LR": "Liberia", "LS": "Lesotho", "TH": "Thailand", "TF": "French Southern Territories", "TG": "Togo", "TD": "Chad", "TC": "Turks and Caicos Islands", "LY": "Libyan Arab Jamahiriya", "VA": "Holy See (Vatican City State)", "VC": "Saint Vincent and the Grenadines", "AE": "United Arab Emirates", "AD": "Andorra", "AG": "Antigua and Barbuda", "AF": "Afghanistan", "AI": "Anguilla", "VI": "Virgin Islands, U.S.", "IS": "Iceland", "IR": "Iran, Islamic Republic of", "AM": "Armenia", "AL": "Albania", "AO": "Angola", "AN": "Netherlands Antilles", "AQ": "Antarctica", "AP": "Asia/Pacific Region", "AS": "American Samoa", "AR": "Argentina", "AU": "Australia", "AT": "Austria", "AW": "Aruba", "IN": "India", "AX": "Aland Islands", "AZ": "Azerbaijan", "IE": "Ireland", "ID": "Indonesia", "UA": "Ukraine", "QA": "Qatar", "MZ": "Mozambique"}, function(k, v) { + countries.push({id: k, text: v}); + }); + $('#country').editable({ + source: countries, + select2: { + width: 200, + placeholder: 'Select country', + allowClear: true + } + }); + + + + $('#address').editable({ + url: '/post', + value: { + city: "Moscow", + street: "Lenina", + building: "12" + }, + validate: function(value) { + if(value.city == '') return 'city is required!'; + }, + display: function(value) { + if(!value) { + $(this).empty(); + return; + } + var html = '' + $('
    ').text(value.city).html() + ', ' + $('
    ').text(value.street).html() + ' st., bld. ' + $('
    ').text(value.building).html(); + $(this).html(html); + } + }); + + $('#user .editable').on('hidden', function(e, reason){ + if(reason === 'save' || reason === 'nochange') { + var $next = $(this).closest('tr').next().find('.editable'); + if($('#autoopen').is(':checked')) { + setTimeout(function() { + $next.editable('show'); + }, 300); + } else { + $next.focus(); + } + } + }); + +}); \ No newline at end of file diff --git a/public/admin/Coco/assets/js/pages/calendar.js b/public/admin/Coco/assets/js/pages/calendar.js new file mode 100644 index 000000000..4c11c17a1 --- /dev/null +++ b/public/admin/Coco/assets/js/pages/calendar.js @@ -0,0 +1,126 @@ +$(function () { + + function runCalendar() { + var $modal = $('#event-modal'); + $('#draggable-events div.draggable-event').each(function () { + // create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/) + // it doesn't need to have a start or end + var eventObject = { + title: $.trim($(this).text()) // use the element's text as the event title + }; + // store the Event Object in the DOM element so we can get to it later + $(this).data('eventObject', eventObject); + // make the event draggable using jQuery UI + $(this).draggable({ + zIndex: 999, + revert: true, // will cause the event to go back to its + revertDuration: 20 // original position after the drag + }); + }); + /* Initialize the calendar */ + var date = new Date(); + var d = date.getDate(); + var m = date.getMonth(); + var y = date.getFullYear(); + var form = ''; + var calendar = $('#calendar').fullCalendar({ + slotDuration: '00:15:00', /* If we want to split day time each 15minutes */ + minTime: '08:00:00', + maxTime: '19:00:00', + header: { + left: 'prev,next today', + center: 'title', + right: 'month,agendaWeek,agendaDay' + }, + events: [{ + title: 'Take your pills!', + start: new Date(y, m, 2), + className: 'bg-darkblue-2' + }, { + title: 'Visit Doctor', + start: '2014-05-15 14:00:00', + start: '2014-05-15 15:00:00', + className: 'bg-red-1' + }], + editable: true, + droppable: true, // this allows things to be dropped onto the calendar !!! + drop: function (date, allDay) { // this function is called when something is dropped + // retrieve the dropped element's stored Event Object + var originalEventObject = $(this).data('eventObject'); + var $categoryClass = $(this).attr('data-class'); + // we need to copy it, so that multiple events don't have a reference to the same object + var copiedEventObject = $.extend({}, originalEventObject); + // assign it the date that was reported + copiedEventObject.start = date; + copiedEventObject.allDay = allDay; + if ($categoryClass) + copiedEventObject['className'] = [$categoryClass]; + // render the event on the calendar + // the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/) + $('#calendar').fullCalendar('renderEvent', copiedEventObject, true); + // is the "remove after drop" checkbox checked? + if ($('#drop-remove').is(':checked')) { + // if so, remove the element from the "Draggable Events" list + $(this).remove(); + } + }, + + selectable: true, + eventClick: function (calEvent, jsEvent, view) { + var form = $("
    "); + form.append(""); + form.append("
    "); + $modal.modal({ + backdrop: 'static' + }); + $modal.find('.delete-event').show().end().find('.save-event').hide().end().find('.modal-body').empty().prepend(form).end().find('.delete-event').unbind('click').click(function () { + calendar.fullCalendar('removeEvents', function (ev) { + return (ev._id == calEvent._id); + }); + $modal.modal('hide'); + }); + $modal.find('form').on('submit', function () { + calEvent.title = form.find("input[type=text]").val(); + calendar.fullCalendar('updateEvent', calEvent); + $modal.modal('hide'); + return false; + }); + }, + select: function (start, end, allDay) { + $modal.modal({ + backdrop: 'static' + }); + form = $("
    "); + form.append("
    "); + form.find(".row").append("
    ").append("
    ").find("select[name='category']").append("") + .append("").append("").append("").append("").append(""); + $modal.find('.delete-event').hide().end().find('.save-event').show().end().find('.modal-body').empty().prepend(form).end().find('.save-event').unbind('click').click(function () { + form.submit(); + }); + $modal.find('form').on('submit', function () { + title = form.find("input[name='title']").val(); + $categoryClass = form.find("select[name='category'] option:checked").val(); + if (title !== null && title.length != 0) { + calendar.fullCalendar('renderEvent', { + title: title, + start: start, + end: end, + allDay: false, + className: $categoryClass + }, true); + } + else{ + alert('You need a title for the event!'); + } + $modal.modal('hide'); + return false; + }); + calendar.fullCalendar('unselect'); + } + + }); + } + + runCalendar(); + +}); \ No newline at end of file diff --git a/public/admin/Coco/assets/js/pages/datatables.js b/public/admin/Coco/assets/js/pages/datatables.js new file mode 100644 index 000000000..36f7eea45 --- /dev/null +++ b/public/admin/Coco/assets/js/pages/datatables.js @@ -0,0 +1,60 @@ +$(function(){ + $("#datatables-1").dataTable(); + + var table = $('#datatables-2').DataTable(); + + $("#datatables-2 tfoot th").each( function ( i ) { + var select = $('') + .appendTo( $(this).empty() ) + .on( 'change', function () { + table.column( i ) + .search( '^'+$(this).val()+'$', true, false ) + .draw(); + } ); + + table.column( i ).data().unique().sort().each( function ( d, j ) { + select.append( '' ) + } ); + } ); + + $('#datatables-3').dataTable( { + "footerCallback": function ( row, data, start, end, display ) { + var api = this.api(), data; + + // Remove the formatting to get integer data for summation + var intVal = function ( i ) { + return typeof i === 'string' ? + i.replace(/[\$,]/g, '')*1 : + typeof i === 'number' ? + i : 0; + }; + + // Total over all pages + data = api.column( 4 ).data(); + total = data.length ? + data.reduce( function (a, b) { + return intVal(a) + intVal(b); + } ) : + 0; + + // Total over this page + data = api.column( 4, { page: 'current'} ).data(); + pageTotal = data.length ? + data.reduce( function (a, b) { + return intVal(a) + intVal(b); + } ) : + 0; + + // Update footer + $( api.column( 4 ).footer() ).html( + '$'+pageTotal +' ( $'+ total +' total)' + ); + } + } ); + $('#datatables-4').DataTable( { + dom: 'T<"clear">lfrtip', + tableTools: { + "sSwfPath": "./assets/libs/jquery-datatables/extensions/TableTools/swf/copy_csv_xls_pdf.swf" + } + } ); +}) \ No newline at end of file diff --git a/public/admin/Coco/assets/js/pages/form-validation.js b/public/admin/Coco/assets/js/pages/form-validation.js new file mode 100644 index 000000000..b75184b9a --- /dev/null +++ b/public/admin/Coco/assets/js/pages/form-validation.js @@ -0,0 +1,290 @@ +$(document).ready(function() { + // Generate a simple captcha + function randomNumber(min, max) { + return Math.floor(Math.random() * (max - min + 1) + min); + }; + $('#captchaOperation').html([randomNumber(1, 20), '+', randomNumber(1, 30), '='].join(' ')); + + + //EXAMPLE REGISTER FORM + $('#registerForm').bootstrapValidator({ + message: 'This value is not valid', + fields: { + username: { + message: 'The username is not valid', + validators: { + notEmpty: { + message: 'The username is required and can\'t be empty' + }, + stringLength: { + min: 6, + max: 30, + message: 'The username must be more than 6 and less than 30 characters long' + }, + regexp: { + regexp: /^[a-zA-Z0-9_\.]+$/, + message: 'The username can only consist of alphabetical, number, dot and underscore' + }, + different: { + field: 'password', + message: 'The username and password can\'t be the same as each other' + } + } + }, + email: { + validators: { + notEmpty: { + message: 'The email address is required and can\'t be empty' + }, + emailAddress: { + message: 'The input is not a valid email address' + } + } + }, + password: { + validators: { + notEmpty: { + message: 'The password is required and can\'t be empty' + }, + identical: { + field: 'confirmPassword', + message: 'The password and its confirm are not the same' + }, + different: { + field: 'username', + message: 'The password can\'t be the same as username' + } + } + }, + confirmPassword: { + validators: { + notEmpty: { + message: 'The confirm password is required and can\'t be empty' + }, + identical: { + field: 'password', + message: 'The password and its confirm are not the same' + }, + different: { + field: 'username', + message: 'The password can\'t be the same as username' + } + } + }, + phoneNumber: { + validators: { + digits: { + message: 'The value can contain only digits' + } + } + }, + acceptTerms: { + validators: { + notEmpty: { + message: 'You have to accept the terms and policies' + } + } + }, + captcha: { + validators: { + callback: { + message: 'Wrong answer', + callback: function(value, validator) { + var items = $('#captchaOperation').html().split(' '), sum = parseInt(items[0]) + parseInt(items[2]); + return value == sum; + } + } + } + } + } + }); + + + //EXAMPLE CONTACT FORM + $('#contactForm').bootstrapValidator({ + message: 'This value is not valid', + fields: { + name: { + message: 'Name is not valid', + validators: { + notEmpty: { + message: 'Name is required and can\'t be empty' + }, + regexp: { + regexp: /^[a-zA-Z0-9_\.]+$/, + message: 'Name can only consist of alphabetical, number, dot and underscore' + } + } + }, + email: { + validators: { + notEmpty: { + message: 'The email address is required and can\'t be empty' + }, + emailAddress: { + message: 'The input is not a valid email address' + } + } + }, + website: { + validators: { + uri: { + message: 'The input is not a valid URL' + } + } + }, + Contactmessage: { + validators: { + notEmpty: { + message: 'Message is required and can\'t be empty' + }, + stringLength: { + min: 6, + message: 'Message must be more than 6 characters long' + } + } + }, + captcha: { + validators: { + callback: { + message: 'Wrong answer', + callback: function(value, validator) { + var items = $('#captchaOperation').html().split(' '), sum = parseInt(items[0]) + parseInt(items[2]); + return value == sum; + } + } + } + } + } + }); + + + //Regular expression based validators + $('#ExpressionValidator').bootstrapValidator({ + message: 'This value is not valid', + fields: { + email: { + validators: { + notEmpty: { + message: 'The email address is required and can\'t be empty' + }, + emailAddress: { + message: 'The input is not a valid email address' + } + } + }, + website: { + validators: { + uri: { + message: 'The input is not a valid URL' + } + } + }, + phoneNumber: { + validators: { + digits: { + message: 'The value can contain only digits' + } + } + }, + color: { + validators: { + hexColor: { + message: 'The input is not a valid hex color' + } + } + }, + zipCode: { + validators: { + usZipCode: { + message: 'The input is not a valid US zip code' + } + } + } + } + }); + + + //Regular expression based validators + $('#NotEmptyValidator').bootstrapValidator({ + message: 'This value is not valid', + fields: { + username: { + message: 'The username is not valid', + validators: { + notEmpty: { + message: 'The username is required and can\'t be empty' + }, + stringLength: { + min: 6, + max: 30, + message: 'The username must be more than 6 and less than 30 characters long' + }, + regexp: { + regexp: /^[a-zA-Z0-9_\.]+$/, + message: 'The username can only consist of alphabetical, number, dot and underscore' + } + } + }, + country: { + validators: { + notEmpty: { + message: 'The country is required and can\'t be empty' + } + } + } + } + }); + + + //Regular expression based validators + $('#IdenticalValidator').bootstrapValidator({ + message: 'This value is not valid', + fields: { + password: { + validators: { + notEmpty: { + message: 'The password is required and can\'t be empty' + }, + identical: { + field: 'confirmPassword', + message: 'The password and its confirm are not the same' + } + } + }, + confirmPassword: { + validators: { + notEmpty: { + message: 'The confirm password is required and can\'t be empty' + }, + identical: { + field: 'password', + message: 'The password and its confirm are not the same' + } + } + } + } + }); + + //Regular expression based validators + $('#OtherValidator').bootstrapValidator({ + message: 'This value is not valid', + fields: { + ages: { + validators: { + lessThan: { + value: 100, + inclusive: true, + message: 'The ages has to be less than 100' + }, + greaterThan: { + value: 10, + inclusive: false, + message: 'The ages has to be greater than or equals to 10' + } + } + } + } + }); + +}); \ No newline at end of file diff --git a/public/admin/Coco/assets/js/pages/form-wizard.js b/public/admin/Coco/assets/js/pages/form-wizard.js new file mode 100644 index 000000000..81f1880d5 --- /dev/null +++ b/public/admin/Coco/assets/js/pages/form-wizard.js @@ -0,0 +1,6 @@ +$(function() { + $('#myWizard').easyWizard({ + buttonsClass: 'btn btn-default', + submitButtonClass: 'btn btn-primary' + }); +}); \ No newline at end of file diff --git a/public/admin/Coco/assets/js/pages/forms.js b/public/admin/Coco/assets/js/pages/forms.js new file mode 100644 index 000000000..1a3672ddc --- /dev/null +++ b/public/admin/Coco/assets/js/pages/forms.js @@ -0,0 +1,5 @@ +$(function() { + $('.summernote').summernote({ + height: 500 + }); +}); \ No newline at end of file diff --git a/public/admin/Coco/assets/js/pages/google-maps.js b/public/admin/Coco/assets/js/pages/google-maps.js new file mode 100644 index 000000000..8cb87bad8 --- /dev/null +++ b/public/admin/Coco/assets/js/pages/google-maps.js @@ -0,0 +1,168 @@ +$(function(){ + + $("#gmap-1").gmap3({ + marker:{ + latLng: [46.578498,2.457275], + options:{ + draggable:true + }, + events:{ + dragend: function(marker){ + $(this).gmap3({ + getaddress:{ + latLng:marker.getPosition(), + callback:function(results){ + var map = $(this).gmap3("get"), + infowindow = $(this).gmap3({get:"infowindow"}), + content = results && results[1] ? results && results[1].formatted_address : "no address"; + if (infowindow){ + infowindow.open(map, marker); + infowindow.setContent(content); + } else { + $(this).gmap3({ + infowindow:{ + anchor:marker, + options:{content: content} + } + }); + } + } + } + }); + } + } + }, + map:{ + options:{ + zoom: 5 + } + } + }); + + $("#gmap-2").gmap3({ + map:{ + options:{ + center:[46.578498,2.457275], + zoom: 4, + mapTypeId: google.maps.MapTypeId.TERRAIN + } + }, + marker:{ + values: [ + [49.28952958093682, 6.152559438984804], + { + latLng:[44.28952958093682, 6.152559438984804], + options:{ + icon: "http://maps.google.com/mapfiles/marker_green.png" + } + }, + [49.28952958093682, -1.1501188139848408], + { + latLng:[44.28952958093682, -1.1501188139848408], + events:{ + click:function(){ + alert("I'm the last one, and i have my own click event"); + } + } + } + ], + events:{ // events trigged by markers + click: function(){ + alert("Here is the default click event"); + } + }, + cluster:{ + radius: 100, + 0: { + content: "
    CLUSTER_COUNT
    ", + width: 53, + height: 52 + }, + 20: { + content: "
    CLUSTER_COUNT
    ", + width: 56, + height: 55 + }, + 50: { + content: "
    CLUSTER_COUNT
    ", + width: 66, + height: 65 + } + } + } + }); + + var fenway = new google.maps.LatLng(42.345573,-71.098326); + $("#gmap-3").gmap3({ + map:{ + options:{ + zoom: 14, + mapTypeId: google.maps.MapTypeId.ROADMAP, + streetViewControl: true, + center: fenway + } + }, + streetviewpanorama:{ + options:{ + container: $("#gmap-4"), + opts:{ + position: fenway, + pov: { + heading: 34, + pitch: 10, + zoom: 1 + } + } + } + } + }); + + $("#gmap-5").gmap3({ + map:{ + address:"ISTABBUL, TURKEY", + options:{ + zoom:4, + mapTypeId: google.maps.MapTypeId.SATELLITE, + mapTypeControl: true, + mapTypeControlOptions: { + style: google.maps.MapTypeControlStyle.DROPDOWN_MENU + }, + navigationControl: true, + scrollwheel: true, + streetViewControl: true + } + } + }); + + $("#gmap-6").gmap3({ + map:{ + options:{ + center:[33, -111], + zoom:10, + mapTypeControlOptions: { + mapTypeIds: [google.maps.MapTypeId.ROADMAP, + google.maps.MapTypeId.SATELLITE, + google.maps.MapTypeId.HYBRID, + google.maps.MapTypeId.TERRAIN, + "sectional"] + } + } + }, + imagemaptype:{ + id: "sectional", + options:{ + getTileUrl: function(coord, zoom) { + return "http://www.fourpeaksnavigation.com/sectionals/phx" + "/" + zoom + "/" + coord.x + "/" + coord.y + ".png"; + }, + tileSize: new google.maps.Size(256, 256), + isPng: true, + name: "Chart", + minZoom: 1, + maxZoom: 111 + }, + callback: function(){ + $(this).gmap3("get").setMapTypeId("sectional"); + } + } + }); +}); \ No newline at end of file diff --git a/public/admin/Coco/assets/js/pages/index.js b/public/admin/Coco/assets/js/pages/index.js new file mode 100644 index 000000000..2ddde98dd --- /dev/null +++ b/public/admin/Coco/assets/js/pages/index.js @@ -0,0 +1,373 @@ +var timer; +var graph; +var graph2; + +$(document).ready(function(){ + $(".dial").knob(); + var cityAreaData = [ + 500.70, + 410.16, + 210.69, + 120.17, + 64.31, + 150.35, + 130.22, + 120.71, + 300.32 + ] + $('#vector-map').vectorMap({ + map: 'us_aea_en', + normalizeFunction: 'polynomial', + zoomOnScroll:true, + focusOn:{ + x: 0, + y: 0, + scale: 0.9 + }, + zoomMin:0.9, + hoverColor: false, + regionStyle:{ + initial: { + fill: '#bbbbbb', + "fill-opacity": 1, + stroke: '#a5ded9', + "stroke-width": 0, + "stroke-opacity": 0 + }, + hover: { + "fill-opacity": 0.8 + } + }, + markerStyle: { + initial: { + fill: '#F57A82', + stroke: 'rgba(230,140,110,.8)', + "fill-opacity": 1, + "stroke-width": 9, + "stroke-opacity": 0.5, + r: 3 + }, + hover: { + stroke: 'black', + "stroke-width": 2 + }, + selected: { + fill: 'blue' + }, + selectedHover: { + } + }, + backgroundColor: '#ffffff', + markers :[ + + {latLng: [35.85, -77.88], name: 'Rocky Mt,NC'}, + {latLng: [32.90, -97.03], name: 'Dallas/FW,TX'}, + {latLng: [39.37, -75.07], name: 'Millville,NJ'} + + ], + series: { + markers: [{ + attribute: 'r', + scale: [3, 7], + values: cityAreaData + }] + } + }); + if ("geolocation" in navigator) { + $('.js-geolocation').show(); + } else { + $('.js-geolocation').hide(); + } + + /* Where in the world are you? */ + $(document).on('click', '.js-geolocation', function() { + navigator.geolocation.getCurrentPosition(function(position) { + loadWeather(position.coords.latitude+','+position.coords.longitude); //load weather using your lat/lng coordinates + }); + }); + + resizefunc.push("reload_charts"); + //$(".content-page").resize(debounce(reload_charts,100)); + + load_charts(); + loadWeather('Seattle',''); + monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; + dayNames = ["S", "M", "T", "W", "T", "F", "S"]; + + var cTime = new Date(), month = cTime.getMonth()+1, year = cTime.getFullYear(); + + var events = [ + { + "date": "4/"+month+"/"+year, + "title": 'Meet a friend', + "link": 'javascript:;', + "color": 'rgba(255,255,255,0.2)', + "content": 'Contents here' + }, + { + "date": "7/"+month+"/"+year, + "title": 'Kick off meeting!', + "link": 'javascript:;', + "color": 'rgba(255,255,255,0.2)', + "content": 'Have a kick off meeting with .inc company' + }, + { + "date": "19/"+month+"/"+year, + "title": 'Link to Google', + "link": 'http://www.google.com', + "color": 'rgba(255,255,255,0.2)', + } + ]; + + $('#calendar-box2').bic_calendar({ + events: events, + dayNames: dayNames, + monthNames: monthNames, + showDays: true, + displayMonthController: true, + displayYearController: false, + popoverOptions:{ + placement: 'top', + trigger: 'hover', + html: true + }, + tooltipOptions:{ + placement: 'top', + html: true + } + }); +}); + +function loadWeather(location, woeid) { + $.simpleWeather({ + location: location, + woeid: woeid, + unit: 'c', + success: function(weather) { + html = '

    '+weather.temp+'°'+weather.units.temp+' / '+weather.tempAlt+'°F

    '; + html += ''+weather.city+', '+weather.region+''; + html += ''+weather.currently+''; + html += ''; + + $("#weather").html(html); + }, + error: function(error) { + $("#weather").html('

    '+error+'

    '); + } + }); +} + +function reload_charts(){ + graph.configure({ + width: $("#home-chart-3").width() + }); + graph.render(); + + graph2.configure({ + width: $("#home-chart-2").width() + }); + graph2.render(); + window.morris1.redraw(); + window.morris2.redraw(); +} + +function load_charts(){ + //MORRIS + + window.morris1 = Morris.Bar({ + element: 'morris-bar-home', + data: [ + { y: 'Indonesia', a: 952}, + { y: 'India', a: 985}, + { y: 'Malaysia', a: 955}, + { y: 'China', a: 785 }, + { y: 'Philipina', a: 700 }, + { y: 'Autralia', a: 601 }, + { y: 'United Kingdom', a: 421 }, + { y: 'United States', a: 725 }, + { y: 'Taiwan', a: 350 }, + { y: 'New Zealand', a: 120 }, + { y: 'Singapore', a: 124} + ], + xkey: 'y', + ykeys: ['a'], + redraw: true, + labels: ['Visitor'], + resize: true, + barColors: ['#45B29D'], + gridTextColor: ['#777'], + gridTextSize: 11, + hideHover: 'auto', + grid :false + }); + + //MORRIS + window.morris2 = Morris.Area({ + element: 'morris-home', + padding: 10, + behaveLikeLine: true, + gridEnabled: false, + gridLineColor: '#dddddd', + axes: true, + resize: true, + smooth:true, + pointSize: 0, + lineWidth: 0, + fillOpacity:0.85, + data: [ + {period: '2010 Q1', iphone: 4666, ipad: 3666, itouch: 2666}, + {period: '2010 Q2', iphone: 4441, ipad: 3441, itouch: 2441}, + {period: '2010 Q3', iphone: 6501, ipad: 4501, itouch: 2501}, + {period: '2010 Q4', iphone: 7689, ipad: 6689, itouch: 5689}, + {period: '2011 Q1', iphone: 4293, ipad: 3293, itouch: 2293}, + {period: '2011 Q2', iphone: 5881, ipad: 3881, itouch: 1881}, + {period: '2011 Q3', iphone: 5588, ipad: 3588, itouch: 1588}, + {period: '2011 Q4', iphone: 15073, ipad: 8967, itouch: 5175}, + {period: '2012 Q1', iphone: 10687, ipad: 4460, itouch: 2028}, + {period: '2012 Q2', iphone: 12432, ipad: 5713, itouch: 3791} + ], + lineColors:['#869d9d','#EFC94C','#45B29D'], + xkey: 'period', + redraw: true, + ykeys: ['iphone', 'ipad', 'itouch'], + labels: ['All Visitors', 'Returning Visitors', 'Unique Visitors'], + hideHover: 'auto' + + }); + /* + Morris.Donut({ + element: 'morris-donut', + data: [ + {label: "Download Sales", value: 12}, + {label: "In-Store Sales", value: 30}, + {label: "Mail-Order Sales", value: 20} + ] + }); + */ + var seriesData = [ [], [], []]; + var random = new Rickshaw.Fixtures.RandomData(50); + + for (var i = 0; i < 40; i++) { + random.addData(seriesData); + } + + graph = new Rickshaw.Graph( { + element: document.querySelector("#home-chart-3"), + height: 150, + renderer: 'line', + interpolation: 'linear', + series: [ + { + data: seriesData[0], + color: 'rgba(0,0,0,0.4)', + name:'S&P' + },{ + data: seriesData[1], + color: 'rgba(0,0,0,0.3)', + name:'Dow jones' + },{ + data: seriesData[2], + color: 'rgba(0,0,0,0.2)', + name:'Nasdaq' + } + ] + } ); + var hoverDetail = new Rickshaw.Graph.HoverDetail({ + graph: graph + }); + + graph.render(); + + setInterval( function() { + random.removeData(seriesData); + random.addData(seriesData); + for (lastitem in seriesData[0]); + var cur = parseInt($("#sp-status").text()); + + if(cur > seriesData[0][lastitem].y.toFixed(2)){ + $("#sp-status").addClass("text-danger").html(" "+seriesData[0][lastitem].y.toFixed(2)); + }else{ + $("#sp-status").removeClass("text-danger").html(" "+seriesData[0][lastitem].y.toFixed(2)); + } + for (lastitem in seriesData[1]); + var cur = parseInt($("#dow-status").text()); + + if(cur > seriesData[1][lastitem].y.toFixed(2)){ + $("#dow-status").addClass("text-danger").html(" "+seriesData[1][lastitem].y.toFixed(2)); + }else{ + $("#dow-status").removeClass("text-danger").html(" "+seriesData[1][lastitem].y.toFixed(2)); + } + for (lastitem in seriesData[2]); + var cur = parseInt($("#nasdaq-status").text()); + + if(cur > seriesData[2][lastitem].y.toFixed(2)){ + $("#nasdaq-status").addClass("text-danger").html(" "+seriesData[2][lastitem].y.toFixed(2)); + }else{ + $("#nasdaq-status").removeClass("text-danger").html(" "+seriesData[2][lastitem].y.toFixed(2)); + } + graph.update(); + + },5000); + + var seriesData2 = [ [], []]; + var random2 = new Rickshaw.Fixtures.RandomData(50); + + for (var i = 0; i < 50; i++) { + random2.addData(seriesData2); + } + graph2 = new Rickshaw.Graph( { + element: document.querySelector("#home-chart-2"), + height: 150, + interpolation: 'linear', + renderer: 'area', + series: [ + { + data: seriesData2[0], + color: 'rgba(255,255,255,0.3)', + name:'Web Server' + },{ + data: seriesData2[1], + color: 'rgba(255,255,255,0.1)', + name:'Database Server' + } + ] + } ); + var hoverDetail = new Rickshaw.Graph.HoverDetail( { + graph: graph2 + }); + + graph2.render(); + clearInterval(timer); + timer = setInterval( function() { + random2.removeData(seriesData2); + random2.addData(seriesData2); + for (lastitem in seriesData2[0]); + $('.ws-load').data('easyPieChart').update(seriesData2[0][lastitem].y); + //for (lastitem in seriesData2[1]); + //$('.ds-load').data('easyPieChart').update(seriesData2[1][lastitem].y); + graph2.update(); + + },2000); + + $('.ws-load').easyPieChart({ + animate: 1000, + trackColor: "rgba(0,0,0,0.1)", + barColor: "#68C39F", + scaleColor: false, + size: 90, + onStep: function(from, to, percent) { + $(this.el).find('.percent').text(Math.round(percent)); + } + }); + /*$('.ds-load').easyPieChart({ + animate: 1000, + scaleColor: false, + trackColor: "rgba(0,0,0,0.1)", + barColor: "#68C39F", + size: 50, + onStep: function(from, to, percent) { + $(this.el).find('.percent').text(Math.round(percent)); + } + });*/ +} +//http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20csv%20where%20url%3D%27http%3A%2F%2Fdownload.finance.yahoo.com%2Fd%2Fquotes.csv%3Fs%3dDOW%2CNASDAQ%2CSP%26f%3Dsl1d1t1c1ohgv%26e%3D.csv%27%20and%20columns%3D%27symbol%2Cprice%2Cdate%2Ctime%2Cchange%2Ccol1%2Chigh%2Clow%2Ccol2%27&format=json&diagnostics=true&callback= \ No newline at end of file diff --git a/public/admin/Coco/assets/js/pages/index2.js b/public/admin/Coco/assets/js/pages/index2.js new file mode 100644 index 000000000..ab396c6c5 --- /dev/null +++ b/public/admin/Coco/assets/js/pages/index2.js @@ -0,0 +1,378 @@ +var timer; +var graph; +var graph2; + +$(document).ready(function(){ + $(".dial").knob(); + var cityAreaData = [ + 500.70, + 410.16, + 210.69, + 120.17, + 64.31, + 150.35, + 130.22, + 120.71, + 300.32 + ] + $('#vector-map').vectorMap({ + map: 'world_mill_en', + normalizeFunction: 'polynomial', + zoomOnScroll:true, + focusOn:{ + x: 0, + y: 0, + scale: 0.9 + }, + zoomMin:0.9, + hoverColor: false, + regionStyle:{ + initial: { + fill: '#bbbbbb', + "fill-opacity": 1, + stroke: '#a5ded9', + "stroke-width": 0, + "stroke-opacity": 0 + }, + hover: { + "fill-opacity": 0.8 + } + }, + markerStyle: { + initial: { + fill: '#F57A82', + stroke: 'rgba(230,140,110,.8)', + "fill-opacity": 1, + "stroke-width": 9, + "stroke-opacity": 0.5, + r: 3 + }, + hover: { + stroke: 'black', + "stroke-width": 2 + }, + selected: { + fill: 'blue' + }, + selectedHover: { + } + }, + backgroundColor: '#ffffff', + markers :[ + + {latLng: [35.85, -77.88], name: 'Rocky Mt,NC'}, + {latLng: [32.90, -97.03], name: 'Dallas/FW,TX'}, + {latLng: [41.00, 28.96], name: 'Istanbul, TR'}, + {latLng: [39.37, -75.07], name: 'Millville,NJ'} + + ], + series: { + markers: [{ + attribute: 'r', + scale: [3, 7], + values: cityAreaData + }] + } + }); + if ("geolocation" in navigator) { + $('.js-geolocation').show(); + } else { + $('.js-geolocation').hide(); + } + + /* Where in the world are you? */ + $(document).on('click', '.js-geolocation', function() { + navigator.geolocation.getCurrentPosition(function(position) { + loadWeather(position.coords.latitude+','+position.coords.longitude); //load weather using your lat/lng coordinates + }); + }); + + resizefunc.push("reload_charts"); + //$(".content-page").resize(debounce(reload_charts,100)); + + load_charts(); + loadWeather('Seattle',''); + monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; + dayNames = ["S", "M", "T", "W", "T", "F", "S"]; + + var cTime = new Date(), month = cTime.getMonth()+1, year = cTime.getFullYear(); + + var events = [ + { + "date": "4/"+month+"/"+year, + "title": 'Meet a friend', + "link": 'javascript:;', + "color": 'rgba(255,255,255,0.2)', + "content": 'Contents here' + }, + { + "date": "7/"+month+"/"+year, + "title": 'Kick off meeting!', + "link": 'javascript:;', + "color": 'rgba(255,255,255,0.2)', + "content": 'Have a kick off meeting with .inc company' + }, + { + "date": "19/"+month+"/"+year, + "title": 'Link to Google', + "link": 'http://www.google.com', + "color": 'rgba(255,255,255,0.2)', + } + ]; + + $('#calendar-box2').bic_calendar({ + events: events, + dayNames: dayNames, + monthNames: monthNames, + showDays: true, + displayMonthController: true, + displayYearController: false, + popoverOptions:{ + placement: 'top', + trigger: 'hover', + html: true + }, + tooltipOptions:{ + placement: 'top', + html: true + } + }); +}); + +function loadWeather(location, woeid) { + $.simpleWeather({ + location: location, + woeid: woeid, + unit: 'c', + success: function(weather) { + html = '

    '+weather.temp+'°'+weather.units.temp+' / '+weather.tempAlt+'°F

    '; + html += ''+weather.city+', '+weather.region+''; + html += ''+weather.currently+''; + html += ''; + + $("#weather").html(html); + }, + error: function(error) { + $("#weather").html('

    '+error+'

    '); + } + }); +} + +function reload_charts(){ + graph.configure({ + width: $("#home-chart-3").width() + }); + graph.render(); + + graph2.configure({ + width: $("#home-chart-2").width() + }); + graph2.render(); + window.morris1.redraw(); + window.morris2.redraw(); +} + +function load_charts(){ + //MORRIS + + window.morris1 = Morris.Bar({ + element: 'morris-bar-home', + data: [ + { y: 'Indonesia', a: 952}, + { y: 'India', a: 985}, + { y: 'Malaysia', a: 955}, + { y: 'China', a: 785 }, + { y: 'Philipina', a: 700 }, + { y: 'Autralia', a: 601 }, + { y: 'United Kingdom', a: 421 }, + { y: 'United States', a: 725 }, + { y: 'Taiwan', a: 350 }, + { y: 'New Zealand', a: 120 }, + { y: 'Singapore', a: 124} + ], + xkey: 'y', + ykeys: ['a'], + redraw: true, + labels: ['Visitor'], + resize: true, + barColors: ['#45B29D'], + gridTextColor: ['#777'], + gridTextSize: 11, + hideHover: 'auto', + grid :false + }); + + //MORRIS + window.morris2 = Morris.Line({ + element: 'morris-home', + padding: 20, + behaveLikeLine: true, + gridEnabled: false, + gridLineColor: '#dddddd', + axes: true, + resize: true, + smooth:false, + pointSize: 3, + lineWidth: 2, + fillOpacity:0.85, + data: [ + {period: '2009 Q1', iphone: 4666, ipad: 3666, itouch: 2666}, + {period: '2009 Q2', iphone: 4441, ipad: 3441, itouch: 2441}, + {period: '2009 Q3', iphone: 16501, ipad: 14501, itouch: 12501}, + {period: '2009 Q4', iphone: 7689, ipad: 6689, itouch: 5689}, + {period: '2010 Q1', iphone: 4666, ipad: 3666, itouch: 2666}, + {period: '2010 Q2', iphone: 4441, ipad: 3441, itouch: 2441}, + {period: '2010 Q3', iphone: 6501, ipad: 4501, itouch: 2501}, + {period: '2010 Q4', iphone: 7689, ipad: 6689, itouch: 5689}, + {period: '2011 Q1', iphone: 2293, ipad: 1293, itouch: 293}, + {period: '2011 Q2', iphone: 5881, ipad: 3881, itouch: 1881}, + {period: '2011 Q3', iphone: 5588, ipad: 3588, itouch: 1588}, + {period: '2011 Q4', iphone: 15073, ipad: 8967, itouch: 5175}, + {period: '2012 Q1', iphone: 10687, ipad: 4460, itouch: 2028}, + {period: '2012 Q2', iphone: 12432, ipad: 5713, itouch: 3791} + ], + lineColors:['#abb7b7','#ABC8E2','#183152'], + xkey: 'period', + redraw: true, + ykeys: ['iphone', 'ipad'], + labels: ['All Visitors', 'Returning Visitors'], + hideHover: 'auto' + + }); + /* + Morris.Donut({ + element: 'morris-donut', + data: [ + {label: "Download Sales", value: 12}, + {label: "In-Store Sales", value: 30}, + {label: "Mail-Order Sales", value: 20} + ] + }); + */ + var seriesData = [ [], [], []]; + var random = new Rickshaw.Fixtures.RandomData(50); + + for (var i = 0; i < 40; i++) { + random.addData(seriesData); + } + + graph = new Rickshaw.Graph( { + element: document.querySelector("#home-chart-3"), + height: 150, + renderer: 'line', + interpolation: 'linear', + series: [ + { + data: seriesData[0], + color: 'rgba(0,0,0,0.4)', + name:'S&P' + },{ + data: seriesData[1], + color: 'rgba(0,0,0,0.3)', + name:'Dow jones' + },{ + data: seriesData[2], + color: 'rgba(0,0,0,0.2)', + name:'Nasdaq' + } + ] + } ); + var hoverDetail = new Rickshaw.Graph.HoverDetail({ + graph: graph + }); + + graph.render(); + + setInterval( function() { + random.removeData(seriesData); + random.addData(seriesData); + for (lastitem in seriesData[0]); + var cur = parseInt($("#sp-status").text()); + + if(cur > seriesData[0][lastitem].y.toFixed(2)){ + $("#sp-status").addClass("text-danger").html(" "+seriesData[0][lastitem].y.toFixed(2)); + }else{ + $("#sp-status").removeClass("text-danger").html(" "+seriesData[0][lastitem].y.toFixed(2)); + } + for (lastitem in seriesData[1]); + var cur = parseInt($("#dow-status").text()); + + if(cur > seriesData[1][lastitem].y.toFixed(2)){ + $("#dow-status").addClass("text-danger").html(" "+seriesData[1][lastitem].y.toFixed(2)); + }else{ + $("#dow-status").removeClass("text-danger").html(" "+seriesData[1][lastitem].y.toFixed(2)); + } + for (lastitem in seriesData[2]); + var cur = parseInt($("#nasdaq-status").text()); + + if(cur > seriesData[2][lastitem].y.toFixed(2)){ + $("#nasdaq-status").addClass("text-danger").html(" "+seriesData[2][lastitem].y.toFixed(2)); + }else{ + $("#nasdaq-status").removeClass("text-danger").html(" "+seriesData[2][lastitem].y.toFixed(2)); + } + graph.update(); + + },5000); + + var seriesData2 = [ [], []]; + var random2 = new Rickshaw.Fixtures.RandomData(50); + + for (var i = 0; i < 50; i++) { + random2.addData(seriesData2); + } + graph2 = new Rickshaw.Graph( { + element: document.querySelector("#home-chart-2"), + height: 254, + interpolation: 'linear', + renderer: 'area', + series: [ + { + data: seriesData2[0], + color: 'rgba(255,255,255,0.3)', + name:'Web Server' + },{ + data: seriesData2[1], + color: 'rgba(255,255,255,0.1)', + name:'Database Server' + } + ] + } ); + var hoverDetail = new Rickshaw.Graph.HoverDetail( { + graph: graph2 + }); + + graph2.render(); + clearInterval(timer); + timer = setInterval( function() { + random2.removeData(seriesData2); + random2.addData(seriesData2); + for (lastitem in seriesData2[0]); + $('.ws-load').data('easyPieChart').update(seriesData2[0][lastitem].y); + //for (lastitem in seriesData2[1]); + //$('.ds-load').data('easyPieChart').update(seriesData2[1][lastitem].y); + graph2.update(); + + },2000); + + $('.ws-load').easyPieChart({ + animate: 1000, + trackColor: "rgba(0,0,0,0.1)", + barColor: "#68C39F", + scaleColor: false, + size: 90, + onStep: function(from, to, percent) { + $(this.el).find('.percent').text(Math.round(percent)); + } + }); + /*$('.ds-load').easyPieChart({ + animate: 1000, + scaleColor: false, + trackColor: "rgba(0,0,0,0.1)", + barColor: "#68C39F", + size: 50, + onStep: function(from, to, percent) { + $(this.el).find('.percent').text(Math.round(percent)); + } + });*/ +} +//http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20csv%20where%20url%3D%27http%3A%2F%2Fdownload.finance.yahoo.com%2Fd%2Fquotes.csv%3Fs%3dDOW%2CNASDAQ%2CSP%26f%3Dsl1d1t1c1ohgv%26e%3D.csv%27%20and%20columns%3D%27symbol%2Cprice%2Cdate%2Ctime%2Cchange%2Ccol1%2Chigh%2Clow%2Ccol2%27&format=json&diagnostics=true&callback= \ No newline at end of file diff --git a/public/admin/Coco/assets/js/pages/lockscreen.js b/public/admin/Coco/assets/js/pages/lockscreen.js new file mode 100644 index 000000000..2a314f3db --- /dev/null +++ b/public/admin/Coco/assets/js/pages/lockscreen.js @@ -0,0 +1,8 @@ +$(function(){ + resizefunc.push("arrangesizeLockscreen"); + $(".lock-page .login-wrap").addClass("animated flipInX"); +}); + +function arrangesizeLockscreen(){ + $(".lock-page").height($(window).height()); +} \ No newline at end of file diff --git a/public/admin/Coco/assets/js/pages/morris-charts.js b/public/admin/Coco/assets/js/pages/morris-charts.js new file mode 100644 index 000000000..3d44fbdc6 --- /dev/null +++ b/public/admin/Coco/assets/js/pages/morris-charts.js @@ -0,0 +1,61 @@ +$(function(){ + Morris.Line({ + element: 'line-example', + resize: true, + data: [ + { y: '2006', a: 100, b: 90 }, + { y: '2007', a: 75, b: 65 }, + { y: '2008', a: 50, b: 40 }, + { y: '2009', a: 75, b: 65 }, + { y: '2010', a: 50, b: 40 }, + { y: '2011', a: 75, b: 65 }, + { y: '2012', a: 100, b: 90 } + ], + xkey: 'y', + ykeys: ['a', 'b'], + labels: ['Series A', 'Series B'] + }); + + Morris.Area({ + element: 'area-example', + resize: true, + data: [ + { y: '2006', a: 100, b: 90 }, + { y: '2007', a: 75, b: 65 }, + { y: '2008', a: 50, b: 40 }, + { y: '2009', a: 75, b: 65 }, + { y: '2010', a: 50, b: 40 }, + { y: '2011', a: 75, b: 65 }, + { y: '2012', a: 100, b: 90 } + ], + xkey: 'y', + ykeys: ['a', 'b'], + labels: ['Series A', 'Series B'] + }); + + Morris.Bar({ + element: 'bar-example', + resize: true, + data: [ + { y: '2007', a: 75, b: 65 }, + { y: '2008', a: 50, b: 40 }, + { y: '2009', a: 75, b: 65 }, + { y: '2010', a: 50, b: 40 }, + { y: '2011', a: 75, b: 65 } + ], + xkey: 'y', + ykeys: ['a', 'b'], + labels: ['Series A', 'Series B'] + }); + + Morris.Donut({ + element: 'donut-example', + resize: true, + data: [ + {label: "Download Sales", value: 12}, + {label: "In-Store Sales", value: 30}, + {label: "Mail-Order Sales", value: 20} + ] + }); + +}); \ No newline at end of file diff --git a/public/admin/Coco/assets/js/pages/nested-list.js b/public/admin/Coco/assets/js/pages/nested-list.js new file mode 100644 index 000000000..e80ff3e37 --- /dev/null +++ b/public/admin/Coco/assets/js/pages/nested-list.js @@ -0,0 +1,22 @@ +var output; +$(document).ready(function(){ + var updateOutput = function(e) + { + var list = e.length ? e : $(e.target), + output = list.data('output'); + if (window.JSON) { + output.val(window.JSON.stringify(list.nestable('serialize')));//, null, 2)); + } else { + output.val('JSON browser support required for this demo.'); + } + }; + + // activate Nestable for list 1 + $('#nestable').nestable({ + group: 1 + }).on('change', updateOutput); + + $('#nestable2').nestable().on('change', updateOutput); + updateOutput($('#nestable').data('output', $('#nestable-output'))); + updateOutput($('#nestable2').data('output', $('#nestable2-output'))); +}) \ No newline at end of file diff --git a/public/admin/Coco/assets/js/pages/new-message.js b/public/admin/Coco/assets/js/pages/new-message.js new file mode 100644 index 000000000..70314ffce --- /dev/null +++ b/public/admin/Coco/assets/js/pages/new-message.js @@ -0,0 +1,11 @@ +$(function(){ + $('.summernote-small').summernote({ + toolbar: [ + ['style', ['bold', 'italic', 'underline', 'clear']], + ['fontsize', ['fontsize']], + ['color', ['color']], + ['para', ['ul', 'ol', 'paragraph']] + ], + height: 200 + }); +}); \ No newline at end of file diff --git a/public/admin/Coco/assets/js/pages/notifications.js b/public/admin/Coco/assets/js/pages/notifications.js new file mode 100644 index 000000000..73f69bc66 --- /dev/null +++ b/public/admin/Coco/assets/js/pages/notifications.js @@ -0,0 +1,101 @@ +function notify(style,position) { + if(style == "error"){ + icon = "fa fa-exclamation"; + }else if(style == "warning"){ + icon = "fa fa-warning"; + }else if(style == "success"){ + icon = "fa fa-check"; + }else if(style == "info"){ + icon = "fa fa-question"; + }else{ + icon = "fa fa-circle-o"; + } + $.notify({ + title: 'Sample Notification', + text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas vitae orci ut dolor scelerisque aliquam.', + image: "" + }, { + style: 'metro', + className: style, + globalPosition:position, + showAnimation: "show", + showDuration: 0, + hideDuration: 0, + autoHide: false, + clickToHide: true + }); +} + +function notify2(style,position) { + $(".autohidebut").notify({ + text: ' Hi buddy. I\'m here!' + }, { + style: 'metro', + className: 'nonspaced', + elementPosition:position, + showAnimation: "show", + showDuration: 0, + hideDuration: 0, + autoHide: false, + clickToHide: true + }); +} + +function autohidenotify(style,position) { + if(style == "error"){ + icon = "fa fa-exclamation"; + }else if(style == "warning"){ + icon = "fa fa-warning"; + }else if(style == "success"){ + icon = "fa fa-check"; + }else if(style == "info"){ + icon = "fa fa-question"; + }else{ + icon = "fa fa-circle-o"; + } + $.notify({ + title: 'I will be closed in 3 seconds...', + text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas vitae orci ut dolor scelerisque aliquam.', + image: "" + }, { + style: 'metro', + className: style, + globalPosition:position, + showAnimation: "show", + showDuration: 0, + hideDuration: 0, + autoHideDelay: 3000, + autoHide: true, + clickToHide: true + }); +} + +function nconfirm() { + $.notify({ + title: 'Are you nuts?!', + text: 'Are you sure you want to do nothing?

    Yes No', + image: "" + }, { + style: 'metro', + className: "cool", + showAnimation: "show", + showDuration: 0, + hideDuration: 0, + autoHide: false, + clickToHide: false + }); +} + +$(function(){ + //listen for click events from this style + $(document).on('click', '.notifyjs-metro-base .no', function() { + //programmatically trigger propogating hide event + $(this).trigger('notify-hide'); + }); + $(document).on('click', '.notifyjs-metro-base .yes', function() { + //show button text + alert($(this).text() + " clicked!"); + //hide notification + $(this).trigger('notify-hide'); + }); +}) \ No newline at end of file diff --git a/public/admin/Coco/assets/js/pages/other-charts.js b/public/admin/Coco/assets/js/pages/other-charts.js new file mode 100644 index 000000000..6a986d2bd --- /dev/null +++ b/public/admin/Coco/assets/js/pages/other-charts.js @@ -0,0 +1,25 @@ +var initCharts = function() { + var charts = $('.percentage'); + charts.easyPieChart({ + animate: 1000, + lineWidth: 5, + barColor: "#eb5055", + lineCap: "butt", + size: "150", + scaleColor: "transparent", + onStep: function(from, to, percent) { + $(this.el).find('.cpercent').text(Math.round(percent)); + } + }); + $('.updatePieCharts').on('click', function(e) { + e.preventDefault(); + charts.each(function() { + $(this).data('easyPieChart').update(Math.floor(100*Math.random())); + }); + }); +} + +$(function(){ + $(".knob").knob(); + initCharts(); +}) \ No newline at end of file diff --git a/public/admin/Coco/assets/js/pages/rickshaw-charts.js b/public/admin/Coco/assets/js/pages/rickshaw-charts.js new file mode 100644 index 000000000..117cbb4bd --- /dev/null +++ b/public/admin/Coco/assets/js/pages/rickshaw-charts.js @@ -0,0 +1,131 @@ +$(function(){ + // Initiate graphs right after interface loaded + rungraphs(); + +}); + +function rungraphs(){ + var graph = new Rickshaw.Graph( { + element: document.querySelector("#chart-2"), + width: $("#chart-2").parent().width(), + height: 235, + renderer: 'area', + stroke: true, + series: [ { + data: [ { x: 0, y: 40 }, { x: 1, y: 49 }, { x: 2, y: 38 }, { x: 3, y: 20 }, { x: 4, y: 16 } ], + color: 'rgba(70,130,180,0.5)', + stroke: 'rgba(0,0,0,0.15)' + }, { + data: [ { x: 0, y: 22 }, { x: 1, y: 25 }, { x: 2, y: 38 }, { x: 3, y: 44 }, { x: 4, y: 46 } ], + color: 'rgba(202,226,247,0.5)', + stroke: 'rgba(0,0,0,0.15)' + } ] + } ); + + graph.renderer.unstack = true; + graph.render(); + + var graph = new Rickshaw.Graph({ + element: document.querySelector("#chart-1"), + width: $("#chart-1").parent().width(), + height: 235, + renderer: 'line', + series: [{ + data: [ { x: 0, y: 40 }, { x: 1, y: 49 }, { x: 2, y: 38 }, { x: 3, y: 30 }, { x: 4, y: 32 } ], + color: '#4682b4' + }, { + data: [ { x: 0, y: 20 }, { x: 1, y: 24 }, { x: 2, y: 19 }, { x: 3, y: 15 }, { x: 4, y: 16 } ], + color: '#9cc1e0' + }] + }); + graph.render(); + + var graph = new Rickshaw.Graph( { + element: document.querySelector("#chart-3"), + height: 235, + renderer: 'bar', + stack: false, + series: [ + { + data: [ { x: 0, y: 40 }, { x: 1, y: 49 }, { x: 2, y: 38 }, { x: 3, y: 30 }, { x: 4, y: 32 } ], + color: '#4682b4' + }, { + data: [ { x: 0, y: 20 }, { x: 1, y: 24 }, { x: 2, y: 19 }, { x: 3, y: 15 }, { x: 4, y: 16 } ], + color: '#9cc1e0' + + } ] + } ); + + graph.render(); + + var graph = new Rickshaw.Graph( { + element: document.querySelector("#chart-4"), + renderer: 'bar', + height: 235, + stack: true, + series: [ + { + data: [ { x: 0, y: 40 }, { x: 1, y: 49 }, { x: 2, y: 38 }, { x: 3, y: 30 }, { x: 4, y: 32 } ], + color: '#4682b4' + }, { + data: [ { x: 0, y: 20 }, { x: 1, y: 24 }, { x: 2, y: 19 }, { x: 3, y: 15 }, { x: 4, y: 16 } ], + color: '#9cc1e0' + + } ] +} ); + +graph.render(); +// set up our data series with 50 random data points + +var seriesData = [ [], [], [] ]; +var random = new Rickshaw.Fixtures.RandomData(150); + +for (var i = 0; i < 150; i++) { + random.addData(seriesData); +} + +// instantiate our graph! + +var graph = new Rickshaw.Graph( { + element: document.getElementById("chart-5"), + height: 500, + renderer: 'line', + series: [ + { + color: "#6FB07F", + data: seriesData[0], + name: 'New York' + }, { + color: "#FCB03C", + data: seriesData[1], + name: 'London' + }, { + color: "#FC5B3F", + data: seriesData[2], + name: 'Tokyo' + } + ] +} ); + +graph.render(); + +var hoverDetail = new Rickshaw.Graph.HoverDetail( { + graph: graph +} ); + +var legend = new Rickshaw.Graph.Legend( { + graph: graph, + element: document.getElementById('legend') + +} ); + +var shelving = new Rickshaw.Graph.Behavior.Series.Toggle( { + graph: graph, + legend: legend +} ); + +var axes = new Rickshaw.Graph.Axis.Time( { + graph: graph +} ); +axes.render(); +} \ No newline at end of file diff --git a/public/admin/Coco/assets/js/pages/sparkline-charts.js b/public/admin/Coco/assets/js/pages/sparkline-charts.js new file mode 100644 index 000000000..334731114 --- /dev/null +++ b/public/admin/Coco/assets/js/pages/sparkline-charts.js @@ -0,0 +1,76 @@ +$(function(){ + // Bar + line composite charts + $('#compositebar').sparkline('html', { type: 'bar', barColor: '#aaf' }); + $('#compositebar').sparkline([4,1,5,7,9,9,8,7,6,6,4,7,8,4,3,2,2,5,6,7], + { composite: true, fillColor: false, lineColor: 'red' }); + + // Larger line charts for the docs + $('.largeline').sparkline('html', + { type: 'line', height: '2.5em', width: '4em' }); + + // Customized line chart + $('#linecustom').sparkline('html', + {height: '1.5em', width: '8em', lineColor: '#f00', fillColor: '#ffa', + minSpotColor: false, maxSpotColor: false, spotColor: '#77f', spotRadius: 3}); + + // Bar charts using inline values + $('.sparkbar').sparkline('html', {type: 'bar'}); + + $('.barformat').sparkline([1, 3, 5, 3, 8], { + type: 'bar', + tooltipFormat: '{{value:levels}} - {{value}}', + tooltipValueLookups: { + levels: $.range_map({ ':2': 'Low', '3:6': 'Medium', '7:': 'High' }) + } + }); + + // Tri-state charts using inline values + $('.sparktristate').sparkline('html', {type: 'tristate'}); + $('.sparktristatecols').sparkline('html', + {type: 'tristate', colorMap: {'-2': '#fa7', '2': '#44f'} }); + + // Composite line charts, the second using values supplied via javascript + $('#compositeline').sparkline('html', { fillColor: false, changeRangeMin: 0, chartRangeMax: 10 }); + $('#compositeline').sparkline([4,1,5,7,9,9,8,7,6,6,4,7,8,4,3,2,2,5,6,7], + { composite: true, fillColor: false, lineColor: 'red', changeRangeMin: 0, chartRangeMax: 10 }); + + // Line charts with normal range marker + $('#normalline').sparkline('html', + { fillColor: false, normalRangeMin: -1, normalRangeMax: 8 }); + $('#normalExample').sparkline('html', + { fillColor: false, normalRangeMin: 80, normalRangeMax: 95, normalRangeColor: '#4f4' }); + + // Discrete charts + $('.discrete1').sparkline('html', + { type: 'discrete', lineColor: 'blue', xwidth: 18 }); + $('#discrete2').sparkline('html', + { type: 'discrete', lineColor: 'blue', thresholdColor: 'red', thresholdValue: 4 }); + + // Bullet charts + $('.sparkbullet').sparkline('html', { type: 'bullet' }); + + // Pie charts + $('.sparkpie').sparkline('html', { type: 'pie', height: '1.0em' }); + + // Box plots + $('.sparkboxplot').sparkline('html', { type: 'box'}); + $('.sparkboxplotraw').sparkline([ 1, 3, 5, 8, 10, 15, 18 ], + {type:'box', raw: true, showOutliers:true, target: 6}); + + // Box plot with specific field order + $('.boxfieldorder').sparkline('html', { + type: 'box', + tooltipFormatFieldlist: ['med', 'lq', 'uq'], + tooltipFormatFieldlistKey: 'field' + }); + + // click event demo sparkline + $('.clickdemo').sparkline(); + $('.clickdemo').bind('sparklineClick', function(ev) { + var sparkline = ev.sparklines[0], + region = sparkline.getCurrentRegionFields(); + value = region.y; + alert("Clicked on x="+region.x+" y="+region.y); + }); + +}); \ No newline at end of file diff --git a/public/admin/Coco/assets/js/pages/tabs-accordions.js b/public/admin/Coco/assets/js/pages/tabs-accordions.js new file mode 100644 index 000000000..9d89af4c0 --- /dev/null +++ b/public/admin/Coco/assets/js/pages/tabs-accordions.js @@ -0,0 +1,3 @@ +$(document).ready(function(){ + +}); \ No newline at end of file diff --git a/public/admin/Coco/assets/js/pages/vector-maps.js b/public/admin/Coco/assets/js/pages/vector-maps.js new file mode 100644 index 000000000..08f4c777b --- /dev/null +++ b/public/admin/Coco/assets/js/pages/vector-maps.js @@ -0,0 +1,32 @@ +$(function(){ + $('#vmap-1').vectorMap({map: 'world_mill_en',backgroundColor: 'transparent', + regionStyle: { + initial: { + fill: '#8d8d8d' + } + }}); + $('#vmap-3').vectorMap({map: 'europe_mill_en',backgroundColor: 'transparent', + regionStyle: { + initial: { + fill: '#8d8d8d' + } + }}); + $('#vmap-4').vectorMap({map: 'us_aea_en',backgroundColor: 'transparent', + regionStyle: { + initial: { + fill: '#8d8d8d' + } + }}); + $('#vmap-5').vectorMap({map: 'uk_mill_en',backgroundColor: 'transparent', + regionStyle: { + initial: { + fill: '#8d8d8d' + } + }}); + $('#vmap-6').vectorMap({map: 'us-il-chicago_mill_en',backgroundColor: 'transparent', + regionStyle: { + initial: { + fill: '#8d8d8d' + } + }}); +}); \ No newline at end of file diff --git a/public/admin/Coco/assets/libs/animate-css/animate.min.css b/public/admin/Coco/assets/libs/animate-css/animate.min.css new file mode 100644 index 000000000..a2aa5ffe7 --- /dev/null +++ b/public/admin/Coco/assets/libs/animate-css/animate.min.css @@ -0,0 +1 @@ +@charset "UTF-8";.animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.animated.hinge{-webkit-animation-duration:2s;animation-duration:2s}@-webkit-keyframes bounce{0%,20%,50%,80%,100%{-webkit-transform:translateY(0);transform:translateY(0)}40%{-webkit-transform:translateY(-30px);transform:translateY(-30px)}60%{-webkit-transform:translateY(-15px);transform:translateY(-15px)}}@keyframes bounce{0%,20%,50%,80%,100%{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}40%{-webkit-transform:translateY(-30px);-ms-transform:translateY(-30px);transform:translateY(-30px)}60%{-webkit-transform:translateY(-15px);-ms-transform:translateY(-15px);transform:translateY(-15px)}}.bounce{-webkit-animation-name:bounce;animation-name:bounce}@-webkit-keyframes flash{0%,50%,100%{opacity:1}25%,75%{opacity:0}}@keyframes flash{0%,50%,100%{opacity:1}25%,75%{opacity:0}}.flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{0%{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.1);transform:scale(1.1)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes pulse{0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.1);-ms-transform:scale(1.1);transform:scale(1.1)}100%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.pulse{-webkit-animation-name:pulse;animation-name:pulse}@-webkit-keyframes shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}}.shake{-webkit-animation-name:shake;animation-name:shake}@-webkit-keyframes swing{20%{-webkit-transform:rotate(15deg);transform:rotate(15deg)}40%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}60%{-webkit-transform:rotate(5deg);transform:rotate(5deg)}80%{-webkit-transform:rotate(-5deg);transform:rotate(-5deg)}100%{-webkit-transform:rotate(0);transform:rotate(0)}}@keyframes swing{20%{-webkit-transform:rotate(15deg);-ms-transform:rotate(15deg);transform:rotate(15deg)}40%{-webkit-transform:rotate(-10deg);-ms-transform:rotate(-10deg);transform:rotate(-10deg)}60%{-webkit-transform:rotate(5deg);-ms-transform:rotate(5deg);transform:rotate(5deg)}80%{-webkit-transform:rotate(-5deg);-ms-transform:rotate(-5deg);transform:rotate(-5deg)}100%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0)}}.swing{-webkit-transform-origin:top center;-ms-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;animation-name:swing}@-webkit-keyframes tada{0%{-webkit-transform:scale(1);transform:scale(1)}10%,20%{-webkit-transform:scale(.9)rotate(-3deg);transform:scale(.9)rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale(1.1)rotate(3deg);transform:scale(1.1)rotate(3deg)}40%,60%,80%{-webkit-transform:scale(1.1)rotate(-3deg);transform:scale(1.1)rotate(-3deg)}100%{-webkit-transform:scale(1)rotate(0);transform:scale(1)rotate(0)}}@keyframes tada{0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}10%,20%{-webkit-transform:scale(.9)rotate(-3deg);-ms-transform:scale(.9)rotate(-3deg);transform:scale(.9)rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale(1.1)rotate(3deg);-ms-transform:scale(1.1)rotate(3deg);transform:scale(1.1)rotate(3deg)}40%,60%,80%{-webkit-transform:scale(1.1)rotate(-3deg);-ms-transform:scale(1.1)rotate(-3deg);transform:scale(1.1)rotate(-3deg)}100%{-webkit-transform:scale(1)rotate(0);-ms-transform:scale(1)rotate(0);transform:scale(1)rotate(0)}}.tada{-webkit-animation-name:tada;animation-name:tada}@-webkit-keyframes wobble{0%{-webkit-transform:translateX(0%);transform:translateX(0%)}15%{-webkit-transform:translateX(-25%)rotate(-5deg);transform:translateX(-25%)rotate(-5deg)}30%{-webkit-transform:translateX(20%)rotate(3deg);transform:translateX(20%)rotate(3deg)}45%{-webkit-transform:translateX(-15%)rotate(-3deg);transform:translateX(-15%)rotate(-3deg)}60%{-webkit-transform:translateX(10%)rotate(2deg);transform:translateX(10%)rotate(2deg)}75%{-webkit-transform:translateX(-5%)rotate(-1deg);transform:translateX(-5%)rotate(-1deg)}100%{-webkit-transform:translateX(0%);transform:translateX(0%)}}@keyframes wobble{0%{-webkit-transform:translateX(0%);-ms-transform:translateX(0%);transform:translateX(0%)}15%{-webkit-transform:translateX(-25%)rotate(-5deg);-ms-transform:translateX(-25%)rotate(-5deg);transform:translateX(-25%)rotate(-5deg)}30%{-webkit-transform:translateX(20%)rotate(3deg);-ms-transform:translateX(20%)rotate(3deg);transform:translateX(20%)rotate(3deg)}45%{-webkit-transform:translateX(-15%)rotate(-3deg);-ms-transform:translateX(-15%)rotate(-3deg);transform:translateX(-15%)rotate(-3deg)}60%{-webkit-transform:translateX(10%)rotate(2deg);-ms-transform:translateX(10%)rotate(2deg);transform:translateX(10%)rotate(2deg)}75%{-webkit-transform:translateX(-5%)rotate(-1deg);-ms-transform:translateX(-5%)rotate(-1deg);transform:translateX(-5%)rotate(-1deg)}100%{-webkit-transform:translateX(0%);-ms-transform:translateX(0%);transform:translateX(0%)}}.wobble{-webkit-animation-name:wobble;animation-name:wobble}@-webkit-keyframes bounceIn{0%{opacity:0;-webkit-transform:scale(.3);transform:scale(.3)}50%{opacity:1;-webkit-transform:scale(1.05);transform:scale(1.05)}70%{-webkit-transform:scale(.9);transform:scale(.9)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes bounceIn{0%{opacity:0;-webkit-transform:scale(.3);-ms-transform:scale(.3);transform:scale(.3)}50%{opacity:1;-webkit-transform:scale(1.05);-ms-transform:scale(1.05);transform:scale(1.05)}70%{-webkit-transform:scale(.9);-ms-transform:scale(.9);transform:scale(.9)}100%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.bounceIn{-webkit-animation-name:bounceIn;animation-name:bounceIn}@-webkit-keyframes bounceInDown{0%{opacity:0;-webkit-transform:translateY(-2000px);transform:translateY(-2000px)}60%{opacity:1;-webkit-transform:translateY(30px);transform:translateY(30px)}80%{-webkit-transform:translateY(-10px);transform:translateY(-10px)}100%{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes bounceInDown{0%{opacity:0;-webkit-transform:translateY(-2000px);-ms-transform:translateY(-2000px);transform:translateY(-2000px)}60%{opacity:1;-webkit-transform:translateY(30px);-ms-transform:translateY(30px);transform:translateY(30px)}80%{-webkit-transform:translateY(-10px);-ms-transform:translateY(-10px);transform:translateY(-10px)}100%{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.bounceInDown{-webkit-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{0%{opacity:0;-webkit-transform:translateX(-2000px);transform:translateX(-2000px)}60%{opacity:1;-webkit-transform:translateX(30px);transform:translateX(30px)}80%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes bounceInLeft{0%{opacity:0;-webkit-transform:translateX(-2000px);-ms-transform:translateX(-2000px);transform:translateX(-2000px)}60%{opacity:1;-webkit-transform:translateX(30px);-ms-transform:translateX(30px);transform:translateX(30px)}80%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}}.bounceInLeft{-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{0%{opacity:0;-webkit-transform:translateX(2000px);transform:translateX(2000px)}60%{opacity:1;-webkit-transform:translateX(-30px);transform:translateX(-30px)}80%{-webkit-transform:translateX(10px);transform:translateX(10px)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes bounceInRight{0%{opacity:0;-webkit-transform:translateX(2000px);-ms-transform:translateX(2000px);transform:translateX(2000px)}60%{opacity:1;-webkit-transform:translateX(-30px);-ms-transform:translateX(-30px);transform:translateX(-30px)}80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}}.bounceInRight{-webkit-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceInUp{0%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}60%{opacity:1;-webkit-transform:translateY(-30px);transform:translateY(-30px)}80%{-webkit-transform:translateY(10px);transform:translateY(10px)}100%{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes bounceInUp{0%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}60%{opacity:1;-webkit-transform:translateY(-30px);-ms-transform:translateY(-30px);transform:translateY(-30px)}80%{-webkit-transform:translateY(10px);-ms-transform:translateY(10px);transform:translateY(10px)}100%{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.bounceInUp{-webkit-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceOut{0%{-webkit-transform:scale(1);transform:scale(1)}25%{-webkit-transform:scale(.95);transform:scale(.95)}50%{opacity:1;-webkit-transform:scale(1.1);transform:scale(1.1)}100%{opacity:0;-webkit-transform:scale(.3);transform:scale(.3)}}@keyframes bounceOut{0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}25%{-webkit-transform:scale(.95);-ms-transform:scale(.95);transform:scale(.95)}50%{opacity:1;-webkit-transform:scale(1.1);-ms-transform:scale(1.1);transform:scale(1.1)}100%{opacity:0;-webkit-transform:scale(.3);-ms-transform:scale(.3);transform:scale(.3)}}.bounceOut{-webkit-animation-name:bounceOut;animation-name:bounceOut}@-webkit-keyframes bounceOutDown{0%{-webkit-transform:translateY(0);transform:translateY(0)}20%{opacity:1;-webkit-transform:translateY(-20px);transform:translateY(-20px)}100%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}}@keyframes bounceOutDown{0%{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}20%{opacity:1;-webkit-transform:translateY(-20px);-ms-transform:translateY(-20px);transform:translateY(-20px)}100%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}}.bounceOutDown{-webkit-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{0%{-webkit-transform:translateX(0);transform:translateX(0)}20%{opacity:1;-webkit-transform:translateX(20px);transform:translateX(20px)}100%{opacity:0;-webkit-transform:translateX(-2000px);transform:translateX(-2000px)}}@keyframes bounceOutLeft{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}20%{opacity:1;-webkit-transform:translateX(20px);-ms-transform:translateX(20px);transform:translateX(20px)}100%{opacity:0;-webkit-transform:translateX(-2000px);-ms-transform:translateX(-2000px);transform:translateX(-2000px)}}.bounceOutLeft{-webkit-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{0%{-webkit-transform:translateX(0);transform:translateX(0)}20%{opacity:1;-webkit-transform:translateX(-20px);transform:translateX(-20px)}100%{opacity:0;-webkit-transform:translateX(2000px);transform:translateX(2000px)}}@keyframes bounceOutRight{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}20%{opacity:1;-webkit-transform:translateX(-20px);-ms-transform:translateX(-20px);transform:translateX(-20px)}100%{opacity:0;-webkit-transform:translateX(2000px);-ms-transform:translateX(2000px);transform:translateX(2000px)}}.bounceOutRight{-webkit-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes bounceOutUp{0%{-webkit-transform:translateY(0);transform:translateY(0)}20%{opacity:1;-webkit-transform:translateY(20px);transform:translateY(20px)}100%{opacity:0;-webkit-transform:translateY(-2000px);transform:translateY(-2000px)}}@keyframes bounceOutUp{0%{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}20%{opacity:1;-webkit-transform:translateY(20px);-ms-transform:translateY(20px);transform:translateY(20px)}100%{opacity:0;-webkit-transform:translateY(-2000px);-ms-transform:translateY(-2000px);transform:translateY(-2000px)}}.bounceOutUp{-webkit-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-20px);transform:translateY(-20px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-20px);-ms-transform:translateY(-20px);transform:translateY(-20px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translateY(-2000px);transform:translateY(-2000px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translateY(-2000px);-ms-transform:translateY(-2000px);transform:translateY(-2000px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.fadeInDownBig{-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translateX(-20px);transform:translateX(-20px)}100%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translateX(-20px);-ms-transform:translateX(-20px);transform:translateX(-20px)}100%{opacity:1;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}}.fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translateX(-2000px);transform:translateX(-2000px)}100%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translateX(-2000px);-ms-transform:translateX(-2000px);transform:translateX(-2000px)}100%{opacity:1;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}}.fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translateX(20px);transform:translateX(20px)}100%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes fadeInRight{0%{opacity:0;-webkit-transform:translateX(20px);-ms-transform:translateX(20px);transform:translateX(20px)}100%{opacity:1;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}}.fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translateX(2000px);transform:translateX(2000px)}100%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translateX(2000px);-ms-transform:translateX(2000px);transform:translateX(2000px)}100%{opacity:1;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}}.fadeInRightBig{-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translateY(20px);transform:translateY(20px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes fadeInUp{0%{opacity:0;-webkit-transform:translateY(20px);-ms-transform:translateY(20px);transform:translateY(20px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.fadeInUpBig{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutDown{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(20px);transform:translateY(20px)}}@keyframes fadeOutDown{0%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(20px);-ms-transform:translateY(20px);transform:translateY(20px)}}.fadeOutDown{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutDownBig{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}}@keyframes fadeOutDownBig{0%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}}.fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeft{0%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(-20px);transform:translateX(-20px)}}@keyframes fadeOutLeft{0%{opacity:1;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(-20px);-ms-transform:translateX(-20px);transform:translateX(-20px)}}.fadeOutLeft{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutLeftBig{0%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(-2000px);transform:translateX(-2000px)}}@keyframes fadeOutLeftBig{0%{opacity:1;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(-2000px);-ms-transform:translateX(-2000px);transform:translateX(-2000px)}}.fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRight{0%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(20px);transform:translateX(20px)}}@keyframes fadeOutRight{0%{opacity:1;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(20px);-ms-transform:translateX(20px);transform:translateX(20px)}}.fadeOutRight{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutRightBig{0%{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(2000px);transform:translateX(2000px)}}@keyframes fadeOutRightBig{0%{opacity:1;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(2000px);-ms-transform:translateX(2000px);transform:translateX(2000px)}}.fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes fadeOutUp{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-20px);transform:translateY(-20px)}}@keyframes fadeOutUp{0%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-20px);-ms-transform:translateY(-20px);transform:translateY(-20px)}}.fadeOutUp{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutUpBig{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-2000px);transform:translateY(-2000px)}}@keyframes fadeOutUpBig{0%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-2000px);-ms-transform:translateY(-2000px);transform:translateY(-2000px)}}.fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes flip{0%{-webkit-transform:perspective(400px)translateZ(0)rotateY(0)scale(1);transform:perspective(400px)translateZ(0)rotateY(0)scale(1)}0%,40%{-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px)translateZ(150px)rotateY(170deg)scale(1);transform:perspective(400px)translateZ(150px)rotateY(170deg)scale(1)}50%{-webkit-transform:perspective(400px)translateZ(150px)rotateY(190deg)scale(1);transform:perspective(400px)translateZ(150px)rotateY(190deg)scale(1);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px)translateZ(0)rotateY(360deg)scale(.95);transform:perspective(400px)translateZ(0)rotateY(360deg)scale(.95)}80%,100%{-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}100%{-webkit-transform:perspective(400px)translateZ(0)rotateY(360deg)scale(1);transform:perspective(400px)translateZ(0)rotateY(360deg)scale(1)}}@keyframes flip{0%{-webkit-transform:perspective(400px)translateZ(0)rotateY(0)scale(1);-ms-transform:perspective(400px)translateZ(0)rotateY(0)scale(1);transform:perspective(400px)translateZ(0)rotateY(0)scale(1)}0%,40%{-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px)translateZ(150px)rotateY(170deg)scale(1);-ms-transform:perspective(400px)translateZ(150px)rotateY(170deg)scale(1);transform:perspective(400px)translateZ(150px)rotateY(170deg)scale(1)}50%{-webkit-transform:perspective(400px)translateZ(150px)rotateY(190deg)scale(1);-ms-transform:perspective(400px)translateZ(150px)rotateY(190deg)scale(1);transform:perspective(400px)translateZ(150px)rotateY(190deg)scale(1);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px)translateZ(0)rotateY(360deg)scale(.95);-ms-transform:perspective(400px)translateZ(0)rotateY(360deg)scale(.95);transform:perspective(400px)translateZ(0)rotateY(360deg)scale(.95)}80%,100%{-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}100%{-webkit-transform:perspective(400px)translateZ(0)rotateY(360deg)scale(1);-ms-transform:perspective(400px)translateZ(0)rotateY(360deg)scale(1);transform:perspective(400px)translateZ(0)rotateY(360deg)scale(1)}}.animated.flip{-webkit-backface-visibility:visible;-ms-backface-visibility:visible;backface-visibility:visible;-webkit-animation-name:flip;animation-name:flip}@-webkit-keyframes flipInX{0%{-webkit-transform:perspective(400px)rotateX(90deg);transform:perspective(400px)rotateX(90deg);opacity:0}40%{-webkit-transform:perspective(400px)rotateX(-10deg);transform:perspective(400px)rotateX(-10deg)}70%{-webkit-transform:perspective(400px)rotateX(10deg);transform:perspective(400px)rotateX(10deg)}100%{-webkit-transform:perspective(400px)rotateX(0);transform:perspective(400px)rotateX(0);opacity:1}}@keyframes flipInX{0%{-webkit-transform:perspective(400px)rotateX(90deg);-ms-transform:perspective(400px)rotateX(90deg);transform:perspective(400px)rotateX(90deg);opacity:0}40%{-webkit-transform:perspective(400px)rotateX(-10deg);-ms-transform:perspective(400px)rotateX(-10deg);transform:perspective(400px)rotateX(-10deg)}70%{-webkit-transform:perspective(400px)rotateX(10deg);-ms-transform:perspective(400px)rotateX(10deg);transform:perspective(400px)rotateX(10deg)}100%{-webkit-transform:perspective(400px)rotateX(0);-ms-transform:perspective(400px)rotateX(0);transform:perspective(400px)rotateX(0);opacity:1}}.flipInX{-webkit-backface-visibility:visible!important;-ms-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInX;animation-name:flipInX}@-webkit-keyframes flipInY{0%{-webkit-transform:perspective(400px)rotateY(90deg);transform:perspective(400px)rotateY(90deg);opacity:0}40%{-webkit-transform:perspective(400px)rotateY(-10deg);transform:perspective(400px)rotateY(-10deg)}70%{-webkit-transform:perspective(400px)rotateY(10deg);transform:perspective(400px)rotateY(10deg)}100%{-webkit-transform:perspective(400px)rotateY(0);transform:perspective(400px)rotateY(0);opacity:1}}@keyframes flipInY{0%{-webkit-transform:perspective(400px)rotateY(90deg);-ms-transform:perspective(400px)rotateY(90deg);transform:perspective(400px)rotateY(90deg);opacity:0}40%{-webkit-transform:perspective(400px)rotateY(-10deg);-ms-transform:perspective(400px)rotateY(-10deg);transform:perspective(400px)rotateY(-10deg)}70%{-webkit-transform:perspective(400px)rotateY(10deg);-ms-transform:perspective(400px)rotateY(10deg);transform:perspective(400px)rotateY(10deg)}100%{-webkit-transform:perspective(400px)rotateY(0);-ms-transform:perspective(400px)rotateY(0);transform:perspective(400px)rotateY(0);opacity:1}}.flipInY{-webkit-backface-visibility:visible!important;-ms-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInY;animation-name:flipInY}@-webkit-keyframes flipOutX{0%{-webkit-transform:perspective(400px)rotateX(0);transform:perspective(400px)rotateX(0);opacity:1}100%{-webkit-transform:perspective(400px)rotateX(90deg);transform:perspective(400px)rotateX(90deg);opacity:0}}@keyframes flipOutX{0%{-webkit-transform:perspective(400px)rotateX(0);-ms-transform:perspective(400px)rotateX(0);transform:perspective(400px)rotateX(0);opacity:1}100%{-webkit-transform:perspective(400px)rotateX(90deg);-ms-transform:perspective(400px)rotateX(90deg);transform:perspective(400px)rotateX(90deg);opacity:0}}.flipOutX{-webkit-animation-name:flipOutX;animation-name:flipOutX;-webkit-backface-visibility:visible!important;-ms-backface-visibility:visible!important;backface-visibility:visible!important}@-webkit-keyframes flipOutY{0%{-webkit-transform:perspective(400px)rotateY(0);transform:perspective(400px)rotateY(0);opacity:1}100%{-webkit-transform:perspective(400px)rotateY(90deg);transform:perspective(400px)rotateY(90deg);opacity:0}}@keyframes flipOutY{0%{-webkit-transform:perspective(400px)rotateY(0);-ms-transform:perspective(400px)rotateY(0);transform:perspective(400px)rotateY(0);opacity:1}100%{-webkit-transform:perspective(400px)rotateY(90deg);-ms-transform:perspective(400px)rotateY(90deg);transform:perspective(400px)rotateY(90deg);opacity:0}}.flipOutY{-webkit-backface-visibility:visible!important;-ms-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipOutY;animation-name:flipOutY}@-webkit-keyframes lightSpeedIn{0%{-webkit-transform:translateX(100%)skewX(-30deg);transform:translateX(100%)skewX(-30deg);opacity:0}60%{-webkit-transform:translateX(-20%)skewX(30deg);transform:translateX(-20%)skewX(30deg);opacity:1}80%{-webkit-transform:translateX(0%)skewX(-15deg);transform:translateX(0%)skewX(-15deg);opacity:1}100%{-webkit-transform:translateX(0%)skewX(0);transform:translateX(0%)skewX(0);opacity:1}}@keyframes lightSpeedIn{0%{-webkit-transform:translateX(100%)skewX(-30deg);-ms-transform:translateX(100%)skewX(-30deg);transform:translateX(100%)skewX(-30deg);opacity:0}60%{-webkit-transform:translateX(-20%)skewX(30deg);-ms-transform:translateX(-20%)skewX(30deg);transform:translateX(-20%)skewX(30deg);opacity:1}80%{-webkit-transform:translateX(0%)skewX(-15deg);-ms-transform:translateX(0%)skewX(-15deg);transform:translateX(0%)skewX(-15deg);opacity:1}100%{-webkit-transform:translateX(0%)skewX(0);-ms-transform:translateX(0%)skewX(0);transform:translateX(0%)skewX(0);opacity:1}}.lightSpeedIn{-webkit-animation-name:lightSpeedIn;animation-name:lightSpeedIn;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedOut{0%{-webkit-transform:translateX(0%)skewX(0);transform:translateX(0%)skewX(0);opacity:1}100%{-webkit-transform:translateX(100%)skewX(-30deg);transform:translateX(100%)skewX(-30deg);opacity:0}}@keyframes lightSpeedOut{0%{-webkit-transform:translateX(0%)skewX(0);-ms-transform:translateX(0%)skewX(0);transform:translateX(0%)skewX(0);opacity:1}100%{-webkit-transform:translateX(100%)skewX(-30deg);-ms-transform:translateX(100%)skewX(-30deg);transform:translateX(100%)skewX(-30deg);opacity:0}}.lightSpeedOut{-webkit-animation-name:lightSpeedOut;animation-name:lightSpeedOut;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes rotateIn{0%{-webkit-transform:rotate(-200deg);transform:rotate(-200deg);opacity:0}0%,100%{-webkit-transform-origin:center center;transform-origin:center center}100%{-webkit-transform:rotate(0);transform:rotate(0);opacity:1}}@keyframes rotateIn{0%{-webkit-transform:rotate(-200deg);-ms-transform:rotate(-200deg);transform:rotate(-200deg);opacity:0}0%,100%{-webkit-transform-origin:center center;-ms-transform-origin:center center;transform-origin:center center}100%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);opacity:1}}.rotateIn{-webkit-animation-name:rotateIn;animation-name:rotateIn}@-webkit-keyframes rotateInDownLeft{0%{-webkit-transform:rotate(-90deg);transform:rotate(-90deg);opacity:0}0%,100%{-webkit-transform-origin:left bottom;transform-origin:left bottom}100%{-webkit-transform:rotate(0);transform:rotate(0);opacity:1}}@keyframes rotateInDownLeft{0%{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);opacity:0}0%,100%{-webkit-transform-origin:left bottom;-ms-transform-origin:left bottom;transform-origin:left bottom}100%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);opacity:1}}.rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft}@-webkit-keyframes rotateInDownRight{0%{-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:0}0%,100%{-webkit-transform-origin:right bottom;transform-origin:right bottom}100%{-webkit-transform:rotate(0);transform:rotate(0);opacity:1}}@keyframes rotateInDownRight{0%{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);opacity:0}0%,100%{-webkit-transform-origin:right bottom;-ms-transform-origin:right bottom;transform-origin:right bottom}100%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);opacity:1}}.rotateInDownRight{-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight}@-webkit-keyframes rotateInUpLeft{0%{-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:0}0%,100%{-webkit-transform-origin:left bottom;transform-origin:left bottom}100%{-webkit-transform:rotate(0);transform:rotate(0);opacity:1}}@keyframes rotateInUpLeft{0%{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);opacity:0}0%,100%{-webkit-transform-origin:left bottom;-ms-transform-origin:left bottom;transform-origin:left bottom}100%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);opacity:1}}.rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft}@-webkit-keyframes rotateInUpRight{0%{-webkit-transform:rotate(-90deg);transform:rotate(-90deg);opacity:0}0%,100%{-webkit-transform-origin:right bottom;transform-origin:right bottom}100%{-webkit-transform:rotate(0);transform:rotate(0);opacity:1}}@keyframes rotateInUpRight{0%{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);opacity:0}0%,100%{-webkit-transform-origin:right bottom;-ms-transform-origin:right bottom;transform-origin:right bottom}100%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);opacity:1}}.rotateInUpRight{-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight}@-webkit-keyframes rotateOut{0%{-webkit-transform:rotate(0);transform:rotate(0);opacity:1}0%,100%{-webkit-transform-origin:center center;transform-origin:center center}100%{-webkit-transform:rotate(200deg);transform:rotate(200deg);opacity:0}}@keyframes rotateOut{0%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);opacity:1}0%,100%{-webkit-transform-origin:center center;-ms-transform-origin:center center;transform-origin:center center}100%{-webkit-transform:rotate(200deg);-ms-transform:rotate(200deg);transform:rotate(200deg);opacity:0}}.rotateOut{-webkit-animation-name:rotateOut;animation-name:rotateOut}@-webkit-keyframes rotateOutDownLeft{0%{-webkit-transform:rotate(0);transform:rotate(0);opacity:1}0%,100%{-webkit-transform-origin:left bottom;transform-origin:left bottom}100%{-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:0}}@keyframes rotateOutDownLeft{0%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);opacity:1}0%,100%{-webkit-transform-origin:left bottom;-ms-transform-origin:left bottom;transform-origin:left bottom}100%{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);opacity:0}}.rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft}@-webkit-keyframes rotateOutDownRight{0%{-webkit-transform:rotate(0);transform:rotate(0);opacity:1}0%,100%{-webkit-transform-origin:right bottom;transform-origin:right bottom}100%{-webkit-transform:rotate(-90deg);transform:rotate(-90deg);opacity:0}}@keyframes rotateOutDownRight{0%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);opacity:1}0%,100%{-webkit-transform-origin:right bottom;-ms-transform-origin:right bottom;transform-origin:right bottom}100%{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);opacity:0}}.rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight}@-webkit-keyframes rotateOutUpLeft{0%{-webkit-transform:rotate(0);transform:rotate(0);opacity:1}0%,100%{-webkit-transform-origin:left bottom;transform-origin:left bottom}100%{-webkit-transform:rotate(-90deg);transform:rotate(-90deg);opacity:0}}@keyframes rotateOutUpLeft{0%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);opacity:1}0%,100%{-webkit-transform-origin:left bottom;-ms-transform-origin:left bottom;transform-origin:left bottom}100%{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);opacity:0}}.rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft}@-webkit-keyframes rotateOutUpRight{0%{-webkit-transform:rotate(0);transform:rotate(0);opacity:1}0%,100%{-webkit-transform-origin:right bottom;transform-origin:right bottom}100%{-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:0}}@keyframes rotateOutUpRight{0%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);opacity:1}0%,100%{-webkit-transform-origin:right bottom;-ms-transform-origin:right bottom;transform-origin:right bottom}100%{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);opacity:0}}.rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight}@-webkit-keyframes slideInDown{0%{opacity:0;-webkit-transform:translateY(-2000px);transform:translateY(-2000px)}100%{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes slideInDown{0%{opacity:0;-webkit-transform:translateY(-2000px);-ms-transform:translateY(-2000px);transform:translateY(-2000px)}100%{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.slideInDown{-webkit-animation-name:slideInDown;animation-name:slideInDown}@-webkit-keyframes slideInLeft{0%{opacity:0;-webkit-transform:translateX(-2000px);transform:translateX(-2000px)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slideInLeft{0%{opacity:0;-webkit-transform:translateX(-2000px);-ms-transform:translateX(-2000px);transform:translateX(-2000px)}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}}.slideInLeft{-webkit-animation-name:slideInLeft;animation-name:slideInLeft}@-webkit-keyframes slideInRight{0%{opacity:0;-webkit-transform:translateX(2000px);transform:translateX(2000px)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slideInRight{0%{opacity:0;-webkit-transform:translateX(2000px);-ms-transform:translateX(2000px);transform:translateX(2000px)}100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}}.slideInRight{-webkit-animation-name:slideInRight;animation-name:slideInRight}@-webkit-keyframes slideOutLeft{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(-2000px);transform:translateX(-2000px)}}@keyframes slideOutLeft{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(-2000px);-ms-transform:translateX(-2000px);transform:translateX(-2000px)}}.slideOutLeft{-webkit-animation-name:slideOutLeft;animation-name:slideOutLeft}@-webkit-keyframes slideOutRight{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(2000px);transform:translateX(2000px)}}@keyframes slideOutRight{0%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(2000px);-ms-transform:translateX(2000px);transform:translateX(2000px)}}.slideOutRight{-webkit-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes slideOutUp{0%{-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-2000px);transform:translateY(-2000px)}}@keyframes slideOutUp{0%{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-2000px);-ms-transform:translateY(-2000px);transform:translateY(-2000px)}}.slideOutUp{-webkit-animation-name:slideOutUp;animation-name:slideOutUp}@-webkit-keyframes hinge{0%{-webkit-transform:rotate(0);transform:rotate(0)}0%,20%,60%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate(80deg);transform:rotate(80deg)}40%{-webkit-transform:rotate(60deg);transform:rotate(60deg)}40%,80%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}80%{-webkit-transform:rotate(60deg)translateY(0);transform:rotate(60deg)translateY(0);opacity:1}100%{-webkit-transform:translateY(700px);transform:translateY(700px);opacity:0}}@keyframes hinge{0%{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0)}0%,20%,60%{-webkit-transform-origin:top left;-ms-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate(80deg);-ms-transform:rotate(80deg);transform:rotate(80deg)}40%{-webkit-transform:rotate(60deg);-ms-transform:rotate(60deg);transform:rotate(60deg)}40%,80%{-webkit-transform-origin:top left;-ms-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}80%{-webkit-transform:rotate(60deg)translateY(0);-ms-transform:rotate(60deg)translateY(0);transform:rotate(60deg)translateY(0);opacity:1}100%{-webkit-transform:translateY(700px);-ms-transform:translateY(700px);transform:translateY(700px);opacity:0}}.hinge{-webkit-animation-name:hinge;animation-name:hinge}@-webkit-keyframes rollIn{0%{opacity:0;-webkit-transform:translateX(-100%)rotate(-120deg);transform:translateX(-100%)rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0)rotate(0);transform:translateX(0)rotate(0)}}@keyframes rollIn{0%{opacity:0;-webkit-transform:translateX(-100%)rotate(-120deg);-ms-transform:translateX(-100%)rotate(-120deg);transform:translateX(-100%)rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0)rotate(0);-ms-transform:translateX(0)rotate(0);transform:translateX(0)rotate(0)}}.rollIn{-webkit-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{0%{opacity:1;-webkit-transform:translateX(0)rotate(0);transform:translateX(0)rotate(0)}100%{opacity:0;-webkit-transform:translateX(100%)rotate(120deg);transform:translateX(100%)rotate(120deg)}}@keyframes rollOut{0%{opacity:1;-webkit-transform:translateX(0)rotate(0);-ms-transform:translateX(0)rotate(0);transform:translateX(0)rotate(0)}100%{opacity:0;-webkit-transform:translateX(100%)rotate(120deg);-ms-transform:translateX(100%)rotate(120deg);transform:translateX(100%)rotate(120deg)}}.rollOut{-webkit-animation-name:rollOut;animation-name:rollOut} \ No newline at end of file diff --git a/public/admin/Coco/assets/libs/bootstrap-bootbox/bootbox.min.js b/public/admin/Coco/assets/libs/bootstrap-bootbox/bootbox.min.js new file mode 100644 index 000000000..737d9e9f7 --- /dev/null +++ b/public/admin/Coco/assets/libs/bootstrap-bootbox/bootbox.min.js @@ -0,0 +1,6 @@ +/** + * bootbox.js v4.2.0 + * + * http://bootboxjs.com/license.txt + */ +!function(a,b){"use strict";"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.bootbox=b(a.jQuery)}(this,function a(b,c){"use strict";function d(a){var b=q[o.locale];return b?b[a]:q.en[a]}function e(a,c,d){a.stopPropagation(),a.preventDefault();var e=b.isFunction(d)&&d(a)===!1;e||c.modal("hide")}function f(a){var b,c=0;for(b in a)c++;return c}function g(a,c){var d=0;b.each(a,function(a,b){c(a,b,d++)})}function h(a){var c,d;if("object"!=typeof a)throw new Error("Please supply an object of options");if(!a.message)throw new Error("Please specify a message");return a=b.extend({},o,a),a.buttons||(a.buttons={}),a.backdrop=a.backdrop?"static":!1,c=a.buttons,d=f(c),g(c,function(a,e,f){if(b.isFunction(e)&&(e=c[a]={callback:e}),"object"!==b.type(e))throw new Error("button with key "+a+" must be an object");e.label||(e.label=a),e.className||(e.className=2>=d&&f===d-1?"btn-primary":"btn-default")}),a}function i(a,b){var c=a.length,d={};if(1>c||c>2)throw new Error("Invalid argument length");return 2===c||"string"==typeof a[0]?(d[b[0]]=a[0],d[b[1]]=a[1]):d=a[0],d}function j(a,c,d){return b.extend(!0,{},a,i(c,d))}function k(a,b,c,d){var e={className:"bootbox-"+a,buttons:l.apply(null,b)};return m(j(e,d,c),b)}function l(){for(var a={},b=0,c=arguments.length;c>b;b++){var e=arguments[b],f=e.toLowerCase(),g=e.toUpperCase();a[f]={label:d(g)}}return a}function m(a,b){var d={};return g(b,function(a,b){d[b]=!0}),g(a.buttons,function(a){if(d[a]===c)throw new Error("button key "+a+" is not allowed (options are "+b.join("\n")+")")}),a}var n={dialog:"",header:"",footer:"",closeButton:"",form:"
    ",inputs:{text:"",textarea:"",email:"",select:"",checkbox:"
    ",date:"",time:"",number:"",password:""}},o={locale:"en",backdrop:!0,animate:!0,className:null,closeButton:!0,show:!0,container:"body"},p={};p.alert=function(){var a;if(a=k("alert",["ok"],["message","callback"],arguments),a.callback&&!b.isFunction(a.callback))throw new Error("alert requires callback property to be a function when provided");return a.buttons.ok.callback=a.onEscape=function(){return b.isFunction(a.callback)?a.callback():!0},p.dialog(a)},p.confirm=function(){var a;if(a=k("confirm",["cancel","confirm"],["message","callback"],arguments),a.buttons.cancel.callback=a.onEscape=function(){return a.callback(!1)},a.buttons.confirm.callback=function(){return a.callback(!0)},!b.isFunction(a.callback))throw new Error("confirm requires a callback");return p.dialog(a)},p.prompt=function(){var a,d,e,f,h,i,k;f=b(n.form),d={className:"bootbox-prompt",buttons:l("cancel","confirm"),value:"",inputType:"text"},a=m(j(d,arguments,["title","callback"]),["cancel","confirm"]),i=a.show===c?!0:a.show;var o=["date","time","number"],q=document.createElement("input");if(q.setAttribute("type",a.inputType),o[a.inputType]&&(a.inputType=q.type),a.message=f,a.buttons.cancel.callback=a.onEscape=function(){return a.callback(null)},a.buttons.confirm.callback=function(){var c;switch(a.inputType){case"text":case"textarea":case"email":case"select":case"date":case"time":case"number":case"password":c=h.val();break;case"checkbox":var d=h.find("input:checked");c=[],g(d,function(a,d){c.push(b(d).val())})}return a.callback(c)},a.show=!1,!a.title)throw new Error("prompt requires a title");if(!b.isFunction(a.callback))throw new Error("prompt requires a callback");if(!n.inputs[a.inputType])throw new Error("invalid prompt type");switch(h=b(n.inputs[a.inputType]),a.inputType){case"text":case"textarea":case"email":case"date":case"time":case"number":case"password":h.val(a.value);break;case"select":var r={};if(k=a.inputOptions||[],!k.length)throw new Error("prompt with select requires options");g(k,function(a,d){var e=h;if(d.value===c||d.text===c)throw new Error("given options in wrong format");d.group&&(r[d.group]||(r[d.group]=b("").attr("label",d.group)),e=r[d.group]),e.append("")}),g(r,function(a,b){h.append(b)}),h.val(a.value);break;case"checkbox":var s=b.isArray(a.value)?a.value:[a.value];if(k=a.inputOptions||[],!k.length)throw new Error("prompt with checkbox requires options");if(!k[0].value||!k[0].text)throw new Error("given options in wrong format");h=b("
    "),g(k,function(c,d){var e=b(n.inputs[a.inputType]);e.find("input").attr("value",d.value),e.find("label").append(d.text),g(s,function(a,b){b===d.value&&e.find("input").prop("checked",!0)}),h.append(e)})}return a.placeholder&&h.attr("placeholder",a.placeholder),a.pattern&&h.attr("pattern",a.pattern),f.append(h),f.on("submit",function(a){a.preventDefault(),e.find(".btn-primary").click()}),e=p.dialog(a),e.off("shown.bs.modal"),e.on("shown.bs.modal",function(){h.focus()}),i===!0&&e.modal("show"),e},p.dialog=function(a){a=h(a);var c=b(n.dialog),d=c.find(".modal-body"),f=a.buttons,i="",j={onEscape:a.onEscape};if(g(f,function(a,b){i+="",j[a]=b.callback}),d.find(".bootbox-body").html(a.message),a.animate===!0&&c.addClass("fade"),a.className&&c.addClass(a.className),a.title&&d.before(n.header),a.closeButton){var k=b(n.closeButton);a.title?c.find(".modal-header").prepend(k):k.css("margin-top","-10px").prependTo(d)}return a.title&&c.find(".modal-title").html(a.title),i.length&&(d.after(n.footer),c.find(".modal-footer").html(i)),c.on("hidden.bs.modal",function(a){a.target===this&&c.remove()}),c.on("shown.bs.modal",function(){c.find(".btn-primary:first").focus()}),c.on("escape.close.bb",function(a){j.onEscape&&e(a,c,j.onEscape)}),c.on("click",".modal-footer button",function(a){var d=b(this).data("bb-handler");e(a,c,j[d])}),c.on("click",".bootbox-close-button",function(a){e(a,c,j.onEscape)}),c.on("keyup",function(a){27===a.which&&c.trigger("escape.close.bb")}),b(a.container).append(c),c.modal({backdrop:a.backdrop,keyboard:!1,show:!1}),a.show&&c.modal("show"),c},p.setDefaults=function(){var a={};2===arguments.length?a[arguments[0]]=arguments[1]:a=arguments[0],b.extend(o,a)},p.hideAll=function(){b(".bootbox").modal("hide")};var q={br:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Sim"},da:{OK:"OK",CANCEL:"Annuller",CONFIRM:"Accepter"},de:{OK:"OK",CANCEL:"Abbrechen",CONFIRM:"Akzeptieren"},en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},es:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Aceptar"},fi:{OK:"OK",CANCEL:"Peruuta",CONFIRM:"OK"},fr:{OK:"OK",CANCEL:"Annuler",CONFIRM:"D'accord"},he:{OK:"אישור",CANCEL:"ביטול",CONFIRM:"אישור"},it:{OK:"OK",CANCEL:"Annulla",CONFIRM:"Conferma"},lt:{OK:"Gerai",CANCEL:"Atšaukti",CONFIRM:"Patvirtinti"},lv:{OK:"Labi",CANCEL:"Atcelt",CONFIRM:"Apstiprināt"},nl:{OK:"OK",CANCEL:"Annuleren",CONFIRM:"Accepteren"},no:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},pl:{OK:"OK",CANCEL:"Anuluj",CONFIRM:"Potwierdź"},ru:{OK:"OK",CANCEL:"Отмена",CONFIRM:"Применить"},sv:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},tr:{OK:"Tamam",CANCEL:"İptal",CONFIRM:"Onayla"},zh_CN:{OK:"OK",CANCEL:"取消",CONFIRM:"确认"},zh_TW:{OK:"OK",CANCEL:"取消",CONFIRM:"確認"}};return p.init=function(c){return a(c||b)},p}); \ No newline at end of file diff --git a/public/admin/Coco/assets/libs/bootstrap-calendar/css/bic_calendar.css b/public/admin/Coco/assets/libs/bootstrap-calendar/css/bic_calendar.css new file mode 100644 index 000000000..6037f7b48 --- /dev/null +++ b/public/admin/Coco/assets/libs/bootstrap-calendar/css/bic_calendar.css @@ -0,0 +1,86 @@ +.bic_calendar{ +} +.bic_calendar a{ + text-decoration: none; + color: #333; + display: block; + cursor: pointer; +} +.bic_calendar .table tbody > tr > td{ + text-align: center; + padding: 0px; +} +.bic_calendar td a{ + +} +.bic_calendar .header{ + padding: 10px 0 10px 0; +} +.bic_calendar .button-month-previous{ + padding: 5px; + float: left; +} +.bic_calendar .button-month-next{ + padding: 5px; + float: right; +} +.bic_calendar .button-year-previous{ + padding: 5px; + float: left; +} +.bic_calendar .button-year-next{ + padding: 5px; + float: right; +} +.bic_calendar .monthAndYear{ + text-align: center; + font-weight: 600; +} +.bic_calendar .days-month{ + font-weight: 600; +} +.bic_calendar .event{ + color: white; + background: #3B5A97; + font-weight: bold; +} + +.bic_calendar .event:hover > a{ + background: #3B5A97; + text-shadow: 0 0 4px #fff; +} +.bic_calendar .event a{ + color: white; +} +.bic_calendar .day:hover{ + background: rgba(0,0,0,0.04) +} +.bic_calendar .table{ + margin-bottom: 3px; +} +.bic_calendar .days-month td{ + background: #f0f0f0 ; +} +.bic_calendar .selection{ + background: rgba(141,200,230,0.5); +} +.bic_calendar .first-selection{ + border-radius: 6px 0 0 6px; + border-right: 0; +} +.bic_calendar .last-selection{ + border-radius: 0 6px 6px 0; + border-left: 0; +} +.bic_calendar .middle-selection{ + border-left: 0; + border-right: 0; + border-radius: 0; +} +.bic_calendar .popover{ + color: #000; + text-shadow: none; +} +.bic_calendar .popover-content{ + font-weight: 300; +} \ No newline at end of file diff --git a/public/admin/Coco/assets/libs/bootstrap-calendar/js/bic_calendar.min.js b/public/admin/Coco/assets/libs/bootstrap-calendar/js/bic_calendar.min.js new file mode 100644 index 000000000..3d1dcfe1d --- /dev/null +++ b/public/admin/Coco/assets/libs/bootstrap-calendar/js/bic_calendar.min.js @@ -0,0 +1,9 @@ +/* + * Bic Calendar - v3.1.2 + * A simple twitter bootstrap calendar / agenda to mark events and select range of dates. + * http://bichotll.github.io/bic_calendar + * + * Made by bichotll + * Under Apache License + */ +$.fn.bic_calendar=function(a){var b=$.extend({},$.fn.bic_calendar.defaults,a);return this.each(function(){function a(){n=$(''),d();var a=new Date,b=a.getMonth(),f=a.getFullYear();e(b,f);var g=$('');g.click(function(a){a.preventDefault(),b=(b+1)%12,0==b&&f++,c(b,f)});var h=$('');h.click(function(a){a.preventDefault(),b-=1,-1==b&&(f--,b=11),c(b,f)});var j=$('');j.click(function(a){a.preventDefault(),f++,c(b,f)});var l=$('');l.click(function(a){a.preventDefault(),f--,c(b,f)});var o=$('
    ');if(C===!0){var t=$(""),u=$('');t.append(l),t.append(u),t.append(j),u.append(r),o.append(t)}if(B===!0){var v=$(""),w=$('');v.append(h),v.append(w),v.append(g),w.append(q),o.append(v)}m=$('
    '),m.prepend(o),m.append(n),p.append(m),i(b,f),k()}function c(a,b){n.empty(),d(),e(a,b),i(a,b),l()}function d(){if(0!=v){var a=$(''),b="";$(o).each(function(a,c){b+=""}),b+="",a.append(b),n.append(a)}}function e(a,b){q.text(u[a]),r.text(b);for(var c=1,d=f(1,a,b),e=h(a,b),g=a+1,i="",j=0;7>j;j++){if(d>j){var k="";0==j&&(k+=""),k+='"),k+='
    ",6==j&&(k+=""),c++}i+=k}for(var l=1;e>=c;){var k="";l%7==1&&(k+=""),k+='
    ",l%7==0&&(k+=""),c++,l++,i+=k}if(l--,l%7!=0){k="";for(var j=l%7+1;7>=j;j++){var k="";k+=""),i+=k}}n.append(i)}function f(a,b,c){var d=new Date(c,b,a),e=d.getDay();return e+=D,0==e?e=6:e--,e}function g(a,b,c){return a>0&&13>a&&c>0&&32768>c&&b>0&&b<=new Date(c,a,0).getDate()}function h(a,b){for(var c=28;g(a+1,c+1,b);)c++;return c}function i(a,b){0!=y?$.ajax({type:y.type,url:y.url,data:{mes:a+1,ano:b},dataType:"json"}).done(function(c){"undefined"==typeof t&&(t=[]),$.each(c,function(a){t.push(c[a])}),j(a,b)}):j(a,b)}function j(a,b){for(var c=a+1,d=0;dc){var d=b;b=c,c=d}for($("#bic_calendar_"+b.getDate()+"_"+(parseInt(b.getMonth())+1)+"_"+b.getFullYear()+" div").addClass("selection first-selection");c>b;)b.setDate(b.getDate()+1),$("#bic_calendar_"+b.getDate()+"_"+(parseInt(b.getMonth())+1)+"_"+b.getFullYear()+" div").addClass("selection middle-selection");$("#bic_calendar_"+b.getDate()+"_"+(parseInt(b.getMonth())+1)+"_"+b.getFullYear()+" div").removeClass("middle-selection").addClass("selection last-selection")}}var m,n,o,p=$(this),q=$('
    '),r=$('
    '),s="bic_calendar",t=b.events;o="undefined"!=typeof b.dayNames?b.dayNames:["l","m","x","j","v","s","d"];var u;u="undefined"!=typeof b.monthNames?b.monthNames:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"];var v;v="undefined"!=typeof b.showDays?b.showDays:!0;var w;w="undefined"!=typeof b.popoverOptions?b.popoverOptions:{placement:"bottom",html:!0,trigger:"hover"};var x;x="undefined"!=typeof b.tooltipOptions?b.tooltipOptions:{placement:"bottom",trigger:"hover"};var y;y="undefined"!=typeof b.reqAjax?b.reqAjax:!1;var z=!1;"undefined"!=typeof b.enableSelect&&(z=b.enableSelect);var A=!1;"undefined"!=typeof b.multiSelect&&(A=b.multiSelect);var B=!0;"undefined"!=typeof b.displayMonthController&&(B=b.displayMonthController);var C=!0;"undefined"!=typeof b.displayYearController&&(C=b.displayYearController);var D=0;"undefined"!=typeof b.startWeekDay&&(D=b.startWeekDay);var E="",F="",G="";a()}),this}; \ No newline at end of file diff --git a/public/admin/Coco/assets/libs/bootstrap-datepicker/css/datepicker.css b/public/admin/Coco/assets/libs/bootstrap-datepicker/css/datepicker.css new file mode 100644 index 000000000..b7065b7d5 --- /dev/null +++ b/public/admin/Coco/assets/libs/bootstrap-datepicker/css/datepicker.css @@ -0,0 +1,182 @@ +/*! + * Datepicker for Bootstrap + * + * Copyright 2012 Stefan Petre + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + */ +.datepicker { + top: 0; + left: 0; + padding: 4px; + margin-top: 1px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + /*.dow { + border-top: 1px solid #ddd !important; + }*/ + +} +.datepicker:before { + content: ''; + display: inline-block; + border-left: 7px solid transparent; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-bottom-color: rgba(0, 0, 0, 0.2); + position: absolute; + top: -7px; + left: 6px; +} +.datepicker:after { + content: ''; + display: inline-block; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #ffffff; + position: absolute; + top: -6px; + left: 7px; +} +.datepicker > div { + display: none; +} +.datepicker table { + width: 100%; + margin: 0; +} +.datepicker td, +.datepicker th { + text-align: center; + width: 20px; + height: 20px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.datepicker td.day:hover { + background: #eeeeee; + cursor: pointer; +} +.datepicker td.day.disabled { + color: #eeeeee; +} +.datepicker td.old, +.datepicker td.new { + color: #999999; +} +.datepicker td.active, +.datepicker td.active:hover { + color: #ffffff; + background-color: #006dcc; + background-image: -moz-linear-gradient(top, #0088cc, #0044cc); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); + background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); + background-image: -o-linear-gradient(top, #0088cc, #0044cc); + background-image: linear-gradient(to bottom, #0088cc, #0044cc); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0); + border-color: #0044cc #0044cc #002a80; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #0044cc; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + color: #fff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.datepicker td.active:hover, +.datepicker td.active:hover:hover, +.datepicker td.active:focus, +.datepicker td.active:hover:focus, +.datepicker td.active:active, +.datepicker td.active:hover:active, +.datepicker td.active.active, +.datepicker td.active:hover.active, +.datepicker td.active.disabled, +.datepicker td.active:hover.disabled, +.datepicker td.active[disabled], +.datepicker td.active:hover[disabled] { + color: #ffffff; + background-color: #0044cc; + *background-color: #003bb3; +} +.datepicker td.active:active, +.datepicker td.active:hover:active, +.datepicker td.active.active, +.datepicker td.active:hover.active { + background-color: #003399 \9; +} +.datepicker td span { + display: block; + width: 47px; + height: 54px; + line-height: 54px; + float: left; + margin: 2px; + cursor: pointer; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.datepicker td span:hover { + background: #eeeeee; +} +.datepicker td span.active { + color: #ffffff; + background-color: #006dcc; + background-image: -moz-linear-gradient(top, #0088cc, #0044cc); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); + background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); + background-image: -o-linear-gradient(top, #0088cc, #0044cc); + background-image: linear-gradient(to bottom, #0088cc, #0044cc); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0); + border-color: #0044cc #0044cc #002a80; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #0044cc; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + color: #fff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.datepicker td span.active:hover, +.datepicker td span.active:focus, +.datepicker td span.active:active, +.datepicker td span.active.active, +.datepicker td span.active.disabled, +.datepicker td span.active[disabled] { + color: #ffffff; + background-color: #0044cc; + *background-color: #003bb3; +} +.datepicker td span.active:active, +.datepicker td span.active.active { + background-color: #003399 \9; +} +.datepicker td span.old { + color: #999999; +} +.datepicker th.switch { + width: 145px; +} +.datepicker th.next, +.datepicker th.prev { + font-size: 21px; +} +.datepicker thead tr:first-child th { + cursor: pointer; +} +.datepicker thead tr:first-child th:hover { + background: #eeeeee; +} +.input-append.date .add-on i, +.input-prepend.date .add-on i { + display: block; + cursor: pointer; + width: 16px; + height: 16px; +} \ No newline at end of file diff --git a/public/admin/Coco/assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.js b/public/admin/Coco/assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.js new file mode 100644 index 000000000..bf3a56df0 --- /dev/null +++ b/public/admin/Coco/assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.js @@ -0,0 +1,474 @@ +/* ========================================================= + * bootstrap-datepicker.js + * http://www.eyecon.ro/bootstrap-datepicker + * ========================================================= + * Copyright 2012 Stefan Petre + * + * 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 Datepicker = function(element, options){ + this.element = $(element); + this.format = DPGlobal.parseFormat(options.format||this.element.data('date-format')||'mm/dd/yyyy'); + this.picker = $(DPGlobal.template) + .appendTo('body') + .on({ + click: $.proxy(this.click, this)//, + //mousedown: $.proxy(this.mousedown, this) + }); + this.isInput = this.element.is('input'); + this.component = this.element.is('.date') ? this.element.find('.add-on') : false; + + if (this.isInput) { + this.element.on({ + focus: $.proxy(this.show, this), + //blur: $.proxy(this.hide, this), + keyup: $.proxy(this.update, this) + }); + } else { + if (this.component){ + this.component.on('click', $.proxy(this.show, this)); + } else { + this.element.on('click', $.proxy(this.show, this)); + } + } + + 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.onRender = options.onRender; + this.fillDow(); + this.fillMonths(); + this.update(); + this.showMode(); + }; + + Datepicker.prototype = { + constructor: Datepicker, + + show: function(e) { + this.picker.show(); + this.height = this.component ? this.component.outerHeight() : this.element.outerHeight(); + this.place(); + $(window).on('resize', $.proxy(this.place, this)); + if (e ) { + e.stopPropagation(); + e.preventDefault(); + } + if (!this.isInput) { + } + var that = this; + $(document).on('mousedown', function(ev){ + if ($(ev.target).closest('.datepicker').length == 0) { + that.hide(); + } + }); + this.element.trigger({ + type: 'show', + date: this.date + }); + }, + + hide: function(){ + this.picker.hide(); + $(window).off('resize', this.place); + this.viewMode = this.startViewMode; + this.showMode(); + if (!this.isInput) { + $(document).off('mousedown', this.hide); + } + //this.set(); + this.element.trigger({ + type: 'hide', + date: this.date + }); + }, + + set: function() { + var formated = DPGlobal.formatDate(this.date, this.format); + if (!this.isInput) { + if (this.component){ + this.element.find('input').prop('value', formated); + } + this.element.data('date', formated); + } else { + this.element.prop('value', formated); + } + }, + + setValue: function(newDate) { + if (typeof newDate === 'string') { + this.date = DPGlobal.parseDate(newDate, this.format); + } else { + this.date = new Date(newDate); + } + this.set(); + this.viewDate = new Date(this.date.getFullYear(), this.date.getMonth(), 1, 0, 0, 0, 0); + this.fill(); + }, + + place: function(){ + var offset = this.component ? this.component.offset() : this.element.offset(); + this.picker.css({ + top: offset.top + this.height, + left: offset.left + }); + }, + + update: function(newDate){ + this.date = DPGlobal.parseDate( + typeof newDate === 'string' ? newDate : (this.isInput ? this.element.prop('value') : this.element.data('date')), + this.format + ); + this.viewDate = new Date(this.date.getFullYear(), this.date.getMonth(), 1, 0, 0, 0, 0); + this.fill(); + }, + + fillDow: function(){ + var dowCnt = this.weekStart; + var html = ''; + while (dowCnt < this.weekStart + 7) { + html += ''+DPGlobal.dates.daysMin[(dowCnt++)%7]+''; + } + html += ''; + this.picker.find('.datepicker-days thead').append(html); + }, + + fillMonths: function(){ + var html = ''; + var i = 0 + while (i < 12) { + html += ''+DPGlobal.dates.monthsShort[i++]+''; + } + this.picker.find('.datepicker-months td').append(html); + }, + + fill: function() { + var d = new Date(this.viewDate), + year = d.getFullYear(), + month = d.getMonth(), + currentDate = this.date.valueOf(); + this.picker.find('.datepicker-days th:eq(1)') + .text(DPGlobal.dates.months[month]+' '+year); + var prevMonth = new Date(year, month-1, 28,0,0,0,0), + day = DPGlobal.getDaysInMonth(prevMonth.getFullYear(), prevMonth.getMonth()); + prevMonth.setDate(day); + prevMonth.setDate(day - (prevMonth.getDay() - this.weekStart + 7)%7); + var nextMonth = new Date(prevMonth); + nextMonth.setDate(nextMonth.getDate() + 42); + nextMonth = nextMonth.valueOf(); + var html = []; + var clsName, + prevY, + prevM; + while(prevMonth.valueOf() < nextMonth) { + if (prevMonth.getDay() === this.weekStart) { + html.push(''); + } + clsName = this.onRender(prevMonth); + prevY = prevMonth.getFullYear(); + prevM = prevMonth.getMonth(); + if ((prevM < month && prevY === year) || prevY < year) { + clsName += ' old'; + } else if ((prevM > month && prevY === year) || prevY > year) { + clsName += ' new'; + } + if (prevMonth.valueOf() === currentDate) { + clsName += ' active'; + } + html.push(''+prevMonth.getDate() + ''); + if (prevMonth.getDay() === this.weekEnd) { + html.push(''); + } + prevMonth.setDate(prevMonth.getDate()+1); + } + this.picker.find('.datepicker-days tbody').empty().append(html.join('')); + var currentYear = this.date.getFullYear(); + + var months = this.picker.find('.datepicker-months') + .find('th:eq(1)') + .text(year) + .end() + .find('span').removeClass('active'); + if (currentYear === year) { + months.eq(this.date.getMonth()).addClass('active'); + } + + html = ''; + year = parseInt(year/10, 10) * 10; + var yearCont = this.picker.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); + }, + + 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': + this.viewDate['set'+DPGlobal.modes[this.viewMode].navFnc].call( + this.viewDate, + this.viewDate['get'+DPGlobal.modes[this.viewMode].navFnc].call(this.viewDate) + + DPGlobal.modes[this.viewMode].navStep * (target[0].className === 'prev' ? -1 : 1) + ); + this.fill(); + this.set(); + break; + } + break; + case 'span': + if (target.is('.month')) { + var month = target.parent().find('span').index(target); + this.viewDate.setMonth(month); + } else { + var year = parseInt(target.text(), 10)||0; + this.viewDate.setFullYear(year); + } + if (this.viewMode !== 0) { + this.date = new Date(this.viewDate); + this.element.trigger({ + type: 'changeDate', + date: this.date, + viewMode: DPGlobal.modes[this.viewMode].clsName + }); + } + this.showMode(-1); + this.fill(); + this.set(); + break; + case 'td': + if (target.is('.day') && !target.is('.disabled')){ + var day = parseInt(target.text(), 10)||1; + var month = this.viewDate.getMonth(); + if (target.is('.old')) { + month -= 1; + } else if (target.is('.new')) { + month += 1; + } + var year = this.viewDate.getFullYear(); + this.date = new Date(year, month, day,0,0,0,0); + this.viewDate = new Date(year, month, Math.min(28, day),0,0,0,0); + this.fill(); + this.set(); + this.element.trigger({ + type: 'changeDate', + date: this.date, + viewMode: DPGlobal.modes[this.viewMode].clsName + }); + } + break; + } + } + }, + + mousedown: function(e){ + e.stopPropagation(); + e.preventDefault(); + }, + + showMode: function(dir) { + if (dir) { + this.viewMode = Math.max(this.minViewMode, Math.min(2, this.viewMode + dir)); + } + this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).show(); + } + }; + + $.fn.datepicker = function ( option, val ) { + return this.each(function () { + var $this = $(this), + data = $this.data('datepicker'), + options = typeof option === 'object' && option; + if (!data) { + $this.data('datepicker', (data = new Datepicker(this, $.extend({}, $.fn.datepicker.defaults,options)))); + } + if (typeof option === 'string') data[option](val); + }); + }; + + $.fn.datepicker.defaults = { + onRender: function(date) { + return ''; + } + }; + $.fn.datepicker.Constructor = Datepicker; + + var DPGlobal = { + modes: [ + { + clsName: 'days', + navFnc: 'Month', + navStep: 1 + }, + { + clsName: 'months', + navFnc: 'FullYear', + navStep: 1 + }, + { + clsName: 'years', + navFnc: 'FullYear', + navStep: 10 + }], + dates:{ + 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"] + }, + 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] + }, + parseFormat: function(format){ + var separator = format.match(/[.\/\-\s].*?/), + parts = format.split(/\W+/); + if (!separator || !parts || parts.length === 0){ + throw new Error("Invalid date format."); + } + return {separator: separator, parts: parts}; + }, + parseDate: function(date, format) { + var parts = date.split(format.separator), + date = new Date(), + val; + date.setHours(0); + date.setMinutes(0); + date.setSeconds(0); + date.setMilliseconds(0); + if (parts.length === format.parts.length) { + var year = date.getFullYear(), day = date.getDate(), month = date.getMonth(); + for (var i=0, cnt = format.parts.length; i < cnt; i++) { + val = parseInt(parts[i], 10)||1; + switch(format.parts[i]) { + case 'dd': + case 'd': + day = val; + date.setDate(val); + break; + case 'mm': + case 'm': + month = val - 1; + date.setMonth(val - 1); + break; + case 'yy': + year = 2000 + val; + date.setFullYear(2000 + val); + break; + case 'yyyy': + year = val; + date.setFullYear(val); + break; + } + } + date = new Date(year, month, day, 0 ,0 ,0); + } + return date; + }, + formatDate: function(date, format){ + var val = { + d: date.getDate(), + m: date.getMonth() + 1, + yy: date.getFullYear().toString().substring(2), + yyyy: date.getFullYear() + }; + val.dd = (val.d < 10 ? '0' : '') + val.d; + val.mm = (val.m < 10 ? '0' : '') + val.m; + var date = []; + for (var i=0, cnt = format.parts.length; i < cnt; i++) { + date.push(val[format.parts[i]]); + } + return date.join(format.separator); + }, + headTemplate: ''+ + ''+ + '‹'+ + ''+ + '›'+ + ''+ + '', + contTemplate: '' + }; + DPGlobal.template = ''; + +}( window.jQuery ); \ No newline at end of file diff --git a/public/admin/Coco/assets/libs/bootstrap-fileinput/bootstrap.file-input.js b/public/admin/Coco/assets/libs/bootstrap-fileinput/bootstrap.file-input.js new file mode 100644 index 000000000..17a3b2754 --- /dev/null +++ b/public/admin/Coco/assets/libs/bootstrap-fileinput/bootstrap.file-input.js @@ -0,0 +1,122 @@ +/* + Bootstrap - File Input + ====================== + + This is meant to convert all file input tags into a set of elements that displays consistently in all browsers. + + Converts all + + into Bootstrap buttons + Browse + +*/ +$(function() { + +$.fn.bootstrapFileInput = function() { + + this.each(function(i,elem){ + + var $elem = $(elem); + + // Maybe some fields don't need to be standardized. + if (typeof $elem.attr('data-bfi-disabled') != 'undefined') { + return; + } + + // Set the word to be displayed on the button + var buttonWord = 'Browse'; + + if (typeof $elem.attr('title') != 'undefined') { + buttonWord = $elem.attr('title'); + } + + // Start by getting the HTML of the input element. + // Thanks for the tip http://stackoverflow.com/a/1299069 + var input = $('
    ').append( $elem.eq(0).clone() ).html(); + var className = ''; + + if (!!$elem.attr('class')) { + className = ' ' + $elem.attr('class'); + } + + // Now we're going to replace that input field with a Bootstrap button. + // The input will actually still be there, it will just be float above and transparent (done with the CSS). + $elem.replaceWith(''+buttonWord+input+''); + }) + + // After we have found all of the file inputs let's apply a listener for tracking the mouse movement. + // This is important because the in order to give the illusion that this is a button in FF we actually need to move the button from the file input under the cursor. Ugh. + .promise().done( function(){ + + // As the cursor moves over our new Bootstrap button we need to adjust the position of the invisible file input Browse button to be under the cursor. + // This gives us the pointer cursor that FF denies us + $('.file-input-wrapper').mousemove(function(cursor) { + + var input, wrapper, + wrapperX, wrapperY, + inputWidth, inputHeight, + cursorX, cursorY; + + // This wrapper element (the button surround this file input) + wrapper = $(this); + // The invisible file input element + input = wrapper.find("input"); + // The left-most position of the wrapper + wrapperX = wrapper.offset().left; + // The top-most position of the wrapper + wrapperY = wrapper.offset().top; + // The with of the browsers input field + inputWidth= input.width(); + // The height of the browsers input field + inputHeight= input.height(); + //The position of the cursor in the wrapper + cursorX = cursor.pageX; + cursorY = cursor.pageY; + + //The positions we are to move the invisible file input + // The 20 at the end is an arbitrary number of pixels that we can shift the input such that cursor is not pointing at the end of the Browse button but somewhere nearer the middle + moveInputX = cursorX - wrapperX - inputWidth + 20; + // Slides the invisible input Browse button to be positioned middle under the cursor + moveInputY = cursorY- wrapperY - (inputHeight/2); + + // Apply the positioning styles to actually move the invisible file input + input.css({ + left:moveInputX, + top:moveInputY + }); + }); + + $('.file-input-wrapper input[type=file]').change(function(){ + + var fileName; + fileName = $(this).val(); + + // Remove any previous file names + $(this).parent().next('.file-input-name').remove(); + if (!!$(this).prop('files') && $(this).prop('files').length > 1) { + fileName = $(this)[0].files.length+' files'; + //$(this).parent().after(''+$(this)[0].files.length+' files'); + } + else { + // var fakepath = 'C:\\fakepath\\'; + // fileName = $(this).val().replace('C:\\fakepath\\',''); + fileName = fileName.substring(fileName.lastIndexOf('\\')+1,fileName.length); + } + + $(this).parent().after(''+fileName+''); + }); + + }); + +}; + +// Add the styles before the first stylesheet +// This ensures they can be easily overridden with developer styles +var cssHtml = ''; +$('link[rel=stylesheet]').eq(0).before(cssHtml); + +}); \ No newline at end of file diff --git a/public/admin/Coco/assets/libs/bootstrap-inputmask/inputmask.js b/public/admin/Coco/assets/libs/bootstrap-inputmask/inputmask.js new file mode 100644 index 000000000..a8010ea8f --- /dev/null +++ b/public/admin/Coco/assets/libs/bootstrap-inputmask/inputmask.js @@ -0,0 +1,360 @@ +/* =========================================================== + * Bootstrap: inputmask.js v3.1.0 + * http://jasny.github.io/bootstrap/javascript/#inputmask + * + * Based on Masked Input plugin by Josh Bush (digitalbush.com) + * =========================================================== + * Copyright 2012-2014 Arnold Daniels + * + * 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 ($) { "use strict"; + + var isIphone = (window.orientation !== undefined) + var isAndroid = navigator.userAgent.toLowerCase().indexOf("android") > -1 + var isIE = window.navigator.appName == 'Microsoft Internet Explorer' + + // INPUTMASK PUBLIC CLASS DEFINITION + // ================================= + + var Inputmask = function (element, options) { + if (isAndroid) return // No support because caret positioning doesn't work on Android + + this.$element = $(element) + this.options = $.extend({}, Inputmask.DEFAULTS, options) + this.mask = String(this.options.mask) + + this.init() + this.listen() + + this.checkVal() //Perform initial check for existing values + } + + Inputmask.DEFAULTS = { + mask: "", + placeholder: "_", + definitions: { + '9': "[0-9]", + 'a': "[A-Za-z]", + 'w': "[A-Za-z0-9]", + '*': "." + } + } + + Inputmask.prototype.init = function() { + var defs = this.options.definitions + var len = this.mask.length + + this.tests = [] + this.partialPosition = this.mask.length + this.firstNonMaskPos = null + + $.each(this.mask.split(""), $.proxy(function(i, c) { + if (c == '?') { + len-- + this.partialPosition = i + } else if (defs[c]) { + this.tests.push(new RegExp(defs[c])) + if (this.firstNonMaskPos === null) + this.firstNonMaskPos = this.tests.length - 1 + } else { + this.tests.push(null) + } + }, this)) + + this.buffer = $.map(this.mask.split(""), $.proxy(function(c, i) { + if (c != '?') return defs[c] ? this.options.placeholder : c + }, this)) + + this.focusText = this.$element.val() + + this.$element.data("rawMaskFn", $.proxy(function() { + return $.map(this.buffer, function(c, i) { + return this.tests[i] && c != this.options.placeholder ? c : null + }).join('') + }, this)) + } + + Inputmask.prototype.listen = function() { + if (this.$element.attr("readonly")) return + + var pasteEventName = (isIE ? 'paste' : 'input') + ".mask" + + this.$element + .on("unmask.bs.inputmask", $.proxy(this.unmask, this)) + + .on("focus.bs.inputmask", $.proxy(this.focusEvent, this)) + .on("blur.bs.inputmask", $.proxy(this.blurEvent, this)) + + .on("keydown.bs.inputmask", $.proxy(this.keydownEvent, this)) + .on("keypress.bs.inputmask", $.proxy(this.keypressEvent, this)) + + .on(pasteEventName, $.proxy(this.pasteEvent, this)) + } + + //Helper Function for Caret positioning + Inputmask.prototype.caret = function(begin, end) { + if (this.$element.length === 0) return + if (typeof begin == 'number') { + end = (typeof end == 'number') ? end : begin + return this.$element.each(function() { + if (this.setSelectionRange) { + this.setSelectionRange(begin, end) + } else if (this.createTextRange) { + var range = this.createTextRange() + range.collapse(true) + range.moveEnd('character', end) + range.moveStart('character', begin) + range.select() + } + }) + } else { + if (this.$element[0].setSelectionRange) { + begin = this.$element[0].selectionStart + end = this.$element[0].selectionEnd + } else if (document.selection && document.selection.createRange) { + var range = document.selection.createRange() + begin = 0 - range.duplicate().moveStart('character', -100000) + end = begin + range.text.length + } + return { + begin: begin, + end: end + } + } + } + + Inputmask.prototype.seekNext = function(pos) { + var len = this.mask.length + while (++pos <= len && !this.tests[pos]); + + return pos + } + + Inputmask.prototype.seekPrev = function(pos) { + while (--pos >= 0 && !this.tests[pos]); + + return pos + } + + Inputmask.prototype.shiftL = function(begin,end) { + var len = this.mask.length + + if (begin < 0) return + + for (var i = begin, j = this.seekNext(end); i < len; i++) { + if (this.tests[i]) { + if (j < len && this.tests[i].test(this.buffer[j])) { + this.buffer[i] = this.buffer[j] + this.buffer[j] = this.options.placeholder + } else + break + j = this.seekNext(j) + } + } + this.writeBuffer() + this.caret(Math.max(this.firstNonMaskPos, begin)) + } + + Inputmask.prototype.shiftR = function(pos) { + var len = this.mask.length + + for (var i = pos, c = this.options.placeholder; i < len; i++) { + if (this.tests[i]) { + var j = this.seekNext(i) + var t = this.buffer[i] + this.buffer[i] = c + if (j < len && this.tests[j].test(t)) + c = t + else + break + } + } + }, + + Inputmask.prototype.unmask = function() { + this.$element + .unbind(".mask") + .removeData("inputmask") + } + + Inputmask.prototype.focusEvent = function() { + this.focusText = this.$element.val() + var len = this.mask.length + var pos = this.checkVal() + this.writeBuffer() + + var that = this + var moveCaret = function() { + if (pos == len) + that.caret(0, pos) + else + that.caret(pos) + } + + moveCaret() + setTimeout(moveCaret, 50) + } + + Inputmask.prototype.blurEvent = function() { + this.checkVal() + if (this.$element.val() !== this.focusText) + this.$element.trigger('change') + } + + Inputmask.prototype.keydownEvent = function(e) { + var k = e.which + + //backspace, delete, and escape get special treatment + if (k == 8 || k == 46 || (isIphone && k == 127)) { + var pos = this.caret(), + begin = pos.begin, + end = pos.end + + if (end - begin === 0) { + begin = k != 46 ? this.seekPrev(begin) : (end = this.seekNext(begin - 1)) + end = k == 46 ? this.seekNext(end) : end + } + this.clearBuffer(begin, end) + this.shiftL(begin, end - 1) + + return false + } else if (k == 27) {//escape + this.$element.val(this.focusText) + this.caret(0, this.checkVal()) + return false + } + } + + Inputmask.prototype.keypressEvent = function(e) { + var len = this.mask.length + + var k = e.which, + pos = this.caret() + + if (e.ctrlKey || e.altKey || e.metaKey || k < 32) {//Ignore + return true + } else if (k) { + if (pos.end - pos.begin !== 0) { + this.clearBuffer(pos.begin, pos.end) + this.shiftL(pos.begin, pos.end - 1) + } + + var p = this.seekNext(pos.begin - 1) + if (p < len) { + var c = String.fromCharCode(k) + if (this.tests[p].test(c)) { + this.shiftR(p) + this.buffer[p] = c + this.writeBuffer() + var next = this.seekNext(p) + this.caret(next) + } + } + return false + } + } + + Inputmask.prototype.pasteEvent = function() { + var that = this + + setTimeout(function() { + that.caret(that.checkVal(true)) + }, 0) + } + + Inputmask.prototype.clearBuffer = function(start, end) { + var len = this.mask.length + + for (var i = start; i < end && i < len; i++) { + if (this.tests[i]) + this.buffer[i] = this.options.placeholder + } + } + + Inputmask.prototype.writeBuffer = function() { + return this.$element.val(this.buffer.join('')).val() + } + + Inputmask.prototype.checkVal = function(allow) { + var len = this.mask.length + //try to place characters where they belong + var test = this.$element.val() + var lastMatch = -1 + + for (var i = 0, pos = 0; i < len; i++) { + if (this.tests[i]) { + this.buffer[i] = this.options.placeholder + while (pos++ < test.length) { + var c = test.charAt(pos - 1) + if (this.tests[i].test(c)) { + this.buffer[i] = c + lastMatch = i + break + } + } + if (pos > test.length) + break + } else if (this.buffer[i] == test.charAt(pos) && i != this.partialPosition) { + pos++ + lastMatch = i + } + } + if (!allow && lastMatch + 1 < this.partialPosition) { + this.$element.val("") + this.clearBuffer(0, len) + } else if (allow || lastMatch + 1 >= this.partialPosition) { + this.writeBuffer() + if (!allow) this.$element.val(this.$element.val().substring(0, lastMatch + 1)) + } + return (this.partialPosition ? i : this.firstNonMaskPos) + } + + + // INPUTMASK PLUGIN DEFINITION + // =========================== + + var old = $.fn.inputmask + + $.fn.inputmask = function (options) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.inputmask') + + if (!data) $this.data('bs.inputmask', (data = new Inputmask(this, options))) + }) + } + + $.fn.inputmask.Constructor = Inputmask + + + // INPUTMASK NO CONFLICT + // ==================== + + $.fn.inputmask.noConflict = function () { + $.fn.inputmask = old + return this + } + + + // INPUTMASK DATA-API + // ================== + + $(document).on('focus.bs.inputmask.data-api', '[data-mask]', function (e) { + var $this = $(this) + if ($this.data('bs.inputmask')) return + $this.inputmask($this.data()) + }) + +}(window.jQuery); diff --git a/public/admin/Coco/assets/libs/bootstrap-select/bootstrap-select.min.css b/public/admin/Coco/assets/libs/bootstrap-select/bootstrap-select.min.css new file mode 100644 index 000000000..36fd6900e --- /dev/null +++ b/public/admin/Coco/assets/libs/bootstrap-select/bootstrap-select.min.css @@ -0,0 +1,7 @@ +/*! + * bootstrap-select v1.4.2 + * http://silviomoreto.github.io/bootstrap-select/ + * + * Copyright 2013 bootstrap-select + * Licensed under the MIT license + */.bootstrap-select.btn-group,.bootstrap-select.btn-group[class*="span"]{float:none;display:inline-block;margin-bottom:10px;margin-left:0}.form-search .bootstrap-select.btn-group,.form-inline .bootstrap-select.btn-group,.form-horizontal .bootstrap-select.btn-group{margin-bottom:0}.bootstrap-select.form-control{margin-bottom:0;padding:0;border:0}.bootstrap-select.btn-group.pull-right,.bootstrap-select.btn-group[class*="span"].pull-right,.row-fluid .bootstrap-select.btn-group[class*="span"].pull-right{float:right}.input-append .bootstrap-select.btn-group{margin-left:-1px}.input-prepend .bootstrap-select.btn-group{margin-right:-1px}.bootstrap-select:not([class*="span"]):not([class*="col-"]):not([class*="form-control"]){width:220px}.bootstrap-select{width:220px\0}.bootstrap-select.form-control:not([class*="span"]){width:100%}.bootstrap-select>.btn{width:100%}.error .bootstrap-select .btn{border:1px solid #b94a48}.dropdown-menu{z-index:2000}.bootstrap-select.show-menu-arrow.open>.btn{z-index:2051}.bootstrap-select .btn:focus{outline:thin dotted #333 !important;outline:5px auto -webkit-focus-ring-color !important;outline-offset:-2px}.bootstrap-select.btn-group .btn .filter-option{overflow:hidden;position:absolute;left:12px;right:25px;text-align:left}.bootstrap-select.btn-group .btn .caret{position:absolute;top:50%;right:12px;margin-top:-2px;vertical-align:middle}.bootstrap-select.btn-group>.disabled,.bootstrap-select.btn-group .dropdown-menu li.disabled>a{cursor:not-allowed}.bootstrap-select.btn-group>.disabled:focus{outline:none !important}.bootstrap-select.btn-group[class*="span"] .btn{width:100%}.bootstrap-select.btn-group .dropdown-menu{min-width:100%;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.bootstrap-select.btn-group .dropdown-menu.inner{position:static;border:0;padding:0;margin:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.bootstrap-select.btn-group .dropdown-menu dt{display:block;padding:3px 20px;cursor:default}.bootstrap-select.btn-group .div-contain{overflow:hidden}.bootstrap-select.btn-group .dropdown-menu li{position:relative}.bootstrap-select.btn-group .dropdown-menu li>a.opt{position:relative;padding-left:35px}.bootstrap-select.btn-group .dropdown-menu li>a{cursor:pointer}.bootstrap-select.btn-group .dropdown-menu li>dt small{font-weight:normal}.bootstrap-select.btn-group.show-tick .dropdown-menu li.selected a i.check-mark{display:inline-block;position:absolute;right:15px;margin-top:2.5px}.bootstrap-select.btn-group .dropdown-menu li a i.check-mark{display:none}.bootstrap-select.btn-group.show-tick .dropdown-menu li a span.text{margin-right:34px}.bootstrap-select.btn-group .dropdown-menu li small{padding-left:.5em}.bootstrap-select.btn-group .dropdown-menu li:not(.disabled)>a:hover small,.bootstrap-select.btn-group .dropdown-menu li:not(.disabled)>a:focus small,.bootstrap-select.btn-group .dropdown-menu li.active:not(.disabled)>a small{color:#64b1d8;color:rgba(255,255,255,0.4)}.bootstrap-select.btn-group .dropdown-menu li>dt small{font-weight:normal}.bootstrap-select.show-menu-arrow .dropdown-toggle:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #CCC;border-bottom-color:rgba(0,0,0,0.2);position:absolute;bottom:-4px;left:9px;display:none}.bootstrap-select.show-menu-arrow .dropdown-toggle:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid white;position:absolute;bottom:-4px;left:10px;display:none}.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:before{bottom:auto;top:-3px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,0.2)}.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:after{bottom:auto;top:-3px;border-top:6px solid #fff;border-bottom:0}.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:before{right:12px;left:auto}.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:after{right:13px;left:auto}.bootstrap-select.show-menu-arrow.open>.dropdown-toggle:before,.bootstrap-select.show-menu-arrow.open>.dropdown-toggle:after{display:block}.bootstrap-select.btn-group .no-results{padding:3px;background:#f5f5f5;margin:0 5px}.mobile-device{position:absolute;top:0;left:0;display:block !important;width:100%;height:100% !important;opacity:0}.bootstrap-select.fit-width{width:auto !important}.bootstrap-select.btn-group.fit-width .btn .filter-option{position:static}.bootstrap-select.btn-group.fit-width .btn .caret{position:static;top:auto;margin-top:-1px}.control-group.error .bootstrap-select .dropdown-toggle{border-color:#b94a48}.bootstrap-select-searchbox{padding:4px 8px}.bootstrap-select-searchbox input{margin-bottom:0} diff --git a/public/admin/Coco/assets/libs/bootstrap-select/bootstrap-select.min.js b/public/admin/Coco/assets/libs/bootstrap-select/bootstrap-select.min.js new file mode 100644 index 000000000..cd4f7fe27 --- /dev/null +++ b/public/admin/Coco/assets/libs/bootstrap-select/bootstrap-select.min.js @@ -0,0 +1,8 @@ +/*! + * bootstrap-select v1.4.2 + * http://silviomoreto.github.io/bootstrap-select/ + * + * Copyright 2013 bootstrap-select + * Licensed under the MIT license + */ +;!function(b){b.expr[":"].icontains=function(e,c,d){return b(e).text().toUpperCase().indexOf(d[3].toUpperCase())>=0};var a=function(d,c,f){if(f){f.stopPropagation();f.preventDefault()}this.$element=b(d);this.$newElement=null;this.$button=null;this.$menu=null;this.options=b.extend({},b.fn.selectpicker.defaults,this.$element.data(),typeof c=="object"&&c);if(this.options.title===null){this.options.title=this.$element.attr("title")}this.val=a.prototype.val;this.render=a.prototype.render;this.refresh=a.prototype.refresh;this.setStyle=a.prototype.setStyle;this.selectAll=a.prototype.selectAll;this.deselectAll=a.prototype.deselectAll;this.init()};a.prototype={constructor:a,init:function(){this.$element.hide();this.multiple=this.$element.prop("multiple");var d=this.$element.attr("id");this.$newElement=this.createView();this.$element.after(this.$newElement);this.$menu=this.$newElement.find("> .dropdown-menu");this.$button=this.$newElement.find("> button");this.$searchbox=this.$newElement.find("input");if(d!==undefined){var c=this;this.$button.attr("data-id",d);b('label[for="'+d+'"]').click(function(f){f.preventDefault();c.$button.focus()})}this.checkDisabled();this.clickListener();if(this.options.liveSearch){this.liveSearchListener()}this.render();this.liHeight();this.setStyle();this.setWidth();if(this.options.container){this.selectPosition()}this.$menu.data("this",this);this.$newElement.data("this",this)},createDropdown:function(){var c=this.multiple?" show-tick":"";var f=this.options.header?'
    '+this.options.header+"
    ":"";var e=this.options.liveSearch?'':"";var d='
    ';return b(d)},createView:function(){var c=this.createDropdown();var d=this.createLi();c.find("ul").append(d);return c},reloadLi:function(){this.destroyLi();var c=this.createLi();this.$menu.find("ul").append(c)},destroyLi:function(){this.$menu.find("li").remove()},createLi:function(){var d=this,e=[],c="";this.$element.find("option").each(function(){var i=b(this);var g=i.attr("class")||"";var h=i.attr("style")||"";var m=i.data("content")?i.data("content"):i.html();var k=i.data("subtext")!==undefined?''+i.data("subtext")+"":"";var j=i.data("icon")!==undefined?' ':"";if(j!==""&&(i.is(":disabled")||i.parent().is(":disabled"))){j=""+j+""}if(!i.data("content")){m=j+''+m+k+""}if(d.options.hideDisabled&&(i.is(":disabled")||i.parent().is(":disabled"))){e.push('')}else{if(i.parent().is("optgroup")&&i.data("divider")!==true){if(i.index()===0){var l=i.parent().attr("label");var n=i.parent().data("subtext")!==undefined?''+i.parent().data("subtext")+"":"";var f=i.parent().data("icon")?' ':"";l=f+''+l+n+"";if(i[0].index!==0){e.push('
    '+l+"
    "+d.createA(m,"opt "+g,h))}else{e.push("
    "+l+"
    "+d.createA(m,"opt "+g,h))}}else{e.push(d.createA(m,"opt "+g,h))}}else{if(i.data("divider")===true){e.push('
    ')}else{if(b(this).data("hidden")===true){e.push("")}else{e.push(d.createA(m,g,h))}}}}});b.each(e,function(f,g){c+="
  • "+g+"
  • "});if(!this.multiple&&this.$element.find("option:selected").length===0&&!this.options.title){this.$element.find("option").eq(0).prop("selected",true).attr("selected","selected")}return b(c)},createA:function(e,c,d){return''+e+''},render:function(){var d=this;this.$element.find("option").each(function(h){d.setDisabled(h,b(this).is(":disabled")||b(this).parent().is(":disabled"));d.setSelected(h,b(this).is(":selected"))});this.tabIndex();var g=this.$element.find("option:selected").map(function(){var j=b(this);var i=j.data("icon")&&d.options.showIcon?' ':"";var h;if(d.options.showSubtext&&j.attr("data-subtext")&&!d.multiple){h=' '+j.data("subtext")+""}else{h=""}if(j.data("content")&&d.options.showContent){return j.data("content")}else{if(j.attr("title")!==undefined){return j.attr("title")}else{return i+j.html()+h}}}).toArray();var f=!this.multiple?g[0]:g.join(this.options.multipleSeparator);if(this.multiple&&this.options.selectedTextFormat.indexOf("count")>-1){var c=this.options.selectedTextFormat.split(">");var e=this.options.hideDisabled?":not([disabled])":"";if((c.length>1&&g.length>c[1])||(c.length==1&&g.length>=2)){f=this.options.countSelectedText.replace("{0}",g.length).replace("{1}",this.$element.find('option:not([data-divider="true"]):not([data-hidden="true"])'+e).length)}}if(!f){f=this.options.title!==undefined?this.options.title:this.options.noneSelectedText}this.$button.attr("title",b.trim(f));this.$newElement.find(".filter-option").html(f)},setStyle:function(e,d){if(this.$element.attr("class")){this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device/gi,""))}var c=e?e:this.options.style;if(d=="add"){this.$button.addClass(c)}else{if(d=="remove"){this.$button.removeClass(c)}else{this.$button.removeClass(this.options.style);this.$button.addClass(c)}}},liHeight:function(){var e=this.$menu.parent().clone().appendTo("body"),f=e.addClass("open").find("> .dropdown-menu"),d=f.find("li > a").outerHeight(),c=this.options.header?f.find(".popover-title").outerHeight():0,g=this.options.liveSearch?f.find(".bootstrap-select-searchbox").outerHeight():0;e.remove();this.$newElement.data("liHeight",d).data("headerHeight",c).data("searchHeight",g)},setSize:function(){var h=this,d=this.$menu,i=d.find(".inner"),t=this.$newElement.outerHeight(),f=this.$newElement.data("liHeight"),r=this.$newElement.data("headerHeight"),l=this.$newElement.data("searchHeight"),k=d.find("li .divider").outerHeight(true),q=parseInt(d.css("padding-top"))+parseInt(d.css("padding-bottom"))+parseInt(d.css("border-top-width"))+parseInt(d.css("border-bottom-width")),o=this.options.hideDisabled?":not(.disabled)":"",n=b(window),g=q+parseInt(d.css("margin-top"))+parseInt(d.css("margin-bottom"))+2,p,u,s,j=function(){u=h.$newElement.offset().top-n.scrollTop();s=n.height()-u-t};j();if(this.options.header){d.css("padding-top",0)}if(this.options.size=="auto"){var e=function(){var v;j();p=s-g;if(h.options.dropupAuto){h.$newElement.toggleClass("dropup",(u>s)&&((p-g)3){v=f*3+g-2}else{v=0}d.css({"max-height":p+"px",overflow:"hidden","min-height":v+"px"});i.css({"max-height":p-r-l-q+"px","overflow-y":"auto","min-height":v-q+"px"})};e();b(window).resize(e);b(window).scroll(e)}else{if(this.options.size&&this.options.size!="auto"&&d.find("li"+o).length>this.options.size){var m=d.find("li"+o+" > *").filter(":not(.div-contain)").slice(0,this.options.size).last().parent().index();var c=d.find("li").slice(0,m+1).find(".div-contain").length;p=f*this.options.size+c*k+q;if(h.options.dropupAuto){this.$newElement.toggleClass("dropup",(u>s)&&(p .dropdown-menu").css("width");d.remove();this.$newElement.css("width",c)}else{if(this.options.width=="fit"){this.$menu.css("min-width","");this.$newElement.css("width","").addClass("fit-width")}else{if(this.options.width){this.$menu.css("min-width","");this.$newElement.css("width",this.options.width)}else{this.$menu.css("min-width","");this.$newElement.css("width","")}}}if(this.$newElement.hasClass("fit-width")&&this.options.width!=="fit"){this.$newElement.removeClass("fit-width")}},selectPosition:function(){var e=this,d="
    ",f=b(d),h,g,c=function(i){f.addClass(i.attr("class")).toggleClass("dropup",i.hasClass("dropup"));h=i.offset();g=i.hasClass("dropup")?0:i[0].offsetHeight;f.css({top:h.top+g,left:h.left,width:i[0].offsetWidth,position:"absolute"})};this.$newElement.on("click",function(){c(b(this));f.appendTo(e.options.container);f.toggleClass("open",!b(this).hasClass("open"));f.append(e.$menu)});b(window).resize(function(){c(e.$newElement)});b(window).on("scroll",function(){c(e.$newElement)});b("html").on("click",function(i){if(b(i.target).closest(e.$newElement).length<1){f.removeClass("open")}})},mobile:function(){this.$element.addClass("mobile-device").appendTo(this.$newElement);if(this.options.container){this.$menu.hide()}},refresh:function(){this.reloadLi();this.render();this.setWidth();this.setStyle();this.checkDisabled();this.liHeight()},update:function(){this.reloadLi();this.setWidth();this.setStyle();this.checkDisabled();this.liHeight()},setSelected:function(c,d){this.$menu.find("li").eq(c).toggleClass("selected",d)},setDisabled:function(c,d){if(d){this.$menu.find("li").eq(c).addClass("disabled").find("a").attr("href","#").attr("tabindex",-1)}else{this.$menu.find("li").eq(c).removeClass("disabled").find("a").removeAttr("href").attr("tabindex",0)}},isDisabled:function(){return this.$element.is(":disabled")},checkDisabled:function(){var c=this;if(this.isDisabled()){this.$button.addClass("disabled").attr("tabindex",-1)}else{if(this.$button.hasClass("disabled")){this.$button.removeClass("disabled")}if(this.$button.attr("tabindex")==-1){if(!this.$element.data("tabindex")){this.$button.removeAttr("tabindex")}}}this.$button.click(function(){return !c.isDisabled()})},tabIndex:function(){if(this.$element.is("[tabindex]")){this.$element.data("tabindex",this.$element.attr("tabindex"));this.$button.attr("tabindex",this.$element.data("tabindex"))}},clickListener:function(){var c=this;b("body").on("touchstart.dropdown",".dropdown-menu",function(d){d.stopPropagation()});this.$newElement.on("click",function(){c.setSize();if(!c.options.liveSearch&&!c.multiple){setTimeout(function(){c.$menu.find(".selected a").focus()},10)}});this.$menu.on("click","li a",function(k){var g=b(this).parent().index(),j=c.$element.val(),f=c.$element.prop("selectedIndex");if(c.multiple){k.stopPropagation()}k.preventDefault();if(!c.isDisabled()&&!b(this).parent().hasClass("disabled")){var d=c.$element.find("option");var i=d.eq(g);if(!c.multiple){d.prop("selected",false);i.prop("selected",true)}else{var h=i.prop("selected");i.prop("selected",!h)}if(!c.multiple){c.$button.focus()}else{if(c.options.liveSearch){c.$searchbox.focus()}}if((j!=c.$element.val()&&c.multiple)||(f!=c.$element.prop("selectedIndex")&&!c.multiple)){c.$element.change()}}});this.$menu.on("click","li.disabled a, li dt, li .div-contain, .popover-title, .popover-title :not(.close)",function(d){if(d.target==this){d.preventDefault();d.stopPropagation();if(!c.options.liveSearch){c.$button.focus()}else{c.$searchbox.focus()}}});this.$menu.on("click",".popover-title .close",function(){c.$button.focus()});this.$searchbox.on("click",function(d){d.stopPropagation()});this.$element.change(function(){c.render()})},liveSearchListener:function(){var d=this,c=b('
  • ');this.$newElement.on("click.dropdown.data-api",function(){d.$menu.find(".active").removeClass("active");if(!!d.$searchbox.val()){d.$searchbox.val("");d.$menu.find("li").show();if(!!c.parent().length){c.remove()}}if(!d.multiple){d.$menu.find(".selected").addClass("active")}setTimeout(function(){d.$searchbox.focus()},10)});this.$searchbox.on("input propertychange",function(){if(d.$searchbox.val()){d.$menu.find("li").show().not(":icontains("+d.$searchbox.val()+")").hide();if(!d.$menu.find("li").filter(":visible:not(.no-results)").length){if(!!c.parent().length){c.remove()}c.html('No results match "'+d.$searchbox.val()+'"').show();d.$menu.find("li").last().after(c)}else{if(!!c.parent().length){c.remove()}}}else{d.$menu.find("li").show();if(!!c.parent().length){c.remove()}}d.$menu.find("li.active").removeClass("active");d.$menu.find("li").filter(":visible:not(.divider)").eq(0).addClass("active").find("a").focus();b(this).focus()});this.$menu.on("mouseenter","a",function(f){d.$menu.find(".active").removeClass("active");b(f.currentTarget).parent().not(".disabled").addClass("active")});this.$menu.on("mouseleave","a",function(){d.$menu.find(".active").removeClass("active")})},val:function(c){if(c!==undefined){this.$element.val(c);this.$element.change();return this.$element}else{return this.$element.val()}},selectAll:function(){this.$element.find("option").prop("selected",true).attr("selected","selected");this.render()},deselectAll:function(){this.$element.find("option").prop("selected",false).removeAttr("selected");this.render()},keydown:function(p){var q,o,i,n,k,j,r,f,h,m,d,s,g={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"};q=b(this);i=q.parent();if(q.is("input")){i=q.parent().parent()}m=i.data("this");if(m.options.liveSearch){i=q.parent().parent()}if(m.options.container){i=m.$menu}o=b("[role=menu] li:not(.divider) a",i);s=m.$menu.parent().hasClass("open");if(m.options.liveSearch){if(/(^9$|27)/.test(p.keyCode)&&s&&m.$menu.find(".active").length===0){p.preventDefault();m.$menu.parent().removeClass("open");m.$button.focus()}o=b("[role=menu] li:not(.divider):visible",i);if(!q.val()&&!/(38|40)/.test(p.keyCode)){if(o.filter(".active").length===0){o=m.$newElement.find("li").filter(":icontains("+g[p.keyCode]+")")}}}if(!o.length){return}if(/(38|40)/.test(p.keyCode)){if(!s){m.$menu.parent().addClass("open")}n=o.index(o.filter(":focus"));j=o.parent(":not(.disabled):visible").first().index();r=o.parent(":not(.disabled):visible").last().index();k=o.eq(n).parent().nextAll(":not(.disabled):visible").eq(0).index();f=o.eq(n).parent().prevAll(":not(.disabled):visible").eq(0).index();h=o.eq(k).parent().prevAll(":not(.disabled):visible").eq(0).index();if(m.options.liveSearch){o.each(function(e){if(b(this).is(":not(.disabled)")){b(this).data("index",e)}});n=o.index(o.filter(".active"));j=o.filter(":not(.disabled):visible").first().data("index");r=o.filter(":not(.disabled):visible").last().data("index");k=o.eq(n).nextAll(":not(.disabled):visible").eq(0).data("index");f=o.eq(n).prevAll(":not(.disabled):visible").eq(0).data("index");h=o.eq(k).prevAll(":not(.disabled):visible").eq(0).data("index")}d=q.data("prevIndex");if(p.keyCode==38){if(m.options.liveSearch){n-=1}if(n!=h&&n>f){n=f}if(nr){n=r}if(n==d){n=j}}q.data("prevIndex",n);if(!m.options.liveSearch){o.eq(n).focus()}else{p.preventDefault();if(!q.is(".dropdown-toggle")){o.removeClass("active");o.eq(n).addClass("active").find("a").focus();q.focus()}}}else{if(!q.is("input")){var c=[],l,t;o.each(function(){if(b(this).parent().is(":not(.disabled)")){if(b.trim(b(this).text().toLowerCase()).substring(0,1)==g[p.keyCode]){c.push(b(this).parent().index())}}});l=b(document).data("keycount");l++;b(document).data("keycount",l);t=b.trim(b(":focus").text().toLowerCase()).substring(0,1);if(t!=g[p.keyCode]){l=1;b(document).data("keycount",l)}else{if(l>=c.length){b(document).data("keycount",0);if(l>c.length){l=1}}}o.eq(c[l-1]).focus()}}if(/(13|32|^9$)/.test(p.keyCode)&&s){if(!/(32)/.test(p.keyCode)){p.preventDefault()}if(!m.options.liveSearch){b(":focus").click()}else{if(!/(32)/.test(p.keyCode)){m.$menu.find(".active a").click();q.focus()}}b(document).data("keycount",0)}if((/(^9$|27)/.test(p.keyCode)&&s&&(m.multiple||m.options.liveSearch))||(/(27)/.test(p.keyCode)&&!s)){m.$menu.parent().removeClass("open");m.$button.focus()}},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},destroy:function(){this.$newElement.remove();this.$element.remove()}};b.fn.selectpicker=function(e,f){var c=arguments;var g;var d=this.each(function(){if(b(this).is("select")){var m=b(this),l=m.data("selectpicker"),h=typeof e=="object"&&e;if(!l){m.data("selectpicker",(l=new a(this,h,f)))}else{if(h){for(var j in h){l.options[j]=h[j]}}}if(typeof e=="string"){var k=e;if(l[k] instanceof Function){[].shift.apply(c);g=l[k].apply(l,c)}else{g=l.options[k]}}}});if(g!==undefined){return g}else{return d}};b.fn.selectpicker.defaults={style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",noneSelectedText:"Nothing selected",countSelectedText:"{0} of {1} selected",width:false,container:false,hideDisabled:false,showSubtext:false,showIcon:true,showContent:true,dropupAuto:true,header:false,liveSearch:false,multipleSeparator:", ",iconBase:"glyphicon",tickIcon:"glyphicon-ok"};b(document).data("keycount",0).on("keydown",".bootstrap-select [data-toggle=dropdown], .bootstrap-select [role=menu], .bootstrap-select-searchbox input",a.prototype.keydown).on("focusin.modal",".bootstrap-select [data-toggle=dropdown], .bootstrap-select [role=menu], .bootstrap-select-searchbox input",function(c){c.stopPropagation()})}(window.jQuery); \ No newline at end of file diff --git a/public/admin/Coco/assets/libs/bootstrap-select2/select2-spinner.gif b/public/admin/Coco/assets/libs/bootstrap-select2/select2-spinner.gif new file mode 100644 index 000000000..5b33f7e54 Binary files /dev/null and b/public/admin/Coco/assets/libs/bootstrap-select2/select2-spinner.gif differ diff --git a/public/admin/Coco/assets/libs/bootstrap-select2/select2.css b/public/admin/Coco/assets/libs/bootstrap-select2/select2.css new file mode 100644 index 000000000..6bad4dc21 --- /dev/null +++ b/public/admin/Coco/assets/libs/bootstrap-select2/select2.css @@ -0,0 +1,589 @@ +/* +Version: 3.4.3 Timestamp: Tue Sep 17 06:47:14 PDT 2013 +*/ +.select2-container { + margin: 0; + position: relative; + display: inline-block; + /* inline-block for ie7 */ + zoom: 1; + *display: inline; + vertical-align: middle; +} + +.select2-container, +.select2-drop, +.select2-search, +.select2-search input { + /* + Force border-box so that % widths fit the parent + container without overlap because of margin/padding. + + More Info : http://www.quirksmode.org/css/box.html + */ + -webkit-box-sizing: border-box; /* webkit */ + -moz-box-sizing: border-box; /* firefox */ + box-sizing: border-box; /* css3 */ +} + +.select2-container .select2-choice { + display: block; + height: 26px; + padding: 0 0 0 8px; + overflow: hidden; + position: relative; + + border: 1px solid #aaa; + white-space: nowrap; + line-height: 26px; + color: #444; + text-decoration: none; + + border-radius: 4px; + + background-clip: padding-box; + + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + + background-color: #fff; +} + +.select2-container.select2-drop-above .select2-choice { + border-bottom-color: #aaa; + + border-radius: 0 0 4px 4px; + +} + +.select2-container.select2-allowclear .select2-choice .select2-chosen { + margin-right: 42px; +} + +.select2-container .select2-choice > .select2-chosen { + margin-right: 26px; + display: block; + overflow: hidden; + + white-space: nowrap; + + text-overflow: ellipsis; +} + +.select2-container .select2-choice abbr { + display: none; + width: 12px; + height: 12px; + position: absolute; + right: 24px; + top: 8px; + + font-size: 1px; + text-decoration: none; + + border: 0; + background: url('select2.png') right top no-repeat; + cursor: pointer; + outline: 0; +} + +.select2-container.select2-allowclear .select2-choice abbr { + display: inline-block; +} + +.select2-container .select2-choice abbr:hover { + background-position: right -11px; + cursor: pointer; +} + +.select2-drop-mask { + border: 0; + margin: 0; + padding: 0; + position: fixed; + left: 0; + top: 0; + min-height: 100%; + min-width: 100%; + height: auto; + width: auto; + opacity: 0; + z-index: 9998; + /* styles required for IE to work */ + background-color: #fff; + filter: alpha(opacity=0); +} + +.select2-drop { + width: 100%; + margin-top: -1px; + position: absolute; + z-index: 9999; + top: 100%; + + background: #fff; + color: #000; + border: 1px solid #aaa; + border-top: 0; + + border-radius: 0 0 4px 4px; + + -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15); + box-shadow: 0 4px 5px rgba(0, 0, 0, .15); +} + +.select2-drop-auto-width { + border-top: 1px solid #aaa; + width: auto; +} + +.select2-drop-auto-width .select2-search { + padding-top: 4px; +} + +.select2-drop.select2-drop-above { + margin-top: 1px; + border-top: 1px solid #aaa; + border-bottom: 0; + + border-radius: 4px 4px 0 0; + + -webkit-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15); + box-shadow: 0 -4px 5px rgba(0, 0, 0, .15); +} + +.select2-drop-active { + border: 1px solid #5897fb; + border-top: none; +} + +.select2-drop.select2-drop-above.select2-drop-active { + border-top: 1px solid #5897fb; +} + +.select2-container .select2-choice .select2-arrow { + display: inline-block; + width: 18px; + height: 100%; + position: absolute; + right: 0; + top: 0; + + border-left: 1px solid #aaa; + border-radius: 0 4px 4px 0; + + background-clip: padding-box; + + background: #ccc; +} + +.select2-container .select2-choice .select2-arrow b { + display: block; + width: 100%; + height: 100%; + background: url('select2.png') no-repeat 0 1px; +} + +.select2-search { + display: inline-block; + width: 100%; + min-height: 26px; + margin: 0; + padding-left: 4px; + padding-right: 4px; + position: relative; + z-index: 10000; + white-space: nowrap; +} + +.select2-search input { + width: 100%; + height: auto !important; + min-height: 26px; + padding: 4px 20px 4px 5px; + margin: 0; + + outline: 0; + font-family: sans-serif; + font-size: 1em; + + border: 1px solid #aaa; + border-radius: 0; + + -webkit-box-shadow: none; + box-shadow: none; + + background: #fff url('select2.png') no-repeat 100% -22px; + background: url('select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee)); + background: url('select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%); + background: url('select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%); + background: url('select2.png') no-repeat 100% -22px, linear-gradient(top, #fff 85%, #eee 99%); +} + +.select2-drop.select2-drop-above .select2-search input { + margin-top: 4px; +} + +.select2-search input.select2-active { + background: #fff url('select2-spinner.gif') no-repeat 100%; + background: url('select2-spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee)); + background: url('select2-spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%); + background: url('select2-spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%); + background: url('select2-spinner.gif') no-repeat 100%, linear-gradient(top, #fff 85%, #eee 99%); +} + +.select2-container-active .select2-choice, +.select2-container-active .select2-choices { + border: 1px solid #5897fb; + outline: none; + + -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3); + box-shadow: 0 0 5px rgba(0, 0, 0, .3); +} + +.select2-dropdown-open .select2-choice { + border-bottom-color: transparent; + -webkit-box-shadow: 0 1px 0 #fff inset; + box-shadow: 0 1px 0 #fff inset; + + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + + background-color: #eee; + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #fff), color-stop(0.5, #eee)); + background-image: -webkit-linear-gradient(center bottom, #fff 0%, #eee 50%); + background-image: -moz-linear-gradient(center bottom, #fff 0%, #eee 50%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0); + background-image: linear-gradient(top, #fff 0%, #eee 50%); +} + +.select2-dropdown-open.select2-drop-above .select2-choice, +.select2-dropdown-open.select2-drop-above .select2-choices { + border: 1px solid #5897fb; + border-top-color: transparent; + + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(0.5, #eee)); + background-image: -webkit-linear-gradient(center top, #fff 0%, #eee 50%); + background-image: -moz-linear-gradient(center top, #fff 0%, #eee 50%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0); + background-image: linear-gradient(bottom, #fff 0%, #eee 50%); +} + +.select2-dropdown-open .select2-choice .select2-arrow { + background: transparent; + border-left: none; + filter: none; +} +.select2-dropdown-open .select2-choice .select2-arrow b { + background-position: -18px 1px; +} + +/* results */ +.select2-results { + max-height: 200px; + padding: 0 0 0 4px; + margin: 4px 4px 4px 0; + position: relative; + overflow-x: hidden; + overflow-y: auto; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} + +.select2-results ul.select2-result-sub { + margin: 0; + padding-left: 0; +} + +.select2-results ul.select2-result-sub > li .select2-result-label { padding-left: 20px } +.select2-results ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 40px } +.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 60px } +.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 80px } +.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 100px } +.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 110px } +.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 120px } + +.select2-results li { + list-style: none; + display: list-item; + background-image: none; +} + +.select2-results li.select2-result-with-children > .select2-result-label { + font-weight: bold; +} + +.select2-results .select2-result-label { + padding: 3px 7px 4px; + margin: 0; + cursor: pointer; + + min-height: 1em; + + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.select2-results .select2-highlighted { + background: #3875d7; + color: #fff; +} + +.select2-results li em { + background: #feffde; + font-style: normal; +} + +.select2-results .select2-highlighted em { + background: transparent; +} + +.select2-results .select2-highlighted ul { + background: #fff; + color: #000; +} + + +.select2-results .select2-no-results, +.select2-results .select2-searching, +.select2-results .select2-selection-limit { + background: #f4f4f4; + display: list-item; +} + +/* +disabled look for disabled choices in the results dropdown +*/ +.select2-results .select2-disabled.select2-highlighted { + color: #666; + background: #f4f4f4; + display: list-item; + cursor: default; +} +.select2-results .select2-disabled { + background: #f4f4f4; + display: list-item; + cursor: default; +} + +.select2-results .select2-selected { + display: none; +} + +.select2-more-results.select2-active { + background: #f4f4f4 url('select2-spinner.gif') no-repeat 100%; +} + +.select2-more-results { + background: #f4f4f4; + display: list-item; +} + +/* disabled styles */ + +.select2-container.select2-container-disabled .select2-choice { + background-color: #f4f4f4; + background-image: none; + border: 1px solid #ddd; + cursor: default; +} + +.select2-container.select2-container-disabled .select2-choice .select2-arrow { + background-color: #f4f4f4; + background-image: none; + border-left: 0; +} + +.select2-container.select2-container-disabled .select2-choice abbr { + display: none; +} + + +/* multiselect */ + +.select2-container-multi .select2-choices { + height: auto !important; + height: 1%; + margin: 0; + padding: 0; + position: relative; + + border: 1px solid #aaa; + cursor: text; + overflow: hidden; + + background-color: #fff; + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eee), color-stop(15%, #fff)); + background-image: -webkit-linear-gradient(top, #eee 1%, #fff 15%); + background-image: -moz-linear-gradient(top, #eee 1%, #fff 15%); + background-image: linear-gradient(top, #eee 1%, #fff 15%); +} + +.select2-locked { + padding: 3px 5px 3px 5px !important; +} + +.select2-container-multi .select2-choices { + min-height: 26px; +} + +.select2-container-multi.select2-container-active .select2-choices { + border: 1px solid #5897fb; + outline: none; + + -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3); + box-shadow: 0 0 5px rgba(0, 0, 0, .3); +} +.select2-container-multi .select2-choices li { + float: left; + list-style: none; +} +.select2-container-multi .select2-choices .select2-search-field { + margin: 0; + padding: 0; + white-space: nowrap; +} + +.select2-container-multi .select2-choices .select2-search-field input { + padding: 5px; + margin: 1px 0; + + font-family: sans-serif; + font-size: 100%; + color: #666; + outline: 0; + border: 0; + -webkit-box-shadow: none; + box-shadow: none; + background: transparent !important; +} + +.select2-container-multi .select2-choices .select2-search-field input.select2-active { + background: #fff url('select2-spinner.gif') no-repeat 100% !important; +} + +.select2-default { + color: #999 !important; +} + +.select2-container-multi .select2-choices .select2-search-choice { + padding: 3px 5px 3px 18px; + margin: 3px 0 3px 5px; + position: relative; + + line-height: 13px; + color: #333; + cursor: default; + border: 1px solid #aaaaaa; + + border-radius: 3px; + + -webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05); + box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05); + + background-clip: padding-box; + + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + + background-color: #e4e4e4; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#f4f4f4', GradientType=0); + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eee)); + background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); + background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); + background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); +} +.select2-container-multi .select2-choices .select2-search-choice .select2-chosen { + cursor: default; +} +.select2-container-multi .select2-choices .select2-search-choice-focus { + background: #d4d4d4; +} + +.select2-search-choice-close { + display: block; + width: 12px; + height: 13px; + position: absolute; + right: 3px; + top: 4px; + + font-size: 1px; + outline: none; + background: url('select2.png') right top no-repeat; +} + +.select2-container-multi .select2-search-choice-close { + left: 3px; +} + +.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover { + background-position: right -11px; +} +.select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close { + background-position: right -11px; +} + +/* disabled styles */ +.select2-container-multi.select2-container-disabled .select2-choices { + background-color: #f4f4f4; + background-image: none; + border: 1px solid #ddd; + cursor: default; +} + +.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice { + padding: 3px 5px 3px 5px; + border: 1px solid #ddd; + background-image: none; + background-color: #f4f4f4; +} + +.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close { display: none; + background: none; +} +/* end multiselect */ + + +.select2-result-selectable .select2-match, +.select2-result-unselectable .select2-match { + text-decoration: underline; +} + +.select2-offscreen, .select2-offscreen:focus { + clip: rect(0 0 0 0) !important; + width: 1px !important; + height: 1px !important; + border: 0 !important; + margin: 0 !important; + padding: 0 !important; + overflow: hidden !important; + position: absolute !important; + outline: 0 !important; + left: 0px !important; + top: 0px !important; +} + +.select2-display-none { + display: none; +} + +.select2-measure-scrollbar { + position: absolute; + top: -10000px; + left: -10000px; + width: 100px; + height: 100px; + overflow: scroll; +} +/* Retina-ize icons */ + + diff --git a/public/admin/Coco/assets/libs/bootstrap-select2/select2.min.js b/public/admin/Coco/assets/libs/bootstrap-select2/select2.min.js new file mode 100644 index 000000000..0910fdfe8 --- /dev/null +++ b/public/admin/Coco/assets/libs/bootstrap-select2/select2.min.js @@ -0,0 +1,22 @@ +/* +Copyright 2012 Igor Vaynberg + +Version: 3.4.3 Timestamp: Tue Sep 17 06:47:14 PDT 2013 + +This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU +General Public License version 2 (the "GPL License"). You may choose either license to govern your +use of this software only upon the condition that you accept all of the terms of either the Apache +License or the GPL License. + +You may obtain a copy of the Apache License and the GPL License at: + +http://www.apache.org/licenses/LICENSE-2.0 +http://www.gnu.org/licenses/gpl-2.0.html + +Unless required by applicable law or agreed to in writing, software distributed under the Apache License +or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, +either express or implied. See the Apache License and the GPL License for the specific language governing +permissions and limitations under the Apache License and the GPL License. +*/ +!function(a){"undefined"==typeof a.fn.each2&&a.extend(a.fn,{each2:function(b){for(var c=a([0]),d=-1,e=this.length;++dc;c++)e=a.charAt(c),b+=m[e]||e;return b}function o(a,b){for(var c=0,d=b.length;d>c;c+=1)if(q(a,b[c]))return c;return-1}function p(){var b=a(l);b.appendTo("body");var c={width:b.width()-b[0].clientWidth,height:b.height()-b[0].clientHeight};return b.remove(),c}function q(a,c){return a===c?!0:a===b||c===b?!1:null===a||null===c?!1:a.constructor===String?a+""==c+"":c.constructor===String?c+""==a+"":!1}function r(b,c){var d,e,f;if(null===b||b.length<1)return[];for(d=b.split(c),e=0,f=d.length;f>e;e+=1)d[e]=a.trim(d[e]);return d}function s(a){return a.outerWidth(!1)-a.width()}function t(c){var d="keyup-change-value";c.on("keydown",function(){a.data(c,d)===b&&a.data(c,d,c.val())}),c.on("keyup",function(){var e=a.data(c,d);e!==b&&c.val()!==e&&(a.removeData(c,d),c.trigger("keyup-change"))})}function u(c){c.on("mousemove",function(c){var d=i;(d===b||d.x!==c.pageX||d.y!==c.pageY)&&a(c.target).trigger("mousemove-filtered",c)})}function v(a,c,d){d=d||b;var e;return function(){var b=arguments;window.clearTimeout(e),e=window.setTimeout(function(){c.apply(d,b)},a)}}function w(a){var c,b=!1;return function(){return b===!1&&(c=a(),b=!0),c}}function x(a,b){var c=v(a,function(a){b.trigger("scroll-debounced",a)});b.on("scroll",function(a){o(a.target,b.get())>=0&&c(a)})}function y(a){a[0]!==document.activeElement&&window.setTimeout(function(){var d,b=a[0],c=a.val().length;a.focus(),a.is(":visible")&&b===document.activeElement&&(b.setSelectionRange?b.setSelectionRange(c,c):b.createTextRange&&(d=b.createTextRange(),d.collapse(!1),d.select()))},0)}function z(b){b=a(b)[0];var c=0,d=0;if("selectionStart"in b)c=b.selectionStart,d=b.selectionEnd-c;else if("selection"in document){b.focus();var e=document.selection.createRange();d=document.selection.createRange().text.length,e.moveStart("character",-b.value.length),c=e.text.length-d}return{offset:c,length:d}}function A(a){a.preventDefault(),a.stopPropagation()}function B(a){a.preventDefault(),a.stopImmediatePropagation()}function C(b){if(!h){var c=b[0].currentStyle||window.getComputedStyle(b[0],null);h=a(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:c.fontSize,fontFamily:c.fontFamily,fontStyle:c.fontStyle,fontWeight:c.fontWeight,letterSpacing:c.letterSpacing,textTransform:c.textTransform,whiteSpace:"nowrap"}),h.attr("class","select2-sizer"),a("body").append(h)}return h.text(b.val()),h.width()}function D(b,c,d){var e,g,f=[];e=b.attr("class"),e&&(e=""+e,a(e.split(" ")).each2(function(){0===this.indexOf("select2-")&&f.push(this)})),e=c.attr("class"),e&&(e=""+e,a(e.split(" ")).each2(function(){0!==this.indexOf("select2-")&&(g=d(this),g&&f.push(this))})),b.attr("class",f.join(" "))}function E(a,b,c,d){var e=n(a.toUpperCase()).indexOf(n(b.toUpperCase())),f=b.length;return 0>e?(c.push(d(a)),void 0):(c.push(d(a.substring(0,e))),c.push(""),c.push(d(a.substring(e,e+f))),c.push(""),c.push(d(a.substring(e+f,a.length))),void 0)}function F(a){var b={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})}function G(c){var d,e=null,f=c.quietMillis||100,g=c.url,h=this;return function(i){window.clearTimeout(d),d=window.setTimeout(function(){var d=c.data,f=g,j=c.transport||a.fn.select2.ajaxDefaults.transport,k={type:c.type||"GET",cache:c.cache||!1,jsonpCallback:c.jsonpCallback||b,dataType:c.dataType||"json"},l=a.extend({},a.fn.select2.ajaxDefaults.params,k);d=d?d.call(h,i.term,i.page,i.context):null,f="function"==typeof f?f.call(h,i.term,i.page,i.context):f,e&&e.abort(),c.params&&(a.isFunction(c.params)?a.extend(l,c.params.call(h)):a.extend(l,c.params)),a.extend(l,{url:f,dataType:c.dataType,data:d,success:function(a){var b=c.results(a,i.page);i.callback(b)}}),e=j.call(h,l)},f)}}function H(b){var d,e,c=b,f=function(a){return""+a.text};a.isArray(c)&&(e=c,c={results:e}),a.isFunction(c)===!1&&(e=c,c=function(){return e});var g=c();return g.text&&(f=g.text,a.isFunction(f)||(d=g.text,f=function(a){return a[d]})),function(b){var g,d=b.term,e={results:[]};return""===d?(b.callback(c()),void 0):(g=function(c,e){var h,i;if(c=c[0],c.children){h={};for(i in c)c.hasOwnProperty(i)&&(h[i]=c[i]);h.children=[],a(c.children).each2(function(a,b){g(b,h.children)}),(h.children.length||b.matcher(d,f(h),c))&&e.push(h)}else b.matcher(d,f(c),c)&&e.push(c)},a(c().results).each2(function(a,b){g(b,e.results)}),b.callback(e),void 0)}}function I(c){var d=a.isFunction(c);return function(e){var f=e.term,g={results:[]};a(d?c():c).each(function(){var a=this.text!==b,c=a?this.text:this;(""===f||e.matcher(f,c))&&g.results.push(a?this:{id:this,text:this})}),e.callback(g)}}function J(b,c){if(a.isFunction(b))return!0;if(!b)return!1;throw new Error(c+" must be a function or a falsy value")}function K(b){return a.isFunction(b)?b():b}function L(b){var c=0;return a.each(b,function(a,b){b.children?c+=L(b.children):c++}),c}function M(a,c,d,e){var h,i,j,k,l,f=a,g=!1;if(!e.createSearchChoice||!e.tokenSeparators||e.tokenSeparators.length<1)return b;for(;;){for(i=-1,j=0,k=e.tokenSeparators.length;k>j&&(l=e.tokenSeparators[j],i=a.indexOf(l),!(i>=0));j++);if(0>i)break;if(h=a.substring(0,i),a=a.substring(i+l.length),h.length>0&&(h=e.createSearchChoice.call(this,h,c),h!==b&&null!==h&&e.id(h)!==b&&null!==e.id(h))){for(g=!1,j=0,k=c.length;k>j;j++)if(q(e.id(h),e.id(c[j]))){g=!0;break}g||d(h)}}return f!==a?a:void 0}function N(b,c){var d=function(){};return d.prototype=new b,d.prototype.constructor=d,d.prototype.parent=b.prototype,d.prototype=a.extend(d.prototype,c),d}if(window.Select2===b){var c,d,e,f,g,h,j,k,i={x:0,y:0},c={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(a){switch(a=a.which?a.which:a){case c.LEFT:case c.RIGHT:case c.UP:case c.DOWN:return!0}return!1},isControl:function(a){var b=a.which;switch(b){case c.SHIFT:case c.CTRL:case c.ALT:return!0}return a.metaKey?!0:!1},isFunctionKey:function(a){return a=a.which?a.which:a,a>=112&&123>=a}},l="
    ",m={"\u24b6":"A","\uff21":"A","\xc0":"A","\xc1":"A","\xc2":"A","\u1ea6":"A","\u1ea4":"A","\u1eaa":"A","\u1ea8":"A","\xc3":"A","\u0100":"A","\u0102":"A","\u1eb0":"A","\u1eae":"A","\u1eb4":"A","\u1eb2":"A","\u0226":"A","\u01e0":"A","\xc4":"A","\u01de":"A","\u1ea2":"A","\xc5":"A","\u01fa":"A","\u01cd":"A","\u0200":"A","\u0202":"A","\u1ea0":"A","\u1eac":"A","\u1eb6":"A","\u1e00":"A","\u0104":"A","\u023a":"A","\u2c6f":"A","\ua732":"AA","\xc6":"AE","\u01fc":"AE","\u01e2":"AE","\ua734":"AO","\ua736":"AU","\ua738":"AV","\ua73a":"AV","\ua73c":"AY","\u24b7":"B","\uff22":"B","\u1e02":"B","\u1e04":"B","\u1e06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24b8":"C","\uff23":"C","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\xc7":"C","\u1e08":"C","\u0187":"C","\u023b":"C","\ua73e":"C","\u24b9":"D","\uff24":"D","\u1e0a":"D","\u010e":"D","\u1e0c":"D","\u1e10":"D","\u1e12":"D","\u1e0e":"D","\u0110":"D","\u018b":"D","\u018a":"D","\u0189":"D","\ua779":"D","\u01f1":"DZ","\u01c4":"DZ","\u01f2":"Dz","\u01c5":"Dz","\u24ba":"E","\uff25":"E","\xc8":"E","\xc9":"E","\xca":"E","\u1ec0":"E","\u1ebe":"E","\u1ec4":"E","\u1ec2":"E","\u1ebc":"E","\u0112":"E","\u1e14":"E","\u1e16":"E","\u0114":"E","\u0116":"E","\xcb":"E","\u1eba":"E","\u011a":"E","\u0204":"E","\u0206":"E","\u1eb8":"E","\u1ec6":"E","\u0228":"E","\u1e1c":"E","\u0118":"E","\u1e18":"E","\u1e1a":"E","\u0190":"E","\u018e":"E","\u24bb":"F","\uff26":"F","\u1e1e":"F","\u0191":"F","\ua77b":"F","\u24bc":"G","\uff27":"G","\u01f4":"G","\u011c":"G","\u1e20":"G","\u011e":"G","\u0120":"G","\u01e6":"G","\u0122":"G","\u01e4":"G","\u0193":"G","\ua7a0":"G","\ua77d":"G","\ua77e":"G","\u24bd":"H","\uff28":"H","\u0124":"H","\u1e22":"H","\u1e26":"H","\u021e":"H","\u1e24":"H","\u1e28":"H","\u1e2a":"H","\u0126":"H","\u2c67":"H","\u2c75":"H","\ua78d":"H","\u24be":"I","\uff29":"I","\xcc":"I","\xcd":"I","\xce":"I","\u0128":"I","\u012a":"I","\u012c":"I","\u0130":"I","\xcf":"I","\u1e2e":"I","\u1ec8":"I","\u01cf":"I","\u0208":"I","\u020a":"I","\u1eca":"I","\u012e":"I","\u1e2c":"I","\u0197":"I","\u24bf":"J","\uff2a":"J","\u0134":"J","\u0248":"J","\u24c0":"K","\uff2b":"K","\u1e30":"K","\u01e8":"K","\u1e32":"K","\u0136":"K","\u1e34":"K","\u0198":"K","\u2c69":"K","\ua740":"K","\ua742":"K","\ua744":"K","\ua7a2":"K","\u24c1":"L","\uff2c":"L","\u013f":"L","\u0139":"L","\u013d":"L","\u1e36":"L","\u1e38":"L","\u013b":"L","\u1e3c":"L","\u1e3a":"L","\u0141":"L","\u023d":"L","\u2c62":"L","\u2c60":"L","\ua748":"L","\ua746":"L","\ua780":"L","\u01c7":"LJ","\u01c8":"Lj","\u24c2":"M","\uff2d":"M","\u1e3e":"M","\u1e40":"M","\u1e42":"M","\u2c6e":"M","\u019c":"M","\u24c3":"N","\uff2e":"N","\u01f8":"N","\u0143":"N","\xd1":"N","\u1e44":"N","\u0147":"N","\u1e46":"N","\u0145":"N","\u1e4a":"N","\u1e48":"N","\u0220":"N","\u019d":"N","\ua790":"N","\ua7a4":"N","\u01ca":"NJ","\u01cb":"Nj","\u24c4":"O","\uff2f":"O","\xd2":"O","\xd3":"O","\xd4":"O","\u1ed2":"O","\u1ed0":"O","\u1ed6":"O","\u1ed4":"O","\xd5":"O","\u1e4c":"O","\u022c":"O","\u1e4e":"O","\u014c":"O","\u1e50":"O","\u1e52":"O","\u014e":"O","\u022e":"O","\u0230":"O","\xd6":"O","\u022a":"O","\u1ece":"O","\u0150":"O","\u01d1":"O","\u020c":"O","\u020e":"O","\u01a0":"O","\u1edc":"O","\u1eda":"O","\u1ee0":"O","\u1ede":"O","\u1ee2":"O","\u1ecc":"O","\u1ed8":"O","\u01ea":"O","\u01ec":"O","\xd8":"O","\u01fe":"O","\u0186":"O","\u019f":"O","\ua74a":"O","\ua74c":"O","\u01a2":"OI","\ua74e":"OO","\u0222":"OU","\u24c5":"P","\uff30":"P","\u1e54":"P","\u1e56":"P","\u01a4":"P","\u2c63":"P","\ua750":"P","\ua752":"P","\ua754":"P","\u24c6":"Q","\uff31":"Q","\ua756":"Q","\ua758":"Q","\u024a":"Q","\u24c7":"R","\uff32":"R","\u0154":"R","\u1e58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1e5a":"R","\u1e5c":"R","\u0156":"R","\u1e5e":"R","\u024c":"R","\u2c64":"R","\ua75a":"R","\ua7a6":"R","\ua782":"R","\u24c8":"S","\uff33":"S","\u1e9e":"S","\u015a":"S","\u1e64":"S","\u015c":"S","\u1e60":"S","\u0160":"S","\u1e66":"S","\u1e62":"S","\u1e68":"S","\u0218":"S","\u015e":"S","\u2c7e":"S","\ua7a8":"S","\ua784":"S","\u24c9":"T","\uff34":"T","\u1e6a":"T","\u0164":"T","\u1e6c":"T","\u021a":"T","\u0162":"T","\u1e70":"T","\u1e6e":"T","\u0166":"T","\u01ac":"T","\u01ae":"T","\u023e":"T","\ua786":"T","\ua728":"TZ","\u24ca":"U","\uff35":"U","\xd9":"U","\xda":"U","\xdb":"U","\u0168":"U","\u1e78":"U","\u016a":"U","\u1e7a":"U","\u016c":"U","\xdc":"U","\u01db":"U","\u01d7":"U","\u01d5":"U","\u01d9":"U","\u1ee6":"U","\u016e":"U","\u0170":"U","\u01d3":"U","\u0214":"U","\u0216":"U","\u01af":"U","\u1eea":"U","\u1ee8":"U","\u1eee":"U","\u1eec":"U","\u1ef0":"U","\u1ee4":"U","\u1e72":"U","\u0172":"U","\u1e76":"U","\u1e74":"U","\u0244":"U","\u24cb":"V","\uff36":"V","\u1e7c":"V","\u1e7e":"V","\u01b2":"V","\ua75e":"V","\u0245":"V","\ua760":"VY","\u24cc":"W","\uff37":"W","\u1e80":"W","\u1e82":"W","\u0174":"W","\u1e86":"W","\u1e84":"W","\u1e88":"W","\u2c72":"W","\u24cd":"X","\uff38":"X","\u1e8a":"X","\u1e8c":"X","\u24ce":"Y","\uff39":"Y","\u1ef2":"Y","\xdd":"Y","\u0176":"Y","\u1ef8":"Y","\u0232":"Y","\u1e8e":"Y","\u0178":"Y","\u1ef6":"Y","\u1ef4":"Y","\u01b3":"Y","\u024e":"Y","\u1efe":"Y","\u24cf":"Z","\uff3a":"Z","\u0179":"Z","\u1e90":"Z","\u017b":"Z","\u017d":"Z","\u1e92":"Z","\u1e94":"Z","\u01b5":"Z","\u0224":"Z","\u2c7f":"Z","\u2c6b":"Z","\ua762":"Z","\u24d0":"a","\uff41":"a","\u1e9a":"a","\xe0":"a","\xe1":"a","\xe2":"a","\u1ea7":"a","\u1ea5":"a","\u1eab":"a","\u1ea9":"a","\xe3":"a","\u0101":"a","\u0103":"a","\u1eb1":"a","\u1eaf":"a","\u1eb5":"a","\u1eb3":"a","\u0227":"a","\u01e1":"a","\xe4":"a","\u01df":"a","\u1ea3":"a","\xe5":"a","\u01fb":"a","\u01ce":"a","\u0201":"a","\u0203":"a","\u1ea1":"a","\u1ead":"a","\u1eb7":"a","\u1e01":"a","\u0105":"a","\u2c65":"a","\u0250":"a","\ua733":"aa","\xe6":"ae","\u01fd":"ae","\u01e3":"ae","\ua735":"ao","\ua737":"au","\ua739":"av","\ua73b":"av","\ua73d":"ay","\u24d1":"b","\uff42":"b","\u1e03":"b","\u1e05":"b","\u1e07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24d2":"c","\uff43":"c","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\xe7":"c","\u1e09":"c","\u0188":"c","\u023c":"c","\ua73f":"c","\u2184":"c","\u24d3":"d","\uff44":"d","\u1e0b":"d","\u010f":"d","\u1e0d":"d","\u1e11":"d","\u1e13":"d","\u1e0f":"d","\u0111":"d","\u018c":"d","\u0256":"d","\u0257":"d","\ua77a":"d","\u01f3":"dz","\u01c6":"dz","\u24d4":"e","\uff45":"e","\xe8":"e","\xe9":"e","\xea":"e","\u1ec1":"e","\u1ebf":"e","\u1ec5":"e","\u1ec3":"e","\u1ebd":"e","\u0113":"e","\u1e15":"e","\u1e17":"e","\u0115":"e","\u0117":"e","\xeb":"e","\u1ebb":"e","\u011b":"e","\u0205":"e","\u0207":"e","\u1eb9":"e","\u1ec7":"e","\u0229":"e","\u1e1d":"e","\u0119":"e","\u1e19":"e","\u1e1b":"e","\u0247":"e","\u025b":"e","\u01dd":"e","\u24d5":"f","\uff46":"f","\u1e1f":"f","\u0192":"f","\ua77c":"f","\u24d6":"g","\uff47":"g","\u01f5":"g","\u011d":"g","\u1e21":"g","\u011f":"g","\u0121":"g","\u01e7":"g","\u0123":"g","\u01e5":"g","\u0260":"g","\ua7a1":"g","\u1d79":"g","\ua77f":"g","\u24d7":"h","\uff48":"h","\u0125":"h","\u1e23":"h","\u1e27":"h","\u021f":"h","\u1e25":"h","\u1e29":"h","\u1e2b":"h","\u1e96":"h","\u0127":"h","\u2c68":"h","\u2c76":"h","\u0265":"h","\u0195":"hv","\u24d8":"i","\uff49":"i","\xec":"i","\xed":"i","\xee":"i","\u0129":"i","\u012b":"i","\u012d":"i","\xef":"i","\u1e2f":"i","\u1ec9":"i","\u01d0":"i","\u0209":"i","\u020b":"i","\u1ecb":"i","\u012f":"i","\u1e2d":"i","\u0268":"i","\u0131":"i","\u24d9":"j","\uff4a":"j","\u0135":"j","\u01f0":"j","\u0249":"j","\u24da":"k","\uff4b":"k","\u1e31":"k","\u01e9":"k","\u1e33":"k","\u0137":"k","\u1e35":"k","\u0199":"k","\u2c6a":"k","\ua741":"k","\ua743":"k","\ua745":"k","\ua7a3":"k","\u24db":"l","\uff4c":"l","\u0140":"l","\u013a":"l","\u013e":"l","\u1e37":"l","\u1e39":"l","\u013c":"l","\u1e3d":"l","\u1e3b":"l","\u017f":"l","\u0142":"l","\u019a":"l","\u026b":"l","\u2c61":"l","\ua749":"l","\ua781":"l","\ua747":"l","\u01c9":"lj","\u24dc":"m","\uff4d":"m","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0271":"m","\u026f":"m","\u24dd":"n","\uff4e":"n","\u01f9":"n","\u0144":"n","\xf1":"n","\u1e45":"n","\u0148":"n","\u1e47":"n","\u0146":"n","\u1e4b":"n","\u1e49":"n","\u019e":"n","\u0272":"n","\u0149":"n","\ua791":"n","\ua7a5":"n","\u01cc":"nj","\u24de":"o","\uff4f":"o","\xf2":"o","\xf3":"o","\xf4":"o","\u1ed3":"o","\u1ed1":"o","\u1ed7":"o","\u1ed5":"o","\xf5":"o","\u1e4d":"o","\u022d":"o","\u1e4f":"o","\u014d":"o","\u1e51":"o","\u1e53":"o","\u014f":"o","\u022f":"o","\u0231":"o","\xf6":"o","\u022b":"o","\u1ecf":"o","\u0151":"o","\u01d2":"o","\u020d":"o","\u020f":"o","\u01a1":"o","\u1edd":"o","\u1edb":"o","\u1ee1":"o","\u1edf":"o","\u1ee3":"o","\u1ecd":"o","\u1ed9":"o","\u01eb":"o","\u01ed":"o","\xf8":"o","\u01ff":"o","\u0254":"o","\ua74b":"o","\ua74d":"o","\u0275":"o","\u01a3":"oi","\u0223":"ou","\ua74f":"oo","\u24df":"p","\uff50":"p","\u1e55":"p","\u1e57":"p","\u01a5":"p","\u1d7d":"p","\ua751":"p","\ua753":"p","\ua755":"p","\u24e0":"q","\uff51":"q","\u024b":"q","\ua757":"q","\ua759":"q","\u24e1":"r","\uff52":"r","\u0155":"r","\u1e59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1e5b":"r","\u1e5d":"r","\u0157":"r","\u1e5f":"r","\u024d":"r","\u027d":"r","\ua75b":"r","\ua7a7":"r","\ua783":"r","\u24e2":"s","\uff53":"s","\xdf":"s","\u015b":"s","\u1e65":"s","\u015d":"s","\u1e61":"s","\u0161":"s","\u1e67":"s","\u1e63":"s","\u1e69":"s","\u0219":"s","\u015f":"s","\u023f":"s","\ua7a9":"s","\ua785":"s","\u1e9b":"s","\u24e3":"t","\uff54":"t","\u1e6b":"t","\u1e97":"t","\u0165":"t","\u1e6d":"t","\u021b":"t","\u0163":"t","\u1e71":"t","\u1e6f":"t","\u0167":"t","\u01ad":"t","\u0288":"t","\u2c66":"t","\ua787":"t","\ua729":"tz","\u24e4":"u","\uff55":"u","\xf9":"u","\xfa":"u","\xfb":"u","\u0169":"u","\u1e79":"u","\u016b":"u","\u1e7b":"u","\u016d":"u","\xfc":"u","\u01dc":"u","\u01d8":"u","\u01d6":"u","\u01da":"u","\u1ee7":"u","\u016f":"u","\u0171":"u","\u01d4":"u","\u0215":"u","\u0217":"u","\u01b0":"u","\u1eeb":"u","\u1ee9":"u","\u1eef":"u","\u1eed":"u","\u1ef1":"u","\u1ee5":"u","\u1e73":"u","\u0173":"u","\u1e77":"u","\u1e75":"u","\u0289":"u","\u24e5":"v","\uff56":"v","\u1e7d":"v","\u1e7f":"v","\u028b":"v","\ua75f":"v","\u028c":"v","\ua761":"vy","\u24e6":"w","\uff57":"w","\u1e81":"w","\u1e83":"w","\u0175":"w","\u1e87":"w","\u1e85":"w","\u1e98":"w","\u1e89":"w","\u2c73":"w","\u24e7":"x","\uff58":"x","\u1e8b":"x","\u1e8d":"x","\u24e8":"y","\uff59":"y","\u1ef3":"y","\xfd":"y","\u0177":"y","\u1ef9":"y","\u0233":"y","\u1e8f":"y","\xff":"y","\u1ef7":"y","\u1e99":"y","\u1ef5":"y","\u01b4":"y","\u024f":"y","\u1eff":"y","\u24e9":"z","\uff5a":"z","\u017a":"z","\u1e91":"z","\u017c":"z","\u017e":"z","\u1e93":"z","\u1e95":"z","\u01b6":"z","\u0225":"z","\u0240":"z","\u2c6c":"z","\ua763":"z"};j=a(document),g=function(){var a=1;return function(){return a++}}(),j.on("mousemove",function(a){i.x=a.pageX,i.y=a.pageY}),d=N(Object,{bind:function(a){var b=this;return function(){a.apply(b,arguments)}},init:function(c){var d,e,h,i,f=".select2-results";this.opts=c=this.prepareOpts(c),this.id=c.id,c.element.data("select2")!==b&&null!==c.element.data("select2")&&c.element.data("select2").destroy(),this.container=this.createContainer(),this.containerId="s2id_"+(c.element.attr("id")||"autogen"+g()),this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.body=w(function(){return c.element.closest("body")}),D(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",c.element.attr("style")),this.container.css(K(c.containerCss)),this.container.addClass(K(c.containerCssClass)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",A),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),D(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(K(c.dropdownCssClass)),this.dropdown.data("select2",this),this.dropdown.on("click",A),this.results=d=this.container.find(f),this.search=e=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),this.container.on("click",A),u(this.results),this.dropdown.on("mousemove-filtered touchstart touchmove touchend",f,this.bind(this.highlightUnderEvent)),x(80,this.results),this.dropdown.on("scroll-debounced",f,this.bind(this.loadMoreIfNeeded)),a(this.container).on("change",".select2-input",function(a){a.stopPropagation()}),a(this.dropdown).on("change",".select2-input",function(a){a.stopPropagation()}),a.fn.mousewheel&&d.mousewheel(function(a,b,c,e){var f=d.scrollTop();e>0&&0>=f-e?(d.scrollTop(0),A(a)):0>e&&d.get(0).scrollHeight-d.scrollTop()+e<=d.height()&&(d.scrollTop(d.get(0).scrollHeight-d.height()),A(a))}),t(e),e.on("keyup-change input paste",this.bind(this.updateResults)),e.on("focus",function(){e.addClass("select2-focused")}),e.on("blur",function(){e.removeClass("select2-focused")}),this.dropdown.on("mouseup",f,this.bind(function(b){a(b.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(b),this.selectHighlighted(b))})),this.dropdown.on("click mouseup mousedown",function(a){a.stopPropagation()}),a.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==c.maximumInputLength&&this.search.attr("maxlength",c.maximumInputLength);var h=c.element.prop("disabled");h===b&&(h=!1),this.enable(!h);var i=c.element.prop("readonly");i===b&&(i=!1),this.readonly(i),k=k||p(),this.autofocus=c.element.prop("autofocus"),c.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.nextSearchTerm=b},destroy:function(){var a=this.opts.element,c=a.data("select2");this.close(),this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),c!==b&&(c.container.remove(),c.dropdown.remove(),a.removeClass("select2-offscreen").removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?a.attr({tabindex:this.elementTabIndex}):a.removeAttr("tabindex"),a.show())},optionToData:function(a){return a.is("option")?{id:a.prop("value"),text:a.text(),element:a.get(),css:a.attr("class"),disabled:a.prop("disabled"),locked:q(a.attr("locked"),"locked")||q(a.data("locked"),!0)}:a.is("optgroup")?{text:a.attr("label"),children:[],element:a.get(),css:a.attr("class")}:void 0},prepareOpts:function(c){var d,e,f,g,h=this;if(d=c.element,"select"===d.get(0).tagName.toLowerCase()&&(this.select=e=c.element),e&&a.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in c)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a ","
    "," ","
      ","
    ","
    "].join(""));return b},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var c,d,e;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.search.focus(),c=this.search.get(0),c.createTextRange?(d=c.createTextRange(),d.collapse(!1),d.select()):c.setSelectionRange&&(e=this.search.val().length,c.setSelectionRange(e,e)),""===this.search.val()&&this.nextSearchTerm!=b&&(this.search.val(this.nextSearchTerm),this.search.select()),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(a.Event("select2-open"))},close:function(a){this.opened()&&(this.parent.close.apply(this,arguments),a=a||{focus:!0},this.focusser.removeAttr("disabled"),a.focus&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.removeAttr("disabled"),this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.removeAttr("disabled"),this.focusser.focus()},destroy:function(){a("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments)},initContainer:function(){var b,d=this.container,e=this.dropdown;this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=b=d.find(".select2-choice"),this.focusser=d.find(".select2-focusser"),this.focusser.attr("id","s2id_autogen"+g()),a("label[for='"+this.opts.element.attr("id")+"']").attr("for",this.focusser.attr("id")),this.focusser.attr("tabindex",this.elementTabIndex),this.search.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()){if(a.which===c.PAGE_UP||a.which===c.PAGE_DOWN)return A(a),void 0;switch(a.which){case c.UP:case c.DOWN:return this.moveHighlight(a.which===c.UP?-1:1),A(a),void 0;case c.ENTER:return this.selectHighlighted(),A(a),void 0;case c.TAB:return this.selectHighlighted({noFocus:!0}),void 0;case c.ESC:return this.cancel(a),A(a),void 0}}})),this.search.on("blur",this.bind(function(){document.activeElement===this.body().get(0)&&window.setTimeout(this.bind(function(){this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()&&a.which!==c.TAB&&!c.isControl(a)&&!c.isFunctionKey(a)&&a.which!==c.ESC){if(this.opts.openOnEnter===!1&&a.which===c.ENTER)return A(a),void 0;if(a.which==c.DOWN||a.which==c.UP||a.which==c.ENTER&&this.opts.openOnEnter){if(a.altKey||a.ctrlKey||a.shiftKey||a.metaKey)return;return this.open(),A(a),void 0}return a.which==c.DELETE||a.which==c.BACKSPACE?(this.opts.allowClear&&this.clear(),A(a),void 0):void 0}})),t(this.focusser),this.focusser.on("keyup-change input",this.bind(function(a){if(this.opts.minimumResultsForSearch>=0){if(a.stopPropagation(),this.opened())return;this.open()}})),b.on("mousedown","abbr",this.bind(function(a){this.isInterfaceEnabled()&&(this.clear(),B(a),this.close(),this.selection.focus())})),b.on("mousedown",this.bind(function(b){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),A(b)})),e.on("mousedown",this.bind(function(){this.search.focus()})),b.on("focus",this.bind(function(a){A(a)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(a.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.setPlaceholder()},clear:function(b){var c=this.selection.data("select2-data");if(c){var d=a.Event("select2-clearing");if(this.opts.element.trigger(d),d.isDefaultPrevented())return;var e=this.getPlaceholderOption();this.opts.element.val(e?e.val():""),this.selection.find(".select2-chosen").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),b!==!1&&(this.opts.element.trigger({type:"select2-removed",val:this.id(c),choice:c}),this.triggerChange({removed:c}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection(null),this.close(),this.setPlaceholder();else{var c=this;this.opts.initSelection.call(null,this.opts.element,function(a){a!==b&&null!==a&&(c.updateSelection(a),c.close(),c.setPlaceholder())})}},isPlaceholderOptionSelected:function(){var a;return this.getPlaceholder()?(a=this.getPlaceholderOption())!==b&&a.is(":selected")||""===this.opts.element.val()||this.opts.element.val()===b||null===this.opts.element.val():!1},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments),c=this;return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(a,b){var d=a.find(":selected");b(c.optionToData(d))}:"data"in b&&(b.initSelection=b.initSelection||function(c,d){var e=c.val(),f=null;b.query({matcher:function(a,c,d){var g=q(e,b.id(d));return g&&(f=d),g},callback:a.isFunction(d)?function(){d(f)}:a.noop})}),b},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===b?b:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var a=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&a!==b){if(this.select&&this.getPlaceholderOption()===b)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(a)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(a,b,c){var d=0,e=this;if(this.findHighlightableChoices().each2(function(a,b){return q(e.id(b.data("select2-data")),e.opts.element.val())?(d=a,!1):void 0}),c!==!1&&(b===!0&&d>=0?this.highlight(d):this.highlight(0)),b===!0){var g=this.opts.minimumResultsForSearch;g>=0&&this.showSearch(L(a.results)>=g)}},showSearch:function(b){this.showSearchInput!==b&&(this.showSearchInput=b,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!b),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!b),a(this.dropdown,this.container).toggleClass("select2-with-searchbox",b))},onSelect:function(a,b){if(this.triggerSelect(a)){var c=this.opts.element.val(),d=this.data();this.opts.element.val(this.id(a)),this.updateSelection(a),this.opts.element.trigger({type:"select2-selected",val:this.id(a),choice:a}),this.nextSearchTerm=this.opts.nextSearchTerm(a,this.search.val()),this.close(),b&&b.noFocus||this.focusser.focus(),q(c,this.id(a))||this.triggerChange({added:a,removed:d})}},updateSelection:function(a){var d,e,c=this.selection.find(".select2-chosen");this.selection.data("select2-data",a),c.empty(),null!==a&&(d=this.opts.formatSelection(a,c,this.opts.escapeMarkup)),d!==b&&c.append(d),e=this.opts.formatSelectionCssClass(a,c),e!==b&&c.addClass(e),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==b&&this.container.addClass("select2-allowclear")},val:function(){var a,c=!1,d=null,e=this,f=this.data();if(0===arguments.length)return this.opts.element.val();if(a=arguments[0],arguments.length>1&&(c=arguments[1]),this.select)this.select.val(a).find(":selected").each2(function(a,b){return d=e.optionToData(b),!1}),this.updateSelection(d),this.setPlaceholder(),c&&this.triggerChange({added:d,removed:f});else{if(!a&&0!==a)return this.clear(c),void 0;if(this.opts.initSelection===b)throw new Error("cannot call val() if initSelection() is not defined");this.opts.element.val(a),this.opts.initSelection(this.opts.element,function(a){e.opts.element.val(a?e.id(a):""),e.updateSelection(a),e.setPlaceholder(),c&&e.triggerChange({added:a,removed:f})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(a){var c,d=!1;return 0===arguments.length?(c=this.selection.data("select2-data"),c==b&&(c=null),c):(arguments.length>1&&(d=arguments[1]),a?(c=this.data(),this.opts.element.val(a?this.id(a):""),this.updateSelection(a),d&&this.triggerChange({added:a,removed:c})):this.clear(d),void 0)}}),f=N(d,{createContainer:function(){var b=a(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html(["
      ","
    • "," ","
    • ","
    ","
    ","
      ","
    ","
    "].join(""));return b},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments),c=this;return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(a,b){var d=[];a.find(":selected").each2(function(a,b){d.push(c.optionToData(b))}),b(d)}:"data"in b&&(b.initSelection=b.initSelection||function(c,d){var e=r(c.val(),b.separator),f=[];b.query({matcher:function(c,d,g){var h=a.grep(e,function(a){return q(a,b.id(g))}).length;return h&&f.push(g),h},callback:a.isFunction(d)?function(){for(var a=[],c=0;c0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.open(),this.focusSearch(),b.preventDefault()))})),this.container.on("focus",b,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var c=this;this.opts.initSelection.call(null,this.opts.element,function(a){a!==b&&null!==a&&(c.updateSelection(a),c.close(),c.clearSearch())})}},clearSearch:function(){var a=this.getPlaceholder(),c=this.getMaxSearchWidth();a!==b&&0===this.getVal().length&&this.search.hasClass("select2-focused")===!1?(this.search.val(a).addClass("select2-default"),this.search.width(c>0?c:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),this.updateResults(!0),this.search.focus(),this.opts.element.trigger(a.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(b){var c=[],d=[],e=this;a(b).each(function(){o(e.id(this),c)<0&&(c.push(e.id(this)),d.push(this))}),b=d,this.selection.find(".select2-search-choice").remove(),a(b).each(function(){e.addSelectedChoice(this)}),e.postprocessResults()},tokenize:function(){var a=this.search.val();a=this.opts.tokenizer.call(this,a,this.data(),this.bind(this.onSelect),this.opts),null!=a&&a!=b&&(this.search.val(a),a.length>0&&this.open())},onSelect:function(a,b){this.triggerSelect(a)&&(this.addSelectedChoice(a),this.opts.element.trigger({type:"selected",val:this.id(a),choice:a}),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(a,!1,this.opts.closeOnSelect===!0),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()&&this.updateResults(!0),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:a}),b&&b.noFocus||this.focusSearch())},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(c){var j,k,d=!c.locked,e=a("
  • "),f=a("
  • "),g=d?e:f,h=this.id(c),i=this.getVal();j=this.opts.formatSelection(c,g.find("div"),this.opts.escapeMarkup),j!=b&&g.find("div").replaceWith("
    "+j+"
    "),k=this.opts.formatSelectionCssClass(c,g.find("div")),k!=b&&g.addClass(k),d&&g.find(".select2-search-choice-close").on("mousedown",A).on("click dblclick",this.bind(function(b){this.isInterfaceEnabled()&&(a(b.target).closest(".select2-search-choice").fadeOut("fast",this.bind(function(){this.unselect(a(b.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),this.close(),this.focusSearch()})).dequeue(),A(b))})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),g.data("select2-data",c),g.insertBefore(this.searchContainer),i.push(h),this.setVal(i)},unselect:function(a){var c,d,b=this.getVal();if(a=a.closest(".select2-search-choice"),0===a.length)throw"Invalid argument: "+a+". Must be .select2-search-choice";if(c=a.data("select2-data")){for(;(d=o(this.id(c),b))>=0;)b.splice(d,1),this.setVal(b),this.select&&this.postprocessResults();a.remove(),this.opts.element.trigger({type:"removed",val:this.id(c),choice:c}),this.triggerChange({removed:c})}},postprocessResults:function(a,b,c){var d=this.getVal(),e=this.results.find(".select2-result"),f=this.results.find(".select2-result-with-children"),g=this;e.each2(function(a,b){var c=g.id(b.data("select2-data"));o(c,d)>=0&&(b.addClass("select2-selected"),b.find(".select2-result-selectable").addClass("select2-selected"))}),f.each2(function(a,b){b.is(".select2-result-selectable")||0!==b.find(".select2-result-selectable:not(.select2-selected)").length||b.addClass("select2-selected")}),-1==this.highlight()&&c!==!1&&g.highlight(0),!this.opts.createSearchChoice&&!e.filter(".select2-result:not(.select2-selected)").length>0&&(!a||a&&!a.more&&0===this.results.find(".select2-no-results").length)&&J(g.opts.formatNoMatches,"formatNoMatches")&&this.results.append("
  • "+g.opts.formatNoMatches(g.search.val())+"
  • ")},getMaxSearchWidth:function(){return this.selection.width()-s(this.search)},resizeSearch:function(){var a,b,c,d,e,f=s(this.search);a=C(this.search)+10,b=this.search.offset().left,c=this.selection.width(),d=this.selection.offset().left,e=c-(b-d)-f,a>e&&(e=c-f),40>e&&(e=c-f),0>=e&&(e=a),this.search.width(Math.floor(e))},getVal:function(){var a;return this.select?(a=this.select.val(),null===a?[]:a):(a=this.opts.element.val(),r(a,this.opts.separator))},setVal:function(b){var c;this.select?this.select.val(b):(c=[],a(b).each(function(){o(this,c)<0&&c.push(this)}),this.opts.element.val(0===c.length?"":c.join(this.opts.separator)))},buildChangeDetails:function(a,b){for(var b=b.slice(0),a=a.slice(0),c=0;c. Attach to instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var b=[],c=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){b.push(c.opts.id(a(this).data("select2-data")))}),this.setVal(b),this.triggerChange()},data:function(b,c){var e,f,d=this;return 0===arguments.length?this.selection.find(".select2-search-choice").map(function(){return a(this).data("select2-data")}).get():(f=this.data(),b||(b=[]),e=a.map(b,function(a){return d.opts.id(a)}),this.setVal(e),this.updateSelection(b),this.clearSearch(),c&&this.triggerChange(this.buildChangeDetails(f,this.data())),void 0)}}),a.fn.select2=function(){var d,g,h,i,j,c=Array.prototype.slice.call(arguments,0),k=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],l=["opened","isFocused","container","dropdown"],m=["val","data"],n={search:"externalSearch"};return this.each(function(){if(0===c.length||"object"==typeof c[0])d=0===c.length?{}:a.extend({},c[0]),d.element=a(this),"select"===d.element.get(0).tagName.toLowerCase()?j=d.element.prop("multiple"):(j=d.multiple||!1,"tags"in d&&(d.multiple=j=!0)),g=j?new f:new e,g.init(d);else{if("string"!=typeof c[0])throw"Invalid arguments to select2 plugin: "+c;if(o(c[0],k)<0)throw"Unknown method: "+c[0];if(i=b,g=a(this).data("select2"),g===b)return;if(h=c[0],"container"===h?i=g.container:"dropdown"===h?i=g.dropdown:(n[h]&&(h=n[h]),i=g[h].apply(g,c.slice(1))),o(c[0],l)>=0||o(c[0],m)&&1==c.length)return!1}}),i===b?this:i},a.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(a,b,c,d){var e=[];return E(a.text,c.term,e,d),e.join("")},formatSelection:function(a,c,d){return a?d(a.text):b},sortResults:function(a){return a},formatResultCssClass:function(){return b},formatSelectionCssClass:function(){return b},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(a,b){var c=b-a.length;return"Please enter "+c+" more character"+(1==c?"":"s")},formatInputTooLong:function(a,b){var c=a.length-b;return"Please delete "+c+" character"+(1==c?"":"s")},formatSelectionTooBig:function(a){return"You can only select "+a+" item"+(1==a?"":"s")},formatLoadMore:function(){return"Loading more results..."},formatSearching:function(){return"Searching..."},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(a){return a.id},matcher:function(a,b){return n(""+b).toUpperCase().indexOf(n(""+a).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:M,escapeMarkup:F,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(a){return a},adaptDropdownCssClass:function(){return null},nextSearchTerm:function(){return b}},a.fn.select2.ajaxDefaults={transport:a.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:G,local:H,tags:I},util:{debounce:v,markMatch:E,escapeMarkup:F,stripDiacritics:n},"class":{"abstract":d,single:e,multi:f}}}}(jQuery); \ No newline at end of file diff --git a/public/admin/Coco/assets/libs/bootstrap-select2/select2.png b/public/admin/Coco/assets/libs/bootstrap-select2/select2.png new file mode 100644 index 000000000..1d804ffb9 Binary files /dev/null and b/public/admin/Coco/assets/libs/bootstrap-select2/select2.png differ diff --git a/public/admin/Coco/assets/libs/bootstrap-typeahead/bootstrap3-typeahead.min.js b/public/admin/Coco/assets/libs/bootstrap-typeahead/bootstrap3-typeahead.min.js new file mode 100644 index 000000000..9d3cb53cc --- /dev/null +++ b/public/admin/Coco/assets/libs/bootstrap-typeahead/bootstrap3-typeahead.min.js @@ -0,0 +1 @@ +!function($){"use strict";var Typeahead=function(element,options){this.$element=$(element),this.options=$.extend({},$.fn.typeahead.defaults,options),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.select=this.options.select||this.select,this.autoSelect="boolean"==typeof this.options.autoSelect?this.options.autoSelect:!0,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=$(this.options.menu),this.shown=!1,this.listen(),this.showHintOnFocus="boolean"==typeof this.options.showHintOnFocus?this.options.showHintOnFocus:!1};Typeahead.prototype={constructor:Typeahead,select:function(){var val=this.$menu.find(".active").data("value");return(this.autoSelect||val)&&this.$element.val(this.updater(val)).change(),this.hide()},updater:function(item){return item},setSource:function(source){this.source=source},show:function(){var scrollHeight,pos=$.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return scrollHeight="function"==typeof this.options.scrollHeight?this.options.scrollHeight.call():this.options.scrollHeight,this.$menu.insertAfter(this.$element).css({top:pos.top+pos.height+scrollHeight,left:pos.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(query){var items;return this.query="undefined"!=typeof query&&null!==query?query:this.$element.val()||"",this.query.length"+match+""})},render:function(items){var that=this;return items=$(items).map(function(i,item){return i=$(that.options.item).data("value",item),i.find("a").html(that.highlighter(item)),i[0]}),this.autoSelect&&items.first().addClass("active"),this.$menu.html(items),this},next:function(){var active=this.$menu.find(".active").removeClass("active"),next=active.next();next.length||(next=$(this.$menu.find("li")[0])),next.addClass("active")},prev:function(){var active=this.$menu.find(".active").removeClass("active"),prev=active.prev();prev.length||(prev=this.$menu.find("li").last()),prev.addClass("active")},listen:function(){this.$element.on("focus",$.proxy(this.focus,this)).on("blur",$.proxy(this.blur,this)).on("keypress",$.proxy(this.keypress,this)).on("keyup",$.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",$.proxy(this.keydown,this)),this.$menu.on("click",$.proxy(this.click,this)).on("mouseenter","li",$.proxy(this.mouseenter,this)).on("mouseleave","li",$.proxy(this.mouseleave,this))},destroy:function(){this.$element.data("typeahead",null),this.$element.off("focus").off("blur").off("keypress").off("keyup"),this.eventSupported("keydown")&&this.$element.off("keydown"),this.$menu.remove()},eventSupported:function(eventName){var isSupported=eventName in this.$element;return isSupported||(this.$element.setAttribute(eventName,"return;"),isSupported="function"==typeof this.$element[eventName]),isSupported},move:function(e){if(this.shown){switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=~$.inArray(e.keyCode,[40,38,9,13,27]),this.shown||40!=e.keyCode?this.move(e):this.lookup("")},keypress:function(e){this.suppressKeyPressRepeat||this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},focus:function(){this.focused||(this.focused=!0,(0===this.options.minLength&&!this.$element.val()||this.options.showHintOnFocus)&&this.lookup())},blur:function(){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(e){e.stopPropagation(),e.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(e){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),$(e.currentTarget).addClass("active")},mouseleave:function(){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var old=$.fn.typeahead;$.fn.typeahead=function(option){var arg=arguments;return this.each(function(){var $this=$(this),data=$this.data("typeahead"),options="object"==typeof option&&option;data||$this.data("typeahead",data=new Typeahead(this,options)),"string"==typeof option&&(arg.length>1?data[option].apply(data,Array.prototype.slice.call(arg,1)):data[option]())})},$.fn.typeahead.defaults={source:[],items:8,menu:'',item:'
  • ',minLength:1,scrollHeight:0,autoSelect:!0},$.fn.typeahead.Constructor=Typeahead,$.fn.typeahead.noConflict=function(){return $.fn.typeahead=old,this},$(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(){var $this=$(this);$this.data("typeahead")||$this.typeahead($this.data())})}(window.jQuery); \ No newline at end of file diff --git a/public/admin/Coco/assets/libs/bootstrap-validator/css/bootstrapValidator.min.css b/public/admin/Coco/assets/libs/bootstrap-validator/css/bootstrapValidator.min.css new file mode 100644 index 000000000..030cbdf75 --- /dev/null +++ b/public/admin/Coco/assets/libs/bootstrap-validator/css/bootstrapValidator.min.css @@ -0,0 +1,13 @@ +/** + * BootstrapValidator (http://bootstrapvalidator.com) + * + * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3 + * + * @version v0.4.5 + * @author https://twitter.com/nghuuphuoc + * @copyright (c) 2013 - 2014 Nguyen Huu Phuoc + * @license MIT + */ + + +.bv-form .help-block{margin-bottom:0}.nav-tabs li.bv-tab-success>a{color:#3c763d}.nav-tabs li.bv-tab-error>a{color:#a94442} \ No newline at end of file diff --git a/public/admin/Coco/assets/libs/bootstrap-validator/js/bootstrapValidator.min.js b/public/admin/Coco/assets/libs/bootstrap-validator/js/bootstrapValidator.min.js new file mode 100644 index 000000000..c10d0d567 --- /dev/null +++ b/public/admin/Coco/assets/libs/bootstrap-validator/js/bootstrapValidator.min.js @@ -0,0 +1,13 @@ +/** + * BootstrapValidator (http://bootstrapvalidator.com) + * + * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3 + * + * @version v0.4.5 + * @author https://twitter.com/nghuuphuoc + * @copyright (c) 2013 - 2014 Nguyen Huu Phuoc + * @license MIT + */ + +!function(a){var b=function(c,d){this.$form=a(c),this.options=a.extend({},b.DEFAULT_OPTIONS,d),this.$invalidField=null,this.$submitButton=null,this.STATUS_NOT_VALIDATED="NOT_VALIDATED",this.STATUS_VALIDATING="VALIDATING",this.STATUS_INVALID="INVALID",this.STATUS_VALID="VALID";var e=function(){for(var a=3,b=document.createElement("div"),c=b.all||[];b.innerHTML="",c[0];);return a>4?a:!a}(),f=document.createElement("div");this._changeEvent=9!==e&&"oninput"in f?"input":"keyup",this._submitIfValid=null,this._init()};b.DEFAULT_OPTIONS={elementClass:"bv-form",message:"This value is not valid",threshold:null,excluded:[":disabled",":hidden",":not(:visible)"],feedbackIcons:{valid:null,invalid:null,validating:null},submitButtons:'[type="submit"]',submitHandler:null,live:"enabled",fields:null},b.prototype={constructor:b,_init:function(){var b,c,d,e,f,g,h,i=this,j={excluded:this.$form.attr("data-bv-excluded"),trigger:this.$form.attr("data-bv-trigger"),message:this.$form.attr("data-bv-message"),submitButtons:this.$form.attr("data-bv-submitbuttons"),threshold:this.$form.attr("data-bv-threshold"),live:this.$form.attr("data-bv-live"),fields:{},feedbackIcons:{valid:this.$form.attr("data-bv-feedbackicons-valid"),invalid:this.$form.attr("data-bv-feedbackicons-invalid"),validating:this.$form.attr("data-bv-feedbackicons-validating")}};this.$form.attr("novalidate","novalidate").addClass(this.options.elementClass).on("submit.bv",function(a){a.preventDefault(),i.validate()}).on("click",this.options.submitButtons,function(){i.$submitButton=a(this),i._submitIfValid=!0}).find("[name], [data-bv-field]").each(function(){var k=a(this);if(!i._isExcluded(k)){var l=k.attr("name")||k.attr("data-bv-field"),m={};for(c in a.fn.bootstrapValidator.validators)if(b=a.fn.bootstrapValidator.validators[c],d=k.attr("data-bv-"+c.toLowerCase())+"",h="function"==typeof b.enableByHtml5?b.enableByHtml5(a(this)):null,h&&"false"!=d||h!==!0&&(""==d||"true"==d)){b.html5Attributes=b.html5Attributes||{message:"message"},m[c]=a.extend({},1==h?{}:h,m[c]);for(g in b.html5Attributes)e=b.html5Attributes[g],f=k.attr("data-bv-"+c.toLowerCase()+"-"+g),f&&("true"==f?f=!0:"false"==f&&(f=!1),m[c][e]=f)}var n={trigger:k.attr("data-bv-trigger"),message:k.attr("data-bv-message"),container:k.attr("data-bv-container"),selector:k.attr("data-bv-selector"),threshold:k.attr("data-bv-threshold"),validators:m};a.isEmptyObject(n.validators)||a.isEmptyObject(n)||(k.attr("data-bv-field",l),j.fields[l]=a.extend({},n,j.fields[l]))}}).end().find(this.options.submitButtons).each(function(){a("").attr("type","hidden").attr("name",a(this).attr("name")).val(a(this).val()).appendTo(i.$form)}),this.options=a.extend(!0,this.options,j);for(var k in this.options.fields)this._initField(k);this.setLiveMode(this.options.live)},_initField:function(b){if(null!=this.options.fields[b]&&null!=this.options.fields[b].validators){var c=this.getFieldElements(b);if(null==c)return void delete this.options.fields[b];for(var d in this.options.fields[b].validators)a.fn.bootstrapValidator.validators[d]||delete this.options.fields[b].validators[d];for(var e=this,f=c.attr("type"),g="radio"==f||"checkbox"==f||"file"==f||"SELECT"==c[0].tagName?"change":e._changeEvent,h=c.length,i=1==h||"radio"==f||"checkbox"==f,j=0;h>j;j++){var k=a(c[j]),l=k.parents(".form-group"),m=this.options.fields[b].container?l.find(this.options.fields[b].container):this._getMessageContainer(k);k.attr("data-bv-field")||k.attr("data-bv-field",b),k.on(g+".update.bv",function(){e._submitIfValid=!1,i?e.updateStatus(b,e.STATUS_NOT_VALIDATED,null):e.updateElementStatus(a(this),e.STATUS_NOT_VALIDATED,null)}),k.data("bv.messages",m);for(d in this.options.fields[b].validators)k.data("bv.result."+d,this.STATUS_NOT_VALIDATED),i&&j!=h-1||a("").css("display","none").attr("data-bv-validator",d).attr("data-bv-validator-for",b).html(this.options.fields[b].validators[d].message||this.options.fields[b].message||this.options.message).addClass("help-block").appendTo(m);if(this.options.feedbackIcons&&this.options.feedbackIcons.validating&&this.options.feedbackIcons.invalid&&this.options.feedbackIcons.valid&&(!i||j==h-1)){l.addClass("has-feedback");var n=a("").css("display","none").addClass("form-control-feedback").attr("data-bv-icon-for",b).insertAfter(k);0==l.find("label").length&&n.css("top",0)}}null==this.options.fields[b].enabled&&(this.options.fields[b].enabled=!0)}},_getMessageContainer:function(a){var b=a.parent();if(b.hasClass("form-group"))return b;var c=b.attr("class");if(!c)return this._getMessageContainer(b);c=c.split(" ");for(var d=c.length,e=0;d>e;e++)if(/^col-(xs|sm|md|lg)-\d+$/.test(c[e])||/^col-(xs|sm|md|lg)-offset-\d+$/.test(c[e]))return b;return this._getMessageContainer(b)},_submit:function(){if(this.isValid())this.options.submitHandler&&"function"==typeof this.options.submitHandler?this.options.submitHandler.call(this,this,this.$form,this.$submitButton):this.disableSubmitButtons(!0).defaultSubmit();else if("submitted"==this.options.live&&this.setLiveMode("enabled"),this.$invalidField){var b,c=this.$invalidField.parents(".tab-pane");c&&(b=c.attr("id"))&&a('a[href="#'+b+'"][data-toggle="tab"]').trigger("click.bs.tab.data-api"),this.$invalidField.focus()}},_isExcluded:function(b){if(this.options.excluded){"string"==typeof this.options.excluded&&(this.options.excluded=a.map(this.options.excluded.split(","),function(b){return a.trim(b)}));for(var c=this.options.excluded.length,d=0;c>d;d++)if("string"==typeof this.options.excluded[d]&&b.is(this.options.excluded[d])||"function"==typeof this.options.excluded[d]&&1==this.options.excluded[d].call(this,b,this))return!0}return!1},_exceedThreshold:function(a){var b=a.attr("data-bv-field"),c=this.options.fields[b].threshold||this.options.threshold;if(!c)return!0;var d=a.attr("type"),e=-1!=["button","checkbox","file","hidden","image","radio","reset","submit"].indexOf(d);return e||a.val().length>=c},getFieldElements:function(b){var c=this.options.fields[b].selector?a(this.options.fields[b].selector):this.$form.find('[name="'+b+'"]');return 0==c.length?null:c},setLiveMode:function(b){if(this.options.live=b,"submitted"==b)return this;var c=this;for(var d in this.options.fields)!function(e){var f=c.getFieldElements(e);if(f)for(var g=f.attr("type"),h=f.length,i=1==h||"radio"==g||"checkbox"==g,j=c.options.fields[d].trigger||c.options.trigger||("radio"==g||"checkbox"==g||"file"==g||"SELECT"==f[0].tagName?"change":c._changeEvent),k=a.map(j.split(" "),function(a){return a+".live.bv"}).join(" "),l=0;h>l;l++)"enabled"==b?a(f[l]).on(k,function(){c._exceedThreshold(a(this))&&(i?c.validateField(e):c.validateFieldElement(a(this),!1))}):a(f[l]).off(k)}(d);return this},disableSubmitButtons:function(a){return a?"disabled"!=this.options.live&&this.$form.find(this.options.submitButtons).attr("disabled","disabled"):this.$form.find(this.options.submitButtons).removeAttr("disabled"),this},validate:function(){if(!this.options.fields)return this;this.disableSubmitButtons(!0);for(var a in this.options.fields)this.validateField(a);return this.$submitButton&&this._submit(),this},validateField:function(b){for(var c=this.getFieldElements(b),d=c.attr("type"),e="radio"==d||"checkbox"==d?1:c.length,f=0;e>f;f++)this.validateFieldElement(a(c[f]),1==e);return this},validateFieldElement:function(b,c){var d,e,f=this,g=b.attr("data-bv-field"),h=this.options.fields[g].validators;if(!this.options.fields[g].enabled||this._isExcluded(b))return this;for(d in h){b.data("bv.dfs."+d)&&b.data("bv.dfs."+d).reject();var i=b.data("bv.result."+d);i!=this.STATUS_VALID&&i!=this.STATUS_INVALID&&(b.data("bv.result."+d,this.STATUS_VALIDATING),e=a.fn.bootstrapValidator.validators[d].validate(this,b,h[d]),"object"==typeof e?(c?this.updateStatus(g,this.STATUS_VALIDATING,d):this.updateElementStatus(b,this.STATUS_VALIDATING,d),b.data("bv.dfs."+d,e),e.done(function(a,b,d){a.removeData("bv.dfs."+b),c?f.updateStatus(a.attr("data-bv-field"),d?f.STATUS_VALID:f.STATUS_INVALID,b):f.updateElementStatus(a,d?f.STATUS_VALID:f.STATUS_INVALID,b),d&&1==f._submitIfValid&&f._submit()})):"boolean"==typeof e&&(c?this.updateStatus(g,e?this.STATUS_VALID:this.STATUS_INVALID,d):this.updateElementStatus(b,e?this.STATUS_VALID:this.STATUS_INVALID,d)))}return this},updateStatus:function(b,c,d){for(var e=this.getFieldElements(b),f=e.attr("type"),g="radio"==f||"checkbox"==f?1:e.length,h=0;g>h;h++)this.updateElementStatus(a(e[h]),c,d);return this},updateElementStatus:function(b,c,d){var e=this,f=b.attr("data-bv-field"),g=b.parents(".form-group"),h=b.data("bv.messages"),i=h.find(".help-block[data-bv-validator]"),j=g.find('.form-control-feedback[data-bv-icon-for="'+f+'"]');if(d)b.data("bv.result."+d,c);else for(var k in this.options.fields[f].validators)b.data("bv.result."+k,c);var l,m,n=b.parents(".tab-pane");switch(n&&(l=n.attr("id"))&&(m=a('a[href="#'+l+'"][data-toggle="tab"]').parent()),c){case this.STATUS_VALIDATING:this.disableSubmitButtons(!0),g.removeClass("has-success").removeClass("has-error"),d?i.filter('.help-block[data-bv-validator="'+d+'"]').hide():i.hide(),j&&j.removeClass(this.options.feedbackIcons.valid).removeClass(this.options.feedbackIcons.invalid).addClass(this.options.feedbackIcons.validating).show(),m&&m.removeClass("bv-tab-success").removeClass("bv-tab-error");break;case this.STATUS_INVALID:this.disableSubmitButtons(!0),g.removeClass("has-success").addClass("has-error"),d?i.filter('[data-bv-validator="'+d+'"]').show():i.show(),j&&j.removeClass(this.options.feedbackIcons.valid).removeClass(this.options.feedbackIcons.validating).addClass(this.options.feedbackIcons.invalid).show(),m&&m.removeClass("bv-tab-success").addClass("bv-tab-error");break;case this.STATUS_VALID:d?i.filter('[data-bv-validator="'+d+'"]').hide():i.hide();var o=0==i.filter(function(){var c=a(this).css("display"),d=a(this).attr("data-bv-validator");return"block"==c||b.data("bv.result."+d)!=e.STATUS_VALID}).length;this.disableSubmitButtons(!o),j&&j.removeClass(this.options.feedbackIcons.invalid).removeClass(this.options.feedbackIcons.validating).removeClass(this.options.feedbackIcons.valid).addClass(o?this.options.feedbackIcons.valid:this.options.feedbackIcons.invalid).show();var p=function(c){return 0==c.find(".help-block[data-bv-validator]").filter(function(){var c=a(this).css("display"),d=a(this).attr("data-bv-validator");return"block"==c||b.data("bv.result."+d)&&b.data("bv.result."+d)!=e.STATUS_VALID}).length};g.removeClass("has-error has-success").addClass(p(g)?"has-success":"has-error"),m&&m.removeClass("bv-tab-success").removeClass("bv-tab-error").addClass(p(n)?"bv-tab-success":"bv-tab-error");break;case this.STATUS_NOT_VALIDATED:default:this.disableSubmitButtons(!1),g.removeClass("has-success").removeClass("has-error"),d?i.filter('.help-block[data-bv-validator="'+d+'"]').hide():i.hide(),j&&j.removeClass(this.options.feedbackIcons.valid).removeClass(this.options.feedbackIcons.invalid).removeClass(this.options.feedbackIcons.validating).hide(),m&&m.removeClass("bv-tab-success").removeClass("bv-tab-error")}return this},isValid:function(){var b,c,d,e,f,g,h,i;for(c in this.options.fields)if(null!=this.options.fields[c]&&this.options.fields[c].enabled)for(b=this.getFieldElements(c),e=b.attr("type"),h="radio"==e||"checkbox"==e?1:b.length,i=0;h>i;i++)if(d=a(b[i]),!this._isExcluded(d))for(g in this.options.fields[c].validators){if(f=d.data("bv.result."+g),f==this.STATUS_NOT_VALIDATED||f==this.STATUS_VALIDATING)return!1;if(f==this.STATUS_INVALID)return this.$invalidField=d,!1}return!0},defaultSubmit:function(){this.$form.off("submit.bv").submit()},resetForm:function(b){var c,d,e,f,g;for(c in this.options.fields){d=this.getFieldElements(c),e=d.length;for(var h=0;e>h;h++)for(g in this.options.fields[c].validators)a(d[h]).removeData("bv.dfs."+g);this.updateStatus(c,this.STATUS_NOT_VALIDATED,null),b&&(f=d.attr("type"),"radio"==f||"checkbox"==f?d.removeAttr("checked").removeAttr("selected"):d.val(""))}return this.$invalidField=null,this.$submitButton=null,this.disableSubmitButtons(!1),this},enableFieldValidators:function(a,b){return this.options.fields[a].enabled=b,this.updateStatus(a,this.STATUS_NOT_VALIDATED,null),this}},a.fn.bootstrapValidator=function(c){var d=arguments;return this.each(function(){var e=a(this),f=e.data("bootstrapValidator"),g="object"==typeof c&&c;f||(f=new b(this,g),e.data("bootstrapValidator",f)),"string"==typeof c&&f[c].apply(f,Array.prototype.slice.call(d,1))})},a.fn.bootstrapValidator.validators={},a.fn.bootstrapValidator.Constructor=b,a.fn.bootstrapValidator.helpers={date:function(a,b,c,d){if(1e3>a||a>9999||0==b||b>12)return!1;var e=[31,28,31,30,31,30,31,31,30,31,30,31];if((a%400==0||a%100!=0&&a%4==0)&&(e[1]=29),0>c||c>e[b-1])return!1;if(d===!0){var f=new Date,g=f.getFullYear(),h=f.getMonth(),i=f.getDate();return g>a||a==g&&h>b-1||a==g&&b-1==h&&i>c}return!0},luhn:function(a){for(var b=a.length,c=0,d=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]],e=0;b--;)e+=d[c][parseInt(a.charAt(b),10)],c^=1;return e%10===0&&e>0},mod_11_10:function(a){for(var b=5,c=a.length,d=0;c>d;d++)b=(2*(b||10)%11+parseInt(a.charAt(d),10))%10;return 1==b},mod_37_36:function(a,b){b=b||"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(var c=b.length,d=a.length,e=Math.floor(c/2),f=0;d>f;f++)e=(2*(e||c)%(c+1)+b.indexOf(a.charAt(f)))%c;return 1==e}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.base64={validate:function(a,b){var c=b.val();return""==c?!0:/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$/.test(c)}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.between={html5Attributes:{message:"message",min:"min",max:"max",inclusive:"inclusive"},enableByHtml5:function(a){return"range"==a.attr("type")?{min:a.attr("min"),max:a.attr("max")}:!1},validate:function(a,b,c){var d=b.val();return""==d?!0:(d=parseFloat(d),c.inclusive===!0?d>c.min&&d=c.min&&d<=c.max)}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.callback={validate:function(b,c,d){var e=c.val();if(d.callback&&"function"==typeof d.callback){var f=new a.Deferred;return f.resolve(c,"callback",d.callback.call(this,e,b)),f}return!0}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.choice={html5Attributes:{message:"message",min:"min",max:"max"},validate:function(a,b,c){var d=b.is("select")?a.getFieldElements(b.attr("data-bv-field")).find("option").filter(":selected").length:a.getFieldElements(b.attr("data-bv-field")).filter(":checked").length;return c.min&&dc.max?!1:!0}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.creditCard={validate:function(b,c){var d=c.val();if(""==d)return!0;if(/[^0-9-\s]+/.test(d))return!1;if(d=d.replace(/\D/g,""),!a.fn.bootstrapValidator.helpers.luhn(d))return!1;var e,f,g={AMERICAN_EXPRESS:{length:[15],prefix:["34","37"]},DINERS_CLUB:{length:[14],prefix:["300","301","302","303","304","305","36"]},DINERS_CLUB_US:{length:[16],prefix:["54","55"]},DISCOVER:{length:[16],prefix:["6011","622126","622127","622128","622129","62213","62214","62215","62216","62217","62218","62219","6222","6223","6224","6225","6226","6227","6228","62290","62291","622920","622921","622922","622923","622924","622925","644","645","646","647","648","649","65"]},JCB:{length:[16],prefix:["3528","3529","353","354","355","356","357","358"]},LASER:{length:[16,17,18,19],prefix:["6304","6706","6771","6709"]},MAESTRO:{length:[12,13,14,15,16,17,18,19],prefix:["5018","5020","5038","6304","6759","6761","6762","6763","6764","6765","6766"]},MASTERCARD:{length:[16],prefix:["51","52","53","54","55"]},SOLO:{length:[16,18,19],prefix:["6334","6767"]},UNIONPAY:{length:[16,17,18,19],prefix:["622126","622127","622128","622129","62213","62214","62215","62216","62217","62218","62219","6222","6223","6224","6225","6226","6227","6228","62290","62291","622920","622921","622922","622923","622924","622925"]},VISA:{length:[16],prefix:["4"]}};for(e in g)for(f in g[e].prefix)if(d.substr(0,g[e].prefix[f].length)==g[e].prefix[f]&&-1!=g[e].length.indexOf(d.length))return!0;return!1}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.cusip={validate:function(b,c){var d=c.val();if(""==d)return!0;if(d=d.toUpperCase(),!/^[0-9A-Z]{9}$/.test(d))return!1;for(var e=a.map(d.split(""),function(a){var b=a.charCodeAt(0);return b>="A".charCodeAt(0)&&b<="Z".charCodeAt(0)?b-"A".charCodeAt(0)+10:a}),f=e.length,g=0,h=0;f-1>h;h++){var i=parseInt(e[h]);h%2!=0&&(i*=2),i>9&&(i-=9),g+=i}return g=(10-g%10)%10,g==e[f-1]}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.cvv={html5Attributes:{message:"message",ccfield:"creditCardField"},validate:function(a,b,c){var d=b.val();if(""==d)return!0;if(!/^[0-9]{3,4}$/.test(d))return!1;if(!c.creditCardField)return!0;var e=a.getFieldElements(c.creditCardField).val();if(""==e)return!0;e=e.replace(/\D/g,"");var f,g,h={AMERICAN_EXPRESS:{length:[15],prefix:["34","37"]},DINERS_CLUB:{length:[14],prefix:["300","301","302","303","304","305","36"]},DINERS_CLUB_US:{length:[16],prefix:["54","55"]},DISCOVER:{length:[16],prefix:["6011","622126","622127","622128","622129","62213","62214","62215","62216","62217","62218","62219","6222","6223","6224","6225","6226","6227","6228","62290","62291","622920","622921","622922","622923","622924","622925","644","645","646","647","648","649","65"]},JCB:{length:[16],prefix:["3528","3529","353","354","355","356","357","358"]},LASER:{length:[16,17,18,19],prefix:["6304","6706","6771","6709"]},MAESTRO:{length:[12,13,14,15,16,17,18,19],prefix:["5018","5020","5038","6304","6759","6761","6762","6763","6764","6765","6766"]},MASTERCARD:{length:[16],prefix:["51","52","53","54","55"]},SOLO:{length:[16,18,19],prefix:["6334","6767"]},UNIONPAY:{length:[16,17,18,19],prefix:["622126","622127","622128","622129","62213","62214","62215","62216","62217","62218","62219","6222","6223","6224","6225","6226","6227","6228","62290","62291","622920","622921","622922","622923","622924","622925"]},VISA:{length:[16],prefix:["4"]}},i=null;for(f in h)for(g in h[f].prefix)if(e.substr(0,h[f].prefix[g].length)==h[f].prefix[g]&&-1!=h[f].length.indexOf(e.length)){i=f;break}return null==i?!1:"AMERICAN_EXPRESS"==i?4==d.length:3==d.length}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.date={html5Attributes:{message:"message",format:"format"},validate:function(b,c,d){var e=c.val();if(""==e)return!0;d.format=d.format||"MM/DD/YYYY";var f=d.format.split(" "),g=f[0],h=f.length>1?f[1]:null,i=f.length>2?f[2]:null,j=e.split(" "),k=j[0],l=j.length>1?j[1]:null;if(f.length!=j.length)return!1;var m=-1!=k.indexOf("/")?"/":-1!=k.indexOf("-")?"-":null;if(null==m)return!1;k=k.split(m),g=g.split(m);var n=k[g.indexOf("YYYY")],o=k[g.indexOf("MM")],p=k[g.indexOf("DD")],q=null,r=null,s=null;if(h){if(h=h.split(":"),l=l.split(":"),h.length!=l.length)return!1;if(r=l.length>0?l[0]:null,q=l.length>1?l[1]:null,s=l.length>2?l[2]:null,s&&(s=parseInt(s,10),0>s||s>60))return!1;if(r&&(r=parseInt(r,10),0>r||r>=24||i&&r>12))return!1;if(q&&(q=parseInt(q,10),0>q||q>59))return!1}return p=parseInt(p,10),o=parseInt(o,10),n=parseInt(n,10),a.fn.bootstrapValidator.helpers.date(n,o,p)}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.different={html5Attributes:{message:"message",field:"field"},validate:function(a,b,c){var d=b.val();if(""==d)return!0;var e=a.getFieldElements(c.field);return null==e?!0:d!=e.val()?(a.updateStatus(c.field,a.STATUS_VALID,"different"),!0):!1}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.digits={validate:function(a,b){var c=b.val();return""==c?!0:/^\d+$/.test(c)}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.ean={validate:function(a,b){var c=b.val();if(""==c)return!0;if(!/^(\d{8}|\d{12}|\d{13})$/.test(c))return!1;for(var d=c.length,e=0,f=8==d?[3,1]:[1,3],g=0;d-1>g;g++)e+=parseInt(c.charAt(g))*f[g%2];return e=10-e%10,e==c.charAt(d-1)}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.emailAddress={enableByHtml5:function(a){return"email"==a.attr("type")},validate:function(a,b){var c=b.val();if(""==c)return!0;var d=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return d.test(c)}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.file={html5Attributes:{extension:"extension",maxsize:"maxSize",message:"message",type:"type"},validate:function(a,b,c){var d=b.val();if(""==d)return!0;var e,f=c.extension?c.extension.split(","):null,g=c.type?c.type.split(","):null,h=window.File&&window.FileList&&window.FileReader;if(h)for(var i=b.get(0).files,j=i.length,k=0;j>k;k++){if(c.maxSize&&i[k].size>parseInt(c.maxSize))return!1;if(e=i[k].name.substr(i[k].name.lastIndexOf(".")+1),f&&-1==f.indexOf(e))return!1;if(g&&-1==g.indexOf(i[k].type))return!1}else if(e=d.substr(d.lastIndexOf(".")+1),f&&-1==f.indexOf(e))return!1;return!0}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.greaterThan={html5Attributes:{message:"message",value:"value",inclusive:"inclusive"},enableByHtml5:function(a){var b=a.attr("min");return b?{value:b}:!1},validate:function(a,b,c){var d=b.val();return""==d?!0:(d=parseFloat(d),c.inclusive===!0?d>c.value:d>=c.value)}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.grid={validate:function(b,c){var d=c.val();return""==d?!0:(d=d.toUpperCase(),/^[GRID:]*([0-9A-Z]{2})[-\s]*([0-9A-Z]{5})[-\s]*([0-9A-Z]{10})[-\s]*([0-9A-Z]{1})$/g.test(d)?(d=d.replace(/\s/g,"").replace(/-/g,""),"GRID:"==d.substr(0,5)&&(d=d.substr(5)),a.fn.bootstrapValidator.helpers.mod_37_36(d)):!1)}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.hex={validate:function(a,b){var c=b.val();return""==c?!0:/^[0-9a-fA-F]+$/.test(c)}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.hexColor={enableByHtml5:function(a){return"color"==a.attr("type")},validate:function(a,b){var c=b.val();return""==c?!0:/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(c)}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.iban={html5Attributes:{message:"message",country:"country"},validate:function(b,c,d){var e=c.val();if(""==e)return!0;var f={AD:"AD[0-9]{2}[0-9]{4}[0-9]{4}[A-Z0-9]{12}",AE:"AE[0-9]{2}[0-9]{3}[0-9]{16}",AL:"AL[0-9]{2}[0-9]{8}[A-Z0-9]{16}",AO:"AO[0-9]{2}[0-9]{21}",AT:"AT[0-9]{2}[0-9]{5}[0-9]{11}",AZ:"AZ[0-9]{2}[A-Z]{4}[A-Z0-9]{20}",BA:"BA[0-9]{2}[0-9]{3}[0-9]{3}[0-9]{8}[0-9]{2}",BE:"BE[0-9]{2}[0-9]{3}[0-9]{7}[0-9]{2}",BF:"BF[0-9]{2}[0-9]{23}",BG:"BG[0-9]{2}[A-Z]{4}[0-9]{4}[0-9]{2}[A-Z0-9]{8}",BH:"BH[0-9]{2}[A-Z]{4}[A-Z0-9]{14}",BI:"BI[0-9]{2}[0-9]{12}",BJ:"BJ[0-9]{2}[A-Z]{1}[0-9]{23}",BR:"BR[0-9]{2}[0-9]{8}[0-9]{5}[0-9]{10}[A-Z][A-Z0-9]",CH:"CH[0-9]{2}[0-9]{5}[A-Z0-9]{12}",CI:"CI[0-9]{2}[A-Z]{1}[0-9]{23}",CM:"CM[0-9]{2}[0-9]{23}",CR:"CR[0-9]{2}[0-9]{3}[0-9]{14}",CV:"CV[0-9]{2}[0-9]{21}",CY:"CY[0-9]{2}[0-9]{3}[0-9]{5}[A-Z0-9]{16}",CZ:"CZ[0-9]{2}[0-9]{20}",DE:"DE[0-9]{2}[0-9]{8}[0-9]{10}",DK:"DK[0-9]{2}[0-9]{14}",DO:"DO[0-9]{2}[A-Z0-9]{4}[0-9]{20}",DZ:"DZ[0-9]{2}[0-9]{20}",EE:"EE[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{11}[0-9]{1}",ES:"ES[0-9]{2}[0-9]{4}[0-9]{4}[0-9]{1}[0-9]{1}[0-9]{10}",FI:"FI[0-9]{2}[0-9]{6}[0-9]{7}[0-9]{1}",FO:"FO[0-9]{2}[0-9]{4}[0-9]{9}[0-9]{1}",FR:"FR[0-9]{2}[0-9]{5}[0-9]{5}[A-Z0-9]{11}[0-9]{2}",GB:"GB[0-9]{2}[A-Z]{4}[0-9]{6}[0-9]{8}",GE:"GE[0-9]{2}[A-Z]{2}[0-9]{16}",GI:"GI[0-9]{2}[A-Z]{4}[A-Z0-9]{15}",GL:"GL[0-9]{2}[0-9]{4}[0-9]{9}[0-9]{1}",GR:"GR[0-9]{2}[0-9]{3}[0-9]{4}[A-Z0-9]{16}",GT:"GT[0-9]{2}[A-Z0-9]{4}[A-Z0-9]{20}",HR:"HR[0-9]{2}[0-9]{7}[0-9]{10}",HU:"HU[0-9]{2}[0-9]{3}[0-9]{4}[0-9]{1}[0-9]{15}[0-9]{1}",IE:"IE[0-9]{2}[A-Z]{4}[0-9]{6}[0-9]{8}",IL:"IL[0-9]{2}[0-9]{3}[0-9]{3}[0-9]{13}",IR:"IR[0-9]{2}[0-9]{22}",IS:"IS[0-9]{2}[0-9]{4}[0-9]{2}[0-9]{6}[0-9]{10}",IT:"IT[0-9]{2}[A-Z]{1}[0-9]{5}[0-9]{5}[A-Z0-9]{12}",JO:"JO[0-9]{2}[A-Z]{4}[0-9]{4}[0]{8}[A-Z0-9]{10}",KW:"KW[0-9]{2}[A-Z]{4}[0-9]{22}",KZ:"KZ[0-9]{2}[0-9]{3}[A-Z0-9]{13}",LB:"LB[0-9]{2}[0-9]{4}[A-Z0-9]{20}",LI:"LI[0-9]{2}[0-9]{5}[A-Z0-9]{12}",LT:"LT[0-9]{2}[0-9]{5}[0-9]{11}",LU:"LU[0-9]{2}[0-9]{3}[A-Z0-9]{13}",LV:"LV[0-9]{2}[A-Z]{4}[A-Z0-9]{13}",MC:"MC[0-9]{2}[0-9]{5}[0-9]{5}[A-Z0-9]{11}[0-9]{2}",MD:"MD[0-9]{2}[A-Z0-9]{20}",ME:"ME[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}",MG:"MG[0-9]{2}[0-9]{23}",MK:"MK[0-9]{2}[0-9]{3}[A-Z0-9]{10}[0-9]{2}",ML:"ML[0-9]{2}[A-Z]{1}[0-9]{23}",MR:"MR13[0-9]{5}[0-9]{5}[0-9]{11}[0-9]{2}",MT:"MT[0-9]{2}[A-Z]{4}[0-9]{5}[A-Z0-9]{18}",MU:"MU[0-9]{2}[A-Z]{4}[0-9]{2}[0-9]{2}[0-9]{12}[0-9]{3}[A-Z]{3}",MZ:"MZ[0-9]{2}[0-9]{21}",NL:"NL[0-9]{2}[A-Z]{4}[0-9]{10}",NO:"NO[0-9]{2}[0-9]{4}[0-9]{6}[0-9]{1}",PK:"PK[0-9]{2}[A-Z]{4}[A-Z0-9]{16}",PL:"PL[0-9]{2}[0-9]{8}[0-9]{16}",PS:"PS[0-9]{2}[A-Z]{4}[A-Z0-9]{21}",PT:"PT[0-9]{2}[0-9]{4}[0-9]{4}[0-9]{11}[0-9]{2}",QA:"QA[0-9]{2}[A-Z]{4}[A-Z0-9]{21}",RO:"RO[0-9]{2}[A-Z]{4}[A-Z0-9]{16}",RS:"RS[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}",SA:"SA[0-9]{2}[0-9]{2}[A-Z0-9]{18}",SE:"SE[0-9]{2}[0-9]{3}[0-9]{16}[0-9]{1}",SI:"SI[0-9]{2}[0-9]{5}[0-9]{8}[0-9]{2}",SK:"SK[0-9]{2}[0-9]{4}[0-9]{6}[0-9]{10}",SM:"SM[0-9]{2}[A-Z]{1}[0-9]{5}[0-9]{5}[A-Z0-9]{12}",SN:"SN[0-9]{2}[A-Z]{1}[0-9]{23}",TN:"TN59[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}",TR:"TR[0-9]{2}[0-9]{5}[A-Z0-9]{1}[A-Z0-9]{16}",VG:"VG[0-9]{2}[A-Z]{4}[0-9]{16}"};e=e.replace(/[^a-zA-Z0-9]/g,"").toUpperCase();var g=d.country||e.substr(0,2);if(!f[g])return!1;if(!new RegExp("^"+f[g]+"$").test(e))return!1;e=e.substr(4)+e.substr(0,4),e=a.map(e.split(""),function(a){var b=a.charCodeAt(0);return b>="A".charCodeAt(0)&&b<="Z".charCodeAt(0)?b-"A".charCodeAt(0)+10:a}),e=e.join("");for(var h=parseInt(e.substr(0,1),10),i=e.length,j=1;i>j;++j)h=(10*h+parseInt(e.substr(j,1),10))%97;return 1==h}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.id={html5Attributes:{message:"message",country:"country"},validate:function(a,b,c){var d=b.val();if(""==d)return!0;var e=c.country||d.substr(0,2),f=["_",e.toLowerCase()].join("");return this[f]&&"function"==typeof this[f]?this[f](d):!0},_validateJMBG:function(a,b){if(!/^\d{13}$/.test(a))return!1;var c=parseInt(a.substr(0,2),10),d=parseInt(a.substr(2,2),10),e=(parseInt(a.substr(4,3),10),parseInt(a.substr(7,2),10)),f=parseInt(a.substr(12,1),10);if(c>31||d>12)return!1;for(var g=0,h=0;6>h;h++)g+=(7-h)*(parseInt(a.charAt(h))+parseInt(a.charAt(h+6)));if(g=11-g%11,(10==g||11==g)&&(g=0),g!=f)return!1;switch(b.toUpperCase()){case"BA":return e>=10&&19>=e;case"MK":return e>=41&&49>=e;case"ME":return e>=20&&29>=e;case"RS":return e>=70&&99>=e;case"SI":return e>=50&&59>=e;default:return!0}},_ba:function(a){return this._validateJMBG(a,"BA")},_mk:function(a){return this._validateJMBG(a,"MK")},_me:function(a){return this._validateJMBG(a,"ME")},_rs:function(a){return this._validateJMBG(a,"RS")},_si:function(a){return this._validateJMBG(a,"SI")},_bg:function(b){if(!/^\d{10}$/.test(b)&&!/^\d{6}\s\d{3}\s\d{1}$/.test(b))return!1;b=b.replace(/\s/g,"");var c=parseInt(b.substr(0,2),10)+1900,d=parseInt(b.substr(2,2),10),e=parseInt(b.substr(4,2),10);if(d>40?(c+=100,d-=40):d>20&&(c-=100,d-=20),!a.fn.bootstrapValidator.helpers.date(c,d,e))return!1;for(var f=0,g=[2,4,8,5,10,9,7,3,6],h=0;9>h;h++)f+=parseInt(b.charAt(h))*g[h];return f=f%11%10,f==b.substr(9,1)},_br:function(a){if(/^1{11}|2{11}|3{11}|4{11}|5{11}|6{11}|7{11}|8{11}|9{11}|0{11}$/.test(a))return!1;if(!/^\d{11}$/.test(a)&&!/^\d{3}\.\d{3}\.\d{3}-\d{2}$/.test(a))return!1;a=a.replace(/\./g,"").replace(/-/g,"");for(var b=0,c=0;9>c;c++)b+=(10-c)*parseInt(a.charAt(c));if(b=11-b%11,(10==b||11==b)&&(b=0),b!=a.charAt(9))return!1;var d=0;for(c=0;10>c;c++)d+=(11-c)*parseInt(a.charAt(c));return d=11-d%11,(10==d||11==d)&&(d=0),d==a.charAt(10)},_ch:function(a){if(!/^756[\.]{0,1}[0-9]{4}[\.]{0,1}[0-9]{4}[\.]{0,1}[0-9]{2}$/.test(a))return!1;a=a.replace(/\D/g,"").substr(3);for(var b=a.length,c=0,d=8==b?[3,1]:[1,3],e=0;b-1>e;e++)c+=parseInt(a.charAt(e))*d[e%2];return c=10-c%10,c==a.charAt(b-1)},_cl:function(a){if(!/^\d{7,8}[-]{0,1}[0-9K]$/.test(a))return!1;for(a=a.replace(/\D/g,"");a.length<9;)a="0"+a;for(var b=0,c=[3,2,7,6,5,4,3,2],d=0;8>d;d++)b+=parseInt(a.charAt(d))*c[d];return b=11-b%11,11==b?b=0:10==b&&(b="K"),b==a.charAt(8)},_cz:function(b){if(!/^\d{9,10}$/.test(b))return!1;var c=1900+parseInt(b.substr(0,2)),d=parseInt(b.substr(2,2))%50%20,e=parseInt(b.substr(4,2));if(9==b.length){if(c>=1980&&(c-=100),c>1953)return!1}else 1954>c&&(c+=100);if(!a.fn.bootstrapValidator.helpers.date(c,d,e))return!1;if(10==b.length){var f=parseInt(b.substr(0,9),10)%11;return 1985>c&&(f%=10),f==b.substr(9,1)}return!0},_dk:function(b){if(!/^[0-9]{6}[-]{0,1}[0-9]{4}$/.test(b))return!1;b=b.replace(/-/g,"");var c=parseInt(b.substr(0,2),10),d=parseInt(b.substr(2,2),10),e=parseInt(b.substr(4,2),10);switch(!0){case-1!="5678".indexOf(b.charAt(6))&&e>=58:e+=1800;break;case-1!="0123".indexOf(b.charAt(6)):case-1!="49".indexOf(b.charAt(6))&&e>=37:e+=1900;break;default:e+=2e3}return a.fn.bootstrapValidator.helpers.date(e,d,c)},_ee:function(a){return this._lt(a)},_es:function(a){if(!/^[0-9A-Z]{8}[-]{0,1}[0-9A-Z]$/.test(a)&&!/^[XYZ][-]{0,1}[0-9]{7}[-]{0,1}[0-9A-Z]$/.test(a))return!1;a=a.replace(/-/g,"");var b="XYZ".indexOf(a.charAt(0));-1!=b&&(a=b+a.substr(1)+"");var c=parseInt(a.substr(0,8),10);return c="TRWAGMYFPDXBNJZSQVHLCKE"[c%23],c==a.substr(8,1)},_fi:function(b){if(!/^[0-9]{6}[-+A][0-9]{3}[0-9ABCDEFHJKLMNPRSTUVWXY]$/.test(b))return!1;var c=parseInt(b.substr(0,2),10),d=parseInt(b.substr(2,2),10),e=parseInt(b.substr(4,2),10),f={"+":1800,"-":1900,A:2e3};if(e=f[b.charAt(6)]+e,!a.fn.bootstrapValidator.helpers.date(e,d,c))return!1;var g=parseInt(b.substr(7,3));if(2>g)return!1;var h=b.substr(0,6)+b.substr(7,3)+"";return h=parseInt(h),"0123456789ABCDEFHJKLMNPRSTUVWXY".charAt(h%31)==b.charAt(10)},_hr:function(b){return/^[0-9]{11}$/.test(b)?a.fn.bootstrapValidator.helpers.mod_11_10(b):!1},_ie:function(a){if(!/^\d{7}[A-W][AHWTX]?$/.test(a))return!1;var b=function(a){for(;a.length<7;)a="0"+a;for(var b="WABCDEFGHIJKLMNOPQRSTUV",c=0,d=0;7>d;d++)c+=parseInt(a.charAt(d))*(8-d);return c+=9*b.indexOf(a.substr(7)),b[c%23]};return 9!=a.length||"A"!=a.charAt(8)&&"H"!=a.charAt(8)?a.charAt(7)==b(a.substr(0,7)):a.charAt(7)==b(a.substr(0,7)+a.substr(8)+"")},_is:function(b){if(!/^[0-9]{6}[-]{0,1}[0-9]{4}$/.test(b))return!1;b=b.replace(/-/g,"");var c=parseInt(b.substr(0,2),10),d=parseInt(b.substr(2,2),10),e=parseInt(b.substr(4,2),10),f=parseInt(b.charAt(9));if(e=9==f?1900+e:100*(20+f)+e,!a.fn.bootstrapValidator.helpers.date(e,d,c,!0))return!1;for(var g=0,h=[3,2,7,6,5,4,3,2],i=0;8>i;i++)g+=parseInt(b.charAt(i))*h[i];return g=11-g%11,g==b.charAt(8)},_lt:function(b){if(!/^[0-9]{11}$/.test(b))return!1;var c=parseInt(b.charAt(0)),d=parseInt(b.substr(1,2),10),e=parseInt(b.substr(3,2),10),f=parseInt(b.substr(5,2),10),g=c%2==0?17+c/2:17+(c+1)/2;if(d=100*g+d,!a.fn.bootstrapValidator.helpers.date(d,e,f,!0))return!1;for(var h=0,i=[1,2,3,4,5,6,7,8,9,1],j=0;10>j;j++)h+=parseInt(b.charAt(j))*i[j];if(h%=11,10!=h)return h==b.charAt(10);for(h=0,i=[3,4,5,6,7,8,9,1,2,3],j=0;10>j;j++)h+=parseInt(b.charAt(j))*i[j];return h%=11,10==h&&(h=0),h==b.charAt(10)},_lv:function(b){if(!/^[0-9]{6}[-]{0,1}[0-9]{5}$/.test(b))return!1;b=b.replace(/\D/g,"");var c=parseInt(b.substr(0,2)),d=parseInt(b.substr(2,2)),e=parseInt(b.substr(4,2));if(e=e+1800+100*parseInt(b.charAt(6)),!a.fn.bootstrapValidator.helpers.date(e,d,c,!0))return!1;for(var f=0,g=[10,5,8,4,2,1,6,3,7,9],h=0;10>h;h++)f+=parseInt(b.charAt(h))*g[h];return f=(f+1)%11%10,f==b.charAt(10)},_nl:function(a){for(;a.length<9;)a="0"+a;if(!/^[0-9]{4}[.]{0,1}[0-9]{2}[.]{0,1}[0-9]{3}$/.test(a))return!1;if(a=a.replace(/\./g,""),0==parseInt(a,10))return!1;for(var b=0,c=a.length,d=0;c-1>d;d++)b+=(9-d)*parseInt(a.charAt(d));return b%=11,10==b&&(b=0),b==a.charAt(c-1)},_ro:function(b){if(!/^[0-9]{13}$/.test(b))return!1;var c=parseInt(b.charAt(0));if(0==c||7==c||8==c)return!1;var d=parseInt(b.substr(1,2),10),e=parseInt(b.substr(3,2),10),f=parseInt(b.substr(5,2),10),g={1:1900,2:1900,3:1800,4:1800,5:2e3,6:2e3};if(f>31&&e>12)return!1;if(9!=c&&(d=g[c+""]+d,!a.fn.bootstrapValidator.helpers.date(d,e,f)))return!1;for(var h=0,i=[2,7,9,1,4,6,3,5,8,2,7,9],j=b.length,k=0;j-1>k;k++)h+=parseInt(b.charAt(k))*i[k]; +return h%=11,10==h&&(h=1),h==b.charAt(j-1)},_se:function(b){if(!/^[0-9]{10}$/.test(b)&&!/^[0-9]{6}[-|+][0-9]{4}$/.test(b))return!1;b=b.replace(/[^0-9]/g,"");var c=parseInt(b.substr(0,2))+1900,d=parseInt(b.substr(2,2)),e=parseInt(b.substr(4,2));return a.fn.bootstrapValidator.helpers.date(c,d,e)?a.fn.bootstrapValidator.helpers.luhn(b):!1},_sk:function(a){return this._cz(a)},_sm:function(a){return/^\d{5}$/.test(a)},_za:function(b){if(!/^[0-9]{10}[0|1][8|9][0-9]$/.test(b))return!1;var c=parseInt(b.substr(0,2)),d=(new Date).getFullYear()%100,e=parseInt(b.substr(2,2)),f=parseInt(b.substr(4,2));return c=c>=d?c+1900:c+2e3,a.fn.bootstrapValidator.helpers.date(c,e,f)?a.fn.bootstrapValidator.helpers.luhn(b):!1}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.identical={html5Attributes:{message:"message",field:"field"},validate:function(a,b,c){var d=b.val();if(""==d)return!0;var e=a.getFieldElements(c.field);return null==e?!0:d==e.val()?(a.updateStatus(c.field,a.STATUS_VALID,"identical"),!0):!1}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.imei={validate:function(b,c){var d=c.val();if(""==d)return!0;switch(!0){case/^\d{15}$/.test(d):case/^\d{2}-\d{6}-\d{6}-\d{1}$/.test(d):case/^\d{2}\s\d{6}\s\d{6}\s\d{1}$/.test(d):return d=d.replace(/[^0-9]/g,""),a.fn.bootstrapValidator.helpers.luhn(d);case/^\d{14}$/.test(d):case/^\d{16}$/.test(d):case/^\d{2}-\d{6}-\d{6}(|-\d{2})$/.test(d):case/^\d{2}\s\d{6}\s\d{6}(|\s\d{2})$/.test(d):return!0;default:return!1}}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.integer={enableByHtml5:function(a){return"number"==a.attr("type")},validate:function(a,b){var c=b.val();return""==c?!0:/^(?:-?(?:0|[1-9][0-9]*))$/.test(c)}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.ip={html5Attributes:{message:"message",ipv4:"ipv4",ipv6:"ipv6"},validate:function(b,c,d){var e=c.val();return""==e?!0:(d=a.extend({},{ipv4:!0,ipv6:!0},d),d.ipv4?/^(?:(?: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]?)$/.test(e):d.ipv6?/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/.test(str):!1)}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.isbn={validate:function(a,b){var c=b.val();if(""==c)return!0;var d;switch(!0){case/^\d{9}[\dX]$/.test(c):case 13==c.length&&/^(\d+)-(\d+)-(\d+)-([\dX])$/.test(c):case 13==c.length&&/^(\d+)\s(\d+)\s(\d+)\s([\dX])$/.test(c):d="ISBN10";break;case/^(978|979)\d{9}[\dX]$/.test(c):case 17==c.length&&/^(978|979)-(\d+)-(\d+)-(\d+)-([\dX])$/.test(c):case 17==c.length&&/^(978|979)\s(\d+)\s(\d+)\s(\d+)\s([\dX])$/.test(c):d="ISBN13";break;default:return!1}c=c.replace(/[^0-9X]/gi,"");var e,f=c.split(""),g=f.length,h=0;switch(d){case"ISBN10":h=0;for(var i=0;g-1>i;i++)h+=(10-i)*parseInt(f[i]);return e=11-h%11,11==e?e=0:10==e&&(e="X"),e+""==f[g-1];case"ISBN13":h=0;for(var i=0;g-1>i;i++)h+=i%2==0?parseInt(f[i]):3*parseInt(f[i]);return e=10-h%10,10==e&&(e="0"),e+""==f[g-1];default:return!1}}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.isin={COUNTRY_CODES:"AF|AX|AL|DZ|AS|AD|AO|AI|AQ|AG|AR|AM|AW|AU|AT|AZ|BS|BH|BD|BB|BY|BE|BZ|BJ|BM|BT|BO|BQ|BA|BW|BV|BR|IO|BN|BG|BF|BI|KH|CM|CA|CV|KY|CF|TD|CL|CN|CX|CC|CO|KM|CG|CD|CK|CR|CI|HR|CU|CW|CY|CZ|DK|DJ|DM|DO|EC|EG|SV|GQ|ER|EE|ET|FK|FO|FJ|FI|FR|GF|PF|TF|GA|GM|GE|DE|GH|GI|GR|GL|GD|GP|GU|GT|GG|GN|GW|GY|HT|HM|VA|HN|HK|HU|IS|IN|ID|IR|IQ|IE|IM|IL|IT|JM|JP|JE|JO|KZ|KE|KI|KP|KR|KW|KG|LA|LV|LB|LS|LR|LY|LI|LT|LU|MO|MK|MG|MW|MY|MV|ML|MT|MH|MQ|MR|MU|YT|MX|FM|MD|MC|MN|ME|MS|MA|MZ|MM|NA|NR|NP|NL|NC|NZ|NI|NE|NG|NU|NF|MP|NO|OM|PK|PW|PS|PA|PG|PY|PE|PH|PN|PL|PT|PR|QA|RE|RO|RU|RW|BL|SH|KN|LC|MF|PM|VC|WS|SM|ST|SA|SN|RS|SC|SL|SG|SX|SK|SI|SB|SO|ZA|GS|SS|ES|LK|SD|SR|SJ|SZ|SE|CH|SY|TW|TJ|TZ|TH|TL|TG|TK|TO|TT|TN|TR|TM|TC|TV|UG|UA|AE|GB|US|UM|UY|UZ|VU|VE|VN|VG|VI|WF|EH|YE|ZM|ZW",validate:function(a,b){var c=b.val();if(""==c)return!0;c=c.toUpperCase();var d=new RegExp("^("+this.COUNTRY_CODES+")[0-9A-Z]{10}$");if(!d.test(c))return!1;for(var e="",f=c.length,g=0;f-1>g;g++){var h=c.charCodeAt(g);e+=h>57?(h-55).toString():c.charAt(g)}var i="",j=e.length,k=j%2!=0?0:1;for(g=0;j>g;g++)i+=parseInt(e[g])*(g%2==k?2:1)+"";var l=0;for(g=0;gh;h++)f+=parseInt(c.charAt(h))*g[h%2];return f=10-f%10,f==c.charAt(e-1)}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.issn={validate:function(a,b){var c=b.val();if(""==c)return!0;if(!/^\d{4}\-\d{3}[\dX]$/.test(c))return!1;c=c.replace(/[^0-9X]/gi,"");var d=c.split(""),e=d.length,f=0;"X"==d[7]&&(d[7]=10);for(var g=0;e>g;g++)f+=(8-g)*parseInt(d[g]);return f%11==0}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.lessThan={html5Attributes:{message:"message",value:"value",inclusive:"inclusive"},enableByHtml5:function(a){var b=a.attr("max");return b?{value:b}:!1},validate:function(a,b,c){var d=b.val();return""==d?!0:(d=parseFloat(d),c.inclusive===!1?d<=c.value:d0:""!=a.trim(c.val())}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.numeric={html5Attributes:{message:"message",separator:"separator"},validate:function(a,b,c){var d=b.val();if(""==d)return!0;var e=c.separator||".";return"."!=e&&(d=d.replace(e,".")),!isNaN(parseFloat(d))&&isFinite(d)}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.phone={html5Attributes:{message:"message",country:"country"},validate:function(a,b,c){var d=b.val();if(""==d)return!0;var e=(c.country||"US").toUpperCase();switch(e){case"US":default:return d=d.replace(/\D/g,""),/^(?:(1\-?)|(\+1 ?))?\(?(\d{3})[\)\-\.]?(\d{3})[\-\.]?(\d{4})$/.test(d)&&10==d.length}}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.regexp={html5Attributes:{message:"message",regexp:"regexp"},enableByHtml5:function(a){var b=a.attr("pattern");return b?{regexp:b}:!1},validate:function(a,b,c){var d=b.val();if(""==d)return!0;var e="string"==typeof c.regexp?new RegExp(c.regexp):c.regexp;return e.test(d)}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.remote={html5Attributes:{message:"message",url:"url",name:"name"},validate:function(b,c,d){var e=c.val();if(""==e)return!0;var f=c.attr("data-bv-field"),g=d.data;null==g&&(g={}),"function"==typeof g&&(g=g.call(this,b)),g[d.name||f]=e;var h=new a.Deferred,i=a.ajax({type:"POST",url:d.url,dataType:"json",data:g});return i.then(function(a){h.resolve(c,"remote",a.valid===!0||"true"===a.valid)}),h.fail(function(){i.abort()}),h}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.rtn={validate:function(a,b){var c=b.val();if(""==c)return!0;if(!/^\d{9}$/.test(c))return!1;for(var d=0,e=0;eg;g++)d+=e[g]*parseInt(c.charAt(g),36);return d=(10-d%10)%10,d==c.charAt(f-1)}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.siren={validate:function(b,c){var d=c.val();return""==d?!0:/^\d{9}$/.test(d)?a.fn.bootstrapValidator.helpers.luhn(d):!1}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.siret={validate:function(a,b){var c=b.val();if(""==c)return!0;for(var d,e=0,f=c.length,g=0;f>g;g++)d=parseInt(c.charAt(g),10),g%2==0&&(d=2*d,d>9&&(d-=9)),e+=d;return e%10==0}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.step={html5Attributes:{message:"message",base:"baseValue",step:"step"},validate:function(b,c,d){var e=c.val();if(""==e)return!0;if(d=a.extend({},{baseValue:0,step:1},d),e=parseFloat(e),isNaN(e)||!isFinite(e))return!1;var f=function(a,b){var c=Math.pow(10,b);a*=c;var d=a>0|-(0>a),e=a%1===.5*d;return e?(Math.floor(a)+(d>0))/c:Math.round(a)/c},g=function(a,b){if(0==b)return 1;var c=(a+"").split("."),d=(b+"").split("."),e=(1==c.length?0:c[1].length)+(1==d.length?0:d[1].length);return f(a-b*Math.floor(a/b),e)},h=g(e-d.baseValue,d.step);return 0==h||h==d.step}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.stringCase={html5Attributes:{message:"message","case":"case"},validate:function(a,b,c){var d=b.val();if(""==d)return!0;var e=(c["case"]||"lower").toLowerCase();switch(e){case"upper":return d===d.toUpperCase();case"lower":default:return d===d.toLowerCase()}}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.stringLength={html5Attributes:{message:"message",min:"min",max:"max"},enableByHtml5:function(a){var b=a.attr("maxlength");return b?{max:parseInt(b,10)}:!1},validate:function(b,c,d){var e=c.val();if(""==e)return!0;var f=a.trim(e).length;return d.min&&fd.max?!1:!0}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.uri={enableByHtml5:function(a){return"url"==a.attr("type")},validate:function(a,b){var c=b.val();if(""==c)return!0;var d=new RegExp("^(?:(?:https?|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?!10(?:\\.\\d{1,3}){3})(?!127(?:\\.\\d{1,3}){3})(?!169\\.254(?:\\.\\d{1,3}){2})(?!192\\.168(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:/[^\\s]*)?$","i");return d.test(c)}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.uuid={html5Attributes:{message:"message",version:"version"},validate:function(a,b,c){var d=b.val();if(""==d)return!0;var e={3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i},f=c.version?c.version+"":"all";return null==e[f]?!0:e[f].test(d)}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.vat={html5Attributes:{message:"message",country:"country"},validate:function(a,b,c){var d=b.val();if(""==d)return!0;var e=c.country||d.substr(0,2),f=["_",e.toLowerCase()].join("");return this[f]&&"function"==typeof this[f]?this[f](d):!0},_at:function(a){if(!/^ATU[0-9]{8}$/.test(a))return!1;a=a.substr(3);for(var b=0,c=[1,2,1,2,1,2,1],d=0,e=0;7>e;e++)d=parseInt(a.charAt(e))*c[e],d>9&&(d=Math.floor(d/10)+d%10),b+=d;return b=10-(b+4)%10,10==b&&(b=0),b==a.substr(7,1)},_be:function(a){if(!/^BE[0]{0,1}[0-9]{9}$/.test(a))return!1;if(a=a.substr(2),9==a.length&&(a="0"+a),0==a.substr(1,1))return!1;var b=parseInt(a.substr(0,8),10)+parseInt(a.substr(8,2),10);return b%97==0},_bg:function(b){if(!/^BG[0-9]{9,10}$/.test(b))return!1;b=b.substr(2);var c=0,d=0;if(9==b.length){for(d=0;8>d;d++)c+=parseInt(b.charAt(d))*(d+1);if(c%=11,10==c)for(c=0,d=0;8>d;d++)c+=parseInt(b.charAt(d))*(d+3);return c%=10,c==b.substr(8)}if(10==b.length){var e=function(b){var c=parseInt(b.substr(0,2),10)+1900,d=parseInt(b.substr(2,2),10),e=parseInt(b.substr(4,2),10);if(d>40?(c+=100,d-=40):d>20&&(c-=100,d-=20),!a.fn.bootstrapValidator.helpers.date(c,d,e))return!1;for(var f=0,g=[2,4,8,5,10,9,7,3,6],h=0;9>h;h++)f+=parseInt(b.charAt(h))*g[h];return f=f%11%10,f==b.substr(9,1)},f=function(a){for(var b=0,c=[21,19,17,13,11,9,7,3,1],d=0;9>d;d++)b+=parseInt(a.charAt(d))*c[d];return b%=10,b==a.substr(9,1)},g=function(a){for(var b=0,c=[4,3,2,7,6,5,4,3,2],d=0;9>d;d++)b+=parseInt(a.charAt(d))*c[d];return b=11-b%11,10==b?!1:(11==b&&(b=0),b==a.substr(9,1))};return e(b)||f(b)||g(b)}return!1},_ch:function(a){if(!/^CHE[0-9]{9}(MWST)?$/.test(a))return!1;a=a.substr(3);for(var b=0,c=[5,4,3,2,7,6,5,4],d=0;8>d;d++)b+=parseInt(a.charAt(d),10)*c[d];return b=11-b%11,10==b?!1:(11==b&&(b=0),b==a.substr(8,1))},_cy:function(a){if(!/^CY[0-5|9]{1}[0-9]{7}[A-Z]{1}$/.test(a))return!1;if(a=a.substr(2),"12"==a.substr(0,2))return!1;for(var b=0,c={0:1,1:0,2:5,3:7,4:9,5:13,6:15,7:17,8:19,9:21},d=0;8>d;d++){var e=parseInt(a.charAt(d),10);d%2==0&&(e=c[e+""]),b+=e}return b="ABCDEFGHIJKLMNOPQRSTUVWXYZ"[b%26],b==a.substr(8,1)},_cz:function(b){if(!/^CZ[0-9]{8,10}$/.test(b))return!1;b=b.substr(2);var c=0,d=0;if(8==b.length){if(b.charAt(0)+""=="9")return!1;for(c=0,d=0;7>d;d++)c+=parseInt(b.charAt(d),10)*(8-d);return c=11-c%11,10==c&&(c=0),11==c&&(c=1),c==b.substr(7,1)}if(9==b.length&&b.charAt(0)+""=="6"){for(c=0,d=0;7>d;d++)c+=parseInt(b.charAt(d+1),10)*(8-d);return c=11-c%11,10==c&&(c=0),11==c&&(c=1),c=[8,7,6,5,4,3,2,1,0,9,10][c-1],c==b.substr(8,1)}if(9==b.length||10==b.length){var e=1900+parseInt(b.substr(0,2)),f=parseInt(b.substr(2,2))%50%20,g=parseInt(b.substr(4,2));if(9==b.length){if(e>=1980&&(e-=100),e>1953)return!1}else 1954>e&&(e+=100);if(!a.fn.bootstrapValidator.helpers.date(e,f,g))return!1;if(10==b.length){var h=parseInt(b.substr(0,9),10)%11;return 1985>e&&(h%=10),h==b.substr(9,1)}return!0}return!1},_de:function(b){return/^DE[0-9]{9}$/.test(b)?(b=b.substr(2),a.fn.bootstrapValidator.helpers.mod_11_10(b)):!1},_dk:function(a){if(!/^DK[0-9]{8}$/.test(a))return!1;a=a.substr(2);for(var b=0,c=[2,7,6,5,4,3,2,1],d=0;8>d;d++)b+=parseInt(a.charAt(d),10)*c[d];return b%11==0},_ee:function(a){if(!/^EE[0-9]{9}$/.test(a))return!1;a=a.substr(2);for(var b=0,c=[3,7,1,3,7,1,3,7,1],d=0;9>d;d++)b+=parseInt(a.charAt(d))*c[d];return b%10==0},_es:function(a){if(!/^ES[0-9A-Z][0-9]{7}[0-9A-Z]$/.test(a))return!1;a=a.substr(2);var b=function(a){var b=parseInt(a.substr(0,8),10);return b="TRWAGMYFPDXBNJZSQVHLCKE"[b%23],b==a.substr(8,1)},c=function(a){var b=["XYZ".indexOf(a.charAt(0)),a.substr(1)].join("");return b=parseInt(b,10),b="TRWAGMYFPDXBNJZSQVHLCKE"[b%23],b==a.substr(8,1)},d=function(a){var b,c=a.charAt(0);if(-1!="KLM".indexOf(c))return b=parseInt(a.substr(1,8),10),b="TRWAGMYFPDXBNJZSQVHLCKE"[b%23],b==a.substr(8,1);if(-1!="ABCDEFGHJNPQRSUVW".indexOf(c)){for(var d=0,e=[2,1,2,1,2,1,2],f=0,g=0;7>g;g++)f=parseInt(a.charAt(g+1))*e[g],f>9&&(f=Math.floor(f/10)+f%10),d+=f;return d=10-d%10,d==a.substr(8,1)||"JABCDEFGHI"[d]==a.substr(8,1)}return!1},e=a.charAt(0);return/^[0-9]$/.test(e)?b(a):/^[XYZ]$/.test(e)?c(a):d(a)},_fi:function(a){if(!/^FI[0-9]{8}$/.test(a))return!1;a=a.substr(2);for(var b=0,c=[7,9,10,5,8,4,2,1],d=0;8>d;d++)b+=parseInt(a.charAt(d))*c[d];return b%11==0},_fr:function(b){if(!/^FR[0-9A-Z]{2}[0-9]{9}$/.test(b))return!1;if(b=b.substr(2),!a.fn.bootstrapValidator.helpers.luhn(b.substr(2)))return!1;if(/^[0-9]{2}$/.test(b.substr(0,2)))return b.substr(0,2)==parseInt(b.substr(2)+"12",10)%97;var c,d="0123456789ABCDEFGHJKLMNPQRSTUVWXYZ";return c=/^[0-9]{1}$/.test(b.charAt(0))?24*d.indexOf(b.charAt(0))+d.indexOf(b.charAt(1))-10:34*d.indexOf(b.charAt(0))+d.indexOf(b.charAt(1))-100,(parseInt(b.substr(2),10)+1+Math.floor(c/11))%11==c%11},_gb:function(a){if(!(/^GB[0-9]{9}$/.test(a)||/^GB[0-9]{12}$/.test(a)||/^GBGD[0-9]{3}$/.test(a)||/^GBHA[0-9]{3}$/.test(a)||/^GB(GD|HA)8888[0-9]{5}$/.test(a)))return!1;a=a.substr(2);var b=a.length;if(5==b){var c=a.substr(0,2),d=parseInt(a.substr(2));return"GD"==c&&500>d||"HA"==c&&d>=500}if(11==b&&("GD8888"==a.substr(0,6)||"HA8888"==a.substr(0,6)))return"GD"==a.substr(0,2)&&parseInt(a.substr(6,3))>=500||"HA"==a.substr(0,2)&&parseInt(a.substr(6,3))<500?!1:parseInt(a.substr(6,3))%97==parseInt(a.substr(9,2));if(9==b||12==b){for(var e=0,f=[8,7,6,5,4,3,2,10,1],g=0;9>g;g++)e+=parseInt(a.charAt(g))*f[g];return e%=97,parseInt(a.substr(0,3))>=100?0==e||42==e||55==e:0==e}return!0},_gr:function(a){if(!/^GR[0-9]{9}$/.test(a))return!1;a=a.substr(2),8==a.length&&(a="0"+a);for(var b=0,c=[256,128,64,32,16,8,4,2],d=0;8>d;d++)b+=parseInt(a.charAt(d))*c[d];return b=b%11%10,b==a.substr(8,1)},_el:function(a){return/^EL[0-9]{9}$/.test(a)?(a="GR"+a.substr(2),this._gr(a)):!1},_hu:function(a){if(!/^HU[0-9]{8}$/.test(a))return!1;a=a.substr(2);for(var b=0,c=[9,7,3,1,9,7,3,1],d=0;8>d;d++)b+=parseInt(a.charAt(d))*c[d];return b%10==0},_hr:function(b){return/^HR[0-9]{11}$/.test(b)?(b=b.substr(2),a.fn.bootstrapValidator.helpers.mod_11_10(b)):!1},_ie:function(a){if(!/^IE[0-9]{1}[0-9A-Z\*\+]{1}[0-9]{5}[A-Z]{1,2}$/.test(a))return!1;a=a.substr(2);var b=function(a){for(;a.length<7;)a="0"+a;for(var b="WABCDEFGHIJKLMNOPQRSTUV",c=0,d=0;7>d;d++)c+=parseInt(a.charAt(d))*(8-d);return c+=9*b.indexOf(a.substr(7)),b[c%23]};return/^[0-9]+$/.test(a.substr(0,7))?a.charAt(7)==b(a.substr(0,7)+a.substr(8)+""):-1!="ABCDEFGHIJKLMNOPQRSTUVWXYZ+*".indexOf(a.charAt(1))?a.charAt(7)==b(a.substr(2,5)+a.substr(0,1)+""):!0},_it:function(b){if(!/^IT[0-9]{11}$/.test(b))return!1;if(b=b.substr(2),0==parseInt(b.substr(0,7)))return!1;var c=parseInt(b.substr(7,3));return 1>c||c>201&&999!=c&&888!=c?!1:a.fn.bootstrapValidator.helpers.luhn(b)},_lt:function(a){if(!/^LT([0-9]{7}1[0-9]{1}|[0-9]{10}1[0-9]{1})$/.test(a))return!1;a=a.substr(2);for(var b=a.length,c=0,d=0;b-1>d;d++)c+=parseInt(a.charAt(d))*(1+d%9);var e=c%11;if(10==e){c=0;for(var d=0;b-1>d;d++)c+=parseInt(a.charAt(d))*(1+(d+2)%9)}return e=e%11%10,e==a.charAt(b-1)},_lu:function(a){return/^LU[0-9]{8}$/.test(a)?(a=a.substr(2),a.substr(0,6)%89==a.substr(6,2)):!1},_lv:function(b){if(!/^LV[0-9]{11}$/.test(b))return!1;b=b.substr(2);var c=parseInt(b.charAt(0)),d=0,e=[],f=0,g=b.length;if(c>3){for(d=0,e=[9,1,4,8,3,10,2,5,7,6,1],f=0;g>f;f++)d+=parseInt(b.charAt(f))*e[f];return d%=11,3==d}var h=parseInt(b.substr(0,2)),i=parseInt(b.substr(2,2)),j=parseInt(b.substr(4,2));if(j=j+1800+100*parseInt(b.charAt(6)),!a.fn.bootstrapValidator.helpers.date(j,i,h))return!1;for(d=0,e=[10,5,8,4,2,1,6,3,7,9],f=0;g-1>f;f++)d+=parseInt(b.charAt(f))*e[f];return d=(d+1)%11%10,d==b.charAt(g-1)},_mt:function(a){if(!/^MT[0-9]{8}$/.test(a))return!1;a=a.substr(2);for(var b=0,c=[3,4,6,7,8,9,10,1],d=0;8>d;d++)b+=parseInt(a.charAt(d))*c[d];return b%37==0},_nl:function(a){if(!/^NL[0-9]{9}B[0-9]{2}$/.test(a))return!1;a=a.substr(2);for(var b=0,c=[9,8,7,6,5,4,3,2],d=0;8>d;d++)b+=parseInt(a.charAt(d))*c[d];return b%=11,b>9&&(b=0),b==a.substr(8,1)},_no:function(a){if(!/^NO[0-9]{9}$/.test(a))return!1;a=a.substr(2);for(var b=0,c=[3,2,7,6,5,4,3,2],d=0;8>d;d++)b+=parseInt(a.charAt(d))*c[d];return b=11-b%11,11==b&&(b=0),b==a.substr(8,1)},_pl:function(a){if(!/^PL[0-9]{10}$/.test(a))return!1;a=a.substr(2);for(var b=0,c=[6,5,7,2,3,4,5,6,7,-1],d=0;10>d;d++)b+=parseInt(a.charAt(d))*c[d];return b%11==0},_pt:function(a){if(!/^PT[0-9]{9}$/.test(a))return!1;a=a.substr(2);for(var b=0,c=[9,8,7,6,5,4,3,2],d=0;8>d;d++)b+=parseInt(a.charAt(d))*c[d];return b=11-b%11,b>9&&(b=0),b==a.substr(8,1)},_ro:function(a){if(!/^RO[1-9][0-9]{1,9}$/.test(a))return!1;a=a.substr(2);for(var b=a.length,c=[7,5,3,2,1,7,5,3,2].slice(10-b),d=0,e=0;b-1>e;e++)d+=parseInt(a.charAt(e))*c[e];return d=10*d%11%10,d==a.substr(b-1,1)},_ru:function(a){if(!/^RU([0-9]{9}|[0-9]{12})$/.test(a))return!1;if(a=a.substr(2),10==a.length){for(var b=0,c=[2,4,10,3,5,9,4,6,8,0],d=0;10>d;d++)b+=parseInt(a.charAt(d))*c[d];return b%=11,b>9&&(b%=10),b==a.substr(9,1)}if(12==a.length){for(var e=0,f=[7,2,4,10,3,5,9,4,6,8,0],g=0,h=[3,7,2,4,10,3,5,9,4,6,8,0],d=0;11>d;d++)e+=parseInt(a.charAt(d))*f[d],g+=parseInt(a.charAt(d))*h[d];return e%=11,e>9&&(e%=10),g%=11,g>9&&(g%=10),e==a.substr(10,1)&&g==a.substr(11,1)}return!1},_rs:function(a){if(!/^RS[0-9]{9}$/.test(a))return!1;a=a.substr(2);for(var b=10,c=0,d=0;8>d;d++)c=(parseInt(a.charAt(d))+b)%10,0==c&&(c=10),b=2*c%11;return(b+parseInt(a.substr(8,1)))%10==1},_se:function(b){return/^SE[0-9]{10}01$/.test(b)?(b=b.substr(2,10),a.fn.bootstrapValidator.helpers.luhn(b)):!1},_si:function(a){if(!/^SI[0-9]{8}$/.test(a))return!1;a=a.substr(2);for(var b=0,c=[8,7,6,5,4,3,2],d=0;7>d;d++)b+=parseInt(a.charAt(d))*c[d];return b=11-b%11,10==b&&(b=0),b==a.substr(7,1)},_sk:function(a){return/^SK[1-9][0-9][(2-4)|(6-9)][0-9]{7}$/.test(a)?(a=a.substr(2),a%11==0):!1}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.vin={validate:function(a,b){var c=b.val();if(""==c)return!0;if(!/^[a-hj-npr-z0-9]{8}[0-9xX][a-hj-npr-z0-9]{8}$/i.test(c))return!1;c=c.toUpperCase();for(var d={A:1,B:2,C:3,D:4,E:5,F:6,G:7,H:8,J:1,K:2,L:3,M:4,N:5,P:7,R:9,S:2,T:3,U:4,V:5,W:6,X:7,Y:8,Z:9,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,0:0},e=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],f=0,g=c.length,h=0;g>h;h++)f+=d[c.charAt(h)+""]*e[h];var i=f%11;return 10==i&&(i="X"),i==c.charAt(8)}}}(window.jQuery),function(a){a.fn.bootstrapValidator.validators.zipCode={html5Attributes:{message:"message",country:"country"},validate:function(a,b,c){var d=b.val();if(""==d||!c.country)return!0;var e=(c.country||"US").toUpperCase();switch(e){case"CA":return/(?:A|B|C|E|G|J|K|L|M|N|P|R|S|T|V|X|Y){1}[0-9]{1}(?:A|B|C|E|G|J|K|L|M|N|P|R|S|T|V|X|Y){1}\s?[0-9]{1}(?:A|B|C|E|G|J|K|L|M|N|P|R|S|T|V|X|Y){1}[0-9]{1}/i.test(d);case"DK":return/^(DK(-|\s)?)?\d{4}$/i.test(d);case"GB":return this._gb(d);case"IT":return/^(I-|IT-)?\d{5}$/i.test(d);case"NL":return/^[1-9][0-9]{3} ?(?!sa|sd|ss)[a-z]{2}$/i.test(d);case"SE":return/^(S-)?\d{3}\s?\d{2}$/i.test(d);case"US":default:return/^\d{4,5}([\-]\d{4})?$/.test(d)}},_gb:function(a){for(var b="[ABCDEFGHIJKLMNOPRSTUWYZ]",c="[ABCDEFGHKLMNOPQRSTUVWXY]",d="[ABCDEFGHJKPMNRSTUVWXY]",e="[ABEHMNPRVWXY]",f="[ABDEFGHJLNPQRSTUWXYZ]",g=[new RegExp("^("+b+"{1}"+c+"?[0-9]{1,2})(\\s*)([0-9]{1}"+f+"{2})$","i"),new RegExp("^("+b+"{1}[0-9]{1}"+d+"{1})(\\s*)([0-9]{1}"+f+"{2})$","i"),new RegExp("^("+b+"{1}"+c+"{1}?[0-9]{1}"+e+"{1})(\\s*)([0-9]{1}"+f+"{2})$","i"),new RegExp("^(BF1)(\\s*)([0-6]{1}[ABDEFGHJLNPQRST]{1}[ABDEFGHJLNPQRSTUWZYZ]{1})$","i"),/^(GIR)(\s*)(0AA)$/i,/^(BFPO)(\s*)([0-9]{1,4})$/i,/^(BFPO)(\s*)(c\/o\s*[0-9]{1,3})$/i,/^([A-Z]{4})(\s*)(1ZZ)$/i,/^(AI-2640)$/i],h=0;h div { + display: none; +} +.datepicker.days div.datepicker-days { + display: block; +} +.datepicker.months div.datepicker-months { + display: block; +} +.datepicker.years div.datepicker-years { + display: block; +} +.datepicker table { + margin: 0; +} +.datepicker td, +.datepicker th { + text-align: center; + width: 20px; + height: 20px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + border: none; +} +.table-striped .datepicker table tr td, +.table-striped .datepicker table tr th { + background-color: transparent; +} +.datepicker table tr td.day:hover { + background: #eeeeee; + cursor: pointer; +} +.datepicker table tr td.old, +.datepicker table tr td.new { + color: #999999; +} +.datepicker table tr td.disabled, +.datepicker table tr td.disabled:hover { + background: none; + color: #999999; + cursor: default; +} +.datepicker table tr td.today, +.datepicker table tr td.today:hover, +.datepicker table tr td.today.disabled, +.datepicker table tr td.today.disabled:hover { + background-color: #fde19a; + background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a); + background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a)); + background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a); + background-image: -o-linear-gradient(top, #fdd49a, #fdf59a); + background-image: linear-gradient(top, #fdd49a, #fdf59a); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0); + border-color: #fdf59a #fdf59a #fbed50; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); + color: #000; +} +.datepicker table tr td.today:hover, +.datepicker table tr td.today:hover:hover, +.datepicker table tr td.today.disabled:hover, +.datepicker table tr td.today.disabled:hover:hover, +.datepicker table tr td.today:active, +.datepicker table tr td.today:hover:active, +.datepicker table tr td.today.disabled:active, +.datepicker table tr td.today.disabled:hover:active, +.datepicker table tr td.today.active, +.datepicker table tr td.today:hover.active, +.datepicker table tr td.today.disabled.active, +.datepicker table tr td.today.disabled:hover.active, +.datepicker table tr td.today.disabled, +.datepicker table tr td.today:hover.disabled, +.datepicker table tr td.today.disabled.disabled, +.datepicker table tr td.today.disabled:hover.disabled, +.datepicker table tr td.today[disabled], +.datepicker table tr td.today:hover[disabled], +.datepicker table tr td.today.disabled[disabled], +.datepicker table tr td.today.disabled:hover[disabled] { + background-color: #fdf59a; +} +.datepicker table tr td.today:active, +.datepicker table tr td.today:hover:active, +.datepicker table tr td.today.disabled:active, +.datepicker table tr td.today.disabled:hover:active, +.datepicker table tr td.today.active, +.datepicker table tr td.today:hover.active, +.datepicker table tr td.today.disabled.active, +.datepicker table tr td.today.disabled:hover.active { + background-color: #fbf069 \9; +} +.datepicker table tr td.today:hover:hover { + color: #000; +} +.datepicker table tr td.today.active:hover { + color: #fff; +} +.datepicker table tr td.range, +.datepicker table tr td.range:hover, +.datepicker table tr td.range.disabled, +.datepicker table tr td.range.disabled:hover { + background: #eeeeee; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.datepicker table tr td.range.today, +.datepicker table tr td.range.today:hover, +.datepicker table tr td.range.today.disabled, +.datepicker table tr td.range.today.disabled:hover { + background-color: #f3d17a; + background-image: -moz-linear-gradient(top, #f3c17a, #f3e97a); + background-image: -ms-linear-gradient(top, #f3c17a, #f3e97a); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f3c17a), to(#f3e97a)); + background-image: -webkit-linear-gradient(top, #f3c17a, #f3e97a); + background-image: -o-linear-gradient(top, #f3c17a, #f3e97a); + background-image: linear-gradient(top, #f3c17a, #f3e97a); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3c17a', endColorstr='#f3e97a', GradientType=0); + border-color: #f3e97a #f3e97a #edde34; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.datepicker table tr td.range.today:hover, +.datepicker table tr td.range.today:hover:hover, +.datepicker table tr td.range.today.disabled:hover, +.datepicker table tr td.range.today.disabled:hover:hover, +.datepicker table tr td.range.today:active, +.datepicker table tr td.range.today:hover:active, +.datepicker table tr td.range.today.disabled:active, +.datepicker table tr td.range.today.disabled:hover:active, +.datepicker table tr td.range.today.active, +.datepicker table tr td.range.today:hover.active, +.datepicker table tr td.range.today.disabled.active, +.datepicker table tr td.range.today.disabled:hover.active, +.datepicker table tr td.range.today.disabled, +.datepicker table tr td.range.today:hover.disabled, +.datepicker table tr td.range.today.disabled.disabled, +.datepicker table tr td.range.today.disabled:hover.disabled, +.datepicker table tr td.range.today[disabled], +.datepicker table tr td.range.today:hover[disabled], +.datepicker table tr td.range.today.disabled[disabled], +.datepicker table tr td.range.today.disabled:hover[disabled] { + background-color: #f3e97a; +} +.datepicker table tr td.range.today:active, +.datepicker table tr td.range.today:hover:active, +.datepicker table tr td.range.today.disabled:active, +.datepicker table tr td.range.today.disabled:hover:active, +.datepicker table tr td.range.today.active, +.datepicker table tr td.range.today:hover.active, +.datepicker table tr td.range.today.disabled.active, +.datepicker table tr td.range.today.disabled:hover.active { + background-color: #efe24b \9; +} +.datepicker table tr td.selected, +.datepicker table tr td.selected:hover, +.datepicker table tr td.selected.disabled, +.datepicker table tr td.selected.disabled:hover { + background-color: #9e9e9e; + background-image: -moz-linear-gradient(top, #b3b3b3, #808080); + background-image: -ms-linear-gradient(top, #b3b3b3, #808080); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b3b3b3), to(#808080)); + background-image: -webkit-linear-gradient(top, #b3b3b3, #808080); + background-image: -o-linear-gradient(top, #b3b3b3, #808080); + background-image: linear-gradient(top, #b3b3b3, #808080); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b3b3b3', endColorstr='#808080', GradientType=0); + border-color: #808080 #808080 #595959; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); + color: #fff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.datepicker table tr td.selected:hover, +.datepicker table tr td.selected:hover:hover, +.datepicker table tr td.selected.disabled:hover, +.datepicker table tr td.selected.disabled:hover:hover, +.datepicker table tr td.selected:active, +.datepicker table tr td.selected:hover:active, +.datepicker table tr td.selected.disabled:active, +.datepicker table tr td.selected.disabled:hover:active, +.datepicker table tr td.selected.active, +.datepicker table tr td.selected:hover.active, +.datepicker table tr td.selected.disabled.active, +.datepicker table tr td.selected.disabled:hover.active, +.datepicker table tr td.selected.disabled, +.datepicker table tr td.selected:hover.disabled, +.datepicker table tr td.selected.disabled.disabled, +.datepicker table tr td.selected.disabled:hover.disabled, +.datepicker table tr td.selected[disabled], +.datepicker table tr td.selected:hover[disabled], +.datepicker table tr td.selected.disabled[disabled], +.datepicker table tr td.selected.disabled:hover[disabled] { + background-color: #808080; +} +.datepicker table tr td.selected:active, +.datepicker table tr td.selected:hover:active, +.datepicker table tr td.selected.disabled:active, +.datepicker table tr td.selected.disabled:hover:active, +.datepicker table tr td.selected.active, +.datepicker table tr td.selected:hover.active, +.datepicker table tr td.selected.disabled.active, +.datepicker table tr td.selected.disabled:hover.active { + background-color: #666666 \9; +} +.datepicker table tr td.active, +.datepicker table tr td.active:hover, +.datepicker table tr td.active.disabled, +.datepicker table tr td.active.disabled:hover { + background-color: #006dcc; + background-image: -moz-linear-gradient(top, #0088cc, #0044cc); + background-image: -ms-linear-gradient(top, #0088cc, #0044cc); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); + background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); + background-image: -o-linear-gradient(top, #0088cc, #0044cc); + background-image: linear-gradient(top, #0088cc, #0044cc); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0); + border-color: #0044cc #0044cc #002a80; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); + color: #fff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.datepicker table tr td.active:hover, +.datepicker table tr td.active:hover:hover, +.datepicker table tr td.active.disabled:hover, +.datepicker table tr td.active.disabled:hover:hover, +.datepicker table tr td.active:active, +.datepicker table tr td.active:hover:active, +.datepicker table tr td.active.disabled:active, +.datepicker table tr td.active.disabled:hover:active, +.datepicker table tr td.active.active, +.datepicker table tr td.active:hover.active, +.datepicker table tr td.active.disabled.active, +.datepicker table tr td.active.disabled:hover.active, +.datepicker table tr td.active.disabled, +.datepicker table tr td.active:hover.disabled, +.datepicker table tr td.active.disabled.disabled, +.datepicker table tr td.active.disabled:hover.disabled, +.datepicker table tr td.active[disabled], +.datepicker table tr td.active:hover[disabled], +.datepicker table tr td.active.disabled[disabled], +.datepicker table tr td.active.disabled:hover[disabled] { + background-color: #0044cc; +} +.datepicker table tr td.active:active, +.datepicker table tr td.active:hover:active, +.datepicker table tr td.active.disabled:active, +.datepicker table tr td.active.disabled:hover:active, +.datepicker table tr td.active.active, +.datepicker table tr td.active:hover.active, +.datepicker table tr td.active.disabled.active, +.datepicker table tr td.active.disabled:hover.active { + background-color: #003399 \9; +} +.datepicker table tr td span { + display: block; + width: 23%; + height: 54px; + line-height: 54px; + float: left; + margin: 1%; + cursor: pointer; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.datepicker table tr td span:hover { + background: #eeeeee; +} +.datepicker table tr td span.disabled, +.datepicker table tr td span.disabled:hover { + background: none; + color: #999999; + cursor: default; +} +.datepicker table tr td span.active, +.datepicker table tr td span.active:hover, +.datepicker table tr td span.active.disabled, +.datepicker table tr td span.active.disabled:hover { + background-color: #006dcc; + background-image: -moz-linear-gradient(top, #0088cc, #0044cc); + background-image: -ms-linear-gradient(top, #0088cc, #0044cc); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); + background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); + background-image: -o-linear-gradient(top, #0088cc, #0044cc); + background-image: linear-gradient(top, #0088cc, #0044cc); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0); + border-color: #0044cc #0044cc #002a80; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); + color: #fff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.datepicker table tr td span.active:hover, +.datepicker table tr td span.active:hover:hover, +.datepicker table tr td span.active.disabled:hover, +.datepicker table tr td span.active.disabled:hover:hover, +.datepicker table tr td span.active:active, +.datepicker table tr td span.active:hover:active, +.datepicker table tr td span.active.disabled:active, +.datepicker table tr td span.active.disabled:hover:active, +.datepicker table tr td span.active.active, +.datepicker table tr td span.active:hover.active, +.datepicker table tr td span.active.disabled.active, +.datepicker table tr td span.active.disabled:hover.active, +.datepicker table tr td span.active.disabled, +.datepicker table tr td span.active:hover.disabled, +.datepicker table tr td span.active.disabled.disabled, +.datepicker table tr td span.active.disabled:hover.disabled, +.datepicker table tr td span.active[disabled], +.datepicker table tr td span.active:hover[disabled], +.datepicker table tr td span.active.disabled[disabled], +.datepicker table tr td span.active.disabled:hover[disabled] { + background-color: #0044cc; +} +.datepicker table tr td span.active:active, +.datepicker table tr td span.active:hover:active, +.datepicker table tr td span.active.disabled:active, +.datepicker table tr td span.active.disabled:hover:active, +.datepicker table tr td span.active.active, +.datepicker table tr td span.active:hover.active, +.datepicker table tr td span.active.disabled.active, +.datepicker table tr td span.active.disabled:hover.active { + background-color: #003399 \9; +} +.datepicker table tr td span.old, +.datepicker table tr td span.new { + color: #999999; +} +.datepicker th.datepicker-switch { + width: 145px; +} +.datepicker thead tr:first-child th, +.datepicker tfoot tr th { + cursor: pointer; +} +.datepicker thead tr:first-child th:hover, +.datepicker tfoot tr th:hover { + background: #eeeeee; +} +.datepicker .cw { + font-size: 10px; + width: 12px; + padding: 0 2px 0 5px; + vertical-align: middle; +} +.datepicker thead tr:first-child th.cw { + cursor: default; + background-color: transparent; +} +.input-append.date .add-on i, +.input-prepend.date .add-on i { + display: block; + cursor: pointer; + width: 16px; + height: 16px; +} +.input-daterange input { + text-align: center; +} +.input-daterange input:first-child { + -webkit-border-radius: 3px 0 0 3px; + -moz-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} +.input-daterange input:last-child { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.input-daterange .add-on { + display: inline-block; + width: auto; + min-width: 16px; + height: 18px; + padding: 4px 5px; + font-weight: normal; + line-height: 18px; + text-align: center; + text-shadow: 0 1px 0 #ffffff; + vertical-align: middle; + background-color: #eeeeee; + border: 1px solid #ccc; + margin-left: -5px; + margin-right: -5px; +} diff --git a/public/admin/Coco/assets/libs/bootstrap-xeditable/demo/demo-mock.js b/public/admin/Coco/assets/libs/bootstrap-xeditable/demo/demo-mock.js new file mode 100644 index 000000000..2680a43e3 --- /dev/null +++ b/public/admin/Coco/assets/libs/bootstrap-xeditable/demo/demo-mock.js @@ -0,0 +1,76 @@ +$(function(){ + //ajax mocks + $.mockjaxSettings.responseTime = 500; + + $.mockjax({ + url: '/post', + response: function(settings) { + log(settings, this); + } + }); + + $.mockjax({ + url: '/error', + status: 400, + statusText: 'Bad Request', + response: function(settings) { + this.responseText = 'Please input correct value'; + log(settings, this); + } + }); + + $.mockjax({ + url: '/status', + status: 500, + response: function(settings) { + this.responseText = 'Internal Server Error'; + log(settings, this); + } + }); + + $.mockjax({ + url: '/groups', + response: function(settings) { + this.responseText = [ + {value: 0, text: 'Guest'}, + {value: 1, text: 'Service'}, + {value: 2, text: 'Customer'}, + {value: 3, text: 'Operator'}, + {value: 4, text: 'Support'}, + {value: 5, text: 'Admin'} + ]; + log(settings, this); + } + }); + + function log(settings, response) { + var s = [], str; + s.push(settings.type.toUpperCase() + ' url = "' + settings.url + '"'); + for(var a in settings.data) { + if(settings.data[a] && typeof settings.data[a] === 'object') { + str = []; + for(var j in settings.data[a]) {str.push(j+': "'+settings.data[a][j]+'"');} + str = '{ '+str.join(', ')+' }'; + } else { + str = '"'+settings.data[a]+'"'; + } + s.push(a + ' = ' + str); + } + s.push('RESPONSE: status = ' + response.status); + + if(response.responseText) { + if($.isArray(response.responseText)) { + s.push('['); + $.each(response.responseText, function(i, v){ + s.push('{value: ' + v.value+', text: "'+v.text+'"}'); + }); + s.push(']'); + } else { + s.push($.trim(response.responseText)); + } + } + s.push('--------------------------------------\n'); + $('#console').val(s.join('\n') + $('#console').val()); + } + +}); \ No newline at end of file diff --git a/public/admin/Coco/assets/libs/bootstrap-xeditable/demo/jquery.mockjax.js b/public/admin/Coco/assets/libs/bootstrap-xeditable/demo/jquery.mockjax.js new file mode 100644 index 000000000..549b6e037 --- /dev/null +++ b/public/admin/Coco/assets/libs/bootstrap-xeditable/demo/jquery.mockjax.js @@ -0,0 +1,521 @@ +/*! + * MockJax - jQuery Plugin to Mock Ajax requests + * + * Version: 1.5.0pre + * Released: + * Home: http://github.com/appendto/jquery-mockjax + * Author: Jonathan Sharp (http://jdsharp.com) + * License: MIT,GPL + * + * Copyright (c) 2011 appendTo LLC. + * Dual licensed under the MIT or GPL licenses. + * http://appendto.com/open-source-licenses + */ +(function($) { + var _ajax = $.ajax, + mockHandlers = [], + CALLBACK_REGEX = /=\?(&|$)/, + jsc = (new Date()).getTime(); + + + // Parse the given XML string. + function parseXML(xml) { + if ( window['DOMParser'] == undefined && window.ActiveXObject ) { + DOMParser = function() { }; + DOMParser.prototype.parseFromString = function( xmlString ) { + var doc = new ActiveXObject('Microsoft.XMLDOM'); + doc.async = 'false'; + doc.loadXML( xmlString ); + return doc; + }; + } + + try { + var xmlDoc = ( new DOMParser() ).parseFromString( xml, 'text/xml' ); + if ( $.isXMLDoc( xmlDoc ) ) { + var err = $('parsererror', xmlDoc); + if ( err.length == 1 ) { + throw('Error: ' + $(xmlDoc).text() ); + } + } else { + throw('Unable to parse XML'); + } + } catch( e ) { + var msg = ( e.name == undefined ? e : e.name + ': ' + e.message ); + $(document).trigger('xmlParseError', [ msg ]); + return undefined; + } + return xmlDoc; + } + + // Trigger a jQuery event + function trigger(s, type, args) { + (s.context ? jQuery(s.context) : jQuery.event).trigger(type, args); + } + + // Check if the data field on the mock handler and the request match. This + // can be used to restrict a mock handler to being used only when a certain + // set of data is passed to it. + function isMockDataEqual( mock, live ) { + var identical = false; + // Test for situations where the data is a querystring (not an object) + if (typeof live === 'string') { + // Querystring may be a regex + return $.isFunction( mock.test ) ? mock.test(live) : mock == live; + } + $.each(mock, function(k, v) { + if ( live[k] === undefined ) { + identical = false; + return identical; + } else { + identical = true; + if ( typeof live[k] == 'object' ) { + return isMockDataEqual(mock[k], live[k]); + } else { + if ( $.isFunction( mock[k].test ) ) { + identical = mock[k].test(live[k]); + } else { + identical = ( mock[k] == live[k] ); + } + return identical; + } + } + }); + + return identical; + } + + // Check the given handler should mock the given request + function getMockForRequest( handler, requestSettings ) { + // If the mock was registered with a function, let the function decide if we + // want to mock this request + if ( $.isFunction(handler) ) { + return handler( requestSettings ); + } + + // Inspect the URL of the request and check if the mock handler's url + // matches the url for this ajax request + if ( $.isFunction(handler.url.test) ) { + // The user provided a regex for the url, test it + if ( !handler.url.test( requestSettings.url ) ) { + return null; + } + } else { + // Look for a simple wildcard '*' or a direct URL match + var star = handler.url.indexOf('*'); + if (handler.url !== requestSettings.url && star === -1 || + !new RegExp(handler.url.replace(/[-[\]{}()+?.,\\^$|#\s]/g, "\\$&").replace('*', '.+')).test(requestSettings.url)) { + return null; + } + } + + // Inspect the data submitted in the request (either POST body or GET query string) + if ( handler.data && requestSettings.data ) { + if ( !isMockDataEqual(handler.data, requestSettings.data) ) { + // They're not identical, do not mock this request + return null; + } + } + // Inspect the request type + if ( handler && handler.type && + handler.type.toLowerCase() != requestSettings.type.toLowerCase() ) { + // The request type doesn't match (GET vs. POST) + return null; + } + + return handler; + } + + // If logging is enabled, log the mock to the console + function logMock( mockHandler, requestSettings ) { + var c = $.extend({}, $.mockjaxSettings, mockHandler); + if ( c.log && $.isFunction(c.log) ) { + c.log('MOCK ' + requestSettings.type.toUpperCase() + ': ' + requestSettings.url, $.extend({}, requestSettings)); + } + } + + // Process the xhr objects send operation + function _xhrSend(mockHandler, requestSettings, origSettings) { + + // This is a substitute for < 1.4 which lacks $.proxy + var process = (function(that) { + return function() { + return (function() { + // The request has returned + this.status = mockHandler.status; + this.statusText = mockHandler.statusText; + this.readyState = 4; + + // We have an executable function, call it to give + // the mock handler a chance to update it's data + if ( $.isFunction(mockHandler.response) ) { + mockHandler.response(origSettings); + } + // Copy over our mock to our xhr object before passing control back to + // jQuery's onreadystatechange callback + if ( requestSettings.dataType == 'json' && ( typeof mockHandler.responseText == 'object' ) ) { + this.responseText = JSON.stringify(mockHandler.responseText); + } else if ( requestSettings.dataType == 'xml' ) { + if ( typeof mockHandler.responseXML == 'string' ) { + this.responseXML = parseXML(mockHandler.responseXML); + } else { + this.responseXML = mockHandler.responseXML; + } + } else { + this.responseText = mockHandler.responseText; + } + if( typeof mockHandler.status == 'number' || typeof mockHandler.status == 'string' ) { + this.status = mockHandler.status; + } + if( typeof mockHandler.statusText === "string") { + this.statusText = mockHandler.statusText; + } + // jQuery < 1.4 doesn't have onreadystate change for xhr + if ( $.isFunction(this.onreadystatechange) ) { + if( mockHandler.isTimeout) { + this.status = -1; + } + this.onreadystatechange( mockHandler.isTimeout ? 'timeout' : undefined ); + } else if ( mockHandler.isTimeout ) { + // Fix for 1.3.2 timeout to keep success from firing. + this.status = -1; + } + }).apply(that); + }; + })(this); + + if ( mockHandler.proxy ) { + // We're proxying this request and loading in an external file instead + _ajax({ + global: false, + url: mockHandler.proxy, + type: mockHandler.proxyType, + data: mockHandler.data, + dataType: requestSettings.dataType === "script" ? "text/plain" : requestSettings.dataType, + complete: function(xhr, txt) { + mockHandler.responseXML = xhr.responseXML; + mockHandler.responseText = xhr.responseText; + mockHandler.status = xhr.status; + mockHandler.statusText = xhr.statusText; + this.responseTimer = setTimeout(process, mockHandler.responseTime || 0); + } + }); + } else { + // type == 'POST' || 'GET' || 'DELETE' + if ( requestSettings.async === false ) { + // TODO: Blocking delay + process(); + } else { + this.responseTimer = setTimeout(process, mockHandler.responseTime || 50); + } + } + } + + // Construct a mocked XHR Object + function xhr(mockHandler, requestSettings, origSettings, origHandler) { + // Extend with our default mockjax settings + mockHandler = $.extend({}, $.mockjaxSettings, mockHandler); + + if (typeof mockHandler.headers === 'undefined') { + mockHandler.headers = {}; + } + if ( mockHandler.contentType ) { + mockHandler.headers['content-type'] = mockHandler.contentType; + } + + return { + status: mockHandler.status, + statusText: mockHandler.statusText, + readyState: 1, + open: function() { }, + send: function() { + origHandler.fired = true; + _xhrSend.call(this, mockHandler, requestSettings, origSettings); + }, + abort: function() { + clearTimeout(this.responseTimer); + }, + setRequestHeader: function(header, value) { + mockHandler.headers[header] = value; + }, + getResponseHeader: function(header) { + // 'Last-modified', 'Etag', 'content-type' are all checked by jQuery + if ( mockHandler.headers && mockHandler.headers[header] ) { + // Return arbitrary headers + return mockHandler.headers[header]; + } else if ( header.toLowerCase() == 'last-modified' ) { + return mockHandler.lastModified || (new Date()).toString(); + } else if ( header.toLowerCase() == 'etag' ) { + return mockHandler.etag || ''; + } else if ( header.toLowerCase() == 'content-type' ) { + return mockHandler.contentType || 'text/plain'; + } + }, + getAllResponseHeaders: function() { + var headers = ''; + $.each(mockHandler.headers, function(k, v) { + headers += k + ': ' + v + "\n"; + }); + return headers; + } + }; + } + + // Process a JSONP mock request. + function processJsonpMock( requestSettings, mockHandler, origSettings ) { + // Handle JSONP Parameter Callbacks, we need to replicate some of the jQuery core here + // because there isn't an easy hook for the cross domain script tag of jsonp + + processJsonpUrl( requestSettings ); + + requestSettings.dataType = "json"; + if(requestSettings.data && CALLBACK_REGEX.test(requestSettings.data) || CALLBACK_REGEX.test(requestSettings.url)) { + createJsonpCallback(requestSettings, mockHandler); + + // We need to make sure + // that a JSONP style response is executed properly + + var rurl = /^(\w+:)?\/\/([^\/?#]+)/, + parts = rurl.exec( requestSettings.url ), + remote = parts && (parts[1] && parts[1] !== location.protocol || parts[2] !== location.host); + + requestSettings.dataType = "script"; + if(requestSettings.type.toUpperCase() === "GET" && remote ) { + var newMockReturn = processJsonpRequest( requestSettings, mockHandler, origSettings ); + + // Check if we are supposed to return a Deferred back to the mock call, or just + // signal success + if(newMockReturn) { + return newMockReturn; + } else { + return true; + } + } + } + return null; + } + + // Append the required callback parameter to the end of the request URL, for a JSONP request + function processJsonpUrl( requestSettings ) { + if ( requestSettings.type.toUpperCase() === "GET" ) { + if ( !CALLBACK_REGEX.test( requestSettings.url ) ) { + requestSettings.url += (/\?/.test( requestSettings.url ) ? "&" : "?") + + (requestSettings.jsonp || "callback") + "=?"; + } + } else if ( !requestSettings.data || !CALLBACK_REGEX.test(requestSettings.data) ) { + requestSettings.data = (requestSettings.data ? requestSettings.data + "&" : "") + (requestSettings.jsonp || "callback") + "=?"; + } + } + + // Process a JSONP request by evaluating the mocked response text + function processJsonpRequest( requestSettings, mockHandler, origSettings ) { + // Synthesize the mock request for adding a script tag + var callbackContext = origSettings && origSettings.context || requestSettings, + newMock = null; + + + // If the response handler on the moock is a function, call it + if ( mockHandler.response && $.isFunction(mockHandler.response) ) { + mockHandler.response(origSettings); + } else { + + // Evaluate the responseText javascript in a global context + if( typeof mockHandler.responseText === 'object' ) { + $.globalEval( '(' + JSON.stringify( mockHandler.responseText ) + ')'); + } else { + $.globalEval( '(' + mockHandler.responseText + ')'); + } + } + + // Successful response + jsonpSuccess( requestSettings, mockHandler ); + jsonpComplete( requestSettings, mockHandler ); + + // If we are running under jQuery 1.5+, return a deferred object + if(jQuery.Deferred){ + newMock = new jQuery.Deferred(); + if(typeof mockHandler.responseText == "object"){ + newMock.resolve( mockHandler.responseText ); + } + else{ + newMock.resolve( jQuery.parseJSON( mockHandler.responseText ) ); + } + } + return newMock; + } + + + // Create the required JSONP callback function for the request + function createJsonpCallback( requestSettings, mockHandler ) { + jsonp = requestSettings.jsonpCallback || ("jsonp" + jsc++); + + // Replace the =? sequence both in the query string and the data + if ( requestSettings.data ) { + requestSettings.data = (requestSettings.data + "").replace(CALLBACK_REGEX, "=" + jsonp + "$1"); + } + + requestSettings.url = requestSettings.url.replace(CALLBACK_REGEX, "=" + jsonp + "$1"); + + + // Handle JSONP-style loading + window[ jsonp ] = window[ jsonp ] || function( tmp ) { + data = tmp; + jsonpSuccess( requestSettings, mockHandler ); + jsonpComplete( requestSettings, mockHandler ); + // Garbage collect + window[ jsonp ] = undefined; + + try { + delete window[ jsonp ]; + } catch(e) {} + + if ( head ) { + head.removeChild( script ); + } + }; + } + + // The JSONP request was successful + function jsonpSuccess(requestSettings, mockHandler) { + // If a local callback was specified, fire it and pass it the data + if ( requestSettings.success ) { + requestSettings.success.call( callbackContext, ( mockHandler.response ? mockHandler.response.toString() : mockHandler.responseText || ''), status, {} ); + } + + // Fire the global callback + if ( requestSettings.global ) { + trigger(requestSettings, "ajaxSuccess", [{}, requestSettings] ); + } + } + + // The JSONP request was completed + function jsonpComplete(requestSettings, mockHandler) { + // Process result + if ( requestSettings.complete ) { + requestSettings.complete.call( callbackContext, {} , status ); + } + + // The request was completed + if ( requestSettings.global ) { + trigger( "ajaxComplete", [{}, requestSettings] ); + } + + // Handle the global AJAX counter + if ( requestSettings.global && ! --jQuery.active ) { + jQuery.event.trigger( "ajaxStop" ); + } + } + + + // The core $.ajax replacement. + function handleAjax( url, origSettings ) { + var mockRequest, requestSettings, mockHandler; + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + origSettings = url; + url = undefined; + } else { + // work around to support 1.5 signature + origSettings.url = url; + } + + // Extend the original settings for the request + requestSettings = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings); + + // Iterate over our mock handlers (in registration order) until we find + // one that is willing to intercept the request + for(var k = 0; k < mockHandlers.length; k++) { + if ( !mockHandlers[k] ) { + continue; + } + + mockHandler = getMockForRequest( mockHandlers[k], requestSettings ); + if(!mockHandler) { + // No valid mock found for this request + continue; + } + + // Handle console logging + logMock( mockHandler, requestSettings ); + + + if ( requestSettings.dataType === "jsonp" ) { + if ((mockRequest = processJsonpMock( requestSettings, mockHandler, origSettings ))) { + // This mock will handle the JSONP request + return mockRequest; + } + } + + + // Removed to fix #54 - keep the mocking data object intact + //mockHandler.data = requestSettings.data; + + mockHandler.cache = requestSettings.cache; + mockHandler.timeout = requestSettings.timeout; + mockHandler.global = requestSettings.global; + + (function(mockHandler, requestSettings, origSettings, origHandler) { + mockRequest = _ajax.call($, $.extend(true, {}, origSettings, { + // Mock the XHR object + xhr: function() { return xhr( mockHandler, requestSettings, origSettings, origHandler ) } + })); + })(mockHandler, requestSettings, origSettings, mockHandlers[k]); + + return mockRequest; + } + + // We don't have a mock request, trigger a normal request + return _ajax.apply($, [origSettings]); + } + + + // Public + + $.extend({ + ajax: handleAjax + }); + + $.mockjaxSettings = { + //url: null, + //type: 'GET', + log: function(msg) { + window['console'] && window.console.log && window.console.log(msg); + }, + status: 200, + statusText: "OK", + responseTime: 500, + isTimeout: false, + contentType: 'text/plain', + response: '', + responseText: '', + responseXML: '', + proxy: '', + proxyType: 'GET', + + lastModified: null, + etag: '', + headers: { + etag: 'IJF@H#@923uf8023hFO@I#H#', + 'content-type' : 'text/plain' + } + }; + + $.mockjax = function(settings) { + var i = mockHandlers.length; + mockHandlers[i] = settings; + return i; + }; + $.mockjaxClear = function(i) { + if ( arguments.length == 1 ) { + mockHandlers[i] = null; + } else { + mockHandlers = []; + } + }; + $.mockjax.handler = function(i) { + if ( arguments.length == 1 ) { + return mockHandlers[i]; + } + }; +})(jQuery); diff --git a/public/admin/Coco/assets/libs/bootstrap-xeditable/img/clear.png b/public/admin/Coco/assets/libs/bootstrap-xeditable/img/clear.png new file mode 100644 index 000000000..580b52a5b Binary files /dev/null and b/public/admin/Coco/assets/libs/bootstrap-xeditable/img/clear.png differ diff --git a/public/admin/Coco/assets/libs/bootstrap-xeditable/img/loading.gif b/public/admin/Coco/assets/libs/bootstrap-xeditable/img/loading.gif new file mode 100644 index 000000000..5b33f7e54 Binary files /dev/null and b/public/admin/Coco/assets/libs/bootstrap-xeditable/img/loading.gif differ diff --git a/public/admin/Coco/assets/libs/bootstrap-xeditable/js/bootstrap-editable.min.js b/public/admin/Coco/assets/libs/bootstrap-xeditable/js/bootstrap-editable.min.js new file mode 100644 index 000000000..e2703aee8 --- /dev/null +++ b/public/admin/Coco/assets/libs/bootstrap-xeditable/js/bootstrap-editable.min.js @@ -0,0 +1,7 @@ +/*! X-editable - v1.5.1 +* In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery +* http://github.com/vitalets/x-editable +* Copyright (c) 2013 Vitaliy Potapov; Licensed MIT */ +!function(a){"use strict";var b=function(b,c){this.options=a.extend({},a.fn.editableform.defaults,c),this.$div=a(b),this.options.scope||(this.options.scope=this)};b.prototype={constructor:b,initInput:function(){this.input=this.options.input,this.value=this.input.str2value(this.options.value),this.input.prerender()},initTemplate:function(){this.$form=a(a.fn.editableform.template)},initButtons:function(){var b=this.$form.find(".editable-buttons");b.append(a.fn.editableform.buttons),"bottom"===this.options.showbuttons&&b.addClass("editable-buttons-bottom")},render:function(){this.$loading=a(a.fn.editableform.loading),this.$div.empty().append(this.$loading),this.initTemplate(),this.options.showbuttons?this.initButtons():this.$form.find(".editable-buttons").remove(),this.showLoading(),this.isSaving=!1,this.$div.triggerHandler("rendering"),this.initInput(),this.$form.find("div.editable-input").append(this.input.$tpl),this.$div.append(this.$form),a.when(this.input.render()).then(a.proxy(function(){if(this.options.showbuttons||this.input.autosubmit(),this.$form.find(".editable-cancel").click(a.proxy(this.cancel,this)),this.input.error)this.error(this.input.error),this.$form.find(".editable-submit").attr("disabled",!0),this.input.$input.attr("disabled",!0),this.$form.submit(function(a){a.preventDefault()});else{this.error(!1),this.input.$input.removeAttr("disabled"),this.$form.find(".editable-submit").removeAttr("disabled");var b=null===this.value||void 0===this.value||""===this.value?this.options.defaultValue:this.value;this.input.value2input(b),this.$form.submit(a.proxy(this.submit,this))}this.$div.triggerHandler("rendered"),this.showForm(),this.input.postrender&&this.input.postrender()},this))},cancel:function(){this.$div.triggerHandler("cancel")},showLoading:function(){var a,b;this.$form?(a=this.$form.outerWidth(),b=this.$form.outerHeight(),a&&this.$loading.width(a),b&&this.$loading.height(b),this.$form.hide()):(a=this.$loading.parent().width(),a&&this.$loading.width(a)),this.$loading.show()},showForm:function(a){this.$loading.hide(),this.$form.show(),a!==!1&&this.input.activate(),this.$div.triggerHandler("show")},error:function(b){var c,d=this.$form.find(".control-group"),e=this.$form.find(".editable-error-block");if(b===!1)d.removeClass(a.fn.editableform.errorGroupClass),e.removeClass(a.fn.editableform.errorBlockClass).empty().hide();else{if(b){c=(""+b).split("\n");for(var f=0;f").text(c[f]).html();b=c.join("
    ")}d.addClass(a.fn.editableform.errorGroupClass),e.addClass(a.fn.editableform.errorBlockClass).html(b).show()}},submit:function(b){b.stopPropagation(),b.preventDefault();var c=this.input.input2value(),d=this.validate(c);if("object"===a.type(d)&&void 0!==d.newValue){if(c=d.newValue,this.input.value2input(c),"string"==typeof d.msg)return this.error(d.msg),this.showForm(),void 0}else if(d)return this.error(d),this.showForm(),void 0;if(!this.options.savenochange&&this.input.value2str(c)==this.input.value2str(this.value))return this.$div.triggerHandler("nochange"),void 0;var e=this.input.value2submit(c);this.isSaving=!0,a.when(this.save(e)).done(a.proxy(function(a){this.isSaving=!1;var b="function"==typeof this.options.success?this.options.success.call(this.options.scope,a,c):null;return b===!1?(this.error(!1),this.showForm(!1),void 0):"string"==typeof b?(this.error(b),this.showForm(),void 0):(b&&"object"==typeof b&&b.hasOwnProperty("newValue")&&(c=b.newValue),this.error(!1),this.value=c,this.$div.triggerHandler("save",{newValue:c,submitValue:e,response:a}),void 0)},this)).fail(a.proxy(function(a){this.isSaving=!1;var b;b="function"==typeof this.options.error?this.options.error.call(this.options.scope,a,c):"string"==typeof a?a:a.responseText||a.statusText||"Unknown error!",this.error(b),this.showForm()},this))},save:function(b){this.options.pk=a.fn.editableutils.tryParseJson(this.options.pk,!0);var c,d="function"==typeof this.options.pk?this.options.pk.call(this.options.scope):this.options.pk,e=!!("function"==typeof this.options.url||this.options.url&&("always"===this.options.send||"auto"===this.options.send&&null!==d&&void 0!==d));return e?(this.showLoading(),c={name:this.options.name||"",value:b,pk:d},"function"==typeof this.options.params?c=this.options.params.call(this.options.scope,c):(this.options.params=a.fn.editableutils.tryParseJson(this.options.params,!0),a.extend(c,this.options.params)),"function"==typeof this.options.url?this.options.url.call(this.options.scope,c):a.ajax(a.extend({url:this.options.url,data:c,type:"POST"},this.options.ajaxOptions))):void 0},validate:function(a){return void 0===a&&(a=this.value),"function"==typeof this.options.validate?this.options.validate.call(this.options.scope,a):void 0},option:function(a,b){a in this.options&&(this.options[a]=b),"value"===a&&this.setValue(b)},setValue:function(a,b){this.value=b?this.input.str2value(a):a,this.$form&&this.$form.is(":visible")&&this.input.value2input(this.value)}},a.fn.editableform=function(c){var d=arguments;return this.each(function(){var e=a(this),f=e.data("editableform"),g="object"==typeof c&&c;f||e.data("editableform",f=new b(this,g)),"string"==typeof c&&f[c].apply(f,Array.prototype.slice.call(d,1))})},a.fn.editableform.Constructor=b,a.fn.editableform.defaults={type:"text",url:null,params:null,name:null,pk:null,value:null,defaultValue:null,send:"auto",validate:null,success:null,error:null,ajaxOptions:null,showbuttons:!0,scope:null,savenochange:!1},a.fn.editableform.template='
    ',a.fn.editableform.loading='
    ',a.fn.editableform.buttons='',a.fn.editableform.errorGroupClass=null,a.fn.editableform.errorBlockClass="editable-error",a.fn.editableform.engine="jquery"}(window.jQuery),function(a){"use strict";a.fn.editableutils={inherit:function(a,b){var c=function(){};c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a,a.superclass=b.prototype},setCursorPosition:function(a,b){if(a.setSelectionRange)a.setSelectionRange(b,b);else if(a.createTextRange){var c=a.createTextRange();c.collapse(!0),c.moveEnd("character",b),c.moveStart("character",b),c.select()}},tryParseJson:function(a,b){if("string"==typeof a&&a.length&&a.match(/^[\{\[].*[\}\]]$/))if(b)try{a=new Function("return "+a)()}catch(c){}finally{return a}else a=new Function("return "+a)();return a},sliceObj:function(b,c,d){var e,f,g={};if(!a.isArray(c)||!c.length)return g;for(var h=0;h").text(b).html()},itemsByValue:function(b,c,d){if(!c||null===b)return[];if("function"!=typeof d){var e=d||"value";d=function(a){return a[e]}}var f=a.isArray(b),g=[],h=this;return a.each(c,function(c,e){if(e.children)g=g.concat(h.itemsByValue(b,e.children,d));else if(f)a.grep(b,function(a){return a==(e&&"object"==typeof e?d(e):e)}).length&&g.push(e);else{var i=e&&"object"==typeof e?d(e):e;b==i&&g.push(e)}}),g},createInput:function(b){var c,d,e,f=b.type;return"date"===f&&("inline"===b.mode?a.fn.editabletypes.datefield?f="datefield":a.fn.editabletypes.dateuifield&&(f="dateuifield"):a.fn.editabletypes.date?f="date":a.fn.editabletypes.dateui&&(f="dateui"),"date"!==f||a.fn.editabletypes.date||(f="combodate")),"datetime"===f&&"inline"===b.mode&&(f="datetimefield"),"wysihtml5"!==f||a.fn.editabletypes[f]||(f="textarea"),"function"==typeof a.fn.editabletypes[f]?(c=a.fn.editabletypes[f],d=this.sliceObj(b,this.objectKeys(c.defaults)),e=new c(d)):(a.error("Unknown type: "+f),!1)},supportsTransitions:function(){var a=document.body||document.documentElement,b=a.style,c="transition",d=["Moz","Webkit","Khtml","O","ms"];if("string"==typeof b[c])return!0;c=c.charAt(0).toUpperCase()+c.substr(1);for(var e=0;e"),this.tip().is(this.innerCss)?this.tip().append(this.$form):this.tip().find(this.innerCss).append(this.$form),this.renderForm()},hide:function(a){if(this.tip()&&this.tip().is(":visible")&&this.$element.hasClass("editable-open")){if(this.$form.data("editableform").isSaving)return this.delayedHide={reason:a},void 0;this.delayedHide=!1,this.$element.removeClass("editable-open"),this.innerHide(),this.$element.triggerHandler("hidden",a||"manual")}},innerShow:function(){},innerHide:function(){},toggle:function(a){this.container()&&this.tip()&&this.tip().is(":visible")?this.hide():this.show(a)},setPosition:function(){},save:function(a,b){this.$element.triggerHandler("save",b),this.hide("save")},option:function(a,b){this.options[a]=b,a in this.containerOptions?(this.containerOptions[a]=b,this.setContainerOption(a,b)):(this.formOptions[a]=b,this.$form&&this.$form.editableform("option",a,b))},setContainerOption:function(a,b){this.call("option",a,b)},destroy:function(){this.hide(),this.innerDestroy(),this.$element.off("destroyed"),this.$element.removeData("editableContainer")},innerDestroy:function(){},closeOthers:function(b){a(".editable-open").each(function(c,d){if(d!==b&&!a(d).find(b).length){var e=a(d),f=e.data("editableContainer");f&&("cancel"===f.options.onblur?e.data("editableContainer").hide("onblur"):"submit"===f.options.onblur&&e.data("editableContainer").tip().find("form").submit())}})},activate:function(){this.tip&&this.tip().is(":visible")&&this.$form&&this.$form.data("editableform").input.activate()}},a.fn.editableContainer=function(d){var e=arguments;return this.each(function(){var f=a(this),g="editableContainer",h=f.data(g),i="object"==typeof d&&d,j="inline"===i.mode?c:b;h||f.data(g,h=new j(this,i)),"string"==typeof d&&h[d].apply(h,Array.prototype.slice.call(e,1))})},a.fn.editableContainer.Popup=b,a.fn.editableContainer.Inline=c,a.fn.editableContainer.defaults={value:null,placement:"top",autohide:!0,onblur:"cancel",anim:!1,mode:"popup"},jQuery.event.special.destroyed={remove:function(a){a.handler&&a.handler()}}}(window.jQuery),function(a){"use strict";a.extend(a.fn.editableContainer.Inline.prototype,a.fn.editableContainer.Popup.prototype,{containerName:"editableform",innerCss:".editable-inline",containerClass:"editable-container editable-inline",initContainer:function(){this.$tip=a(""),this.options.anim||(this.options.anim=0)},splitOptions:function(){this.containerOptions={},this.formOptions=this.options},tip:function(){return this.$tip},innerShow:function(){this.$element.hide(),this.tip().insertAfter(this.$element).show()},innerHide:function(){this.$tip.hide(this.options.anim,a.proxy(function(){this.$element.show(),this.innerDestroy()},this))},innerDestroy:function(){this.tip()&&this.tip().empty().remove()}})}(window.jQuery),function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.editable.defaults,c,a.fn.editableutils.getConfigData(this.$element)),this.options.selector?this.initLive():this.init(),this.options.highlight&&!a.fn.editableutils.supportsTransitions()&&(this.options.highlight=!1)};b.prototype={constructor:b,init:function(){var b,c=!1;if(this.options.name=this.options.name||this.$element.attr("id"),this.options.scope=this.$element[0],this.input=a.fn.editableutils.createInput(this.options),this.input){switch(void 0===this.options.value||null===this.options.value?(this.value=this.input.html2value(a.trim(this.$element.html())),c=!0):(this.options.value=a.fn.editableutils.tryParseJson(this.options.value,!0),this.value="string"==typeof this.options.value?this.input.str2value(this.options.value):this.options.value),this.$element.addClass("editable"),"textarea"===this.input.type&&this.$element.addClass("editable-pre-wrapped"),"manual"!==this.options.toggle?(this.$element.addClass("editable-click"),this.$element.on(this.options.toggle+".editable",a.proxy(function(a){if(this.options.disabled||a.preventDefault(),"mouseenter"===this.options.toggle)this.show();else{var b="click"!==this.options.toggle;this.toggle(b)}},this))):this.$element.attr("tabindex",-1),"function"==typeof this.options.display&&(this.options.autotext="always"),this.options.autotext){case"always":b=!0;break;case"auto":b=!a.trim(this.$element.text()).length&&null!==this.value&&void 0!==this.value&&!c;break;default:b=!1}a.when(b?this.render():!0).then(a.proxy(function(){this.options.disabled?this.disable():this.enable(),this.$element.triggerHandler("init",this)},this))}},initLive:function(){var b=this.options.selector;this.options.selector=!1,this.options.autotext="never",this.$element.on(this.options.toggle+".editable",b,a.proxy(function(b){var c=a(b.target);c.data("editable")||(c.hasClass(this.options.emptyclass)&&c.empty(),c.editable(this.options).trigger(b))},this))},render:function(a){return this.options.display!==!1?this.input.value2htmlFinal?this.input.value2html(this.value,this.$element[0],this.options.display,a):"function"==typeof this.options.display?this.options.display.call(this.$element[0],this.value,a):this.input.value2html(this.value,this.$element[0]):void 0},enable:function(){this.options.disabled=!1,this.$element.removeClass("editable-disabled"),this.handleEmpty(this.isEmpty),"manual"!==this.options.toggle&&"-1"===this.$element.attr("tabindex")&&this.$element.removeAttr("tabindex")},disable:function(){this.options.disabled=!0,this.hide(),this.$element.addClass("editable-disabled"),this.handleEmpty(this.isEmpty),this.$element.attr("tabindex",-1)},toggleDisabled:function(){this.options.disabled?this.enable():this.disable()},option:function(b,c){return b&&"object"==typeof b?(a.each(b,a.proxy(function(b,c){this.option(a.trim(b),c)},this)),void 0):(this.options[b]=c,"disabled"===b?c?this.disable():this.enable():("value"===b&&this.setValue(c),this.container&&this.container.option(b,c),this.input.option&&this.input.option(b,c),void 0))},handleEmpty:function(b){this.options.display!==!1&&(this.isEmpty=void 0!==b?b:"function"==typeof this.input.isEmpty?this.input.isEmpty(this.$element):""===a.trim(this.$element.html()),this.options.disabled?this.isEmpty&&(this.$element.empty(),this.options.emptyclass&&this.$element.removeClass(this.options.emptyclass)):this.isEmpty?(this.$element.html(this.options.emptytext),this.options.emptyclass&&this.$element.addClass(this.options.emptyclass)):this.options.emptyclass&&this.$element.removeClass(this.options.emptyclass))},show:function(b){if(!this.options.disabled){if(this.container){if(this.container.tip().is(":visible"))return}else{var c=a.extend({},this.options,{value:this.value,input:this.input});this.$element.editableContainer(c),this.$element.on("save.internal",a.proxy(this.save,this)),this.container=this.$element.data("editableContainer")}this.container.show(b)}},hide:function(){this.container&&this.container.hide()},toggle:function(a){this.container&&this.container.tip().is(":visible")?this.hide():this.show(a)},save:function(a,b){if(this.options.unsavedclass){var c=!1;c=c||"function"==typeof this.options.url,c=c||this.options.display===!1,c=c||void 0!==b.response,c=c||this.options.savenochange&&this.input.value2str(this.value)!==this.input.value2str(b.newValue),c?this.$element.removeClass(this.options.unsavedclass):this.$element.addClass(this.options.unsavedclass)}if(this.options.highlight){var d=this.$element,e=d.css("background-color");d.css("background-color",this.options.highlight),setTimeout(function(){"transparent"===e&&(e=""),d.css("background-color",e),d.addClass("editable-bg-transition"),setTimeout(function(){d.removeClass("editable-bg-transition")},1700)},10)}this.setValue(b.newValue,!1,b.response)},validate:function(){return"function"==typeof this.options.validate?this.options.validate.call(this,this.value):void 0},setValue:function(b,c,d){this.value=c?this.input.str2value(b):b,this.container&&this.container.option("value",this.value),a.when(this.render(d)).then(a.proxy(function(){this.handleEmpty()},this))},activate:function(){this.container&&this.container.activate()},destroy:function(){this.disable(),this.container&&this.container.destroy(),this.input.destroy(),"manual"!==this.options.toggle&&(this.$element.removeClass("editable-click"),this.$element.off(this.options.toggle+".editable")),this.$element.off("save.internal"),this.$element.removeClass("editable editable-open editable-disabled"),this.$element.removeData("editable")}},a.fn.editable=function(c){var d={},e=arguments,f="editable";switch(c){case"validate":return this.each(function(){var b,c=a(this),e=c.data(f);e&&(b=e.validate())&&(d[e.options.name]=b)}),d;case"getValue":return 2===arguments.length&&arguments[1]===!0?d=this.eq(0).data(f).value:this.each(function(){var b=a(this),c=b.data(f);c&&void 0!==c.value&&null!==c.value&&(d[c.options.name]=c.input.value2submit(c.value))}),d;case"submit":var g=arguments[1]||{},h=this,i=this.editable("validate");if(a.isEmptyObject(i)){var j={};if(1===h.length){var k=h.data("editable"),l={name:k.options.name||"",value:k.input.value2submit(k.value),pk:"function"==typeof k.options.pk?k.options.pk.call(k.options.scope):k.options.pk};"function"==typeof k.options.params?l=k.options.params.call(k.options.scope,l):(k.options.params=a.fn.editableutils.tryParseJson(k.options.params,!0),a.extend(l,k.options.params)),j={url:k.options.url,data:l,type:"POST"},g.success=g.success||k.options.success,g.error=g.error||k.options.error}else{var m=this.editable("getValue");j={url:g.url,data:m,type:"POST"}}j.success="function"==typeof g.success?function(a){g.success.call(h,a,g)}:a.noop,j.error="function"==typeof g.error?function(){g.error.apply(h,arguments)}:a.noop,g.ajaxOptions&&a.extend(j,g.ajaxOptions),g.data&&a.extend(j.data,g.data),a.ajax(j)}else"function"==typeof g.error&&g.error.call(h,i);return this}return this.each(function(){var d=a(this),g=d.data(f),h="object"==typeof c&&c;return h&&h.selector?(g=new b(this,h),void 0):(g||d.data(f,g=new b(this,h)),"string"==typeof c&&g[c].apply(g,Array.prototype.slice.call(e,1)),void 0)})},a.fn.editable.defaults={type:"text",disabled:!1,toggle:"click",emptytext:"Empty",autotext:"auto",value:null,display:null,emptyclass:"editable-empty",unsavedclass:"editable-unsaved",selector:null,highlight:"#FFFF80"}}(window.jQuery),function(a){"use strict";a.fn.editabletypes={};var b=function(){};b.prototype={init:function(b,c,d){this.type=b,this.options=a.extend({},d,c)},prerender:function(){this.$tpl=a(this.options.tpl),this.$input=this.$tpl,this.$clear=null,this.error=null},render:function(){},value2html:function(b,c){a(c)[this.options.escape?"text":"html"](a.trim(b))},html2value:function(b){return a("
    ").html(b).text()},value2str:function(a){return a},str2value:function(a){return a},value2submit:function(a){return a},value2input:function(a){this.$input.val(a)},input2value:function(){return this.$input.val()},activate:function(){this.$input.is(":visible")&&this.$input.focus()},clear:function(){this.$input.val(null)},escape:function(b){return a("
    ").text(b).html()},autosubmit:function(){},destroy:function(){},setClass:function(){this.options.inputclass&&this.$input.addClass(this.options.inputclass)},setAttr:function(a){void 0!==this.options[a]&&null!==this.options[a]&&this.$input.attr(a,this.options[a])},option:function(a,b){this.options[a]=b}},b.defaults={tpl:"",inputclass:null,escape:!0,scope:null,showbuttons:!0},a.extend(a.fn.editabletypes,{abstractinput:b})}(window.jQuery),function(a){"use strict";var b=function(){};a.fn.editableutils.inherit(b,a.fn.editabletypes.abstractinput),a.extend(b.prototype,{render:function(){var b=a.Deferred();return this.error=null,this.onSourceReady(function(){this.renderList(),b.resolve()},function(){this.error=this.options.sourceError,b.resolve()}),b.promise()},html2value:function(){return null},value2html:function(b,c,d,e){var f=a.Deferred(),g=function(){"function"==typeof d?d.call(c,b,this.sourceData,e):this.value2htmlFinal(b,c),f.resolve()};return null===b?g.call(this):this.onSourceReady(g,function(){f.resolve()}),f.promise()},onSourceReady:function(b,c){var d;if(a.isFunction(this.options.source)?(d=this.options.source.call(this.options.scope),this.sourceData=null):d=this.options.source,this.options.sourceCache&&a.isArray(this.sourceData))return b.call(this),void 0;try{d=a.fn.editableutils.tryParseJson(d,!1)}catch(e){return c.call(this),void 0}if("string"==typeof d){if(this.options.sourceCache){var f,g=d;if(a(document).data(g)||a(document).data(g,{}),f=a(document).data(g),f.loading===!1&&f.sourceData)return this.sourceData=f.sourceData,this.doPrepend(),b.call(this),void 0;if(f.loading===!0)return f.callbacks.push(a.proxy(function(){this.sourceData=f.sourceData,this.doPrepend(),b.call(this)},this)),f.err_callbacks.push(a.proxy(c,this)),void 0;f.loading=!0,f.callbacks=[],f.err_callbacks=[]}var h=a.extend({url:d,type:"get",cache:!1,dataType:"json",success:a.proxy(function(d){f&&(f.loading=!1),this.sourceData=this.makeArray(d),a.isArray(this.sourceData)?(f&&(f.sourceData=this.sourceData,a.each(f.callbacks,function(){this.call()})),this.doPrepend(),b.call(this)):(c.call(this),f&&a.each(f.err_callbacks,function(){this.call()}))},this),error:a.proxy(function(){c.call(this),f&&(f.loading=!1,a.each(f.err_callbacks,function(){this.call()}))},this)},this.options.sourceOptions);a.ajax(h)}else this.sourceData=this.makeArray(d),a.isArray(this.sourceData)?(this.doPrepend(),b.call(this)):c.call(this)},doPrepend:function(){null!==this.options.prepend&&void 0!==this.options.prepend&&(a.isArray(this.prependData)||(a.isFunction(this.options.prepend)&&(this.options.prepend=this.options.prepend.call(this.options.scope)),this.options.prepend=a.fn.editableutils.tryParseJson(this.options.prepend,!0),"string"==typeof this.options.prepend&&(this.options.prepend={"":this.options.prepend}),this.prependData=this.makeArray(this.options.prepend)),a.isArray(this.prependData)&&a.isArray(this.sourceData)&&(this.sourceData=this.prependData.concat(this.sourceData)))},renderList:function(){},value2htmlFinal:function(){},makeArray:function(b){var c,d,e,f,g=[];if(!b||"string"==typeof b)return null;if(a.isArray(b)){f=function(a,b){return d={value:a,text:b},c++>=2?!1:void 0};for(var h=0;h1&&(e.children&&(e.children=this.makeArray(e.children)),g.push(e))):g.push({value:e,text:e})}else a.each(b,function(a,b){g.push({value:a,text:b})});return g},option:function(a,b){this.options[a]=b,"source"===a&&(this.sourceData=null),"prepend"===a&&(this.prependData=null)}}),b.defaults=a.extend({},a.fn.editabletypes.abstractinput.defaults,{source:null,prepend:!1,sourceError:"Error when loading list",sourceCache:!0,sourceOptions:null}),a.fn.editabletypes.list=b}(window.jQuery),function(a){"use strict";var b=function(a){this.init("text",a,b.defaults)};a.fn.editableutils.inherit(b,a.fn.editabletypes.abstractinput),a.extend(b.prototype,{render:function(){this.renderClear(),this.setClass(),this.setAttr("placeholder")},activate:function(){this.$input.is(":visible")&&(this.$input.focus(),a.fn.editableutils.setCursorPosition(this.$input.get(0),this.$input.val().length),this.toggleClear&&this.toggleClear())},renderClear:function(){this.options.clear&&(this.$clear=a(''),this.$input.after(this.$clear).css("padding-right",24).keyup(a.proxy(function(b){if(!~a.inArray(b.keyCode,[40,38,9,13,27])){clearTimeout(this.t);var c=this;this.t=setTimeout(function(){c.toggleClear(b)},100)}},this)).parent().css("position","relative"),this.$clear.click(a.proxy(this.clear,this)))},postrender:function(){},toggleClear:function(){if(this.$clear){var a=this.$input.val().length,b=this.$clear.is(":visible");a&&!b&&this.$clear.show(),!a&&b&&this.$clear.hide()}},clear:function(){this.$clear.hide(),this.$input.val("").focus()}}),b.defaults=a.extend({},a.fn.editabletypes.abstractinput.defaults,{tpl:'',placeholder:null,clear:!0}),a.fn.editabletypes.text=b}(window.jQuery),function(a){"use strict";var b=function(a){this.init("textarea",a,b.defaults)};a.fn.editableutils.inherit(b,a.fn.editabletypes.abstractinput),a.extend(b.prototype,{render:function(){this.setClass(),this.setAttr("placeholder"),this.setAttr("rows"),this.$input.keydown(function(b){b.ctrlKey&&13===b.which&&a(this).closest("form").submit()})},activate:function(){a.fn.editabletypes.text.prototype.activate.call(this)}}),b.defaults=a.extend({},a.fn.editabletypes.abstractinput.defaults,{tpl:"",inputclass:"input-large",placeholder:null,rows:7}),a.fn.editabletypes.textarea=b}(window.jQuery),function(a){"use strict";var b=function(a){this.init("select",a,b.defaults)};a.fn.editableutils.inherit(b,a.fn.editabletypes.list),a.extend(b.prototype,{renderList:function(){this.$input.empty();var b=function(c,d){var e;if(a.isArray(d))for(var f=0;f",e),d[f].children))):(e.value=d[f].value,d[f].disabled&&(e.disabled=!0),c.append(a("