├── .gitignore ├── app ├── common │ ├── __init__.py │ ├── error.py │ ├── log.py │ ├── mysql.py │ ├── redis_cache.py │ └── state.py ├── config.py ├── handler │ ├── __init__.py │ ├── admin │ │ ├── __init__.py │ │ ├── admin_base_handler.py │ │ ├── application_handler.py │ │ ├── department_handler.py │ │ ├── func_handler.py │ │ ├── main_handler.py │ │ ├── oper_log_handler.py │ │ ├── role_handler.py │ │ ├── user_handler.py │ │ └── usergroup_handler.py │ ├── api │ │ ├── __init__.py │ │ ├── api_base_handler.py │ │ ├── func_api_handler.py │ │ └── user_api_handler.py │ ├── base_handler.py │ ├── login_handler.py │ └── test_handler.py ├── helper │ ├── __init__.py │ ├── file_helper.py │ ├── http_helper.py │ ├── log_helper.py │ └── str_helper.py ├── logic │ ├── __init__.py │ ├── application_logic.py │ ├── department_logic.py │ ├── func_logic.py │ ├── oper_log_logic.py │ ├── role_logic.py │ ├── user_logic.py │ └── usergroup_logic.py ├── proxy │ ├── __init__.py │ └── soc_right_proxy.py ├── route.py ├── start.py ├── static │ ├── css │ │ └── style.css │ └── js │ │ ├── My97DatePicker │ │ ├── WdatePicker.js │ │ ├── calendar.js │ │ ├── lang │ │ │ ├── en.js │ │ │ ├── zh-cn.js │ │ │ └── zh-tw.js │ │ └── skin │ │ │ ├── WdatePicker.css │ │ │ ├── datePicker.gif │ │ │ ├── default │ │ │ ├── datepicker.css │ │ │ └── img.gif │ │ │ └── whyGreen │ │ │ ├── bg.jpg │ │ │ ├── datepicker.css │ │ │ └── img.gif │ │ ├── bootstrap │ │ ├── css │ │ │ ├── bootstrap-theme.css │ │ │ ├── bootstrap-theme.css.map │ │ │ ├── bootstrap-theme.min.css │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ ├── bootstrap.min.css │ │ │ └── bs_style.css │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ └── glyphicons-halflings-regular.woff │ │ └── js │ │ │ ├── bootstrap.js │ │ │ └── bootstrap.min.js │ │ ├── common.js │ │ ├── ichecker │ │ ├── jquery.icheck.js │ │ ├── jquery.icheck.min.js │ │ └── skins │ │ │ ├── all.css │ │ │ ├── flat │ │ │ ├── _all.css │ │ │ ├── aero.css │ │ │ ├── aero.png │ │ │ ├── aero@2x.png │ │ │ ├── blue.css │ │ │ ├── blue.png │ │ │ ├── blue@2x.png │ │ │ ├── flat.css │ │ │ ├── flat.png │ │ │ ├── flat@2x.png │ │ │ ├── green.css │ │ │ ├── green.png │ │ │ ├── green@2x.png │ │ │ ├── grey.css │ │ │ ├── grey.png │ │ │ ├── grey@2x.png │ │ │ ├── orange.css │ │ │ ├── orange.png │ │ │ ├── orange@2x.png │ │ │ ├── pink.css │ │ │ ├── pink.png │ │ │ ├── pink@2x.png │ │ │ ├── purple.css │ │ │ ├── purple.png │ │ │ ├── purple@2x.png │ │ │ ├── red.css │ │ │ ├── red.png │ │ │ ├── red@2x.png │ │ │ ├── yellow.css │ │ │ ├── yellow.png │ │ │ └── yellow@2x.png │ │ │ ├── futurico │ │ │ ├── futurico.css │ │ │ ├── futurico.png │ │ │ └── futurico@2x.png │ │ │ ├── line │ │ │ ├── _all.css │ │ │ ├── aero.css │ │ │ ├── blue.css │ │ │ ├── green.css │ │ │ ├── grey.css │ │ │ ├── line.css │ │ │ ├── line.png │ │ │ ├── line@2x.png │ │ │ ├── orange.css │ │ │ ├── pink.css │ │ │ ├── purple.css │ │ │ ├── red.css │ │ │ └── yellow.css │ │ │ ├── minimal │ │ │ ├── _all.css │ │ │ ├── aero.css │ │ │ ├── aero.png │ │ │ ├── aero@2x.png │ │ │ ├── blue.css │ │ │ ├── blue.png │ │ │ ├── blue@2x.png │ │ │ ├── green.css │ │ │ ├── green.png │ │ │ ├── green@2x.png │ │ │ ├── grey.css │ │ │ ├── grey.png │ │ │ ├── grey@2x.png │ │ │ ├── minimal.css │ │ │ ├── minimal.png │ │ │ ├── minimal@2x.png │ │ │ ├── orange.css │ │ │ ├── orange.png │ │ │ ├── orange@2x.png │ │ │ ├── pink.css │ │ │ ├── pink.png │ │ │ ├── pink@2x.png │ │ │ ├── purple.css │ │ │ ├── purple.png │ │ │ ├── purple@2x.png │ │ │ ├── red.css │ │ │ ├── red.png │ │ │ ├── red@2x.png │ │ │ ├── yellow.css │ │ │ ├── yellow.png │ │ │ └── yellow@2x.png │ │ │ ├── polaris │ │ │ ├── polaris.css │ │ │ ├── polaris.png │ │ │ └── polaris@2x.png │ │ │ └── square │ │ │ ├── _all.css │ │ │ ├── aero.css │ │ │ ├── aero.png │ │ │ ├── aero@2x.png │ │ │ ├── blue.css │ │ │ ├── blue.png │ │ │ ├── blue@2x.png │ │ │ ├── green.css │ │ │ ├── green.png │ │ │ ├── green@2x.png │ │ │ ├── grey.css │ │ │ ├── grey.png │ │ │ ├── grey@2x.png │ │ │ ├── orange.css │ │ │ ├── orange.png │ │ │ ├── orange@2x.png │ │ │ ├── pink.css │ │ │ ├── pink.png │ │ │ ├── pink@2x.png │ │ │ ├── purple.css │ │ │ ├── purple.png │ │ │ ├── purple@2x.png │ │ │ ├── red.css │ │ │ ├── red.png │ │ │ ├── red@2x.png │ │ │ ├── square.css │ │ │ ├── square.png │ │ │ ├── square@2x.png │ │ │ ├── yellow.css │ │ │ ├── yellow.png │ │ │ └── yellow@2x.png │ │ ├── jquery-1.10.2.js │ │ ├── jquery-1.10.2.min.js │ │ ├── jquery.min.1.7.2.js │ │ └── zTree │ │ ├── jquery.ztree.all-3.2.js │ │ ├── jquery.ztree.all-3.2.min.js │ │ ├── jquery.ztree.core-3.2.js │ │ ├── jquery.ztree.core-3.2.min.js │ │ ├── jquery.ztree.excheck-3.2.js │ │ ├── jquery.ztree.excheck-3.2.min.js │ │ ├── jquery.ztree.exedit-3.2.js │ │ ├── jquery.ztree.exedit-3.2.min.js │ │ └── zTreeStyle │ │ ├── img │ │ ├── diy │ │ │ ├── 1_close.png │ │ │ ├── 1_open.png │ │ │ ├── 2.png │ │ │ ├── 3.png │ │ │ ├── 4.png │ │ │ ├── 5.png │ │ │ ├── 6.png │ │ │ ├── 7.png │ │ │ ├── 8.png │ │ │ └── 9.png │ │ ├── line_conn.gif │ │ ├── loading.gif │ │ ├── zTreeStandard.gif │ │ └── zTreeStandard.png │ │ └── zTreeStyle.css ├── templates │ ├── admin │ │ ├── application │ │ │ ├── add_or_edit_bs.html │ │ │ ├── detail_bs.html │ │ │ └── list_bs.html │ │ ├── base_a_bs.html │ │ ├── department │ │ │ ├── add_or_edit_bs.html │ │ │ ├── detail_bs.html │ │ │ └── list_bs.html │ │ ├── func │ │ │ ├── detail_bs.html │ │ │ └── list_bs.html │ │ ├── index_bs.html │ │ ├── main_bs.html │ │ ├── not_right_bs.html │ │ ├── operlog │ │ │ └── list_bs.html │ │ ├── role │ │ │ ├── add_or_edit_bs.html │ │ │ ├── detail_bs.html │ │ │ ├── list_bs.html │ │ │ ├── right_detail_bs.html │ │ │ ├── right_edit_bs.html │ │ │ ├── user_group_list_bs.html │ │ │ └── user_list_bs.html │ │ ├── user │ │ │ ├── add_or_edit_bs.html │ │ │ ├── detail_bs.html │ │ │ ├── group_list_bs.html │ │ │ ├── list_bs.html │ │ │ ├── right_detail_bs.html │ │ │ └── role_list_bs.html │ │ └── usergroup │ │ │ ├── add_or_edit_bs.html │ │ │ ├── detail_bs.html │ │ │ ├── list_bs.html │ │ │ ├── right_detail_bs.html │ │ │ ├── role_list_bs.html │ │ │ └── user_list_bs.html │ ├── app_list_bs.html │ ├── base_bs.html │ ├── base_s_bs.html │ ├── login_bs.html │ ├── password_edit_bs.html │ └── test.html └── test.py ├── install.md ├── install ├── db │ └── soc_sso_right.sql └── nginx-conf │ └── nginx.conf ├── readme ├── shell ├── __init__.py └── check_user_lock_and_expire.py ├── start.sh └── stop.sh /.gitignore: -------------------------------------------------------------------------------- 1 | #ignore these files 2 | *.pyc 3 | /logs 4 | *.log 5 | -------------------------------------------------------------------------------- /app/common/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/common/__init__.py -------------------------------------------------------------------------------- /app/common/error.py: -------------------------------------------------------------------------------- 1 | #-*- encoding: utf-8 -*- 2 | 3 | from common import state 4 | 5 | class RightError(Exception): 6 | def __init__(self, value = None, code = 999999): 7 | if None != value: 8 | self.msg = '%s,%s' % (state.ResultInfo.get(code, ''), value) 9 | else: 10 | self.msg = state.ResultInfo.get(code, '') 11 | self.code = code 12 | 13 | def __str__(self): 14 | return repr(self.code + '___' + self.msg) -------------------------------------------------------------------------------- /app/common/log.py: -------------------------------------------------------------------------------- 1 | #-*- encoding: utf-8 -*- 2 | 3 | 4 | from helper import log_helper 5 | import config 6 | 7 | _logger = None 8 | def get_logger(): 9 | if None == _logger: 10 | _logger = log_helper.get_logger(config.log_path) 11 | return _logger -------------------------------------------------------------------------------- /app/common/redis_cache.py: -------------------------------------------------------------------------------- 1 | #-*- encoding: utf-8 -*- 2 | 3 | import config 4 | import redis 5 | from helper import str_helper 6 | 7 | _conn = None 8 | 9 | _cachekeypre = 'soc_right_user_%s' 10 | 11 | def _get_redis(): 12 | global _conn 13 | if None == _conn: 14 | _conn = redis.ConnectionPool(host=config.cache['host'], port=config.cache['port'], db = config.cache['db']) 15 | return redis.Redis(connection_pool=_conn) 16 | 17 | def getStr(key): 18 | r = _get_redis() 19 | key = _cachekeypre % key 20 | return r.get(key) 21 | 22 | 23 | def setStr(key, val, time = 0): 24 | r = _get_redis() 25 | key = _cachekeypre % key 26 | if time <= 0: 27 | r.set(key, val) 28 | else: 29 | r.setex(key, val, time) 30 | 31 | def delete(key): 32 | r = _get_redis() 33 | key = _cachekeypre % key 34 | return r.delete(key) 35 | 36 | 37 | def getObj(key): 38 | r = _get_redis() 39 | key = _cachekeypre % key 40 | json = r.get(key) 41 | if None == json: 42 | return None 43 | return str_helper.json_decode(json) 44 | 45 | 46 | def setObj(key, val, time = 0): 47 | if None == val: 48 | return 49 | json = str_helper.json_encode(val) 50 | r = _get_redis() 51 | key = _cachekeypre % key 52 | if time <= 0: 53 | r.set(key, json) 54 | else: 55 | r.setex(key, json, time) 56 | 57 | 58 | -------------------------------------------------------------------------------- /app/config.py: -------------------------------------------------------------------------------- 1 | #-*- encoding: utf-8 -*- 2 | 3 | import os 4 | 5 | SOCRightConfig = { 6 | 7 | #系统版本号,可以通过该参数reload,js,css资源文件 8 | 'version':'0.9.1', 9 | #站点名称 10 | 'siteName' : '云海统一权限管理平台', 11 | #js域名前缀,不需要修改 12 | 'jsDomain' : '/static/', 13 | #css域名前缀,不需要修改 14 | 'cssDomain' : '/static/', 15 | 16 | #后台站点的域名,需要根据实际情况修改 17 | 'siteDomain' : 'http://ssoadmin.ejyi.com/', 18 | #服务站点的域名,需要根据实际情况修改 19 | 'serviceSiteDomain' : 'http://sso.ejyi.com/', 20 | 21 | #页面分页每页显示数 22 | 'size' : 15, 23 | #搜索选择列表分页每页显示数 24 | 'modelSize' : 5, 25 | #该系统的应用编号,不需要修改 26 | 'appCode' : 'SOCRight', 27 | #权限服务保存cookie的key 28 | 'rightCookieName' : 'soc_right_user', 29 | #权限后台保存cookie的key 30 | 'adminCookieName' : 'soc_right_admin_user', 31 | 32 | #系统部署目录,需要根据实际情况修改 33 | 'realPath' : '/opt/web/sso.socsoft.net/', 34 | #导出用户信息目录,不需要修改 35 | 'exportUserPath' : 'app/static/export/user/', 36 | #导出操作日志信息目录,不需要修改 37 | 'exportOperLogPath' : 'app/static/export/operlog/', 38 | } 39 | 40 | log_path = None 41 | 42 | #系统配置目录,不需要修改 43 | urls = { 44 | 'socRightApi' : SOCRightConfig['serviceSiteDomain']+'Api/', 45 | 'adminBackUrl' : SOCRightConfig['siteDomain']+'Admin/Main', 46 | 'loginUrl' : SOCRightConfig['serviceSiteDomain']+'Login', 47 | } 48 | 49 | #系统数据库配置,根据实际情况修改 50 | db = { 51 | 'host' : '192.168.36.55', 52 | 'user' : 'root', 53 | 'passwd' : 'fXL2bO$RQgaRS^lH', 54 | 'db' : 'soc_sso_right', 55 | 'charset':'utf8', 56 | 'port':3306, 57 | } 58 | 59 | 60 | #redis缓存配置,根据实际情况修改 61 | cache = { 62 | 'host' : '127.0.0.1', 63 | 'port' : 6379, 64 | 'db' : 0, 65 | 66 | #用户信息超时时间,秒 67 | 'userTimeOut' : 86400, 68 | #authtoken超时时间,秒 69 | 'userRightTimeOut' : 600, 70 | #authtoken超时时间,秒 71 | 'apiTimeOut' : 3600, 72 | } 73 | 74 | settings = dict( 75 | static_path=os.path.join(os.path.dirname(__file__), "static"), 76 | template_path=os.path.join(os.path.dirname(__file__), "templates"), 77 | #系统调试模式,服务器可设置为False 78 | debug=True, 79 | ) 80 | 81 | 82 | -------------------------------------------------------------------------------- /app/handler/__init__.py: -------------------------------------------------------------------------------- 1 | #-*- encoding: utf-8 -*- 2 | 3 | -------------------------------------------------------------------------------- /app/handler/admin/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/handler/admin/__init__.py -------------------------------------------------------------------------------- /app/handler/admin/admin_base_handler.py: -------------------------------------------------------------------------------- 1 | #-*- encoding: utf-8 -*- 2 | 3 | import tornado.web 4 | from datetime import datetime 5 | 6 | import config 7 | from common import state, redis_cache 8 | from helper import str_helper 9 | from handler import base_handler 10 | from logic import oper_log_logic 11 | 12 | 13 | class AdminBaseHandler(base_handler.BaseHandler): 14 | def get_current_user(self): 15 | #if not self.current_user: 16 | uuid = self.get_cookie(config.SOCRightConfig['adminCookieName']) 17 | if None == uuid: 18 | return None 19 | user = redis_cache.getObj(uuid) 20 | return user 21 | 22 | def is_edit(self): 23 | return 'edit' in self.request.path.lower() 24 | 25 | def get_page_config(self, title, refUrl = ''): 26 | ps = base_handler.BaseHandler.get_page_config(self, title) 27 | ps['isedit'] = self.is_edit() 28 | ru = self.get_arg('refUrl', '') 29 | if None != ru and '' != ru: 30 | ps['refUrl'] = ru 31 | else: 32 | ru = self.request.headers.get('Referer', refUrl) 33 | if None != ru and '' != ru and '/Admin/Main' not in ru: 34 | ps['refUrl'] = ru 35 | else: 36 | ps['refUrl'] = refUrl 37 | return ps 38 | 39 | def get_oper_user(self): 40 | return self.current_user['name'] 41 | 42 | def clear_user_info(self): 43 | uuid = self.get_cookie(config.SOCRightConfig['adminCookieName']) 44 | if None == uuid: 45 | return None 46 | user = redis_cache.delete(uuid) 47 | self.clear_all_cookies() 48 | 49 | 50 | 51 | def check_oper_right(self, right = None, user = None): 52 | ''' 判断用户权限 ''' 53 | if right == None: 54 | right = self._right 55 | 56 | if None == self._rightKey or '' == self._rightKey or None == right or 0 == right: 57 | return 58 | if None == user: 59 | user = self.current_user 60 | 61 | rights = user.get('rights', []) 62 | type = False 63 | for r in rights: 64 | if r.get('path', '') == self._rightKey: 65 | if r.get('right', 0) & right == right: 66 | type = True 67 | break 68 | if not type: 69 | if self.get_arg('ajax', '') == 'ajax': 70 | self.out_fail(code = 1004) 71 | self.finish() 72 | else: 73 | self.redirect(config.SOCRightConfig['siteDomain']+'Admin/NotRight') 74 | return 75 | 76 | 77 | def check_oper_right_custom_right(self, rightKey, customRight): 78 | user = self.current_user 79 | rights = user.get('rights', []) 80 | for r in rights: 81 | if r.get('path', '') != rightKey: 82 | continue 83 | crs = r.get('customRight', []) 84 | for cr in crs: 85 | if customRight == cr: 86 | return True 87 | return False 88 | return False 89 | 90 | 91 | 92 | class AdminRightBaseHandler(AdminBaseHandler): 93 | 94 | _rightKey = '' 95 | _right = 0 96 | 97 | _resetPwKey = 'ResetPassword' 98 | _exportUserKey = 'Export' 99 | _lockUserKey = 'Lock' 100 | 101 | def prepare(self): 102 | super(AdminRightBaseHandler, self).prepare() 103 | user = self.current_user 104 | if None == user: 105 | ''' 判断用户是否存在,如果不存在,重新登录 ''' 106 | params = {'backUrl':config.urls['adminBackUrl'], 'appCode': config.SOCRightConfig['appCode']} 107 | url = self.format_url(config.urls['loginUrl'] , params) 108 | self.redirect(url) 109 | return 110 | self.check_oper_right() 111 | 112 | 113 | def write_oper_log(self, action, targetType = 0, targetID = '', targetName = '', startStatus = '', endStatus= ''): 114 | u = self.current_user 115 | oper_log_logic.add(operID=u['id'], operUserName=u['name'], operRealName=u[ 116 | 'realName'], appCode='SOCRight', funcPath=self._rightKey, action=action, targetType=targetType, targetID=targetID, targetName=targetName, startStatus=startStatus, endStatus=endStatus, operIp=self.get_user_ip()) -------------------------------------------------------------------------------- /app/handler/admin/main_handler.py: -------------------------------------------------------------------------------- 1 | #-*- encoding: utf-8 -*- 2 | 3 | 4 | 5 | import tornado.web 6 | import config 7 | 8 | from helper import str_helper, http_helper 9 | from datetime import datetime, timedelta 10 | import admin_base_handler 11 | from common import redis_cache, state 12 | from proxy import soc_right_proxy 13 | 14 | 15 | 16 | 17 | class MainHandler(admin_base_handler.AdminBaseHandler): 18 | 19 | _rightKey = config.SOCRightConfig['appCode'] + '.Login' 20 | _right = state.operView 21 | 22 | def get(self): 23 | ps = self.get_page_config(title = '后台') 24 | token = self.get_args(['token'], '') 25 | ps['token'] = token['token'] 26 | user = self.current_user 27 | if None == user: 28 | ''' 判断用户是否存在,如果不存在,判断token重新登录 ''' 29 | if '' == ps['token']: 30 | params = {'backUrl':config.urls['adminBackUrl'], 'appCode': config.SOCRightConfig['appCode']} 31 | url = self.format_url(config.urls['loginUrl'] , params) 32 | self.redirect(url) 33 | return 34 | else: 35 | user = self.get_user_info_by_token(token = ps['token']) 36 | elif ps['token'] != '' and user.get('loginToken', '') != ps['token']: 37 | ''' 用户登录token不等于传入token,需要重新登录 ''' 38 | user = self.get_user_info_by_token(token = ps['token']) 39 | 40 | ps['user'] = user 41 | self.check_oper_right(user = user) 42 | 43 | self.render('admin/main_bs.html', **ps) 44 | 45 | def get_user_info_by_token(self , token): 46 | user = soc_right_proxy.get_login_user(token = token) 47 | if None == user or type(user) != dict or user.get('email','') == '': 48 | ''' 无法获取用户信息,重新登录 ''' 49 | self.redirect(config.urls['loginUrl']) 50 | return 51 | else: 52 | rights = user.get('rights', []) 53 | user['loginToken'] = token 54 | uuid = str_helper.get_uuid() 55 | redis_cache.setObj(uuid, user, config.cache['userTimeOut']) 56 | ex = datetime.now() + timedelta(seconds=config.cache['userTimeOut']) 57 | self.set_cookie(name = config.SOCRightConfig['adminCookieName'], value=uuid, expires=ex) 58 | return user 59 | 60 | 61 | 62 | 63 | class LogoutHandler(admin_base_handler.AdminBaseHandler): 64 | def get(self): 65 | self.clear_user_info() 66 | self.redirect(config.urls['loginUrl']) 67 | 68 | 69 | class NotRightHandler(admin_base_handler.AdminBaseHandler): 70 | def get(self): 71 | ps = self.get_page_config(title = '无该操作权限') 72 | self.render('admin/not_right_bs.html', **ps) 73 | 74 | 75 | class IndexHandler(admin_base_handler.AdminRightBaseHandler): 76 | _rightKey = config.SOCRightConfig['appCode'] + '.Login' 77 | _right = state.operView 78 | 79 | def get(self): 80 | ps = self.get_page_config(title = '欢迎访问') 81 | user = self.get_current_user() 82 | ps['user'] = user 83 | self.render('admin/index_bs.html', **ps) -------------------------------------------------------------------------------- /app/handler/admin/oper_log_handler.py: -------------------------------------------------------------------------------- 1 | #-*- encoding: utf-8 -*- 2 | 3 | 4 | import tornado.web 5 | from tornado.escape import json_decode, json_encode 6 | import config 7 | 8 | from datetime import datetime, timedelta 9 | import admin_base_handler 10 | from common import redis_cache, state, error 11 | from helper import str_helper, http_helper 12 | from logic import role_logic, application_logic, oper_log_logic 13 | 14 | 15 | class OperLogListHandler(admin_base_handler.AdminRightBaseHandler): 16 | _rightKey = config.SOCRightConfig['appCode'] + '.OperLogManager' 17 | _right = state.operView 18 | 19 | def get(self): 20 | ps = self.get_page_config(title = '操作日志列表') 21 | ps['ExportType'] = self.check_oper_right_custom_right(self._rightKey, self._exportUserKey) 22 | operLog = self.get_args(['operUserName', 'action', 'beginTime', 'endTime'], '') 23 | operLog['operID'] = int(self.get_arg('operID', '0')) 24 | ps['page'] = int(self.get_arg('page', '1')) 25 | ps['pagedata'] = oper_log_logic.query_page(operID = operLog['operID'], operUserName = operLog['operUserName'], appCode = '', funcPath = '', action = operLog['action'], operIp = '', beginTime = operLog['beginTime'], endTime = operLog['endTime'], page = ps['page'], size = ps['size']) 26 | ps['operLog'] = operLog 27 | ps['actions'] = state.logAction2 28 | ps['pager'] = self.build_page_html_bs(page=ps['page'], size=ps[ 29 | 'size'], total=ps['pagedata']['total'], pageTotal=ps['pagedata']['pagetotal']) 30 | self.render('admin/operlog/list_bs.html', **ps) 31 | 32 | 33 | class OperLogExportHandler(admin_base_handler.AdminRightBaseHandler): 34 | _rightKey = config.SOCRightConfig['appCode'] + '.OperLogManager' 35 | _right = state.operView 36 | 37 | def get(self): 38 | type = self.check_oper_right_custom_right(self._rightKey, self._exportUserKey) 39 | if type == False: 40 | self.redirect(config.SOCRightConfig['siteDomain']+'Admin/NotRight') 41 | return 42 | 43 | import sys 44 | reload(sys) 45 | sys.setdefaultencoding('utf-8') 46 | ps = self.get_page_config(title = '导出操作日志列表') 47 | 48 | operLog = self.get_args(['operUserName', 'action', 'beginTime', 'endTime'], '') 49 | operLog['operID'] = int(self.get_arg('operID', '0')) 50 | ps['page'] = int(self.get_arg('page', '1')) 51 | ps['pagedata'] = oper_log_logic.query_page(operID = operLog['operID'], operUserName = operLog['operUserName'], appCode = '', funcPath = '', action = operLog['action'], operIp = '', beginTime = operLog['beginTime'], endTime = operLog['endTime'], page = ps['page'], size = 99999) 52 | 53 | #生成excel文件 54 | logs = ps['pagedata']['data'] 55 | info = u''' 56 | 57 | ''' 58 | 59 | for log in logs: 60 | u = u''' 61 | ''' % (str(log['id']), log['operID'], log['operUserName'], 62 | log['operRealName'], log['operIp'], str(log['operTime'])[0:-3], log['appCode'], log['actionname'], str(log['targetType']), 63 | log['targetID'], log['targetName'] ) 64 | info = info + u 65 | info = info + u'
id操作用户ID操作用户名操作用户姓名操作IP操作时间应用编号操作类型操作目标类型操作目标ID操作目标名称
%s%s%s%s%s%s%s%s%s%s%s
' 66 | fileName = config.SOCRightConfig['exportOperLogPath'] + str_helper.get_now_datestr() +'_'+ str_helper.get_uuid() + '.xls' 67 | 68 | path = config.SOCRightConfig['realPath'] + fileName 69 | 70 | file_object = open(path, 'w') 71 | file_object.write(info) 72 | file_object.close( ) 73 | self.redirect(config.SOCRightConfig['siteDomain']+fileName) -------------------------------------------------------------------------------- /app/handler/api/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/handler/api/__init__.py -------------------------------------------------------------------------------- /app/handler/api/api_base_handler.py: -------------------------------------------------------------------------------- 1 | #-*- encoding: utf-8 -*- 2 | 3 | import tornado.web 4 | from datetime import datetime 5 | 6 | import config 7 | from common import state, redis_cache, error 8 | from helper import str_helper 9 | from handler import base_handler 10 | from logic import oper_log_logic 11 | 12 | 13 | class ApiBaseHandler(base_handler.BaseHandler): 14 | 15 | def write_oper_log(self, action, targetType = 0, targetID = '', targetName = '', startStatus = '', endStatus= '', user = None): 16 | if None == user: 17 | return 18 | oper_log_logic.add(operID=user['id'], operUserName=user['name'], operRealName=user['realName'], 19 | appCode='SOCRight', funcPath=self._rightKey, action=action, targetType=targetType, 20 | targetID=targetID, targetName=targetName, startStatus=startStatus, endStatus=endStatus, operIp=self.get_user_ip()) 21 | 22 | -------------------------------------------------------------------------------- /app/handler/api/user_api_handler.py: -------------------------------------------------------------------------------- 1 | #-*- encoding: utf-8 -*- 2 | 3 | import tornado.web 4 | #import tornado.escape 5 | from datetime import datetime 6 | 7 | 8 | import config 9 | from common import state, redis_cache, error 10 | from helper import str_helper 11 | from handler import base_handler 12 | from logic import usergroup_logic, user_logic 13 | 14 | #{"code":0,"msg":"OK","data":{"id": 1, "tel": "123", "email": "treeyh@126.com", "name": "\u4f59\u6d77"}} 15 | #{"code":0,"msg":"OK"} 16 | #{"code":0,"msg":"OK","data":{"id": 1, "tel": "123", "email": "treeyh@126.com", "name": "\u4f59\u6d77", "rights": [{"id":12, "path":"xx.aa","right":1, "customRight": ",1,2,3,"}, {"id":13, "path":"xx.aa.bb","right":1, "customRight": ""}]}} 17 | class UserGetInfoHandler(base_handler.BaseHandler): 18 | def get(self): 19 | token = self.get_arg('token','') 20 | if '' == token: 21 | self.out_fail(code = 1001, msg = 'token') 22 | return 23 | user = redis_cache.getStr(token) 24 | if None == user: 25 | self.out_ok() 26 | return 27 | redis_cache.delete(token) 28 | self.out_ok(user) 29 | return 30 | 31 | class UserByUserGroupHandler(base_handler.BaseHandler): 32 | def get(self): 33 | userGroupID = int(self.get_arg('userGroupID','0')) 34 | if 0 == userGroupID: 35 | self.out_fail(code = 1001, msg = 'userGroupID') 36 | return 37 | 38 | json = usergroup_logic.query_users_by_user_group_cache(userGroupID = userGroupID) 39 | self.out_ok(data = json) 40 | return 41 | 42 | 43 | class UserByUserNameHandler(base_handler.BaseHandler): 44 | def get(self): 45 | userName = self.get_arg('userName','') 46 | if '' == userName: 47 | self.out_fail(code = 1001, msg = 'userName') 48 | return 49 | 50 | user = user_logic.query_user_by_name_cache(name = userName) 51 | if None == users: 52 | self.out_ok(data = '{}') 53 | return 54 | 55 | json = str_helper.json_encode(user) 56 | self.out_ok(data = json) 57 | return 58 | 59 | 60 | class UsersByUserNamesHandler(base_handler.BaseHandler): 61 | def get(self): 62 | names = self.get_arg('names','') 63 | if '' == names: 64 | self.out_fail(code = 1001, msg = 'names') 65 | return 66 | names = str_helper.format_str_to_list_filter_empty(names, ',') 67 | 68 | users = [] 69 | for name in names: 70 | if str_helper.is_null_or_empty(name): 71 | continue 72 | user = user_logic.query_user_by_name_cache(name = name) 73 | if None != user: 74 | users.append(user) 75 | 76 | json = str_helper.json_encode(users) 77 | self.out_ok(data = json) 78 | return 79 | -------------------------------------------------------------------------------- /app/handler/test_handler.py: -------------------------------------------------------------------------------- 1 | #-*- encoding: utf-8 -*- 2 | 3 | from common import redis_cache 4 | from helper import str_helper 5 | from logic import user_logic 6 | import tornado.web 7 | import tornado.escape 8 | from tornado.escape import json_decode 9 | from tornado.escape import json_encode 10 | import config 11 | 12 | from datetime import datetime 13 | import base_handler 14 | 15 | 16 | class TestHandler(base_handler.BaseHandler): 17 | def get(self): 18 | 19 | self.out_ok('','') 20 | 21 | def post(self): 22 | ps = self.get_page_config('登录') 23 | ps['appcode'] = self.get_arg('appcode', ps['appcode']) 24 | username = self.get_arg('username', '') 25 | password = self.get_arg('password', '') 26 | if username == '' or password == '': 27 | self.redirect("/Login?msg=100001") 28 | return 29 | user = user_logic.login(username, password, ps['appcode']) 30 | if None == user: 31 | self.redirect("/Login?msg=100002") 32 | return 33 | uuid = str_helper.get_uuid() 34 | redis_cache.setObj(uuid, user, config.cache['userTimeOut']) 35 | self.set_cookie(name = config.SOCRightConfig['cookiename'], value=uuid, expires=config.cache['userTimeOut']) 36 | self.render("login.html", **ps) 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /app/helper/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/helper/__init__.py -------------------------------------------------------------------------------- /app/helper/http_helper.py: -------------------------------------------------------------------------------- 1 | #-*- encoding: utf-8 -*- 2 | 3 | import urllib 4 | import urllib2 5 | import socket 6 | import sys 7 | 8 | def get(url, params = {}): 9 | try: 10 | c = urllib2.urlopen(url % params) 11 | j = c.read() 12 | return j 13 | except: 14 | print 'http helper error!!!url:%s' % (url % params) 15 | return None 16 | 17 | ###GB18030 18 | def http(url, params = {}, method = 'GET', headers = {}, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, htmlEncode = 'UTF-8', exportEncode = 'UTF-8'): 19 | ''' 20 | HTTP 模拟请求 21 | url:请求地址 22 | params:传入参数,map形式传入 23 | headers:模拟http头 24 | method:http请求模式,默认GET 25 | timeout:超时时间 26 | htmlEncode:请求内容的编码,默认UTF-8 27 | exportEncode:输出内容编码,默认UTF-8 28 | ''' 29 | try: 30 | req = None 31 | if 'GET' == method: 32 | data = urllib.urlencode(params) 33 | url = '%s?%s' % (url , data) 34 | req = urllib2.Request(url = url, headers = headers) 35 | else: 36 | data = urllib.urlencode(params) 37 | req = urllib2.Request(url = url, data = data, headers = headers) 38 | 39 | c = urllib2.urlopen(req, timeout=timeout).read() 40 | if htmlEncode != exportEncode: 41 | c = c.decode(htmlEncode).encode(exportEncode) 42 | return c 43 | except: 44 | print "Unexpected error:", sys.exc_info() 45 | return None -------------------------------------------------------------------------------- /app/logic/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/logic/__init__.py -------------------------------------------------------------------------------- /app/logic/application_logic.py: -------------------------------------------------------------------------------- 1 | #-*- encoding: utf-8 -*- 2 | 3 | from helper import str_helper 4 | from common import mysql, state, error 5 | 6 | 7 | _query_sql = ''' select code, name, developer, url, status, remark, 8 | isDelete, creater, createTime, lastUpdater, lastUpdateTime from sso_application where isDelete = %s ''' 9 | _query_col = str_helper.format_str_to_list_filter_empty('code, name, developer, url, status, remark, isDelete, creater, createTime, lastUpdater, lastUpdateTime', ',') 10 | ''' 分页查询应用信息 ''' 11 | def query_page( name = '', code = '', status = 0, page = 1 , size = 12): 12 | sql = _query_sql 13 | isdelete = state.Boole['false'] 14 | ps = [isdelete] 15 | if 0 != status: 16 | sql = sql + ' and status = %s ' 17 | ps.append(status) 18 | if '' != name: 19 | sql = sql + ' and name like %s ' 20 | ps.append('%'+name+'%') 21 | if '' != code: 22 | sql = sql + ' and code like %s ' 23 | ps.append('%'+code+'%') 24 | sql = sql + ' order by createTime asc ' 25 | yz = tuple(ps) 26 | apps = mysql.find_page(sql, yz, _query_col, page, size) 27 | if None != apps['data']: 28 | for r in apps['data']: 29 | r['statusname'] = state.Status.get(r['status']) 30 | return apps 31 | 32 | ''' 根据编号查询应用信息 ''' 33 | def query_one( code = ''): 34 | sql = _query_sql 35 | isdelete = state.Boole['false'] 36 | ps = [isdelete] 37 | if '' != code: 38 | sql = sql + ' and code = %s ' 39 | ps.append(code) 40 | else: 41 | return None 42 | yz = tuple(ps) 43 | app = mysql.find_one(sql, yz, _query_col) 44 | if None != app: 45 | app['statusname'] = state.Status.get(app['status']) 46 | return app 47 | 48 | ''' 根据名称查询应用信息 ''' 49 | def query_one_by_name( name = ''): 50 | sql = _query_sql 51 | isdelete = state.Boole['false'] 52 | sql = sql + ' and name = %s ' 53 | yz = (isdelete, name) 54 | app = mysql.find_one(sql, yz, _query_col) 55 | if None != app: 56 | app['statusname'] = state.Status.get(app['status']) 57 | return app 58 | 59 | _query_all_by_active_sql = ''' select code, name from sso_application where isDelete = %s ''' 60 | _query_all_by_active_col = str_helper.format_str_to_list_filter_empty('code, name', ',') 61 | ''' 查询所有可用的应用 ''' 62 | def query_all_by_active(): 63 | sql = _query_all_by_active_sql 64 | 65 | isdelete = state.Boole['false'] 66 | sql = sql + ' and status = %s order by createTime asc ' 67 | yz = (isdelete, state.statusActive) 68 | apps = mysql.find_all(sql, yz, _query_all_by_active_col) 69 | return apps 70 | 71 | 72 | _add_sql = ''' INSERT INTO sso_application(code, name, developer, url, status, remark, 73 | isDelete, creater, createTime, lastUpdater, lastUpdateTime) 74 | VALUES(%s, %s, %s, %s, %s, %s, %s, %s, now(), %s, now()) ''' 75 | ''' 添加应用 ''' 76 | def add(name, code, developer, url, status, remark, user): 77 | obj = query_one_by_name(name = name) 78 | if None != obj: 79 | raise error.RightError(code = 101001) 80 | obj = query_one(code = code) 81 | if None != obj: 82 | raise error.RightError(code = 101005) 83 | 84 | isdelete = state.Boole['false'] 85 | yz = (code, name, developer, url, status, remark, isdelete, user, user) 86 | result = mysql.insert_or_update_or_delete(_add_sql, yz) 87 | return 0 == result 88 | 89 | 90 | _update_sql = ''' update sso_application set name = %s, developer = %s, 91 | url = %s, status = %s, remark = %s, lastUpdater = %s, 92 | lastUpdateTime = now() where code = %s ''' 93 | ''' 更新应用 ''' 94 | def update( name, code, developer, url, status, remark, user): 95 | obj = query_one_by_name(name = name) 96 | if None != obj and obj['code'] != str(code): 97 | raise error.RightError(code = 101001) 98 | 99 | isdelete = state.Boole['false'] 100 | yz = (name, developer, url, status, remark, user, code) 101 | result = mysql.insert_or_update_or_delete(_update_sql, yz) 102 | return 0 == result 103 | 104 | 105 | _delete_sql = ''' update sso_application set isDelete = %s, lastUpdater = %s, 106 | lastUpdateTime = now() where code = %s ''' 107 | ''' 删除应用 ''' 108 | def delete(code, user): 109 | isdelete = state.Boole['true'] 110 | yz = (isdelete, user, code) 111 | result = mysql.insert_or_update_or_delete(_delete_sql, yz) 112 | return 0 == result 113 | -------------------------------------------------------------------------------- /app/logic/department_logic.py: -------------------------------------------------------------------------------- 1 | #-*- encoding: utf-8 -*- 2 | 3 | from helper import str_helper 4 | from common import mysql, state, error 5 | 6 | 7 | _query_sql = ''' select id, `name`, `status`, remark, isDelete, 8 | creater, createTime, lastUpdater, lastUpdateTime 9 | from sso_department where isDelete = %s ''' 10 | _query_col = str_helper.format_str_to_list_filter_empty('id, name, status, remark, isDelete, creater, createTime, lastUpdater, lastUpdateTime', ',') 11 | ''' 分页查询部门信息 ''' 12 | def query_page(name = '', status = 0, page = 1 , size = 12): 13 | sql = _query_sql 14 | isdelete = state.Boole['false'] 15 | ps = [isdelete] 16 | if 0 != status: 17 | sql = sql + ' and status = %s ' 18 | ps.append(status) 19 | if '' != name: 20 | sql = sql + ' and name like %s ' 21 | ps.append('%'+name+'%') 22 | 23 | sql = sql + ' order by createTime asc ' 24 | yz = tuple(ps) 25 | deps = mysql.find_page(sql, yz, _query_col, page, size) 26 | if None != deps['data']: 27 | for r in deps['data']: 28 | r['statusname'] = state.Status.get(r['status']) 29 | return deps 30 | 31 | ''' 根据编号查询部门信息 ''' 32 | def query_one(id = 0): 33 | sql = _query_sql 34 | isdelete = state.Boole['false'] 35 | ps = [isdelete] 36 | if 0 != id: 37 | sql = sql + ' and id = %s ' 38 | ps.append(id) 39 | else: 40 | return None 41 | yz = tuple(ps) 42 | dep = mysql.find_one(sql, yz, _query_col) 43 | if None != dep: 44 | dep['statusname'] = state.Status.get(dep['status']) 45 | return dep 46 | 47 | ''' 根据名称查询部门信息 ''' 48 | def query_one_by_name(name = ''): 49 | sql = _query_sql 50 | isdelete = state.Boole['false'] 51 | sql = sql + ' and name = %s ' 52 | yz = (isdelete, name) 53 | dep = mysql.find_one(sql, yz, _query_col) 54 | if None != dep: 55 | dep['statusname'] = state.Status.get(dep['status']) 56 | return dep 57 | 58 | _query_all_by_active_sql = ''' select id, name from sso_department where isDelete = %s ''' 59 | _query_all_by_active_col = str_helper.format_str_to_list_filter_empty('id, name', ',') 60 | ''' 查询所有可用的部门 ''' 61 | def query_all_by_active(): 62 | sql = _query_all_by_active_sql 63 | 64 | isdelete = state.Boole['false'] 65 | sql = sql + ' and status = %s order by createTime asc ' 66 | yz = (isdelete, state.statusActive) 67 | deps = mysql.find_all(sql, yz, _query_all_by_active_col) 68 | return deps 69 | 70 | 71 | _add_sql = ''' INSERT INTO sso_department(name, status, remark, 72 | isDelete, creater, createTime, lastUpdater, lastUpdateTime) 73 | VALUES(%s, %s, %s, %s, %s, now(), %s, now()) ''' 74 | ''' 添加部门 ''' 75 | def add( name, status, remark, user): 76 | obj = query_one_by_name(name = name) 77 | if None != obj: 78 | raise error.RightError(code = 106001) 79 | 80 | isdelete = state.Boole['false'] 81 | yz = (name, status, remark, isdelete, user, user) 82 | result = mysql.insert_or_update_or_delete(_add_sql, yz) 83 | return 0 == result 84 | 85 | 86 | _update_sql = ''' update sso_department set name = %s, status = %s, 87 | remark = %s, lastUpdater = %s, 88 | lastUpdateTime = now() where id = %s ''' 89 | ''' 更新部门 ''' 90 | def update(id, name, status, remark, user): 91 | obj = query_one_by_name(name = name) 92 | if None != obj and str(obj['id']) != str(id): 93 | raise error.RightError(code = 106001) 94 | 95 | isdelete = state.Boole['false'] 96 | yz = (name, status, remark, user, id) 97 | result = mysql.insert_or_update_or_delete(_update_sql, yz) 98 | return 0 == result 99 | 100 | 101 | _delete_sql = ''' update sso_department set isDelete = %s, lastUpdater = %s, 102 | lastUpdateTime = now() where id = %s ''' 103 | ''' 删除部门 ''' 104 | def delete(id, user): 105 | isdelete = state.Boole['true'] 106 | yz = (isdelete, user, id) 107 | result = mysql.insert_or_update_or_delete(_delete_sql, yz) 108 | return 0 == result 109 | -------------------------------------------------------------------------------- /app/logic/oper_log_logic.py: -------------------------------------------------------------------------------- 1 | #-*- encoding: utf-8 -*- 2 | 3 | from helper import str_helper 4 | from common import mysql, state, error 5 | 6 | 7 | _query_sql = ''' select id, operID, operUserName, operRealName, appCode, funcPath, 8 | action, targetType, targetID, targetName, startStatus, endStatus, operIp, operTime from sso_oper_log as u where 1 = 1 ''' 9 | _query_col = str_helper.format_str_to_list_filter_empty( 10 | 'id, operID, operUserName, operRealName, appCode, funcPath, action, targetType, targetID, targetName, startStatus, endStatus, operIp, operTime ', ',') 11 | def query_page( operID , operUserName, appCode, funcPath, action, operIp, beginTime, endTime, page, size): 12 | sql = _query_sql 13 | ps = [] 14 | if None != operID and 0 != operID: 15 | sql = sql + ' and u.operID = %s ' 16 | ps.append(operID) 17 | if None != operUserName and '' != operUserName: 18 | sql = sql + ' and u.operUserName = %s ' 19 | ps.append(operUserName) 20 | if None != appCode and '' != appCode: 21 | sql = sql + ' and u.appCode = %s ' 22 | ps.append(appCode) 23 | if None != funcPath and '' != funcPath: 24 | sql = sql + ' and u.funcPath = %s ' 25 | ps.append(funcPath) 26 | if None != action and '' != action: 27 | sql = sql + ' and u.action = %s ' 28 | ps.append(action) 29 | if None != operIp and '' != operIp: 30 | sql = sql + ' and u.operIp = %s ' 31 | ps.append(operIp) 32 | if None != beginTime and '' != beginTime: 33 | sql = sql + ' and u.operTime >= %s ' 34 | ps.append(beginTime + ' 00:00:00') 35 | if None != endTime and '' != endTime: 36 | sql = sql + ' and u.operTime <= %s ' 37 | ps.append(endTime+ ' 23:59:59') 38 | 39 | yz = tuple(ps) 40 | sql = sql + ' order by u.id desc ' 41 | logs = mysql.find_page(sql, yz, _query_col, page, size) 42 | if None != logs['data']: 43 | for r in logs['data']: 44 | # r['operTime'] = str(r['operTime'])[0:20] 45 | r['actionname'] = state.logAction[r['action']] 46 | return logs 47 | 48 | 49 | 50 | _add_sql = ''' INSERT INTO sso_oper_log (operID, operUserName, operRealName, appCode, funcPath, 51 | action, targetType, targetID, targetName, startStatus, endStatus, operIp, operTime) 52 | VALUES(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, now() ) ''' 53 | ''' 添加日志 ''' 54 | 55 | def add(operID, operUserName, operRealName, appCode, funcPath, action, 56 | targetType=0, targetID='', targetName='', startStatus='', endStatus='', operIp=''): 57 | yz = (operID, operUserName, operRealName, appCode, funcPath, action, 58 | targetType, targetID, targetName, startStatus, endStatus, operIp) 59 | result = mysql.insert_or_update_or_delete(_add_sql, yz) 60 | return 0 == result 61 | -------------------------------------------------------------------------------- /app/proxy/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/proxy/__init__.py -------------------------------------------------------------------------------- /app/proxy/soc_right_proxy.py: -------------------------------------------------------------------------------- 1 | #-*- encoding: utf-8 -*- 2 | 3 | from tornado.escape import url_escape 4 | 5 | from helper import http_helper, str_helper 6 | import config 7 | 8 | def _format_url(url, params): 9 | if '?' in url: 10 | url = '%s&' % url 11 | else: 12 | url = '%s?' % url 13 | for k in params.keys(): 14 | url = '%s%s=%s&' % (url, k, url_escape(params[k])) 15 | return url 16 | 17 | def _http_get(url, params): 18 | url = _format_url(url, params) 19 | json = http_helper.get(url) 20 | obj = str_helper.json_decode(json) 21 | 22 | if None == obj or obj['code'] != 0: 23 | return None 24 | return obj.get('data', None) 25 | 26 | 27 | def get_login_user(token): 28 | params = {'token': token} 29 | url = '%sUser/Get' % (config.urls['socRightApi']) 30 | obj = _http_get(url, params) 31 | return obj 32 | 33 | 34 | def get_users_by_usergroup(userGroupID): 35 | params = {'userGroupID': str(userGroupID)} 36 | url = '%sUser/GetByUserGroup' % (config.urls['socRightApi']) 37 | return _http_get(url, params) 38 | 39 | 40 | def get_user_by_name(userName): 41 | params = {'userName': userName} 42 | url = '%sUser/GetByUserName' % (config.urls['socRightApi']) 43 | return _http_get(url, params) 44 | 45 | -------------------------------------------------------------------------------- /app/start.py: -------------------------------------------------------------------------------- 1 | #-*- encoding: utf-8 -*- 2 | 3 | import os 4 | import tornado.httpserver 5 | import tornado.ioloop 6 | import tornado.options 7 | import tornado.web 8 | import config 9 | import route 10 | 11 | from tornado.options import define, options 12 | 13 | define("port", default=9801, help="Count Run server on a specific port", type=int) 14 | define("service_log_file", default='./logs/sso.log', help="Count Run server on service_log_file", type=str) 15 | 16 | class Application(tornado.web.Application): 17 | def __init__(self): 18 | tornado.web.Application.__init__(self, route.route, **(config.settings)) 19 | 20 | 21 | def main(): 22 | tornado.options.parse_command_line() 23 | 24 | config.log_path = options.service_log_file 25 | http_server = tornado.httpserver.HTTPServer(Application()) 26 | http_server.listen(options.port) 27 | tornado.ioloop.IOLoop.instance().start() 28 | 29 | 30 | if __name__ == "__main__": 31 | main() 32 | -------------------------------------------------------------------------------- /app/static/css/style.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | margin: 0; 4 | background-color:##F5F5F5; 5 | } 6 | body, table, input, textarea, select 7 | { 8 | font-family: 微软雅黑,Verdana,sans-serif,宋体; 9 | font-size:12px; 10 | } 11 | 12 | .red{color:red;} 13 | .g{ color: #D25900;} 14 | 15 | .linetable{border-collapse: collapse;border: none;width: 400px;} 16 | .linetable td{border: solid #B9B9B9 1px;} 17 | .linetable .head{height: 45px;padding:0;} 18 | .linetable .head .title{font-size:24px; margin:0; padding:0; padding-left:10px; float:left;} 19 | .linetable .head .funcs{float:left; width:400px; height:40px; line-height:40px;font-size:14px; padding-left:250px;} 20 | .linetable .head .userinfo{float:right;width:250px; height:40px; line-height:40px;font-size:14px; } 21 | .linetable .head .userinfo .logout{float:right; margin-right:15px;} 22 | .linetable .menumain{width: 150px; vertical-align:top; overflow:hidden;} 23 | .linetable .menucon{width: 5px; cursor: pointer; font-size: 8px;} 24 | .linetable .foot{height: 20px;} 25 | 26 | 27 | 28 | 29 | .titlediv{height: 22px; width: 100%; border-bottom: solid #B9B9B9 1px;} 30 | .titlediv h1{font-size: 14px; font-weight: bolder; margin: 5px 0 0 3px;} 31 | .titlediv .userinfo{float:right;width:250px; height:40px; line-height:40px;font-size:14px; } 32 | .titlediv .userinfo .logout{float:right; margin-right:15px;} 33 | 34 | .inputdiv{width: 100%; text-align:center;} 35 | .inputtable{border-collapse: collapse;border: none;width:99%;margin:auto; margin-top:3px; margin-bottom:2px;} 36 | .inputtable td{border: solid #B9B9B9 1px;height: 25px;padding: 3px 0 3px 2px;text-align: left; font-size:12px;} 37 | .inputtable td input{width:150px;height:22px; line-height:20px;} 38 | 39 | .cbtable{border-collapse: collapse;border: none;width:99%;margin:auto; margin-top:3px; margin-bottom:2px;} 40 | .cbtable td{border: solid #B9B9B9 1px;height: 25px;padding: 3px 0 3px 2px;text-align: left; font-size:12px;} 41 | .cbtable td input{width:15px;height:18px; float:left;} 42 | .cbtable td label{ margin-right:10px; line-height:22px; float:left;} 43 | .cbtable .td{border: solid #B9B9B9 1px; text-align: left; font-size:12px;padding: 0;} 44 | .cbtable tr.head{background:#03468F;color:#FFFFFF;} 45 | .cbtable tr.alt{ background: #B8DDF3;} 46 | .cbtable tr.over{background:#9DE6A3;color:#000;}/*color:#FC3646;*/ 47 | 48 | .cb2table{border-collapse: collapse;border: none;width:100%;margin:auto;} 49 | .cb2table td{height: 20px;text-align: left; font-size:12px;} 50 | .cb2table td input{width:15px;height:18px; float:left;} 51 | .cb2table td label{ margin-right:10px; line-height:22px; float:left;} 52 | 53 | 54 | .showdiv{width: 100%; text-align:center; border-top: dashed #B9B9B9 1px;} 55 | .showtable{border-collapse: collapse;border: none;width:99%;margin:auto; margin-top:3px;} 56 | .showtable td{border: solid #B9B9B9 1px;height: 25px; text-align: left;} 57 | .showtable tr.head{background:#03468F;color:#FFFFFF; text-align: center;} 58 | .showtable tr.head td{text-align: center;} 59 | .showtable tr.alt{background:#B8DDF3;} 60 | .showtable tr.over{background:#9DE6A3;color:#000;}/*color:#FC3646;*/ 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /app/static/js/My97DatePicker/lang/en.js: -------------------------------------------------------------------------------- 1 | var $lang={ 2 | errAlertMsg: "Invalid date or the date out of range,redo or not?", 3 | aWeekStr: ["wk", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], 4 | aLongWeekStr:["wk","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"], 5 | aMonStr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], 6 | aLongMonStr: ["January","February","March","April","May","June","July","August","September","October","November","December"], 7 | clearStr: "Clear", 8 | todayStr: "Today", 9 | okStr: "OK", 10 | updateStr: "OK", 11 | timeStr: "Time", 12 | quickStr: "Quick Selection", 13 | err_1: 'MinDate Cannot be bigger than MaxDate!' 14 | } -------------------------------------------------------------------------------- /app/static/js/My97DatePicker/lang/zh-cn.js: -------------------------------------------------------------------------------- 1 | var $lang={ 2 | errAlertMsg: "\u4E0D\u5408\u6CD5\u7684\u65E5\u671F\u683C\u5F0F\u6216\u8005\u65E5\u671F\u8D85\u51FA\u9650\u5B9A\u8303\u56F4,\u9700\u8981\u64A4\u9500\u5417?", 3 | aWeekStr: ["\u5468","\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"], 4 | aLongWeekStr:["\u5468","\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"], 5 | aMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00","\u5341\u4E8C"], 6 | aLongMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"], 7 | clearStr: "\u6E05\u7A7A", 8 | todayStr: "\u4ECA\u5929", 9 | okStr: "\u786E\u5B9A", 10 | updateStr: "\u786E\u5B9A", 11 | timeStr: "\u65F6\u95F4", 12 | quickStr: "\u5FEB\u901F\u9009\u62E9", 13 | err_1: '\u6700\u5C0F\u65E5\u671F\u4E0D\u80FD\u5927\u4E8E\u6700\u5927\u65E5\u671F!' 14 | } -------------------------------------------------------------------------------- /app/static/js/My97DatePicker/lang/zh-tw.js: -------------------------------------------------------------------------------- 1 | var $lang={ 2 | errAlertMsg: "\u4E0D\u5408\u6CD5\u7684\u65E5\u671F\u683C\u5F0F\u6216\u8005\u65E5\u671F\u8D85\u51FA\u9650\u5B9A\u7BC4\u570D,\u9700\u8981\u64A4\u92B7\u55CE?", 3 | aWeekStr: ["\u5468","\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"], 4 | aLongWeekStr:["\u5468","\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"], 5 | aMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00","\u5341\u4E8C"], 6 | aLongMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"], 7 | clearStr: "\u6E05\u7A7A", 8 | todayStr: "\u4ECA\u5929", 9 | okStr: "\u78BA\u5B9A", 10 | updateStr: "\u78BA\u5B9A", 11 | timeStr: "\u6642\u9593", 12 | quickStr: "\u5FEB\u901F\u9078\u64C7", 13 | err_1: '\u6700\u5C0F\u65E5\u671F\u4E0D\u80FD\u5927\u65BC\u6700\u5927\u65E5\u671F!' 14 | } -------------------------------------------------------------------------------- /app/static/js/My97DatePicker/skin/WdatePicker.css: -------------------------------------------------------------------------------- 1 | .Wdate{ 2 | border:#999 1px solid; 3 | /*height:20px;*/ 4 | background:#fff url(datePicker.gif) no-repeat right; 5 | } 6 | .Wdate::-ms-clear{display:none;} 7 | 8 | .WdateFmtErr{ 9 | font-weight:bold; 10 | color:red; 11 | } -------------------------------------------------------------------------------- /app/static/js/My97DatePicker/skin/datePicker.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/My97DatePicker/skin/datePicker.gif -------------------------------------------------------------------------------- /app/static/js/My97DatePicker/skin/default/datepicker.css: -------------------------------------------------------------------------------- 1 | /* 2 | * My97 DatePicker 4.8 3 | */ 4 | 5 | .WdateDiv{ 6 | width:180px; 7 | background-color:#FFFFFF; 8 | border:#bbb 1px solid; 9 | padding:2px; 10 | } 11 | 12 | .WdateDiv2{ 13 | width:360px; 14 | } 15 | .WdateDiv *{font-size:9pt;} 16 | 17 | .WdateDiv .NavImg a{ 18 | display:block; 19 | cursor:pointer; 20 | height:16px; 21 | width:16px; 22 | } 23 | 24 | .WdateDiv .NavImgll a{ 25 | float:left; 26 | background:transparent url(img.gif) no-repeat scroll 0 0; 27 | } 28 | .WdateDiv .NavImgl a{ 29 | float:left; 30 | background:transparent url(img.gif) no-repeat scroll -16px 0; 31 | } 32 | .WdateDiv .NavImgr a{ 33 | float:right; 34 | background:transparent url(img.gif) no-repeat scroll -32px 0; 35 | } 36 | .WdateDiv .NavImgrr a{ 37 | float:right; 38 | background:transparent url(img.gif) no-repeat scroll -48px 0; 39 | } 40 | 41 | .WdateDiv #dpTitle{ 42 | height:24px; 43 | margin-bottom:2px; 44 | padding:1px; 45 | } 46 | 47 | .WdateDiv .yminput{ 48 | margin-top:2px; 49 | text-align:center; 50 | height:20px; 51 | border:0px; 52 | width:50px; 53 | cursor:pointer; 54 | } 55 | 56 | .WdateDiv .yminputfocus{ 57 | margin-top:2px; 58 | text-align:center; 59 | font-weight:bold; 60 | height:20px; 61 | color:blue; 62 | border:#ccc 1px solid; 63 | width:50px; 64 | } 65 | 66 | .WdateDiv .menuSel{ 67 | z-index:1; 68 | position:absolute; 69 | background-color:#FFFFFF; 70 | border:#ccc 1px solid; 71 | display:none; 72 | } 73 | 74 | .WdateDiv .menu{ 75 | cursor:pointer; 76 | background-color:#fff; 77 | } 78 | 79 | .WdateDiv .menuOn{ 80 | cursor:pointer; 81 | background-color:#BEEBEE; 82 | } 83 | 84 | .WdateDiv .invalidMenu{ 85 | color:#aaa; 86 | } 87 | 88 | .WdateDiv .YMenu{ 89 | margin-top:20px; 90 | 91 | } 92 | 93 | .WdateDiv .MMenu{ 94 | margin-top:20px; 95 | *width:62px; 96 | } 97 | 98 | .WdateDiv .hhMenu{ 99 | margin-top:-90px; 100 | margin-left:26px; 101 | } 102 | 103 | .WdateDiv .mmMenu{ 104 | margin-top:-46px; 105 | margin-left:26px; 106 | } 107 | 108 | .WdateDiv .ssMenu{ 109 | margin-top:-24px; 110 | margin-left:26px; 111 | } 112 | 113 | .WdateDiv .Wweek { 114 | text-align:center; 115 | background:#DAF3F5; 116 | border-right:#BDEBEE 1px solid; 117 | } 118 | 119 | .WdateDiv .MTitle{ 120 | background-color:#BDEBEE; 121 | } 122 | .WdateDiv .WdayTable2{ 123 | border-collapse:collapse; 124 | border:#c5d9e8 1px solid; 125 | } 126 | .WdateDiv .WdayTable2 table{ 127 | border:0; 128 | } 129 | 130 | .WdateDiv .WdayTable{ 131 | line-height:20px; 132 | border:#c5d9e8 1px solid; 133 | } 134 | .WdateDiv .WdayTable td{ 135 | text-align:center; 136 | } 137 | 138 | .WdateDiv .Wday{ 139 | cursor:pointer; 140 | } 141 | 142 | .WdateDiv .WdayOn{ 143 | cursor:pointer; 144 | background-color:#C0EBEF; 145 | } 146 | 147 | .WdateDiv .Wwday{ 148 | cursor:pointer; 149 | color:#FF2F2F; 150 | } 151 | 152 | .WdateDiv .WwdayOn{ 153 | cursor:pointer; 154 | color:#000; 155 | background-color:#C0EBEF; 156 | } 157 | .WdateDiv .Wtoday{ 158 | cursor:pointer; 159 | color:blue; 160 | } 161 | .WdateDiv .Wselday{ 162 | background-color:#A9E4E9; 163 | } 164 | .WdateDiv .WspecialDay{ 165 | background-color:#66F4DF; 166 | } 167 | 168 | .WdateDiv .WotherDay{ 169 | cursor:pointer; 170 | color:#6A6AFF; 171 | } 172 | 173 | .WdateDiv .WotherDayOn{ 174 | cursor:pointer; 175 | background-color:#C0EBEF; 176 | } 177 | 178 | .WdateDiv .WinvalidDay{ 179 | color:#aaa; 180 | } 181 | 182 | .WdateDiv #dpTime{ 183 | float:left; 184 | margin-top:3px; 185 | margin-right:30px; 186 | } 187 | 188 | .WdateDiv #dpTime #dpTimeStr{ 189 | margin-left:1px; 190 | } 191 | 192 | .WdateDiv #dpTime input{ 193 | width:18px; 194 | height:20px; 195 | text-align:center; 196 | border:#ccc 1px solid; 197 | } 198 | 199 | .WdateDiv #dpTime .tB{ 200 | border-right:0px; 201 | } 202 | 203 | .WdateDiv #dpTime .tE{ 204 | border-left:0; 205 | border-right:0; 206 | } 207 | 208 | .WdateDiv #dpTime .tm{ 209 | width:7px; 210 | border-left:0; 211 | border-right:0; 212 | } 213 | 214 | .WdateDiv #dpTime #dpTimeUp{ 215 | height:10px; 216 | width:13px; 217 | border:0px; 218 | background:url(img.gif) no-repeat -32px -16px; 219 | } 220 | 221 | .WdateDiv #dpTime #dpTimeDown{ 222 | height:10px; 223 | width:13px; 224 | border:0px; 225 | background:url(img.gif) no-repeat -48px -16px; 226 | } 227 | 228 | .WdateDiv #dpQS { 229 | float:left; 230 | margin-right:3px; 231 | margin-top:3px; 232 | background:url(img.gif) no-repeat 0px -16px; 233 | width:20px; 234 | height:20px; 235 | cursor:pointer; 236 | } 237 | .WdateDiv #dpControl { 238 | text-align:right; 239 | } 240 | .WdateDiv .dpButton{ 241 | height:20px; 242 | width:45px; 243 | border:#ccc 1px solid; 244 | margin-top:2px; 245 | margin-right:1px; 246 | } -------------------------------------------------------------------------------- /app/static/js/My97DatePicker/skin/default/img.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/My97DatePicker/skin/default/img.gif -------------------------------------------------------------------------------- /app/static/js/My97DatePicker/skin/whyGreen/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/My97DatePicker/skin/whyGreen/bg.jpg -------------------------------------------------------------------------------- /app/static/js/My97DatePicker/skin/whyGreen/img.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/My97DatePicker/skin/whyGreen/img.gif -------------------------------------------------------------------------------- /app/static/js/bootstrap/css/bs_style.css: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | 登录页面样式 4 | */ 5 | .form-signin { 6 | max-width: 330px; 7 | padding: 15px; 8 | margin: 0 auto; 9 | margin-top: 120px; 10 | } 11 | .form-signin .form-signin-heading, 12 | .form-signin .checkbox { 13 | margin-bottom: 10px; 14 | } 15 | .form-signin .checkbox { 16 | font-weight: normal; 17 | } 18 | .form-signin .form-control { 19 | position: relative; 20 | font-size: 16px; 21 | height: auto; 22 | padding: 10px; 23 | -webkit-box-sizing: border-box; 24 | -moz-box-sizing: border-box; 25 | box-sizing: border-box; 26 | } 27 | .form-signin .form-control:focus { 28 | z-index: 2; 29 | } 30 | 31 | /* 页头样式 */ 32 | .navbar-wrapper{position:absolute;top:0;left:0;right:0;z-index:20} 33 | @media screen and (min-width:768px){.navbar-wrapper.affix{position:fixed;margin-top:0}.navbar-wrapper.affix>.container{width:100%;padding-left:0;padding-right:0} .navbar-wrapper.affix .navbar{border-radius:0}}.navbar-wrapper .container{padding-left:0;padding-right:0} 34 | .navbar-wrapper .navbar{padding-left:15px;padding-right:15px} 35 | @media (min-width:768px){.navbar{min-height:44px}.navbar .navbar-header{float:right} .navbar .navbar-nav>li>a{padding-top:12px;padding-bottom:12px} .navbar .navbar-brand{padding-top:12px;padding-bottom:12px}}.carousel{height:460px} 36 | 37 | 38 | .red{ 39 | color:red; 40 | margin-right:5px; 41 | } 42 | .ur { 43 | color: #D25900; 44 | font-weight: border; 45 | } 46 | .m-r10{ 47 | margin-right: 10px; 48 | } 49 | .m-0{ 50 | margin:0px; 51 | } -------------------------------------------------------------------------------- /app/static/js/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /app/static/js/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /app/static/js/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /app/static/js/common.js: -------------------------------------------------------------------------------- 1 | var Common = { 2 | alert: function (msg, gotoUrl) { 3 | if (msg != undefined && msg != '') { 4 | alert(msg); 5 | if (undefined != gotoUrl && gotoUrl != '') { 6 | window.location.href = gotoUrl; 7 | } 8 | } 9 | }, 10 | resetContent: function(){ 11 | var h = $(window).height(); 12 | var hh = $('.navbar').outerHeight(true); 13 | // var fh = $('#footer').outerHeight(true); 14 | var fh = 3; 15 | var height = h - hh - fh; 16 | if(height > 300){ 17 | $('#wrap').height(height); 18 | }else{ 19 | $('#wrap').height(300); 20 | } 21 | }, 22 | backPage:function(){ 23 | var url = $('#refUrl').val(); 24 | if(undefined == url || '' == url){ 25 | return; 26 | } 27 | window.location.href = url; 28 | }, 29 | goToPage: function(url, pageTotal){ 30 | var page = $('#btGoToPage').val(); 31 | var p = parseInt(page); 32 | if(p <= 0 || p > pageTotal){ 33 | Common.alert('填入数量不符合要求.'); 34 | return; 35 | } 36 | url = url + p; 37 | if($('#refUrl').length > 0 && url.indexOf('refUrl=') < 0){ 38 | var aback = $('#refUrl')[0].href; 39 | url = "&refUrl="+enencodeURIComponent(aback); 40 | } 41 | 42 | window.location.href = url; 43 | } 44 | }; 45 | 46 | -------------------------------------------------------------------------------- /app/static/js/ichecker/jquery.icheck.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * iCheck v0.9.1 jQuery plugin, http://git.io/uhUPMA 3 | */ 4 | (function(f){function C(a,c,d){var b=a[0],e=/er/.test(d)?k:/bl/.test(d)?u:j;active=d==E?{checked:b[j],disabled:b[u],indeterminate:"true"==a.attr(k)||"false"==a.attr(v)}:b[e];if(/^(ch|di|in)/.test(d)&&!active)p(a,e);else if(/^(un|en|de)/.test(d)&&active)w(a,e);else if(d==E)for(var e in active)active[e]?p(a,e,!0):w(a,e,!0);else if(!c||"toggle"==d){if(!c)a[r]("ifClicked");active?b[l]!==x&&w(a,e):p(a,e)}}function p(a,c,d){var b=a[0],e=a.parent(),g=c==j,H=c==k,m=H?v:g?I:"enabled",r=h(b,m+y(b[l])),L=h(b, 5 | c+y(b[l]));if(!0!==b[c]){if(!d&&c==j&&b[l]==x&&b.name){var p=a.closest("form"),s='input[name="'+b.name+'"]',s=p.length?p.find(s):f(s);s.each(function(){this!==b&&f.data(this,n)&&w(f(this),c)})}H?(b[c]=!0,b[j]&&w(a,j,"force")):(d||(b[c]=!0),g&&b[k]&&w(a,k,!1));J(a,g,c,d)}b[u]&&h(b,z,!0)&&e.find("."+F).css(z,"default");e[t](L||h(b,c));e[A](r||h(b,m)||"")}function w(a,c,d){var b=a[0],e=a.parent(),g=c==j,f=c==k,m=f?v:g?I:"enabled",n=h(b,m+y(b[l])),p=h(b,c+y(b[l]));if(!1!==b[c]){if(f||!d||"force"==d)b[c]= 6 | !1;J(a,g,m,d)}!b[u]&&h(b,z,!0)&&e.find("."+F).css(z,"pointer");e[A](p||h(b,c)||"");e[t](n||h(b,m))}function K(a,c){if(f.data(a,n)){var d=f(a);d.parent().html(d.attr("style",f.data(a,n).s||"")[r](c||""));d.off(".i").unwrap();f(D+'[for="'+a.id+'"]').add(d.closest(D)).off(".i")}}function h(a,c,d){if(f.data(a,n))return f.data(a,n).o[c+(d?"":"Class")]}function y(a){return a.charAt(0).toUpperCase()+a.slice(1)}function J(a,c,d,b){if(!b){if(c)a[r]("ifToggled");a[r]("ifChanged")[r]("if"+y(d))}}var n="iCheck", 7 | F=n+"-helper",x="radio",j="checked",I="un"+j,u="disabled",v="determinate",k="in"+v,E="update",l="type",t="addClass",A="removeClass",r="trigger",D="label",z="cursor",G=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini/i.test(navigator.userAgent);f.fn[n]=function(a,c){var d=":checkbox, :"+x,b=f(),e=function(a){a.each(function(){var a=f(this);b=a.is(d)?b.add(a):b.add(a.find(d))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(a))return a=a.toLowerCase(), 8 | e(this),b.each(function(){"destroy"==a?K(this,"ifDestroyed"):C(f(this),!0,a);f.isFunction(c)&&c()});if("object"==typeof a||!a){var g=f.extend({checkedClass:j,disabledClass:u,indeterminateClass:k,labelHover:!0},a),h=g.handle,m=g.hoverClass||"hover",y=g.focusClass||"focus",v=g.activeClass||"active",z=!!g.labelHover,s=g.labelHoverClass||"hover",B=(""+g.increaseArea).replace("%","")|0;if("checkbox"==h||h==x)d=":"+h;-50>B&&(B=-50);e(this);return b.each(function(){K(this);var a=f(this),b=this,c=b.id,d= 9 | -B+"%",e=100+2*B+"%",e={position:"absolute",top:d,left:d,display:"block",width:e,height:e,margin:0,padding:0,background:"#fff",border:0,opacity:0},d=G?{position:"absolute",visibility:"hidden"}:B?e:{position:"absolute",opacity:0},h="checkbox"==b[l]?g.checkboxClass||"icheckbox":g.radioClass||"i"+x,k=f(D+'[for="'+c+'"]').add(a.closest(D)),q=a.wrap('
')[r]("ifCreated").parent().append(g.insert),e=f('').css(e).appendTo(q);a.data(n,{o:g,s:a.attr("style")}).css(d); 10 | g.inheritClass&&q[t](b.className);g.inheritID&&c&&q.attr("id",n+"-"+c);"static"==q.css("position")&&q.css("position","relative");C(a,!0,E);if(k.length)k.on("click.i mouseenter.i mouseleave.i touchbegin.i touchend.i",function(c){var d=c[l],e=f(this);if(!b[u])if("click"==d?C(a,!1,!0):z&&(/ve|nd/.test(d)?(q[A](m),e[A](s)):(q[t](m),e[t](s))),G)c.stopPropagation();else return!1});a.on("click.i focus.i blur.i keyup.i keydown.i keypress.i",function(c){var d=c[l];c=c.keyCode;if("click"==d)return!1;if("keydown"== 11 | d&&32==c)return b[l]==x&&b[j]||(b[j]?w(a,j):p(a,j)),!1;if("keyup"==d&&b[l]==x)!b[j]&&p(a,j);else if(/us|ur/.test(d))q["blur"==d?A:t](y)});e.on("click mousedown mouseup mouseover mouseout touchbegin.i touchend.i",function(d){var c=d[l],e=/wn|up/.test(c)?v:m;if(!b[u]){if("click"==c)C(a,!1,!0);else{if(/wn|er|in/.test(c))q[t](e);else q[A](e+" "+v);if(k.length&&z&&e==m)k[/ut|nd/.test(c)?A:t](s)}if(G)d.stopPropagation();else return!1}})})}return this}})(jQuery); -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/all.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin skins 2 | ----------------------------------- */ 3 | @import url("minimal/_all.css"); 4 | /* 5 | @import url("minimal/minimal.css"); 6 | @import url("minimal/red.css"); 7 | @import url("minimal/green.css"); 8 | @import url("minimal/blue.css"); 9 | @import url("minimal/aero.css"); 10 | @import url("minimal/grey.css"); 11 | @import url("minimal/orange.css"); 12 | @import url("minimal/yellow.css"); 13 | @import url("minimal/pink.css"); 14 | @import url("minimal/purple.css"); 15 | */ 16 | 17 | @import url("square/_all.css"); 18 | /* 19 | @import url("square/square.css"); 20 | @import url("square/red.css"); 21 | @import url("square/green.css"); 22 | @import url("square/blue.css"); 23 | @import url("square/aero.css"); 24 | @import url("square/grey.css"); 25 | @import url("square/orange.css"); 26 | @import url("square/yellow.css"); 27 | @import url("square/pink.css"); 28 | @import url("square/purple.css"); 29 | */ 30 | 31 | @import url("flat/_all.css"); 32 | /* 33 | @import url("flat/flat.css"); 34 | @import url("flat/red.css"); 35 | @import url("flat/green.css"); 36 | @import url("flat/blue.css"); 37 | @import url("flat/aero.css"); 38 | @import url("flat/grey.css"); 39 | @import url("flat/orange.css"); 40 | @import url("flat/yellow.css"); 41 | @import url("flat/pink.css"); 42 | @import url("flat/purple.css"); 43 | */ 44 | 45 | @import url("line/_all.css"); 46 | /* 47 | @import url("line/line.css"); 48 | @import url("line/red.css"); 49 | @import url("line/green.css"); 50 | @import url("line/blue.css"); 51 | @import url("line/aero.css"); 52 | @import url("line/grey.css"); 53 | @import url("line/orange.css"); 54 | @import url("line/yellow.css"); 55 | @import url("line/pink.css"); 56 | @import url("line/purple.css"); 57 | */ 58 | 59 | @import url("polaris/polaris.css"); 60 | 61 | @import url("futurico/futurico.css"); -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/aero.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Flat skin, aero 2 | ----------------------------------- */ 3 | .icheckbox_flat-aero, 4 | .iradio_flat-aero { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 20px; 9 | height: 20px; 10 | background: url(aero.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_flat-aero { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_flat-aero.checked { 19 | background-position: -22px 0; 20 | } 21 | .icheckbox_flat-aero.disabled { 22 | background-position: -44px 0; 23 | cursor: default; 24 | } 25 | .icheckbox_flat-aero.checked.disabled { 26 | background-position: -66px 0; 27 | } 28 | 29 | .iradio_flat-aero { 30 | background-position: -88px 0; 31 | } 32 | .iradio_flat-aero.checked { 33 | background-position: -110px 0; 34 | } 35 | .iradio_flat-aero.disabled { 36 | background-position: -132px 0; 37 | cursor: default; 38 | } 39 | .iradio_flat-aero.checked.disabled { 40 | background-position: -154px 0; 41 | } 42 | 43 | /* Retina support */ 44 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 45 | only screen and (-moz-min-device-pixel-ratio: 1.5), 46 | only screen and (-o-min-device-pixel-ratio: 3/2), 47 | only screen and (min-device-pixel-ratio: 1.5) { 48 | .icheckbox_flat-aero, 49 | .iradio_flat-aero { 50 | background-image: url(aero@2x.png); 51 | -webkit-background-size: 176px 22px; 52 | background-size: 176px 22px; 53 | } 54 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/aero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/flat/aero.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/aero@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/flat/aero@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/blue.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Flat skin, blue 2 | ----------------------------------- */ 3 | .icheckbox_flat-blue, 4 | .iradio_flat-blue { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 20px; 9 | height: 20px; 10 | background: url(blue.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_flat-blue { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_flat-blue.checked { 19 | background-position: -22px 0; 20 | } 21 | .icheckbox_flat-blue.disabled { 22 | background-position: -44px 0; 23 | cursor: default; 24 | } 25 | .icheckbox_flat-blue.checked.disabled { 26 | background-position: -66px 0; 27 | } 28 | 29 | .iradio_flat-blue { 30 | background-position: -88px 0; 31 | } 32 | .iradio_flat-blue.checked { 33 | background-position: -110px 0; 34 | } 35 | .iradio_flat-blue.disabled { 36 | background-position: -132px 0; 37 | cursor: default; 38 | } 39 | .iradio_flat-blue.checked.disabled { 40 | background-position: -154px 0; 41 | } 42 | 43 | /* Retina support */ 44 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 45 | only screen and (-moz-min-device-pixel-ratio: 1.5), 46 | only screen and (-o-min-device-pixel-ratio: 3/2), 47 | only screen and (min-device-pixel-ratio: 1.5) { 48 | .icheckbox_flat-blue, 49 | .iradio_flat-blue { 50 | background-image: url(blue@2x.png); 51 | -webkit-background-size: 176px 22px; 52 | background-size: 176px 22px; 53 | } 54 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/flat/blue.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/blue@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/flat/blue@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/flat.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin flat skin, black 2 | ----------------------------------- */ 3 | .icheckbox_flat, 4 | .iradio_flat { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 20px; 9 | height: 20px; 10 | background: url(flat.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_flat { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_flat.checked { 19 | background-position: -22px 0; 20 | } 21 | .icheckbox_flat.disabled { 22 | background-position: -44px 0; 23 | cursor: default; 24 | } 25 | .icheckbox_flat.checked.disabled { 26 | background-position: -66px 0; 27 | } 28 | 29 | .iradio_flat { 30 | background-position: -88px 0; 31 | } 32 | .iradio_flat.checked { 33 | background-position: -110px 0; 34 | } 35 | .iradio_flat.disabled { 36 | background-position: -132px 0; 37 | cursor: default; 38 | } 39 | .iradio_flat.checked.disabled { 40 | background-position: -154px 0; 41 | } 42 | 43 | /* Retina support */ 44 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 45 | only screen and (-moz-min-device-pixel-ratio: 1.5), 46 | only screen and (-o-min-device-pixel-ratio: 3/2), 47 | only screen and (min-device-pixel-ratio: 1.5) { 48 | .icheckbox_flat, 49 | .iradio_flat { 50 | background-image: url(flat@2x.png); 51 | -webkit-background-size: 176px 22px; 52 | background-size: 176px 22px; 53 | } 54 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/flat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/flat/flat.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/flat@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/flat/flat@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/green.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Flat skin, green 2 | ----------------------------------- */ 3 | .icheckbox_flat-green, 4 | .iradio_flat-green { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 20px; 9 | height: 20px; 10 | background: url(green.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_flat-green { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_flat-green.checked { 19 | background-position: -22px 0; 20 | } 21 | .icheckbox_flat-green.disabled { 22 | background-position: -44px 0; 23 | cursor: default; 24 | } 25 | .icheckbox_flat-green.checked.disabled { 26 | background-position: -66px 0; 27 | } 28 | 29 | .iradio_flat-green { 30 | background-position: -88px 0; 31 | } 32 | .iradio_flat-green.checked { 33 | background-position: -110px 0; 34 | } 35 | .iradio_flat-green.disabled { 36 | background-position: -132px 0; 37 | cursor: default; 38 | } 39 | .iradio_flat-green.checked.disabled { 40 | background-position: -154px 0; 41 | } 42 | 43 | /* Retina support */ 44 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 45 | only screen and (-moz-min-device-pixel-ratio: 1.5), 46 | only screen and (-o-min-device-pixel-ratio: 3/2), 47 | only screen and (min-device-pixel-ratio: 1.5) { 48 | .icheckbox_flat-green, 49 | .iradio_flat-green { 50 | background-image: url(green@2x.png); 51 | -webkit-background-size: 176px 22px; 52 | background-size: 176px 22px; 53 | } 54 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/flat/green.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/green@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/flat/green@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/grey.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Flat skin, grey 2 | ----------------------------------- */ 3 | .icheckbox_flat-grey, 4 | .iradio_flat-grey { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 20px; 9 | height: 20px; 10 | background: url(grey.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_flat-grey { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_flat-grey.checked { 19 | background-position: -22px 0; 20 | } 21 | .icheckbox_flat-grey.disabled { 22 | background-position: -44px 0; 23 | cursor: default; 24 | } 25 | .icheckbox_flat-grey.checked.disabled { 26 | background-position: -66px 0; 27 | } 28 | 29 | .iradio_flat-grey { 30 | background-position: -88px 0; 31 | } 32 | .iradio_flat-grey.checked { 33 | background-position: -110px 0; 34 | } 35 | .iradio_flat-grey.disabled { 36 | background-position: -132px 0; 37 | cursor: default; 38 | } 39 | .iradio_flat-grey.checked.disabled { 40 | background-position: -154px 0; 41 | } 42 | 43 | /* Retina support */ 44 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 45 | only screen and (-moz-min-device-pixel-ratio: 1.5), 46 | only screen and (-o-min-device-pixel-ratio: 3/2), 47 | only screen and (min-device-pixel-ratio: 1.5) { 48 | .icheckbox_flat-grey, 49 | .iradio_flat-grey { 50 | background-image: url(grey@2x.png); 51 | -webkit-background-size: 176px 22px; 52 | background-size: 176px 22px; 53 | } 54 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/flat/grey.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/grey@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/flat/grey@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/orange.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Flat skin, orange 2 | ----------------------------------- */ 3 | .icheckbox_flat-orange, 4 | .iradio_flat-orange { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 20px; 9 | height: 20px; 10 | background: url(orange.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_flat-orange { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_flat-orange.checked { 19 | background-position: -22px 0; 20 | } 21 | .icheckbox_flat-orange.disabled { 22 | background-position: -44px 0; 23 | cursor: default; 24 | } 25 | .icheckbox_flat-orange.checked.disabled { 26 | background-position: -66px 0; 27 | } 28 | 29 | .iradio_flat-orange { 30 | background-position: -88px 0; 31 | } 32 | .iradio_flat-orange.checked { 33 | background-position: -110px 0; 34 | } 35 | .iradio_flat-orange.disabled { 36 | background-position: -132px 0; 37 | cursor: default; 38 | } 39 | .iradio_flat-orange.checked.disabled { 40 | background-position: -154px 0; 41 | } 42 | 43 | /* Retina support */ 44 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 45 | only screen and (-moz-min-device-pixel-ratio: 1.5), 46 | only screen and (-o-min-device-pixel-ratio: 3/2), 47 | only screen and (min-device-pixel-ratio: 1.5) { 48 | .icheckbox_flat-orange, 49 | .iradio_flat-orange { 50 | background-image: url(orange@2x.png); 51 | -webkit-background-size: 176px 22px; 52 | background-size: 176px 22px; 53 | } 54 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/flat/orange.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/orange@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/flat/orange@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/pink.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Flat skin, pink 2 | ----------------------------------- */ 3 | .icheckbox_flat-pink, 4 | .iradio_flat-pink { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 20px; 9 | height: 20px; 10 | background: url(pink.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_flat-pink { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_flat-pink.checked { 19 | background-position: -22px 0; 20 | } 21 | .icheckbox_flat-pink.disabled { 22 | background-position: -44px 0; 23 | cursor: default; 24 | } 25 | .icheckbox_flat-pink.checked.disabled { 26 | background-position: -66px 0; 27 | } 28 | 29 | .iradio_flat-pink { 30 | background-position: -88px 0; 31 | } 32 | .iradio_flat-pink.checked { 33 | background-position: -110px 0; 34 | } 35 | .iradio_flat-pink.disabled { 36 | background-position: -132px 0; 37 | cursor: default; 38 | } 39 | .iradio_flat-pink.checked.disabled { 40 | background-position: -154px 0; 41 | } 42 | 43 | /* Retina support */ 44 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 45 | only screen and (-moz-min-device-pixel-ratio: 1.5), 46 | only screen and (-o-min-device-pixel-ratio: 3/2), 47 | only screen and (min-device-pixel-ratio: 1.5) { 48 | .icheckbox_flat-pink, 49 | .iradio_flat-pink { 50 | background-image: url(pink@2x.png); 51 | -webkit-background-size: 176px 22px; 52 | background-size: 176px 22px; 53 | } 54 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/flat/pink.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/pink@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/flat/pink@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/purple.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Flat skin, purple 2 | ----------------------------------- */ 3 | .icheckbox_flat-purple, 4 | .iradio_flat-purple { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 20px; 9 | height: 20px; 10 | background: url(purple.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_flat-purple { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_flat-purple.checked { 19 | background-position: -22px 0; 20 | } 21 | .icheckbox_flat-purple.disabled { 22 | background-position: -44px 0; 23 | cursor: default; 24 | } 25 | .icheckbox_flat-purple.checked.disabled { 26 | background-position: -66px 0; 27 | } 28 | 29 | .iradio_flat-purple { 30 | background-position: -88px 0; 31 | } 32 | .iradio_flat-purple.checked { 33 | background-position: -110px 0; 34 | } 35 | .iradio_flat-purple.disabled { 36 | background-position: -132px 0; 37 | cursor: default; 38 | } 39 | .iradio_flat-purple.checked.disabled { 40 | background-position: -154px 0; 41 | } 42 | 43 | /* Retina support */ 44 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 45 | only screen and (-moz-min-device-pixel-ratio: 1.5), 46 | only screen and (-o-min-device-pixel-ratio: 3/2), 47 | only screen and (min-device-pixel-ratio: 1.5) { 48 | .icheckbox_flat-purple, 49 | .iradio_flat-purple { 50 | background-image: url(purple@2x.png); 51 | -webkit-background-size: 176px 22px; 52 | background-size: 176px 22px; 53 | } 54 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/purple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/flat/purple.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/purple@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/flat/purple@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/red.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Flat skin, red 2 | ----------------------------------- */ 3 | .icheckbox_flat-red, 4 | .iradio_flat-red { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 20px; 9 | height: 20px; 10 | background: url(red.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_flat-red { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_flat-red.checked { 19 | background-position: -22px 0; 20 | } 21 | .icheckbox_flat-red.disabled { 22 | background-position: -44px 0; 23 | cursor: default; 24 | } 25 | .icheckbox_flat-red.checked.disabled { 26 | background-position: -66px 0; 27 | } 28 | 29 | .iradio_flat-red { 30 | background-position: -88px 0; 31 | } 32 | .iradio_flat-red.checked { 33 | background-position: -110px 0; 34 | } 35 | .iradio_flat-red.disabled { 36 | background-position: -132px 0; 37 | cursor: default; 38 | } 39 | .iradio_flat-red.checked.disabled { 40 | background-position: -154px 0; 41 | } 42 | 43 | /* Retina support */ 44 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 45 | only screen and (-moz-min-device-pixel-ratio: 1.5), 46 | only screen and (-o-min-device-pixel-ratio: 3/2), 47 | only screen and (min-device-pixel-ratio: 1.5) { 48 | .icheckbox_flat-red, 49 | .iradio_flat-red { 50 | background-image: url(red@2x.png); 51 | -webkit-background-size: 176px 22px; 52 | background-size: 176px 22px; 53 | } 54 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/flat/red.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/red@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/flat/red@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/yellow.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Flat skin, yellow 2 | ----------------------------------- */ 3 | .icheckbox_flat-yellow, 4 | .iradio_flat-yellow { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 20px; 9 | height: 20px; 10 | background: url(yellow.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_flat-yellow { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_flat-yellow.checked { 19 | background-position: -22px 0; 20 | } 21 | .icheckbox_flat-yellow.disabled { 22 | background-position: -44px 0; 23 | cursor: default; 24 | } 25 | .icheckbox_flat-yellow.checked.disabled { 26 | background-position: -66px 0; 27 | } 28 | 29 | .iradio_flat-yellow { 30 | background-position: -88px 0; 31 | } 32 | .iradio_flat-yellow.checked { 33 | background-position: -110px 0; 34 | } 35 | .iradio_flat-yellow.disabled { 36 | background-position: -132px 0; 37 | cursor: default; 38 | } 39 | .iradio_flat-yellow.checked.disabled { 40 | background-position: -154px 0; 41 | } 42 | 43 | /* Retina support */ 44 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 45 | only screen and (-moz-min-device-pixel-ratio: 1.5), 46 | only screen and (-o-min-device-pixel-ratio: 3/2), 47 | only screen and (min-device-pixel-ratio: 1.5) { 48 | .icheckbox_flat-yellow, 49 | .iradio_flat-yellow { 50 | background-image: url(yellow@2x.png); 51 | -webkit-background-size: 176px 22px; 52 | background-size: 176px 22px; 53 | } 54 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/flat/yellow.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/flat/yellow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/flat/yellow@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/futurico/futurico.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Futurico skin 2 | ----------------------------------- */ 3 | .icheckbox_futurico, 4 | .iradio_futurico { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 16px; 9 | height: 17px; 10 | background: url(futurico.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_futurico { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_futurico.checked { 19 | background-position: -18px 0; 20 | } 21 | .icheckbox_futurico.disabled { 22 | background-position: -36px 0; 23 | cursor: default; 24 | } 25 | .icheckbox_futurico.checked.disabled { 26 | background-position: -54px 0; 27 | } 28 | 29 | .iradio_futurico { 30 | background-position: -72px 0; 31 | } 32 | .iradio_futurico.checked { 33 | background-position: -90px 0; 34 | } 35 | .iradio_futurico.disabled { 36 | background-position: -108px 0; 37 | cursor: default; 38 | } 39 | .iradio_futurico.checked.disabled { 40 | background-position: -126px 0; 41 | } 42 | 43 | /* Retina support */ 44 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 45 | only screen and (-moz-min-device-pixel-ratio: 1.5), 46 | only screen and (-o-min-device-pixel-ratio: 3/2), 47 | only screen and (min-device-pixel-ratio: 1.5) { 48 | .icheckbox_futurico, 49 | .iradio_futurico { 50 | background-image: url(futurico@2x.png); 51 | -webkit-background-size: 144px 19px; 52 | background-size: 144px 19px; 53 | } 54 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/futurico/futurico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/futurico/futurico.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/futurico/futurico@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/futurico/futurico@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/line/aero.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Line skin, aero 2 | ----------------------------------- */ 3 | .icheckbox_line-aero, 4 | .iradio_line-aero { 5 | position: relative; 6 | display: block; 7 | margin: 0; 8 | padding: 5px 15px 5px 38px; 9 | font-size: 13px; 10 | line-height: 17px; 11 | color: #fff; 12 | background: #9cc2cb; 13 | border: none; 14 | -webkit-border-radius: 3px; 15 | -moz-border-radius: 3px; 16 | border-radius: 3px; 17 | cursor: pointer; 18 | } 19 | .icheckbox_line-aero .icheck_line-icon, 20 | .iradio_line-aero .icheck_line-icon { 21 | position: absolute; 22 | top: 50%; 23 | left: 13px; 24 | width: 13px; 25 | height: 11px; 26 | margin: -5px 0 0 0; 27 | padding: 0; 28 | overflow: hidden; 29 | background: url(line.png) no-repeat; 30 | border: none; 31 | } 32 | .icheckbox_line-aero.hover, 33 | .icheckbox_line-aero.checked.hover, 34 | .iradio_line-aero.hover { 35 | background: #B5D1D8; 36 | } 37 | .icheckbox_line-aero.checked, 38 | .iradio_line-aero.checked { 39 | background: #9cc2cb; 40 | } 41 | .icheckbox_line-aero.checked .icheck_line-icon, 42 | .iradio_line-aero.checked .icheck_line-icon { 43 | background-position: -15px 0; 44 | } 45 | .icheckbox_line-aero.disabled, 46 | .iradio_line-aero.disabled { 47 | background: #D2E4E8; 48 | cursor: default; 49 | } 50 | .icheckbox_line-aero.disabled .icheck_line-icon, 51 | .iradio_line-aero.disabled .icheck_line-icon { 52 | background-position: -30px 0; 53 | } 54 | .icheckbox_line-aero.checked.disabled, 55 | .iradio_line-aero.checked.disabled { 56 | background: #D2E4E8; 57 | } 58 | .icheckbox_line-aero.checked.disabled .icheck_line-icon, 59 | .iradio_line-aero.checked.disabled .icheck_line-icon { 60 | background-position: -45px 0; 61 | } 62 | 63 | /* Retina support */ 64 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 65 | only screen and (-moz-min-device-pixel-ratio: 1.5), 66 | only screen and (-o-min-device-pixel-ratio: 3/2), 67 | only screen and (min-device-pixel-ratio: 1.5) { 68 | .icheckbox_line-aero .icheck_line-icon, 69 | .iradio_line-aero .icheck_line-icon { 70 | background-image: url(line@2x.png); 71 | -webkit-background-size: 60px 13px; 72 | background-size: 60px 13px; 73 | } 74 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/line/blue.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Line skin, blue 2 | ----------------------------------- */ 3 | .icheckbox_line-blue, 4 | .iradio_line-blue { 5 | position: relative; 6 | display: block; 7 | margin: 0; 8 | padding: 5px 15px 5px 38px; 9 | font-size: 13px; 10 | line-height: 17px; 11 | color: #fff; 12 | background: #2489c5; 13 | border: none; 14 | -webkit-border-radius: 3px; 15 | -moz-border-radius: 3px; 16 | border-radius: 3px; 17 | cursor: pointer; 18 | } 19 | .icheckbox_line-blue .icheck_line-icon, 20 | .iradio_line-blue .icheck_line-icon { 21 | position: absolute; 22 | top: 50%; 23 | left: 13px; 24 | width: 13px; 25 | height: 11px; 26 | margin: -5px 0 0 0; 27 | padding: 0; 28 | overflow: hidden; 29 | background: url(line.png) no-repeat; 30 | border: none; 31 | } 32 | .icheckbox_line-blue.hover, 33 | .icheckbox_line-blue.checked.hover, 34 | .iradio_line-blue.hover { 35 | background: #3DA0DB; 36 | } 37 | .icheckbox_line-blue.checked, 38 | .iradio_line-blue.checked { 39 | background: #2489c5; 40 | } 41 | .icheckbox_line-blue.checked .icheck_line-icon, 42 | .iradio_line-blue.checked .icheck_line-icon { 43 | background-position: -15px 0; 44 | } 45 | .icheckbox_line-blue.disabled, 46 | .iradio_line-blue.disabled { 47 | background: #ADD7F0; 48 | cursor: default; 49 | } 50 | .icheckbox_line-blue.disabled .icheck_line-icon, 51 | .iradio_line-blue.disabled .icheck_line-icon { 52 | background-position: -30px 0; 53 | } 54 | .icheckbox_line-blue.checked.disabled, 55 | .iradio_line-blue.checked.disabled { 56 | background: #ADD7F0; 57 | } 58 | .icheckbox_line-blue.checked.disabled .icheck_line-icon, 59 | .iradio_line-blue.checked.disabled .icheck_line-icon { 60 | background-position: -45px 0; 61 | } 62 | 63 | /* Retina support */ 64 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 65 | only screen and (-moz-min-device-pixel-ratio: 1.5), 66 | only screen and (-o-min-device-pixel-ratio: 3/2), 67 | only screen and (min-device-pixel-ratio: 1.5) { 68 | .icheckbox_line-blue .icheck_line-icon, 69 | .iradio_line-blue .icheck_line-icon { 70 | background-image: url(line@2x.png); 71 | -webkit-background-size: 60px 13px; 72 | background-size: 60px 13px; 73 | } 74 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/line/green.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Line skin, green 2 | ----------------------------------- */ 3 | .icheckbox_line-green, 4 | .iradio_line-green { 5 | position: relative; 6 | display: block; 7 | margin: 0; 8 | padding: 5px 15px 5px 38px; 9 | font-size: 13px; 10 | line-height: 17px; 11 | color: #fff; 12 | background: #1b7e5a; 13 | border: none; 14 | -webkit-border-radius: 3px; 15 | -moz-border-radius: 3px; 16 | border-radius: 3px; 17 | cursor: pointer; 18 | } 19 | .icheckbox_line-green .icheck_line-icon, 20 | .iradio_line-green .icheck_line-icon { 21 | position: absolute; 22 | top: 50%; 23 | left: 13px; 24 | width: 13px; 25 | height: 11px; 26 | margin: -5px 0 0 0; 27 | padding: 0; 28 | overflow: hidden; 29 | background: url(line.png) no-repeat; 30 | border: none; 31 | } 32 | .icheckbox_line-green.hover, 33 | .icheckbox_line-green.checked.hover, 34 | .iradio_line-green.hover { 35 | background: #24AA7A; 36 | } 37 | .icheckbox_line-green.checked, 38 | .iradio_line-green.checked { 39 | background: #1b7e5a; 40 | } 41 | .icheckbox_line-green.checked .icheck_line-icon, 42 | .iradio_line-green.checked .icheck_line-icon { 43 | background-position: -15px 0; 44 | } 45 | .icheckbox_line-green.disabled, 46 | .iradio_line-green.disabled { 47 | background: #89E6C4; 48 | cursor: default; 49 | } 50 | .icheckbox_line-green.disabled .icheck_line-icon, 51 | .iradio_line-green.disabled .icheck_line-icon { 52 | background-position: -30px 0; 53 | } 54 | .icheckbox_line-green.checked.disabled, 55 | .iradio_line-green.checked.disabled { 56 | background: #89E6C4; 57 | } 58 | .icheckbox_line-green.checked.disabled .icheck_line-icon, 59 | .iradio_line-green.checked.disabled .icheck_line-icon { 60 | background-position: -45px 0; 61 | } 62 | 63 | /* Retina support */ 64 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 65 | only screen and (-moz-min-device-pixel-ratio: 1.5), 66 | only screen and (-o-min-device-pixel-ratio: 3/2), 67 | only screen and (min-device-pixel-ratio: 1.5) { 68 | .icheckbox_line-green .icheck_line-icon, 69 | .iradio_line-green .icheck_line-icon { 70 | background-image: url(line@2x.png); 71 | -webkit-background-size: 60px 13px; 72 | background-size: 60px 13px; 73 | } 74 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/line/grey.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Line skin, grey 2 | ----------------------------------- */ 3 | .icheckbox_line-grey, 4 | .iradio_line-grey { 5 | position: relative; 6 | display: block; 7 | margin: 0; 8 | padding: 5px 15px 5px 38px; 9 | font-size: 13px; 10 | line-height: 17px; 11 | color: #fff; 12 | background: #73716e; 13 | border: none; 14 | -webkit-border-radius: 3px; 15 | -moz-border-radius: 3px; 16 | border-radius: 3px; 17 | cursor: pointer; 18 | } 19 | .icheckbox_line-grey .icheck_line-icon, 20 | .iradio_line-grey .icheck_line-icon { 21 | position: absolute; 22 | top: 50%; 23 | left: 13px; 24 | width: 13px; 25 | height: 11px; 26 | margin: -5px 0 0 0; 27 | padding: 0; 28 | overflow: hidden; 29 | background: url(line.png) no-repeat; 30 | border: none; 31 | } 32 | .icheckbox_line-grey.hover, 33 | .icheckbox_line-grey.checked.hover, 34 | .iradio_line-grey.hover { 35 | background: #8B8986; 36 | } 37 | .icheckbox_line-grey.checked, 38 | .iradio_line-grey.checked { 39 | background: #73716e; 40 | } 41 | .icheckbox_line-grey.checked .icheck_line-icon, 42 | .iradio_line-grey.checked .icheck_line-icon { 43 | background-position: -15px 0; 44 | } 45 | .icheckbox_line-grey.disabled, 46 | .iradio_line-grey.disabled { 47 | background: #D5D4D3; 48 | cursor: default; 49 | } 50 | .icheckbox_line-grey.disabled .icheck_line-icon, 51 | .iradio_line-grey.disabled .icheck_line-icon { 52 | background-position: -30px 0; 53 | } 54 | .icheckbox_line-grey.checked.disabled, 55 | .iradio_line-grey.checked.disabled { 56 | background: #D5D4D3; 57 | } 58 | .icheckbox_line-grey.checked.disabled .icheck_line-icon, 59 | .iradio_line-grey.checked.disabled .icheck_line-icon { 60 | background-position: -45px 0; 61 | } 62 | 63 | /* Retina support */ 64 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 65 | only screen and (-moz-min-device-pixel-ratio: 1.5), 66 | only screen and (-o-min-device-pixel-ratio: 3/2), 67 | only screen and (min-device-pixel-ratio: 1.5) { 68 | .icheckbox_line-grey .icheck_line-icon, 69 | .iradio_line-grey .icheck_line-icon { 70 | background-image: url(line@2x.png); 71 | -webkit-background-size: 60px 13px; 72 | background-size: 60px 13px; 73 | } 74 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/line/line.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Line skin, black 2 | ----------------------------------- */ 3 | .icheckbox_line, 4 | .iradio_line { 5 | position: relative; 6 | display: block; 7 | margin: 0; 8 | padding: 5px 15px 5px 38px; 9 | font-size: 13px; 10 | line-height: 17px; 11 | color: #fff; 12 | background: #000; 13 | border: none; 14 | -webkit-border-radius: 3px; 15 | -moz-border-radius: 3px; 16 | border-radius: 3px; 17 | cursor: pointer; 18 | } 19 | .icheckbox_line .icheck_line-icon, 20 | .iradio_line .icheck_line-icon { 21 | position: absolute; 22 | top: 50%; 23 | left: 13px; 24 | width: 13px; 25 | height: 11px; 26 | margin: -5px 0 0 0; 27 | padding: 0; 28 | overflow: hidden; 29 | background: url(line.png) no-repeat; 30 | border: none; 31 | } 32 | .icheckbox_line.hover, 33 | .icheckbox_line.checked.hover, 34 | .iradio_line.hover { 35 | background: #444; 36 | } 37 | .icheckbox_line.checked, 38 | .iradio_line.checked { 39 | background: #000; 40 | } 41 | .icheckbox_line.checked .icheck_line-icon, 42 | .iradio_line.checked .icheck_line-icon { 43 | background-position: -15px 0; 44 | } 45 | .icheckbox_line.disabled, 46 | .iradio_line.disabled { 47 | background: #ccc; 48 | cursor: default; 49 | } 50 | .icheckbox_line.disabled .icheck_line-icon, 51 | .iradio_line.disabled .icheck_line-icon { 52 | background-position: -30px 0; 53 | } 54 | .icheckbox_line.checked.disabled, 55 | .iradio_line.checked.disabled { 56 | background: #ccc; 57 | } 58 | .icheckbox_line.checked.disabled .icheck_line-icon, 59 | .iradio_line.checked.disabled .icheck_line-icon { 60 | background-position: -45px 0; 61 | } 62 | 63 | /* Retina support */ 64 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 65 | only screen and (-moz-min-device-pixel-ratio: 1.5), 66 | only screen and (-o-min-device-pixel-ratio: 3/2), 67 | only screen and (min-device-pixel-ratio: 1.5) { 68 | .icheckbox_line .icheck_line-icon, 69 | .iradio_line .icheck_line-icon { 70 | background-image: url(line@2x.png); 71 | -webkit-background-size: 60px 13px; 72 | background-size: 60px 13px; 73 | } 74 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/line/line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/line/line.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/line/line@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/line/line@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/line/orange.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Line skin, orange 2 | ----------------------------------- */ 3 | .icheckbox_line-orange, 4 | .iradio_line-orange { 5 | position: relative; 6 | display: block; 7 | margin: 0; 8 | padding: 5px 15px 5px 38px; 9 | font-size: 13px; 10 | line-height: 17px; 11 | color: #fff; 12 | background: #f70; 13 | border: none; 14 | -webkit-border-radius: 3px; 15 | -moz-border-radius: 3px; 16 | border-radius: 3px; 17 | cursor: pointer; 18 | } 19 | .icheckbox_line-orange .icheck_line-icon, 20 | .iradio_line-orange .icheck_line-icon { 21 | position: absolute; 22 | top: 50%; 23 | left: 13px; 24 | width: 13px; 25 | height: 11px; 26 | margin: -5px 0 0 0; 27 | padding: 0; 28 | overflow: hidden; 29 | background: url(line.png) no-repeat; 30 | border: none; 31 | } 32 | .icheckbox_line-orange.hover, 33 | .icheckbox_line-orange.checked.hover, 34 | .iradio_line-orange.hover { 35 | background: #FF9233; 36 | } 37 | .icheckbox_line-orange.checked, 38 | .iradio_line-orange.checked { 39 | background: #f70; 40 | } 41 | .icheckbox_line-orange.checked .icheck_line-icon, 42 | .iradio_line-orange.checked .icheck_line-icon { 43 | background-position: -15px 0; 44 | } 45 | .icheckbox_line-orange.disabled, 46 | .iradio_line-orange.disabled { 47 | background: #FFD6B3; 48 | cursor: default; 49 | } 50 | .icheckbox_line-orange.disabled .icheck_line-icon, 51 | .iradio_line-orange.disabled .icheck_line-icon { 52 | background-position: -30px 0; 53 | } 54 | .icheckbox_line-orange.checked.disabled, 55 | .iradio_line-orange.checked.disabled { 56 | background: #FFD6B3; 57 | } 58 | .icheckbox_line-orange.checked.disabled .icheck_line-icon, 59 | .iradio_line-orange.checked.disabled .icheck_line-icon { 60 | background-position: -45px 0; 61 | } 62 | 63 | /* Retina support */ 64 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 65 | only screen and (-moz-min-device-pixel-ratio: 1.5), 66 | only screen and (-o-min-device-pixel-ratio: 3/2), 67 | only screen and (min-device-pixel-ratio: 1.5) { 68 | .icheckbox_line-orange .icheck_line-icon, 69 | .iradio_line-orange .icheck_line-icon { 70 | background-image: url(line@2x.png); 71 | -webkit-background-size: 60px 13px; 72 | background-size: 60px 13px; 73 | } 74 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/line/pink.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Line skin, pink 2 | ----------------------------------- */ 3 | .icheckbox_line-pink, 4 | .iradio_line-pink { 5 | position: relative; 6 | display: block; 7 | margin: 0; 8 | padding: 5px 15px 5px 38px; 9 | font-size: 13px; 10 | line-height: 17px; 11 | color: #fff; 12 | background: #a77a94; 13 | border: none; 14 | -webkit-border-radius: 3px; 15 | -moz-border-radius: 3px; 16 | border-radius: 3px; 17 | cursor: pointer; 18 | } 19 | .icheckbox_line-pink .icheck_line-icon, 20 | .iradio_line-pink .icheck_line-icon { 21 | position: absolute; 22 | top: 50%; 23 | left: 13px; 24 | width: 13px; 25 | height: 11px; 26 | margin: -5px 0 0 0; 27 | padding: 0; 28 | overflow: hidden; 29 | background: url(line.png) no-repeat; 30 | border: none; 31 | } 32 | .icheckbox_line-pink.hover, 33 | .icheckbox_line-pink.checked.hover, 34 | .iradio_line-pink.hover { 35 | background: #B995A9; 36 | } 37 | .icheckbox_line-pink.checked, 38 | .iradio_line-pink.checked { 39 | background: #a77a94; 40 | } 41 | .icheckbox_line-pink.checked .icheck_line-icon, 42 | .iradio_line-pink.checked .icheck_line-icon { 43 | background-position: -15px 0; 44 | } 45 | .icheckbox_line-pink.disabled, 46 | .iradio_line-pink.disabled { 47 | background: #E0D0DA; 48 | cursor: default; 49 | } 50 | .icheckbox_line-pink.disabled .icheck_line-icon, 51 | .iradio_line-pink.disabled .icheck_line-icon { 52 | background-position: -30px 0; 53 | } 54 | .icheckbox_line-pink.checked.disabled, 55 | .iradio_line-pink.checked.disabled { 56 | background: #E0D0DA; 57 | } 58 | .icheckbox_line-pink.checked.disabled .icheck_line-icon, 59 | .iradio_line-pink.checked.disabled .icheck_line-icon { 60 | background-position: -45px 0; 61 | } 62 | 63 | /* Retina support */ 64 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 65 | only screen and (-moz-min-device-pixel-ratio: 1.5), 66 | only screen and (-o-min-device-pixel-ratio: 3/2), 67 | only screen and (min-device-pixel-ratio: 1.5) { 68 | .icheckbox_line-pink .icheck_line-icon, 69 | .iradio_line-pink .icheck_line-icon { 70 | background-image: url(line@2x.png); 71 | -webkit-background-size: 60px 13px; 72 | background-size: 60px 13px; 73 | } 74 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/line/purple.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Line skin, purple 2 | ----------------------------------- */ 3 | .icheckbox_line-purple, 4 | .iradio_line-purple { 5 | position: relative; 6 | display: block; 7 | margin: 0; 8 | padding: 5px 15px 5px 38px; 9 | font-size: 13px; 10 | line-height: 17px; 11 | color: #fff; 12 | background: #6a5a8c; 13 | border: none; 14 | -webkit-border-radius: 3px; 15 | -moz-border-radius: 3px; 16 | border-radius: 3px; 17 | cursor: pointer; 18 | } 19 | .icheckbox_line-purple .icheck_line-icon, 20 | .iradio_line-purple .icheck_line-icon { 21 | position: absolute; 22 | top: 50%; 23 | left: 13px; 24 | width: 13px; 25 | height: 11px; 26 | margin: -5px 0 0 0; 27 | padding: 0; 28 | overflow: hidden; 29 | background: url(line.png) no-repeat; 30 | border: none; 31 | } 32 | .icheckbox_line-purple.hover, 33 | .icheckbox_line-purple.checked.hover, 34 | .iradio_line-purple.hover { 35 | background: #8677A7; 36 | } 37 | .icheckbox_line-purple.checked, 38 | .iradio_line-purple.checked { 39 | background: #6a5a8c; 40 | } 41 | .icheckbox_line-purple.checked .icheck_line-icon, 42 | .iradio_line-purple.checked .icheck_line-icon { 43 | background-position: -15px 0; 44 | } 45 | .icheckbox_line-purple.disabled, 46 | .iradio_line-purple.disabled { 47 | background: #D2CCDE; 48 | cursor: default; 49 | } 50 | .icheckbox_line-purple.disabled .icheck_line-icon, 51 | .iradio_line-purple.disabled .icheck_line-icon { 52 | background-position: -30px 0; 53 | } 54 | .icheckbox_line-purple.checked.disabled, 55 | .iradio_line-purple.checked.disabled { 56 | background: #D2CCDE; 57 | } 58 | .icheckbox_line-purple.checked.disabled .icheck_line-icon, 59 | .iradio_line-purple.checked.disabled .icheck_line-icon { 60 | background-position: -45px 0; 61 | } 62 | 63 | /* Retina support */ 64 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 65 | only screen and (-moz-min-device-pixel-ratio: 1.5), 66 | only screen and (-o-min-device-pixel-ratio: 3/2), 67 | only screen and (min-device-pixel-ratio: 1.5) { 68 | .icheckbox_line-purple .icheck_line-icon, 69 | .iradio_line-purple .icheck_line-icon { 70 | background-image: url(line@2x.png); 71 | -webkit-background-size: 60px 13px; 72 | background-size: 60px 13px; 73 | } 74 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/line/red.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Line skin, red 2 | ----------------------------------- */ 3 | .icheckbox_line-red, 4 | .iradio_line-red { 5 | position: relative; 6 | display: block; 7 | margin: 0; 8 | padding: 5px 15px 5px 38px; 9 | font-size: 13px; 10 | line-height: 17px; 11 | color: #fff; 12 | background: #e56c69; 13 | border: none; 14 | -webkit-border-radius: 3px; 15 | -moz-border-radius: 3px; 16 | border-radius: 3px; 17 | cursor: pointer; 18 | } 19 | .icheckbox_line-red .icheck_line-icon, 20 | .iradio_line-red .icheck_line-icon { 21 | position: absolute; 22 | top: 50%; 23 | left: 13px; 24 | width: 13px; 25 | height: 11px; 26 | margin: -5px 0 0 0; 27 | padding: 0; 28 | overflow: hidden; 29 | background: url(line.png) no-repeat; 30 | border: none; 31 | } 32 | .icheckbox_line-red.hover, 33 | .icheckbox_line-red.checked.hover, 34 | .iradio_line-red.hover { 35 | background: #E98582; 36 | } 37 | .icheckbox_line-red.checked, 38 | .iradio_line-red.checked { 39 | background: #e56c69; 40 | } 41 | .icheckbox_line-red.checked .icheck_line-icon, 42 | .iradio_line-red.checked .icheck_line-icon { 43 | background-position: -15px 0; 44 | } 45 | .icheckbox_line-red.disabled, 46 | .iradio_line-red.disabled { 47 | background: #F7D3D2; 48 | cursor: default; 49 | } 50 | .icheckbox_line-red.disabled .icheck_line-icon, 51 | .iradio_line-red.disabled .icheck_line-icon { 52 | background-position: -30px 0; 53 | } 54 | .icheckbox_line-red.checked.disabled, 55 | .iradio_line-red.checked.disabled { 56 | background: #F7D3D2; 57 | } 58 | .icheckbox_line-red.checked.disabled .icheck_line-icon, 59 | .iradio_line-red.checked.disabled .icheck_line-icon { 60 | background-position: -45px 0; 61 | } 62 | 63 | /* Retina support */ 64 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 65 | only screen and (-moz-min-device-pixel-ratio: 1.5), 66 | only screen and (-o-min-device-pixel-ratio: 3/2), 67 | only screen and (min-device-pixel-ratio: 1.5) { 68 | .icheckbox_line-red .icheck_line-icon, 69 | .iradio_line-red .icheck_line-icon { 70 | background-image: url(line@2x.png); 71 | -webkit-background-size: 60px 13px; 72 | background-size: 60px 13px; 73 | } 74 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/line/yellow.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Line skin, yellow 2 | ----------------------------------- */ 3 | .icheckbox_line-yellow, 4 | .iradio_line-yellow { 5 | position: relative; 6 | display: block; 7 | margin: 0; 8 | padding: 5px 15px 5px 38px; 9 | font-size: 13px; 10 | line-height: 17px; 11 | color: #fff; 12 | background: #FFC414; 13 | border: none; 14 | -webkit-border-radius: 3px; 15 | -moz-border-radius: 3px; 16 | border-radius: 3px; 17 | cursor: pointer; 18 | } 19 | .icheckbox_line-yellow .icheck_line-icon, 20 | .iradio_line-yellow .icheck_line-icon { 21 | position: absolute; 22 | top: 50%; 23 | left: 13px; 24 | width: 13px; 25 | height: 11px; 26 | margin: -5px 0 0 0; 27 | padding: 0; 28 | overflow: hidden; 29 | background: url(line.png) no-repeat; 30 | border: none; 31 | } 32 | .icheckbox_line-yellow.hover, 33 | .icheckbox_line-yellow.checked.hover, 34 | .iradio_line-yellow.hover { 35 | background: #FFD34F; 36 | } 37 | .icheckbox_line-yellow.checked, 38 | .iradio_line-yellow.checked { 39 | background: #FFC414; 40 | } 41 | .icheckbox_line-yellow.checked .icheck_line-icon, 42 | .iradio_line-yellow.checked .icheck_line-icon { 43 | background-position: -15px 0; 44 | } 45 | .icheckbox_line-yellow.disabled, 46 | .iradio_line-yellow.disabled { 47 | background: #FFE495; 48 | cursor: default; 49 | } 50 | .icheckbox_line-yellow.disabled .icheck_line-icon, 51 | .iradio_line-yellow.disabled .icheck_line-icon { 52 | background-position: -30px 0; 53 | } 54 | .icheckbox_line-yellow.checked.disabled, 55 | .iradio_line-yellow.checked.disabled { 56 | background: #FFE495; 57 | } 58 | .icheckbox_line-yellow.checked.disabled .icheck_line-icon, 59 | .iradio_line-yellow.checked.disabled .icheck_line-icon { 60 | background-position: -45px 0; 61 | } 62 | 63 | /* Retina support */ 64 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 65 | only screen and (-moz-min-device-pixel-ratio: 1.5), 66 | only screen and (-o-min-device-pixel-ratio: 3/2), 67 | only screen and (min-device-pixel-ratio: 1.5) { 68 | .icheckbox_line-yellow .icheck_line-icon, 69 | .iradio_line-yellow .icheck_line-icon { 70 | background-image: url(line@2x.png); 71 | -webkit-background-size: 60px 13px; 72 | background-size: 60px 13px; 73 | } 74 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/aero.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Minimal skin, aero 2 | ----------------------------------- */ 3 | .icheckbox_minimal-aero, 4 | .iradio_minimal-aero { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 18px; 9 | height: 18px; 10 | background: url(aero.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_minimal-aero { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_minimal-aero.hover { 19 | background-position: -20px 0; 20 | } 21 | .icheckbox_minimal-aero.checked { 22 | background-position: -40px 0; 23 | } 24 | .icheckbox_minimal-aero.disabled { 25 | background-position: -60px 0; 26 | cursor: default; 27 | } 28 | .icheckbox_minimal-aero.checked.disabled { 29 | background-position: -80px 0; 30 | } 31 | 32 | .iradio_minimal-aero { 33 | background-position: -100px 0; 34 | } 35 | .iradio_minimal-aero.hover { 36 | background-position: -120px 0; 37 | } 38 | .iradio_minimal-aero.checked { 39 | background-position: -140px 0; 40 | } 41 | .iradio_minimal-aero.disabled { 42 | background-position: -160px 0; 43 | cursor: default; 44 | } 45 | .iradio_minimal-aero.checked.disabled { 46 | background-position: -180px 0; 47 | } 48 | 49 | /* Retina support */ 50 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 51 | only screen and (-moz-min-device-pixel-ratio: 1.5), 52 | only screen and (-o-min-device-pixel-ratio: 3/2), 53 | only screen and (min-device-pixel-ratio: 1.5) { 54 | .icheckbox_minimal-aero, 55 | .iradio_minimal-aero { 56 | background-image: url(aero@2x.png); 57 | -webkit-background-size: 200px 20px; 58 | background-size: 200px 20px; 59 | } 60 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/aero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/minimal/aero.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/aero@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/minimal/aero@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/blue.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Minimal skin, blue 2 | ----------------------------------- */ 3 | .icheckbox_minimal-blue, 4 | .iradio_minimal-blue { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 18px; 9 | height: 18px; 10 | background: url(blue.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_minimal-blue { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_minimal-blue.hover { 19 | background-position: -20px 0; 20 | } 21 | .icheckbox_minimal-blue.checked { 22 | background-position: -40px 0; 23 | } 24 | .icheckbox_minimal-blue.disabled { 25 | background-position: -60px 0; 26 | cursor: default; 27 | } 28 | .icheckbox_minimal-blue.checked.disabled { 29 | background-position: -80px 0; 30 | } 31 | 32 | .iradio_minimal-blue { 33 | background-position: -100px 0; 34 | } 35 | .iradio_minimal-blue.hover { 36 | background-position: -120px 0; 37 | } 38 | .iradio_minimal-blue.checked { 39 | background-position: -140px 0; 40 | } 41 | .iradio_minimal-blue.disabled { 42 | background-position: -160px 0; 43 | cursor: default; 44 | } 45 | .iradio_minimal-blue.checked.disabled { 46 | background-position: -180px 0; 47 | } 48 | 49 | /* Retina support */ 50 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 51 | only screen and (-moz-min-device-pixel-ratio: 1.5), 52 | only screen and (-o-min-device-pixel-ratio: 3/2), 53 | only screen and (min-device-pixel-ratio: 1.5) { 54 | .icheckbox_minimal-blue, 55 | .iradio_minimal-blue { 56 | background-image: url(blue@2x.png); 57 | -webkit-background-size: 200px 20px; 58 | background-size: 200px 20px; 59 | } 60 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/minimal/blue.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/blue@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/minimal/blue@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/green.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Minimal skin, green 2 | ----------------------------------- */ 3 | .icheckbox_minimal-green, 4 | .iradio_minimal-green { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 18px; 9 | height: 18px; 10 | background: url(green.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_minimal-green { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_minimal-green.hover { 19 | background-position: -20px 0; 20 | } 21 | .icheckbox_minimal-green.checked { 22 | background-position: -40px 0; 23 | } 24 | .icheckbox_minimal-green.disabled { 25 | background-position: -60px 0; 26 | cursor: default; 27 | } 28 | .icheckbox_minimal-green.checked.disabled { 29 | background-position: -80px 0; 30 | } 31 | 32 | .iradio_minimal-green { 33 | background-position: -100px 0; 34 | } 35 | .iradio_minimal-green.hover { 36 | background-position: -120px 0; 37 | } 38 | .iradio_minimal-green.checked { 39 | background-position: -140px 0; 40 | } 41 | .iradio_minimal-green.disabled { 42 | background-position: -160px 0; 43 | cursor: default; 44 | } 45 | .iradio_minimal-green.checked.disabled { 46 | background-position: -180px 0; 47 | } 48 | 49 | /* Retina support */ 50 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 51 | only screen and (-moz-min-device-pixel-ratio: 1.5), 52 | only screen and (-o-min-device-pixel-ratio: 1.5), 53 | only screen and (min-device-pixel-ratio: 1.5) { 54 | .icheckbox_minimal-green, 55 | .iradio_minimal-green { 56 | background-image: url(green@2x.png); 57 | -webkit-background-size: 200px 20px; 58 | background-size: 200px 20px; 59 | } 60 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/minimal/green.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/green@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/minimal/green@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/grey.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Minimal skin, grey 2 | ----------------------------------- */ 3 | .icheckbox_minimal-grey, 4 | .iradio_minimal-grey { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 18px; 9 | height: 18px; 10 | background: url(grey.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_minimal-grey { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_minimal-grey.hover { 19 | background-position: -20px 0; 20 | } 21 | .icheckbox_minimal-grey.checked { 22 | background-position: -40px 0; 23 | } 24 | .icheckbox_minimal-grey.disabled { 25 | background-position: -60px 0; 26 | cursor: default; 27 | } 28 | .icheckbox_minimal-grey.checked.disabled { 29 | background-position: -80px 0; 30 | } 31 | 32 | .iradio_minimal-grey { 33 | background-position: -100px 0; 34 | } 35 | .iradio_minimal-grey.hover { 36 | background-position: -120px 0; 37 | } 38 | .iradio_minimal-grey.checked { 39 | background-position: -140px 0; 40 | } 41 | .iradio_minimal-grey.disabled { 42 | background-position: -160px 0; 43 | cursor: default; 44 | } 45 | .iradio_minimal-grey.checked.disabled { 46 | background-position: -180px 0; 47 | } 48 | 49 | /* Retina support */ 50 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 51 | only screen and (-moz-min-device-pixel-ratio: 1.5), 52 | only screen and (-o-min-device-pixel-ratio: 1.5), 53 | only screen and (min-device-pixel-ratio: 1.5) { 54 | .icheckbox_minimal-grey, 55 | .iradio_minimal-grey { 56 | background-image: url(grey@2x.png); 57 | -webkit-background-size: 200px 20px; 58 | background-size: 200px 20px; 59 | } 60 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/minimal/grey.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/grey@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/minimal/grey@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/minimal.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Minimal skin, black 2 | ----------------------------------- */ 3 | .icheckbox_minimal, 4 | .iradio_minimal { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 18px; 9 | height: 18px; 10 | background: url(minimal.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_minimal { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_minimal.hover { 19 | background-position: -20px 0; 20 | } 21 | .icheckbox_minimal.checked { 22 | background-position: -40px 0; 23 | } 24 | .icheckbox_minimal.disabled { 25 | background-position: -60px 0; 26 | cursor: default; 27 | } 28 | .icheckbox_minimal.checked.disabled { 29 | background-position: -80px 0; 30 | } 31 | 32 | .iradio_minimal { 33 | background-position: -100px 0; 34 | } 35 | .iradio_minimal.hover { 36 | background-position: -120px 0; 37 | } 38 | .iradio_minimal.checked { 39 | background-position: -140px 0; 40 | } 41 | .iradio_minimal.disabled { 42 | background-position: -160px 0; 43 | cursor: default; 44 | } 45 | .iradio_minimal.checked.disabled { 46 | background-position: -180px 0; 47 | } 48 | 49 | /* Retina support */ 50 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 51 | only screen and (-moz-min-device-pixel-ratio: 1.5), 52 | only screen and (-o-min-device-pixel-ratio: 3/2), 53 | only screen and (min-device-pixel-ratio: 1.5) { 54 | .icheckbox_minimal, 55 | .iradio_minimal { 56 | background-image: url(minimal@2x.png); 57 | -webkit-background-size: 200px 20px; 58 | background-size: 200px 20px; 59 | } 60 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/minimal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/minimal/minimal.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/minimal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/minimal/minimal@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/orange.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Minimal skin, orange 2 | ----------------------------------- */ 3 | .icheckbox_minimal-orange, 4 | .iradio_minimal-orange { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 18px; 9 | height: 18px; 10 | background: url(orange.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_minimal-orange { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_minimal-orange.hover { 19 | background-position: -20px 0; 20 | } 21 | .icheckbox_minimal-orange.checked { 22 | background-position: -40px 0; 23 | } 24 | .icheckbox_minimal-orange.disabled { 25 | background-position: -60px 0; 26 | cursor: default; 27 | } 28 | .icheckbox_minimal-orange.checked.disabled { 29 | background-position: -80px 0; 30 | } 31 | 32 | .iradio_minimal-orange { 33 | background-position: -100px 0; 34 | } 35 | .iradio_minimal-orange.hover { 36 | background-position: -120px 0; 37 | } 38 | .iradio_minimal-orange.checked { 39 | background-position: -140px 0; 40 | } 41 | .iradio_minimal-orange.disabled { 42 | background-position: -160px 0; 43 | cursor: default; 44 | } 45 | .iradio_minimal-orange.checked.disabled { 46 | background-position: -180px 0; 47 | } 48 | 49 | /* Retina support */ 50 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 51 | only screen and (-moz-min-device-pixel-ratio: 1.5), 52 | only screen and (-o-min-device-pixel-ratio: 1.5), 53 | only screen and (min-device-pixel-ratio: 1.5) { 54 | .icheckbox_minimal-orange, 55 | .iradio_minimal-orange { 56 | background-image: url(orange@2x.png); 57 | -webkit-background-size: 200px 20px; 58 | background-size: 200px 20px; 59 | } 60 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/minimal/orange.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/orange@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/minimal/orange@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/pink.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Minimal skin, pink 2 | ----------------------------------- */ 3 | .icheckbox_minimal-pink, 4 | .iradio_minimal-pink { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 18px; 9 | height: 18px; 10 | background: url(pink.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_minimal-pink { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_minimal-pink.hover { 19 | background-position: -20px 0; 20 | } 21 | .icheckbox_minimal-pink.checked { 22 | background-position: -40px 0; 23 | } 24 | .icheckbox_minimal-pink.disabled { 25 | background-position: -60px 0; 26 | cursor: default; 27 | } 28 | .icheckbox_minimal-pink.checked.disabled { 29 | background-position: -80px 0; 30 | } 31 | 32 | .iradio_minimal-pink { 33 | background-position: -100px 0; 34 | } 35 | .iradio_minimal-pink.hover { 36 | background-position: -120px 0; 37 | } 38 | .iradio_minimal-pink.checked { 39 | background-position: -140px 0; 40 | } 41 | .iradio_minimal-pink.disabled { 42 | background-position: -160px 0; 43 | cursor: default; 44 | } 45 | .iradio_minimal-pink.checked.disabled { 46 | background-position: -180px 0; 47 | } 48 | 49 | /* Retina support */ 50 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 51 | only screen and (-moz-min-device-pixel-ratio: 1.5), 52 | only screen and (-o-min-device-pixel-ratio: 1.5), 53 | only screen and (min-device-pixel-ratio: 1.5) { 54 | .icheckbox_minimal-pink, 55 | .iradio_minimal-pink { 56 | background-image: url(pink@2x.png); 57 | -webkit-background-size: 200px 20px; 58 | background-size: 200px 20px; 59 | } 60 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/minimal/pink.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/pink@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/minimal/pink@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/purple.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Minimal skin, purple 2 | ----------------------------------- */ 3 | .icheckbox_minimal-purple, 4 | .iradio_minimal-purple { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 18px; 9 | height: 18px; 10 | background: url(purple.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_minimal-purple { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_minimal-purple.hover { 19 | background-position: -20px 0; 20 | } 21 | .icheckbox_minimal-purple.checked { 22 | background-position: -40px 0; 23 | } 24 | .icheckbox_minimal-purple.disabled { 25 | background-position: -60px 0; 26 | cursor: default; 27 | } 28 | .icheckbox_minimal-purple.checked.disabled { 29 | background-position: -80px 0; 30 | } 31 | 32 | .iradio_minimal-purple { 33 | background-position: -100px 0; 34 | } 35 | .iradio_minimal-purple.hover { 36 | background-position: -120px 0; 37 | } 38 | .iradio_minimal-purple.checked { 39 | background-position: -140px 0; 40 | } 41 | .iradio_minimal-purple.disabled { 42 | background-position: -160px 0; 43 | cursor: default; 44 | } 45 | .iradio_minimal-purple.checked.disabled { 46 | background-position: -180px 0; 47 | } 48 | 49 | /* Retina support */ 50 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 51 | only screen and (-moz-min-device-pixel-ratio: 1.5), 52 | only screen and (-o-min-device-pixel-ratio: 1.5), 53 | only screen and (min-device-pixel-ratio: 1.5) { 54 | .icheckbox_minimal-purple, 55 | .iradio_minimal-purple { 56 | background-image: url(purple@2x.png); 57 | -webkit-background-size: 200px 20px; 58 | background-size: 200px 20px; 59 | } 60 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/purple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/minimal/purple.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/purple@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/minimal/purple@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/red.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Minimal skin, red 2 | ----------------------------------- */ 3 | .icheckbox_minimal-red, 4 | .iradio_minimal-red { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 18px; 9 | height: 18px; 10 | background: url(red.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_minimal-red { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_minimal-red.hover { 19 | background-position: -20px 0; 20 | } 21 | .icheckbox_minimal-red.checked { 22 | background-position: -40px 0; 23 | } 24 | .icheckbox_minimal-red.disabled { 25 | background-position: -60px 0; 26 | cursor: default; 27 | } 28 | .icheckbox_minimal-red.checked.disabled { 29 | background-position: -80px 0; 30 | } 31 | 32 | .iradio_minimal-red { 33 | background-position: -100px 0; 34 | } 35 | .iradio_minimal-red.hover { 36 | background-position: -120px 0; 37 | } 38 | .iradio_minimal-red.checked { 39 | background-position: -140px 0; 40 | } 41 | .iradio_minimal-red.disabled { 42 | background-position: -160px 0; 43 | cursor: default; 44 | } 45 | .iradio_minimal-red.checked.disabled { 46 | background-position: -180px 0; 47 | } 48 | 49 | /* Retina support */ 50 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 51 | only screen and (-moz-min-device-pixel-ratio: 1.5), 52 | only screen and (-o-min-device-pixel-ratio: 1.5), 53 | only screen and (min-device-pixel-ratio: 1.5) { 54 | .icheckbox_minimal-red, 55 | .iradio_minimal-red { 56 | background-image: url(red@2x.png); 57 | -webkit-background-size: 200px 20px; 58 | background-size: 200px 20px; 59 | } 60 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/minimal/red.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/red@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/minimal/red@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/yellow.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Minimal skin, yellow 2 | ----------------------------------- */ 3 | .icheckbox_minimal-yellow, 4 | .iradio_minimal-yellow { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 18px; 9 | height: 18px; 10 | background: url(yellow.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_minimal-yellow { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_minimal-yellow.hover { 19 | background-position: -20px 0; 20 | } 21 | .icheckbox_minimal-yellow.checked { 22 | background-position: -40px 0; 23 | } 24 | .icheckbox_minimal-yellow.disabled { 25 | background-position: -60px 0; 26 | cursor: default; 27 | } 28 | .icheckbox_minimal-yellow.checked.disabled { 29 | background-position: -80px 0; 30 | } 31 | 32 | .iradio_minimal-yellow { 33 | background-position: -100px 0; 34 | } 35 | .iradio_minimal-yellow.hover { 36 | background-position: -120px 0; 37 | } 38 | .iradio_minimal-yellow.checked { 39 | background-position: -140px 0; 40 | } 41 | .iradio_minimal-yellow.disabled { 42 | background-position: -160px 0; 43 | cursor: default; 44 | } 45 | .iradio_minimal-yellow.checked.disabled { 46 | background-position: -180px 0; 47 | } 48 | 49 | /* Retina support */ 50 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 51 | only screen and (-moz-min-device-pixel-ratio: 1.5), 52 | only screen and (-o-min-device-pixel-ratio: 1.5), 53 | only screen and (min-device-pixel-ratio: 1.5) { 54 | .icheckbox_minimal-yellow, 55 | .iradio_minimal-yellow { 56 | background-image: url(yellow@2x.png); 57 | -webkit-background-size: 200px 20px; 58 | background-size: 200px 20px; 59 | } 60 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/minimal/yellow.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/minimal/yellow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/minimal/yellow@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/polaris/polaris.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Polaris skin 2 | ----------------------------------- */ 3 | .icheckbox_polaris, 4 | .iradio_polaris { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 29px; 9 | height: 29px; 10 | background: url(polaris.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_polaris { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_polaris.hover { 19 | background-position: -31px 0; 20 | } 21 | .icheckbox_polaris.checked { 22 | background-position: -62px 0; 23 | } 24 | .icheckbox_polaris.disabled { 25 | background-position: -93px 0; 26 | cursor: default; 27 | } 28 | .icheckbox_polaris.checked.disabled { 29 | background-position: -124px 0; 30 | } 31 | 32 | .iradio_polaris { 33 | background-position: -155px 0; 34 | } 35 | .iradio_polaris.hover { 36 | background-position: -186px 0; 37 | } 38 | .iradio_polaris.checked { 39 | background-position: -217px 0; 40 | } 41 | .iradio_polaris.disabled { 42 | background-position: -248px 0; 43 | cursor: default; 44 | } 45 | .iradio_polaris.checked.disabled { 46 | background-position: -279px 0; 47 | } 48 | 49 | /* Retina support */ 50 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 51 | only screen and (-moz-min-device-pixel-ratio: 1.5), 52 | only screen and (-o-min-device-pixel-ratio: 3/2), 53 | only screen and (min-device-pixel-ratio: 1.5) { 54 | .icheckbox_polaris, 55 | .iradio_polaris { 56 | background-image: url(polaris@2x.png); 57 | -webkit-background-size: 310px 31px; 58 | background-size: 310px 31px; 59 | } 60 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/polaris/polaris.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/polaris/polaris.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/polaris/polaris@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/polaris/polaris@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/aero.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Square skin, aero 2 | ----------------------------------- */ 3 | .icheckbox_square-aero, 4 | .iradio_square-aero { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 22px; 9 | height: 22px; 10 | background: url(aero.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_square-aero { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_square-aero.hover { 19 | background-position: -24px 0; 20 | } 21 | .icheckbox_square-aero.checked { 22 | background-position: -48px 0; 23 | } 24 | .icheckbox_square-aero.disabled { 25 | background-position: -72px 0; 26 | cursor: default; 27 | } 28 | .icheckbox_square-aero.checked.disabled { 29 | background-position: -96px 0; 30 | } 31 | 32 | .iradio_square-aero { 33 | background-position: -120px 0; 34 | } 35 | .iradio_square-aero.hover { 36 | background-position: -144px 0; 37 | } 38 | .iradio_square-aero.checked { 39 | background-position: -168px 0; 40 | } 41 | .iradio_square-aero.disabled { 42 | background-position: -192px 0; 43 | cursor: default; 44 | } 45 | .iradio_square-aero.checked.disabled { 46 | background-position: -216px 0; 47 | } 48 | 49 | /* Retina support */ 50 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 51 | only screen and (-moz-min-device-pixel-ratio: 1.5), 52 | only screen and (-o-min-device-pixel-ratio: 3/2), 53 | only screen and (min-device-pixel-ratio: 1.5) { 54 | .icheckbox_square-aero, 55 | .iradio_square-aero { 56 | background-image: url(aero@2x.png); 57 | -webkit-background-size: 240px 24px; 58 | background-size: 240px 24px; 59 | } 60 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/aero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/square/aero.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/aero@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/square/aero@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/blue.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Square skin, blue 2 | ----------------------------------- */ 3 | .icheckbox_square-blue, 4 | .iradio_square-blue { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 22px; 9 | height: 22px; 10 | background: url(blue.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_square-blue { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_square-blue.hover { 19 | background-position: -24px 0; 20 | } 21 | .icheckbox_square-blue.checked { 22 | background-position: -48px 0; 23 | } 24 | .icheckbox_square-blue.disabled { 25 | background-position: -72px 0; 26 | cursor: default; 27 | } 28 | .icheckbox_square-blue.checked.disabled { 29 | background-position: -96px 0; 30 | } 31 | 32 | .iradio_square-blue { 33 | background-position: -120px 0; 34 | } 35 | .iradio_square-blue.hover { 36 | background-position: -144px 0; 37 | } 38 | .iradio_square-blue.checked { 39 | background-position: -168px 0; 40 | } 41 | .iradio_square-blue.disabled { 42 | background-position: -192px 0; 43 | cursor: default; 44 | } 45 | .iradio_square-blue.checked.disabled { 46 | background-position: -216px 0; 47 | } 48 | 49 | /* Retina support */ 50 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 51 | only screen and (-moz-min-device-pixel-ratio: 1.5), 52 | only screen and (-o-min-device-pixel-ratio: 3/2), 53 | only screen and (min-device-pixel-ratio: 1.5) { 54 | .icheckbox_square-blue, 55 | .iradio_square-blue { 56 | background-image: url(blue@2x.png); 57 | -webkit-background-size: 240px 24px; 58 | background-size: 240px 24px; 59 | } 60 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/square/blue.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/blue@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/square/blue@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/green.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Square skin, green 2 | ----------------------------------- */ 3 | .icheckbox_square-green, 4 | .iradio_square-green { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 22px; 9 | height: 22px; 10 | background: url(green.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_square-green { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_square-green.hover { 19 | background-position: -24px 0; 20 | } 21 | .icheckbox_square-green.checked { 22 | background-position: -48px 0; 23 | } 24 | .icheckbox_square-green.disabled { 25 | background-position: -72px 0; 26 | cursor: default; 27 | } 28 | .icheckbox_square-green.checked.disabled { 29 | background-position: -96px 0; 30 | } 31 | 32 | .iradio_square-green { 33 | background-position: -120px 0; 34 | } 35 | .iradio_square-green.hover { 36 | background-position: -144px 0; 37 | } 38 | .iradio_square-green.checked { 39 | background-position: -168px 0; 40 | } 41 | .iradio_square-green.disabled { 42 | background-position: -192px 0; 43 | cursor: default; 44 | } 45 | .iradio_square-green.checked.disabled { 46 | background-position: -216px 0; 47 | } 48 | 49 | /* Retina support */ 50 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 51 | only screen and (-moz-min-device-pixel-ratio: 1.5), 52 | only screen and (-o-min-device-pixel-ratio: 3/2), 53 | only screen and (min-device-pixel-ratio: 1.5) { 54 | .icheckbox_square-green, 55 | .iradio_square-green { 56 | background-image: url(green@2x.png); 57 | -webkit-background-size: 240px 24px; 58 | background-size: 240px 24px; 59 | } 60 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/square/green.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/green@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/square/green@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/grey.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Square skin, grey 2 | ----------------------------------- */ 3 | .icheckbox_square-grey, 4 | .iradio_square-grey { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 22px; 9 | height: 22px; 10 | background: url(grey.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_square-grey { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_square-grey.hover { 19 | background-position: -24px 0; 20 | } 21 | .icheckbox_square-grey.checked { 22 | background-position: -48px 0; 23 | } 24 | .icheckbox_square-grey.disabled { 25 | background-position: -72px 0; 26 | cursor: default; 27 | } 28 | .icheckbox_square-grey.checked.disabled { 29 | background-position: -96px 0; 30 | } 31 | 32 | .iradio_square-grey { 33 | background-position: -120px 0; 34 | } 35 | .iradio_square-grey.hover { 36 | background-position: -144px 0; 37 | } 38 | .iradio_square-grey.checked { 39 | background-position: -168px 0; 40 | } 41 | .iradio_square-grey.disabled { 42 | background-position: -192px 0; 43 | cursor: default; 44 | } 45 | .iradio_square-grey.checked.disabled { 46 | background-position: -216px 0; 47 | } 48 | 49 | /* Retina support */ 50 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 51 | only screen and (-moz-min-device-pixel-ratio: 1.5), 52 | only screen and (-o-min-device-pixel-ratio: 3/2), 53 | only screen and (min-device-pixel-ratio: 1.5) { 54 | .icheckbox_square-grey, 55 | .iradio_square-grey { 56 | background-image: url(grey@2x.png); 57 | -webkit-background-size: 240px 24px; 58 | background-size: 240px 24px; 59 | } 60 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/square/grey.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/grey@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/square/grey@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/orange.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Square skin, orange 2 | ----------------------------------- */ 3 | .icheckbox_square-orange, 4 | .iradio_square-orange { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 22px; 9 | height: 22px; 10 | background: url(orange.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_square-orange { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_square-orange.hover { 19 | background-position: -24px 0; 20 | } 21 | .icheckbox_square-orange.checked { 22 | background-position: -48px 0; 23 | } 24 | .icheckbox_square-orange.disabled { 25 | background-position: -72px 0; 26 | cursor: default; 27 | } 28 | .icheckbox_square-orange.checked.disabled { 29 | background-position: -96px 0; 30 | } 31 | 32 | .iradio_square-orange { 33 | background-position: -120px 0; 34 | } 35 | .iradio_square-orange.hover { 36 | background-position: -144px 0; 37 | } 38 | .iradio_square-orange.checked { 39 | background-position: -168px 0; 40 | } 41 | .iradio_square-orange.disabled { 42 | background-position: -192px 0; 43 | cursor: default; 44 | } 45 | .iradio_square-orange.checked.disabled { 46 | background-position: -216px 0; 47 | } 48 | 49 | /* Retina support */ 50 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 51 | only screen and (-moz-min-device-pixel-ratio: 1.5), 52 | only screen and (-o-min-device-pixel-ratio: 3/2), 53 | only screen and (min-device-pixel-ratio: 1.5) { 54 | .icheckbox_square-orange, 55 | .iradio_square-orange { 56 | background-image: url(orange@2x.png); 57 | -webkit-background-size: 240px 24px; 58 | background-size: 240px 24px; 59 | } 60 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/square/orange.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/orange@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/square/orange@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/pink.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Square skin, pink 2 | ----------------------------------- */ 3 | .icheckbox_square-pink, 4 | .iradio_square-pink { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 22px; 9 | height: 22px; 10 | background: url(pink.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_square-pink { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_square-pink.hover { 19 | background-position: -24px 0; 20 | } 21 | .icheckbox_square-pink.checked { 22 | background-position: -48px 0; 23 | } 24 | .icheckbox_square-pink.disabled { 25 | background-position: -72px 0; 26 | cursor: default; 27 | } 28 | .icheckbox_square-pink.checked.disabled { 29 | background-position: -96px 0; 30 | } 31 | 32 | .iradio_square-pink { 33 | background-position: -120px 0; 34 | } 35 | .iradio_square-pink.hover { 36 | background-position: -144px 0; 37 | } 38 | .iradio_square-pink.checked { 39 | background-position: -168px 0; 40 | } 41 | .iradio_square-pink.disabled { 42 | background-position: -192px 0; 43 | cursor: default; 44 | } 45 | .iradio_square-pink.checked.disabled { 46 | background-position: -216px 0; 47 | } 48 | 49 | /* Retina support */ 50 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 51 | only screen and (-moz-min-device-pixel-ratio: 1.5), 52 | only screen and (-o-min-device-pixel-ratio: 3/2), 53 | only screen and (min-device-pixel-ratio: 1.5) { 54 | .icheckbox_square-pink, 55 | .iradio_square-pink { 56 | background-image: url(pink@2x.png); 57 | -webkit-background-size: 240px 24px; 58 | background-size: 240px 24px; 59 | } 60 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/square/pink.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/pink@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/square/pink@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/purple.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Square skin, purple 2 | ----------------------------------- */ 3 | .icheckbox_square-purple, 4 | .iradio_square-purple { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 22px; 9 | height: 22px; 10 | background: url(purple.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_square-purple { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_square-purple.hover { 19 | background-position: -24px 0; 20 | } 21 | .icheckbox_square-purple.checked { 22 | background-position: -48px 0; 23 | } 24 | .icheckbox_square-purple.disabled { 25 | background-position: -72px 0; 26 | cursor: default; 27 | } 28 | .icheckbox_square-purple.checked.disabled { 29 | background-position: -96px 0; 30 | } 31 | 32 | .iradio_square-purple { 33 | background-position: -120px 0; 34 | } 35 | .iradio_square-purple.hover { 36 | background-position: -144px 0; 37 | } 38 | .iradio_square-purple.checked { 39 | background-position: -168px 0; 40 | } 41 | .iradio_square-purple.disabled { 42 | background-position: -192px 0; 43 | cursor: default; 44 | } 45 | .iradio_square-purple.checked.disabled { 46 | background-position: -216px 0; 47 | } 48 | 49 | /* Retina support */ 50 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 51 | only screen and (-moz-min-device-pixel-ratio: 1.5), 52 | only screen and (-o-min-device-pixel-ratio: 3/2), 53 | only screen and (min-device-pixel-ratio: 1.5) { 54 | .icheckbox_square-purple, 55 | .iradio_square-purple { 56 | background-image: url(purple@2x.png); 57 | -webkit-background-size: 240px 24px; 58 | background-size: 240px 24px; 59 | } 60 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/purple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/square/purple.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/purple@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/square/purple@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/red.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Square skin, red 2 | ----------------------------------- */ 3 | .icheckbox_square-red, 4 | .iradio_square-red { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 22px; 9 | height: 22px; 10 | background: url(red.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_square-red { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_square-red.hover { 19 | background-position: -24px 0; 20 | } 21 | .icheckbox_square-red.checked { 22 | background-position: -48px 0; 23 | } 24 | .icheckbox_square-red.disabled { 25 | background-position: -72px 0; 26 | cursor: default; 27 | } 28 | .icheckbox_square-red.checked.disabled { 29 | background-position: -96px 0; 30 | } 31 | 32 | .iradio_square-red { 33 | background-position: -120px 0; 34 | } 35 | .iradio_square-red.hover { 36 | background-position: -144px 0; 37 | } 38 | .iradio_square-red.checked { 39 | background-position: -168px 0; 40 | } 41 | .iradio_square-red.disabled { 42 | background-position: -192px 0; 43 | cursor: default; 44 | } 45 | .iradio_square-red.checked.disabled { 46 | background-position: -216px 0; 47 | } 48 | 49 | /* Retina support */ 50 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 51 | only screen and (-moz-min-device-pixel-ratio: 1.5), 52 | only screen and (-o-min-device-pixel-ratio: 3/2), 53 | only screen and (min-device-pixel-ratio: 1.5) { 54 | .icheckbox_square-red, 55 | .iradio_square-red { 56 | background-image: url(red@2x.png); 57 | -webkit-background-size: 240px 24px; 58 | background-size: 240px 24px; 59 | } 60 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/square/red.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/red@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/square/red@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/square.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Square skin, black 2 | ----------------------------------- */ 3 | .icheckbox_square, 4 | .iradio_square { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 22px; 9 | height: 22px; 10 | background: url(square.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_square { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_square.hover { 19 | background-position: -24px 0; 20 | } 21 | .icheckbox_square.checked { 22 | background-position: -48px 0; 23 | } 24 | .icheckbox_square.disabled { 25 | background-position: -72px 0; 26 | cursor: default; 27 | } 28 | .icheckbox_square.checked.disabled { 29 | background-position: -96px 0; 30 | } 31 | 32 | .iradio_square { 33 | background-position: -120px 0; 34 | } 35 | .iradio_square.hover { 36 | background-position: -144px 0; 37 | } 38 | .iradio_square.checked { 39 | background-position: -168px 0; 40 | } 41 | .iradio_square.disabled { 42 | background-position: -192px 0; 43 | cursor: default; 44 | } 45 | .iradio_square.checked.disabled { 46 | background-position: -216px 0; 47 | } 48 | 49 | /* Retina support */ 50 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 51 | only screen and (-moz-min-device-pixel-ratio: 1.5), 52 | only screen and (-o-min-device-pixel-ratio: 3/2), 53 | only screen and (min-device-pixel-ratio: 1.5) { 54 | .icheckbox_square, 55 | .iradio_square { 56 | background-image: url(square@2x.png); 57 | -webkit-background-size: 240px 24px; 58 | background-size: 240px 24px; 59 | } 60 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/square/square.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/square@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/square/square@2x.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/yellow.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Square skin, yellow 2 | ----------------------------------- */ 3 | .icheckbox_square-yellow, 4 | .iradio_square-yellow { 5 | display: block; 6 | margin: 0; 7 | padding: 0; 8 | width: 22px; 9 | height: 22px; 10 | background: url(yellow.png) no-repeat; 11 | border: none; 12 | cursor: pointer; 13 | } 14 | 15 | .icheckbox_square-yellow { 16 | background-position: 0 0; 17 | } 18 | .icheckbox_square-yellow.hover { 19 | background-position: -24px 0; 20 | } 21 | .icheckbox_square-yellow.checked { 22 | background-position: -48px 0; 23 | } 24 | .icheckbox_square-yellow.disabled { 25 | background-position: -72px 0; 26 | cursor: default; 27 | } 28 | .icheckbox_square-yellow.checked.disabled { 29 | background-position: -96px 0; 30 | } 31 | 32 | .iradio_square-yellow { 33 | background-position: -120px 0; 34 | } 35 | .iradio_square-yellow.hover { 36 | background-position: -144px 0; 37 | } 38 | .iradio_square-yellow.checked { 39 | background-position: -168px 0; 40 | } 41 | .iradio_square-yellow.disabled { 42 | background-position: -192px 0; 43 | cursor: default; 44 | } 45 | .iradio_square-yellow.checked.disabled { 46 | background-position: -216px 0; 47 | } 48 | 49 | /* Retina support */ 50 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 51 | only screen and (-moz-min-device-pixel-ratio: 1.5), 52 | only screen and (-o-min-device-pixel-ratio: 3/2), 53 | only screen and (min-device-pixel-ratio: 1.5) { 54 | .icheckbox_square-yellow, 55 | .iradio_square-yellow { 56 | background-image: url(yellow@2x.png); 57 | -webkit-background-size: 240px 24px; 58 | background-size: 240px 24px; 59 | } 60 | } -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/square/yellow.png -------------------------------------------------------------------------------- /app/static/js/ichecker/skins/square/yellow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/ichecker/skins/square/yellow@2x.png -------------------------------------------------------------------------------- /app/static/js/zTree/zTreeStyle/img/diy/1_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/zTree/zTreeStyle/img/diy/1_close.png -------------------------------------------------------------------------------- /app/static/js/zTree/zTreeStyle/img/diy/1_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/zTree/zTreeStyle/img/diy/1_open.png -------------------------------------------------------------------------------- /app/static/js/zTree/zTreeStyle/img/diy/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/zTree/zTreeStyle/img/diy/2.png -------------------------------------------------------------------------------- /app/static/js/zTree/zTreeStyle/img/diy/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/zTree/zTreeStyle/img/diy/3.png -------------------------------------------------------------------------------- /app/static/js/zTree/zTreeStyle/img/diy/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/zTree/zTreeStyle/img/diy/4.png -------------------------------------------------------------------------------- /app/static/js/zTree/zTreeStyle/img/diy/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/zTree/zTreeStyle/img/diy/5.png -------------------------------------------------------------------------------- /app/static/js/zTree/zTreeStyle/img/diy/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/zTree/zTreeStyle/img/diy/6.png -------------------------------------------------------------------------------- /app/static/js/zTree/zTreeStyle/img/diy/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/zTree/zTreeStyle/img/diy/7.png -------------------------------------------------------------------------------- /app/static/js/zTree/zTreeStyle/img/diy/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/zTree/zTreeStyle/img/diy/8.png -------------------------------------------------------------------------------- /app/static/js/zTree/zTreeStyle/img/diy/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/zTree/zTreeStyle/img/diy/9.png -------------------------------------------------------------------------------- /app/static/js/zTree/zTreeStyle/img/line_conn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/zTree/zTreeStyle/img/line_conn.gif -------------------------------------------------------------------------------- /app/static/js/zTree/zTreeStyle/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/zTree/zTreeStyle/img/loading.gif -------------------------------------------------------------------------------- /app/static/js/zTree/zTreeStyle/img/zTreeStandard.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/zTree/zTreeStyle/img/zTreeStandard.gif -------------------------------------------------------------------------------- /app/static/js/zTree/zTreeStyle/img/zTreeStandard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/app/static/js/zTree/zTreeStyle/img/zTreeStandard.png -------------------------------------------------------------------------------- /app/templates/admin/application/add_or_edit_bs.html: -------------------------------------------------------------------------------- 1 | {% extends "../base_a_bs.html" %} 2 | {% block crumb %} 3 |
  • 4 | 应用管理 5 |
  • 6 |
  • {% if isedit %}编辑应用{% else %}新建应用{% end %}
  • 7 | {% end %} 8 | 9 | {% block content %} 10 |
    11 |
    12 |
    13 |
    14 |
    15 |
    16 | 17 |
    18 | 19 | {% if isedit %} 20 | 21 | {% end %} 22 |
    23 |
    24 |
    25 | 26 |
    27 | 28 |
    29 |
    30 |
    31 | 32 |
    33 | 36 | 39 |
    40 |
    41 |
    42 | 43 |
    44 | 45 |
    46 |
    47 |
    48 | 49 |
    50 | 51 |
    52 |
    53 |
    54 | 55 |
    56 | 57 |
    58 |
    59 |
    60 | 61 | 返回 62 | 63 |
    64 |
    65 |
    66 |
    67 |
    68 |
    69 | {% end %} -------------------------------------------------------------------------------- /app/templates/admin/application/detail_bs.html: -------------------------------------------------------------------------------- 1 | {% extends "../base_a_bs.html" %} 2 | {% block crumb %} 3 |
  • 4 | 应用管理 5 |
  • 6 |
  • 应用详情
  • 7 | {% end %} 8 | 9 | {% block content %} 10 |
    11 |
    12 |
    13 |
    14 | 15 | 16 | 19 | 22 | 23 | 24 | 27 | 30 | 31 | 32 | 35 | 38 | 39 | 40 | 43 | 46 | 47 | 48 | 51 | 54 | 55 | 56 | 59 | 62 | 63 | 64 | 67 | 70 | 71 | 72 | 75 | 78 | 79 | 80 | 83 | 86 | 87 | 88 | 91 | 94 | 95 |
    17 | 编号 18 | 20 | {{ app['code'] }} 21 |
    25 | 名称 26 | 28 | {{ app['name'] }} 29 |
    33 | 状态 34 | 36 | {{ app['statusname'] }} 37 |
    41 | 默认链接 42 | 44 | {{ app['url'] }} 45 |
    49 | 开发负责人 50 | 52 | {{ app['developer'] }} 53 |
    57 | 备注 58 | 60 | {{ app['remark'] }} 61 |
    65 | 创建人 66 | 68 | {{ app['creater'] }} 69 |
    73 | 创建时间 74 | 76 | {{ app['createTime'] }} 77 |
    81 | 最后更新人 82 | 84 | {{ app['lastUpdater'] }} 85 |
    89 | 最后更新时间 90 | 92 | {{ app['lastUpdateTime'] }} 93 |
    96 |
    97 | 返回 98 |
    99 |
    100 |
    101 |
    102 |
    103 | {% end %} -------------------------------------------------------------------------------- /app/templates/admin/base_a_bs.html: -------------------------------------------------------------------------------- 1 | {% extends "../base_bs.html" %} 2 | {% block head %} 3 | 4 | 5 | 6 | 7 | 8 | {% end %} 9 | {% block body %} 10 |
    11 |
    12 |
    13 |
    14 | 18 |
    19 |
    20 |
    21 |
    22 | 23 |
    24 |
    25 |
    26 |
    27 | {% block content %}{% end %} 28 |
    29 |
    30 |
    31 |
    32 | 43 | {% end %} 44 | -------------------------------------------------------------------------------- /app/templates/admin/department/add_or_edit_bs.html: -------------------------------------------------------------------------------- 1 | {% extends "../base_a_bs.html" %} 2 | {% block crumb %} 3 |
  • 4 | 部门管理 5 |
  • 6 |
  • {% if isedit %}编辑部门{% else %}新建部门{% end %}
  • 7 | {% end %} 8 | 9 | {% block content %} 10 |
    11 |
    12 |
    13 |
    14 |
    15 | {% if isedit %} 16 |
    17 | 18 |
    19 | 20 | 21 |
    22 |
    23 | {% end %} 24 |
    25 | 26 |
    27 | 28 |
    29 |
    30 |
    31 | 32 |
    33 | 36 | 39 |
    40 |
    41 |
    42 | 43 |
    44 | 45 |
    46 |
    47 |
    48 | 49 | 返回 50 | 51 |
    52 |
    53 |
    54 |
    55 |
    56 |
    57 | {% end %} -------------------------------------------------------------------------------- /app/templates/admin/department/detail_bs.html: -------------------------------------------------------------------------------- 1 | {% extends "../base_a_bs.html" %} 2 | {% block crumb %} 3 |
  • 4 | 部门管理 5 |
  • 6 |
  • 部门详情
  • 7 | {% end %} 8 | 9 | {% block content %} 10 |
    11 |
    12 |
    13 |
    14 | 15 | 16 | 19 | 22 | 23 | 24 | 27 | 30 | 31 | 32 | 35 | 38 | 39 | 40 | 43 | 46 | 47 | 48 | 51 | 54 | 55 | 56 | 59 | 62 | 63 | 64 | 67 | 70 | 71 | 72 | 75 | 78 | 79 |
    17 | 编号 18 | 20 | {{ dep['id'] }} 21 |
    25 | 名称 26 | 28 | {{ dep['name'] }} 29 |
    33 | 状态 34 | 36 | {{ dep['statusname'] }} 37 |
    41 | 备注 42 | 44 | {{ dep['remark'] }} 45 |
    49 | 创建人 50 | 52 | {{ dep['creater'] }} 53 |
    57 | 创建时间 58 | 60 | {{ dep['createTime'] }} 61 |
    65 | 最后更新人 66 | 68 | {{ dep['lastUpdater'] }} 69 |
    73 | 最后更新时间 74 | 76 | {{ dep['lastUpdateTime'] }} 77 |
    80 |
    81 | 返回 82 |
    83 |
    84 |
    85 |
    86 |
    87 | {% end %} -------------------------------------------------------------------------------- /app/templates/admin/department/list_bs.html: -------------------------------------------------------------------------------- 1 | {% extends "../base_a_bs.html" %} 2 | {% block crumb %} 3 |
  • 4 | 部门管理 5 |
  • 6 |
  • 部门列表
  • 7 | {% end %} 8 | 9 | {% block content %} 10 |
    11 |
    12 |
    13 |
    查询条件
    14 |
    15 |
    16 |
    17 | 18 | 19 |
    20 |
    21 | 22 | 27 |
    28 |
    29 | 新建部门 30 | 31 |
    32 |
    33 |
    34 |
    35 |
    36 |
    37 |
    38 |
    39 |
    40 |
    41 | 42 | 43 | 46 | 49 | 52 | 55 | 58 | 61 | 64 | 67 | 68 | {% for r in pagedata['data'] %} 69 | 70 | 73 | 76 | 79 | 82 | 85 | 88 | 91 | 95 | 96 | {% end %} 97 |
    44 | 编号 45 | 47 | 部门 48 | 50 | 状态 51 | 53 | 创建人 54 | 56 | 创建时间 57 | 59 | 最后更新人 60 | 62 | 最后更新时间 63 | 65 | 操作 66 |
    71 | {{ r['id'] }} 72 | 74 | {{ r['name'] }} 75 | 77 | {{ r['statusname'] }} 78 | 80 | {{ r['creater'] }} 81 | 83 | {{ str(r['createTime'])[0:-3] }} 84 | 86 | {{ r['lastUpdater'] }} 87 | 89 | {{ str(r['lastUpdateTime'])[0:-3] }} 90 | 92 | 查看详情 93 | 修改编辑 94 |
    98 | {% raw pager %} 99 |
    100 |
    101 |
    102 |
    103 | {% end %} -------------------------------------------------------------------------------- /app/templates/admin/func/list_bs.html: -------------------------------------------------------------------------------- 1 | {% extends "../base_a_bs.html" %} 2 | {% block crumb %} 3 |
  • 4 | 功能管理 5 |
  • 6 |
  • 功能列表
  • 7 | {% end %} 8 | 9 | {% block content %} 10 |
    11 |
    12 |
    13 |
    查询条件
    14 |
    15 |
    16 |
    17 | 18 | 23 |
    24 | 27 |
    28 |
    29 |
    30 |
    31 |
    32 |
    33 |
    34 |
    35 |
    36 | 37 | 38 | 41 | 44 | 47 | 50 | 53 | 54 | {% if None != funcs %} 55 | {% for func in funcs %} 56 | 57 | 60 | 64 | 67 | 70 | 73 | 74 | {% end %} 75 | {% end %} 76 |
    39 | 编号 40 | 42 | 名称 43 | 45 | 编号 46 | 48 | 排序编号 49 | 51 | 功能PATH 52 |
    58 | {{ func['id'] }} 59 | 61 | {% set c = func['path'].count('.') %} 62 | {% for i in range(c-1) %}██{% end %}{{ func['name'] }}-Lv{{c}} 63 | 65 | {{ func['code'] }} 66 | 68 | {{ func['sort'] }} 69 | 71 | {{ func['path'] }} 72 |
    77 |
    78 |
    79 |
    80 |
    81 | 90 | {% end %} -------------------------------------------------------------------------------- /app/templates/admin/index_bs.html: -------------------------------------------------------------------------------- 1 | {% extends "base_a_bs.html" %} 2 | {% block crumb %} 3 |
  • 欢迎页
  • 4 | {% end %} 5 | 6 | {% block content %} 7 |
    8 |
    9 |
    10 |
    {{title}}
    11 |
    12 | 欢迎您:{{user['realName']}} 13 |
    14 |
    15 |
    16 |
    友情提示:不支持IE6-8浏览器,建议使用更高级浏览器版本,谢谢。
    17 |
    18 |
    19 |
    20 |
    21 | {% end %} -------------------------------------------------------------------------------- /app/templates/admin/not_right_bs.html: -------------------------------------------------------------------------------- 1 | {% extends "base_a_bs.html" %} 2 | {% block crumb %} 3 |
  • 权限错误
  • 4 | {% end %} 5 | 6 | {% block content %} 7 |
    8 |
    9 |
    10 |

    抱歉,您没有该操作权限。

    11 |
    12 |
    13 |
    14 | {% end %} -------------------------------------------------------------------------------- /app/templates/admin/role/add_or_edit_bs.html: -------------------------------------------------------------------------------- 1 | {% extends "../base_a_bs.html" %} 2 | {% block crumb %} 3 |
  • 4 | 角色管理 5 |
  • 6 |
  • {% if isedit %}编辑角色{% else %}新建角色{% end %}
  • 7 | {% end %} 8 | 9 | {% block content %} 10 |
    11 |
    12 |
    13 |
    14 |
    15 | {% if isedit %} 16 |
    17 | 18 |
    19 | 20 | 21 |
    22 |
    23 | {% end %} 24 |
    25 | 26 |
    27 | 28 |
    29 |
    30 |
    31 | 32 |
    33 | 36 | 39 |
    40 |
    41 |
    42 | 43 |
    44 | 45 |
    46 |
    47 |
    48 | 49 | 返回 50 | 51 |
    52 |
    53 |
    54 |
    55 |
    56 |
    57 | {% end %} -------------------------------------------------------------------------------- /app/templates/admin/role/detail_bs.html: -------------------------------------------------------------------------------- 1 | {% extends "../base_a_bs.html" %} 2 | {% block crumb %} 3 |
  • 4 | 角色管理 5 |
  • 6 |
  • 角色详情
  • 7 | {% end %} 8 | 9 | {% block content %} 10 |
    11 |
    12 |
    13 |
    14 | 15 | 16 | 19 | 22 | 23 | 24 | 27 | 30 | 31 | 32 | 35 | 38 | 39 | 40 | 43 | 46 | 47 | 48 | 51 | 54 | 55 | 56 | 59 | 62 | 63 | 64 | 67 | 70 | 71 | 72 | 75 | 78 | 79 |
    17 | 编号 18 | 20 | {{ role['id'] }} 21 |
    25 | 名称 26 | 28 | {{ role['name'] }} 29 |
    33 | 状态 34 | 36 | {{ role['statusname'] }} 37 |
    41 | 备注 42 | 44 | {{ role['remark'] }} 45 |
    49 | 创建人 50 | 52 | {{ role['creater'] }} 53 |
    57 | 创建时间 58 | 60 | {{ role['createTime'] }} 61 |
    65 | 最后更新人 66 | 68 | {{ role['lastUpdater'] }} 69 |
    73 | 最后更新时间 74 | 76 | {{ role['lastUpdateTime'] }} 77 |
    80 |
    81 | 返回 82 |
    83 |
    84 |
    85 |
    86 |
    87 | {% end %} -------------------------------------------------------------------------------- /app/templates/admin/usergroup/add_or_edit_bs.html: -------------------------------------------------------------------------------- 1 | {% extends "../base_a_bs.html" %} 2 | {% block crumb %} 3 |
  • 4 | 用户组管理 5 |
  • 6 |
  • {% if isedit %}编辑用户组{% else %}新建用户组{% end %}
  • 7 | {% end %} 8 | 9 | {% block content %} 10 |
    11 |
    12 |
    13 |
    14 |
    15 | {% if isedit %} 16 |
    17 | 18 |
    19 | 20 | 21 |
    22 |
    23 | {% end %} 24 |
    25 | 26 |
    27 | 28 |
    29 |
    30 |
    31 | 32 |
    33 | 36 | 39 |
    40 |
    41 |
    42 | 43 |
    44 | 45 |
    46 |
    47 |
    48 | 49 | 返回 50 | 51 |
    52 |
    53 |
    54 |
    55 |
    56 |
    57 | {% end %} -------------------------------------------------------------------------------- /app/templates/admin/usergroup/detail_bs.html: -------------------------------------------------------------------------------- 1 | {% extends "../base_a_bs.html" %} 2 | {% block crumb %} 3 |
  • 4 | 用户组管理 5 |
  • 6 |
  • 用户组详情
  • 7 | {% end %} 8 | 9 | {% block content %} 10 |
    11 |
    12 |
    13 |
    14 | 15 | 16 | 19 | 22 | 23 | 24 | 27 | 30 | 31 | 32 | 35 | 38 | 39 | 40 | 43 | 46 | 47 | 48 | 51 | 54 | 55 | 56 | 59 | 62 | 63 | 64 | 67 | 70 | 71 | 72 | 75 | 78 | 79 |
    17 | 编号 18 | 20 | {{ usergroup['id'] }} 21 |
    25 | 名称 26 | 28 | {{ usergroup['name'] }} 29 |
    33 | 状态 34 | 36 | {{ usergroup['statusname'] }} 37 |
    41 | 备注 42 | 44 | {{ usergroup['remark'] }} 45 |
    49 | 创建人 50 | 52 | {{ usergroup['creater'] }} 53 |
    57 | 创建时间 58 | 60 | {{ usergroup['createTime'] }} 61 |
    65 | 最后更新人 66 | 68 | {{ usergroup['lastUpdater'] }} 69 |
    73 | 最后更新时间 74 | 76 | {{ usergroup['lastUpdateTime'] }} 77 |
    80 |
    81 | 返回 82 |
    83 |
    84 |
    85 |
    86 |
    87 | {% end %} -------------------------------------------------------------------------------- /app/templates/app_list_bs.html: -------------------------------------------------------------------------------- 1 | {% extends "base_s_bs.html" %} {% block head %} {% end %} {% block content %} 2 | 3 | 4 |
    5 |
    6 | {% for app in apps %} 7 |
      {{app['name']}}
    8 | {% end %} 9 |
    10 | {% end %} -------------------------------------------------------------------------------- /app/templates/base_bs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{ title }} 7 | 8 | 9 | 10 | 11 | 12 | 13 | {% block head %}{% end %} 14 | 15 | 16 | {% block body %}{% end %} 17 | 18 | 19 | 20 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /app/templates/base_s_bs.html: -------------------------------------------------------------------------------- 1 | {% extends "base_bs.html" %} {% block head %} {% end %} {% block body %} 2 | 3 | 30 |
    31 | {% block content %}{% end %} 32 |
    33 | {% end %} 34 | -------------------------------------------------------------------------------- /app/templates/login_bs.html: -------------------------------------------------------------------------------- 1 | {% extends "base_bs.html" %} {% block head %} 2 | 3 | {% end %} {% block body %} 4 | 5 |
    6 | 22 |
    友情提示:不支持IE6-8浏览器,建议使用更高级浏览器版本,谢谢。
    23 |
    24 | {% end %} -------------------------------------------------------------------------------- /app/templates/password_edit_bs.html: -------------------------------------------------------------------------------- 1 | {% extends "base_s_bs.html" %} {% block head %} 2 | {% end %} {% block content %} 3 |
    4 | 19 |
    20 | 21 | {% end %} -------------------------------------------------------------------------------- /app/templates/test.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} {% block head %} 2 | 3 | {% end %} {% block body %} 4 | 5 | {% end %} -------------------------------------------------------------------------------- /app/test.py: -------------------------------------------------------------------------------- 1 | #-*- encoding: utf-8 -*- 2 | 3 | from datetime import date, datetime, timedelta 4 | 5 | 6 | def get_now_datestr(): 7 | return datetime.now().strftime('%Y-%m-%d') 8 | 9 | 10 | def get_now_datestr1(days): 11 | d = datetime.now() + timedelta(days=days) 12 | return d.strftime('%Y-%m-%d') 13 | 14 | print get_now_datestr1(1) -------------------------------------------------------------------------------- /install.md: -------------------------------------------------------------------------------- 1 | # 1 云海统一权限管理系统【SOCSSORight】 2 | 目前由Tree维护的开源项目:-),目前支持linux平台,windows平台理论上也支持,但是还没部署过。 3 | 4 | ## 1.1 安装步骤 5 | 6 | ### 1.1.1 安装Nginx 1.2.9版本 7 | 可以去网上搜索安装教程,不再累述,理论上也支持nginx1.5.x版本,但未实验过,部署目录自定义 8 | 9 | ### 1.1.2 安装Redis 2.6.16版本 10 | 可以去网上搜索安装教程,不再累述,理论上也支持redis2.8.x版本,但未实验过,部署目录自定义 11 | 12 | ### 1.1.3 安装Python 2.7.x版本 13 | 可以去网上搜索安装教程,不再累述,理论上不支持python 3.x版本(:-)),部署目录自定义 14 | 15 | ### 1.1.4 安装Mysql 5.1.x版本 16 | 可以去网上搜索安装教程,不再累述,注意mysql-server和mysql-devel都需要装,CentOS系统可以使用yum进行安装 17 | 18 | ### 1.1.5 安装Python扩展,包括: 19 | - setuptools-0.6c11 20 | - MySQL-python-1.2.3 21 | - redis-py 22 | - Tornado 3.1.1 23 | 可以去网上搜索安装教程,不再累述 24 | 25 | ### 1.1.6 软连接Python,如下: 26 | - ln -s /opt/soft/python/bin/python /opt/soft/python/bin/python_socssoadmin 27 | - ln -s /opt/soft/python/bin/python /opt/soft/python/bin/python_socsso 28 | 29 | ### 1.1.6 修改redis配置,启动redis,主要有以下两点: 30 | - 修改为守护进程模式 31 | - daemonize yes 32 | - 注释save操作 33 | - #save 900 1 34 | - #save 300 10 35 | - #save 60 10000 36 | - 启动redis 37 | - /opt/soft/redis/redis-server /opt/soft/redis/etc/redis.conf 38 | 39 | 40 | ### 1.1.7 安装系统数据库 41 | Sql脚本为install/db/soc_sso_right.sql,数据库名为soc_sso_right,使用UTF-8编码 42 | 43 | ### 1.1.8 部署云海统一权限管理系统 44 | 将整个项目目录,放入web目录中,Tree自己部署在/opt/web/sso.socsoft.net/目录下 45 | 46 | #### 1.1.8.1 修改startservice.sh中配置 47 | 根据服务器cpu核数修改配置,目前为8核CPU的示例 48 | 49 | #### 1.1.8.2 修改startadmin.sh中配置 50 | 根据服务器cpu核数修改配置,目前为8核CPU的示例 51 | 52 | #### 1.1.8.3 给予/opt/web/sso.socsoft.net/下所有内容读写权限 53 | 54 | #### 1.1.8.4 给予4个sh文件可执行权限 55 | 56 | #### 1.1.8.5 修改app/config.py配置文件内容,修改参考备注 57 | 58 | #### 1.1.8.6 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /install/nginx-conf/nginx.conf: -------------------------------------------------------------------------------- 1 | 2 | #user nobody; 3 | worker_processes 8; 4 | 5 | #error_log logs/error.log; 6 | #error_log logs/error.log notice; 7 | #error_log logs/error.log info; 8 | 9 | #pid logs/nginx.pid; 10 | 11 | 12 | events { 13 | use epoll; 14 | worker_connections 102400; 15 | } 16 | 17 | 18 | http { 19 | include mime.types; 20 | default_type application/octet-stream; 21 | 22 | log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 23 | '$status $body_bytes_sent "$http_referer" ' 24 | '"$http_user_agent" "$http_x_forwarded_for"'; 25 | 26 | access_log logs/access.log main; 27 | 28 | server_tokens off; 29 | sendfile on; 30 | tcp_nopush on; 31 | 32 | keepalive_timeout 65; 33 | 34 | client_max_body_size 100m; 35 | 36 | gzip on; 37 | gzip_min_length 1k; 38 | gzip_buffers 4 16k; 39 | gzip_http_version 1.1; 40 | gzip_comp_level 2; 41 | gzip_types text/plain application/x-javascript text/css application/xml; 42 | gzip_vary on; 43 | 44 | 45 | upstream ssoserver { 46 | server 127.0.0.1:9901; 47 | server 127.0.0.1:9902; 48 | server 127.0.0.1:9903; 49 | server 127.0.0.1:9904; 50 | } 51 | 52 | 53 | server{ 54 | listen 80; 55 | server_name sso.ejyi.com; 56 | root /data/web/SOCRight; 57 | 58 | location /crossdomain.xml { 59 | root /data/web/SOCRight; 60 | } 61 | 62 | location / { 63 | root /data/web/SOCRight; 64 | proxy_pass_header Server; 65 | proxy_set_header Host $http_host; 66 | # proxy_redirect false; 67 | proxy_set_header X-Real-IP $remote_addr; 68 | proxy_set_header X-Scheme $scheme; 69 | if (!-f $request_filename) { 70 | proxy_pass http://ssoserver; 71 | } 72 | } 73 | } 74 | 75 | 76 | upstream ssoadminserver { 77 | server 127.0.0.1:9801; 78 | server 127.0.0.1:9802; 79 | server 127.0.0.1:9803; 80 | server 127.0.0.1:9804; 81 | } 82 | 83 | server{ 84 | listen 80; 85 | server_name ssoadmin.ejyi.com; 86 | root /data/web/SOCRight; 87 | 88 | location /crossdomain.xml { 89 | root /data/web/SOCRight; 90 | } 91 | 92 | location / { 93 | root /data/web/SOCRight; 94 | proxy_pass_header Server; 95 | proxy_set_header Host $http_host; 96 | # proxy_redirect false; 97 | proxy_set_header X-Real-IP $remote_addr; 98 | proxy_set_header X-Scheme $scheme; 99 | if (!-f $request_filename) { 100 | proxy_pass http://ssoadminserver; 101 | } 102 | } 103 | } 104 | 105 | 106 | } 107 | -------------------------------------------------------------------------------- /readme: -------------------------------------------------------------------------------- 1 | 云海权限管理系统. 2 | 3 | 4 | git push -u origin master 5 | 6 | 7 | update 8 | -------------------------------------------------------------------------------- /shell/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treeyh/SOCRight/020580d60b3ac55e84cfd459269ee0066498736c/shell/__init__.py -------------------------------------------------------------------------------- /shell/check_user_lock_and_expire.py: -------------------------------------------------------------------------------- 1 | #-*- encoding: utf-8 -*- 2 | 3 | # 计划任务:1、N天未登录锁定账号;2、账号超过使用期限锁定账号; 4 | # 5 | # 6 | # 7 | 8 | 9 | 10 | 11 | import datetime, calendar 12 | import sys 13 | import os 14 | 15 | path = os.path.split(os.path.realpath(__file__))[0] 16 | sys.path.append(path + '/../app/') 17 | 18 | #设置多少天未登录即锁定账号 19 | lockDay = 30 20 | 21 | 22 | from helper import str_helper 23 | from logic import user_logic 24 | from common import state, redis_cache, error 25 | 26 | 27 | 28 | #今天 29 | def get_today(): 30 | return datetime.datetime.today() 31 | 32 | 33 | def _get_user_info(page, size): 34 | userPage = user_logic.query_page(id = '', name = '', realName = '', departmentID = 0, 35 | tel = '', mobile = '', email = '', status = state.statusUserActive, page = page, size = size) 36 | return userPage 37 | 38 | 39 | 40 | 41 | if __name__ == '__main__': 42 | today = get_today() 43 | 44 | for p in range(1, 9999): 45 | 46 | up = _get_user_info(page = p, size = 1000) 47 | print up 48 | if 0 == len(up['data']): 49 | break 50 | for user in up['data']: 51 | endDate = str_helper.date_string_to_datetime(user['endDate']) 52 | 53 | ''' 验证是否超过截止日期 begin ''' 54 | inv = endDate - today 55 | if inv.days < 0: 56 | user_logic.update_status(id = user['id'], status = state.statusUserExpire, user = 'sys') 57 | 58 | 59 | ''' 验证是否登录超过30天 end ''' 60 | lastLoginTime = user.get('lastLoginTime', None) 61 | if None == lastLoginTime or '' == lastLoginTime: 62 | lastLoginTime = user['lastUpdateTime'] 63 | inv2 = today - lastLoginTime 64 | print '%s--%s--%d' % (user['name'], str(lastLoginTime) ,inv2.days) 65 | if inv2.days > lockDay: 66 | user_logic.update_status(id = user['id'], status = state.statusUserLock, user = 'sys') 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | 4 | CUR_DIR=$(cd "$(dirname "$0")"; pwd) 5 | PYTHON_BIN=/opt/python/bin 6 | 7 | #start service 8 | $PYTHON_BIN/python-soc $CUR_DIR/app/start.py -port=9901 -log_file_prefix=$CUR_DIR/logs/sso9901.log -service_log_file=$CUR_DIR/logs/sso.log >>$CUR_DIR/logs/ssoshell.log 2>&1 & 9 | $PYTHON_BIN/python-soc $CUR_DIR/app/start.py -port=9902 -log_file_prefix=$CUR_DIR/logs/sso9902.log -service_log_file=$CUR_DIR/logs/sso.log >>$CUR_DIR/logs/ssoshell.log 2>&1 & 10 | $PYTHON_BIN/python-soc $CUR_DIR/app/start.py -port=9903 -log_file_prefix=$CUR_DIR/logs/sso9903.log -service_log_file=$CUR_DIR/logs/sso.log >>$CUR_DIR/logs/ssoshell.log 2>&1 & 11 | $PYTHON_BIN/python-soc $CUR_DIR/app/start.py -port=9904 -log_file_prefix=$CUR_DIR/logs/sso9904.log -service_log_file=$CUR_DIR/logs/sso.log >>$CUR_DIR/logs/ssoshell.log 2>&1 & 12 | 13 | #start admin 14 | $PYTHON_BIN/python-socadmin $CUR_DIR/app/start.py -port=9801 -log_file_prefix=$CUR_DIR/logs/ssoadmin9801.log -service_log_file=$CUR_DIR/logs/ssoadmin.log >>$CUR_DIR/logs/ssoadminshell.log 2>&1 & 15 | $PYTHON_BIN/python-socadmin $CUR_DIR/app/start.py -port=9802 -log_file_prefix=$CUR_DIR/logs/ssoadmin9802.log -service_log_file=$CUR_DIR/logs/ssoadmin.log >>$CUR_DIR/logs/ssoadminshell.log 2>&1 & 16 | $PYTHON_BIN/python-socadmin $CUR_DIR/app/start.py -port=9803 -log_file_prefix=$CUR_DIR/logs/ssoadmin9803.log -service_log_file=$CUR_DIR/logs/ssoadmin.log >>$CUR_DIR/logs/ssoadminshell.log 2>&1 & 17 | $PYTHON_BIN/python-socadmin $CUR_DIR/app/start.py -port=9804 -log_file_prefix=$CUR_DIR/logs/ssoadmin9804.log -service_log_file=$CUR_DIR/logs/ssoadmin.log >>$CUR_DIR/logs/ssoadminshell.log 2>&1 & 18 | 19 | sleep 2 20 | 21 | ps aux|grep python-soc 22 | -------------------------------------------------------------------------------- /stop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #stop admin 4 | 5 | killall -9 python-socadmin 6 | sleep 2 7 | ps aux|grep python-socadmin 8 | 9 | #stop service 10 | killall -9 python-soc 11 | sleep 2 12 | ps aux|grep python-soc 13 | --------------------------------------------------------------------------------