目录结构更新,增加composer支持
This commit is contained in:
@@ -16,15 +16,6 @@ return array(
|
||||
'template' => array(
|
||||
),
|
||||
|
||||
'view_replace_str' => array(
|
||||
'__ADDONS__' => BASE_PATH . '/addons',
|
||||
'__PUBLIC__' => BASE_PATH . '/public',
|
||||
'__STATIC__' => BASE_PATH . '/application/admin/static',
|
||||
'__IMG__' => BASE_PATH . '/application/admin/static/images',
|
||||
'__CSS__' => BASE_PATH . '/application/admin/static/css',
|
||||
'__JS__' => BASE_PATH . '/application/admin/static/js',
|
||||
),
|
||||
|
||||
'session' => array(
|
||||
'prefix' => 'admin',
|
||||
'type' => '',
|
||||
|
||||
@@ -40,7 +40,7 @@ class Action extends Admin {
|
||||
*/
|
||||
public function add() {
|
||||
$model = model('Action');
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$data = input('post.');
|
||||
$result = $model->save($data);
|
||||
if (false != $result) {
|
||||
@@ -65,7 +65,7 @@ class Action extends Admin {
|
||||
*/
|
||||
public function edit($id = null) {
|
||||
$model = model('Action');
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$data = input('post.');
|
||||
$result = $model->save($data, array('id' => $data['id']));
|
||||
if ($result !== false) {
|
||||
|
||||
@@ -42,7 +42,7 @@ class Ad extends Admin {
|
||||
*/
|
||||
public function add() {
|
||||
$place = model('AdPlace');
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$result = $place->change();
|
||||
if (false !== false) {
|
||||
return $this->success("添加成功!");
|
||||
@@ -61,7 +61,7 @@ class Ad extends Admin {
|
||||
|
||||
public function edit($id = null) {
|
||||
$place = model('AdPlace');
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$result = $place->change();
|
||||
if ($result) {
|
||||
return $this->success("修改成功!", url('admin/ad/index'));
|
||||
@@ -115,7 +115,7 @@ class Ad extends Admin {
|
||||
|
||||
public function addad($id) {
|
||||
$ad = model('ad');
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$result = $ad->change();
|
||||
if ($result) {
|
||||
return $this->success("添加成功!", url('admin/ad/lists', array('id' => $this->param['place_id'])));
|
||||
@@ -136,7 +136,7 @@ class Ad extends Admin {
|
||||
|
||||
public function editad($id = null) {
|
||||
$ad = model('ad');
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$result = $ad->change();
|
||||
if ($result) {
|
||||
return $this->success("修改成功!", url('admin/ad/lists', array('id' => $this->param['place_id'])));
|
||||
|
||||
@@ -43,7 +43,7 @@ class Addons extends Admin {
|
||||
|
||||
//创建向导首页
|
||||
public function add() {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$data = $this->addons->create();
|
||||
if ($data) {
|
||||
if ($result) {
|
||||
@@ -150,7 +150,7 @@ class Addons extends Admin {
|
||||
* 设置插件页面
|
||||
*/
|
||||
public function config() {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
# code...
|
||||
} else {
|
||||
$id = input('id', '', 'trim,intval');
|
||||
@@ -232,7 +232,7 @@ class Addons extends Admin {
|
||||
|
||||
public function addhook() {
|
||||
$hooks = model('Hooks');
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$result = $hooks->change();
|
||||
if ($result !== false) {
|
||||
return $this->success("修改成功");
|
||||
@@ -253,7 +253,7 @@ class Addons extends Admin {
|
||||
//钩子出编辑挂载插件页面
|
||||
public function edithook($id) {
|
||||
$hooks = model('Hooks');
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$result = $hooks->change();
|
||||
if ($result !== false) {
|
||||
return $this->success("修改成功");
|
||||
|
||||
@@ -66,7 +66,7 @@ class Attribute extends Admin {
|
||||
* @author colin <colin@tensent.cn>
|
||||
*/
|
||||
public function add($model_id = '') {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$result = $this->model->validate('attribute.add')->save($this->param);
|
||||
if (false !== $result) {
|
||||
return $this->success("创建成功!", url('Attribute/index', array('model_id' => $model_id)));
|
||||
@@ -89,7 +89,7 @@ class Attribute extends Admin {
|
||||
* @author colin <colin@tensent.cn>
|
||||
*/
|
||||
public function edit($id = '', $model_id = '') {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$result = $this->model->validate('attribute.edit')->save($this->param, array('id'=>$id));
|
||||
if ($result) {
|
||||
return $this->success("修改成功!", url('Attribute/index', array('model_id' => $model_id)));
|
||||
|
||||
@@ -47,7 +47,7 @@ class Category extends Admin {
|
||||
|
||||
/* 编辑分类 */
|
||||
public function edit($id = null, $pid = 0) {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$category = model('Category');
|
||||
//提交表单
|
||||
$result = $category->change();
|
||||
@@ -85,7 +85,7 @@ class Category extends Admin {
|
||||
public function add($pid = 0) {
|
||||
$Category = model('Category');
|
||||
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
//提交表单
|
||||
$id = $Category->change();
|
||||
if (false !== $id) {
|
||||
@@ -250,7 +250,7 @@ class Category extends Admin {
|
||||
}
|
||||
|
||||
public function add_channel() {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$Channel = model('Channel');
|
||||
$data = $this->request->param();
|
||||
if ($data) {
|
||||
|
||||
@@ -53,7 +53,7 @@ class Channel extends Admin {
|
||||
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
||||
*/
|
||||
public function add() {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$Channel = model('Channel');
|
||||
$data = $this->request->post();
|
||||
if ($data) {
|
||||
@@ -89,7 +89,7 @@ class Channel extends Admin {
|
||||
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
||||
*/
|
||||
public function edit($id = 0) {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$Channel = model('Channel');
|
||||
$data = $this->request->post();
|
||||
if ($data) {
|
||||
@@ -155,7 +155,7 @@ class Channel extends Admin {
|
||||
* @author huajie <banhuajie@163.com>
|
||||
*/
|
||||
public function sort() {
|
||||
if (IS_GET) {
|
||||
if ($this->request->isGet()) {
|
||||
$ids = input('ids');
|
||||
$pid = input('pid');
|
||||
//获取排序的数据
|
||||
@@ -172,7 +172,7 @@ class Channel extends Admin {
|
||||
$this->assign('list', $list);
|
||||
$this->setMeta('导航排序');
|
||||
return $this->fetch();
|
||||
} elseif (IS_POST) {
|
||||
} elseif ($this->request->isPost()) {
|
||||
$ids = input('post.ids');
|
||||
$ids = explode(',', $ids);
|
||||
foreach ($ids as $key => $value) {
|
||||
|
||||
@@ -30,7 +30,7 @@ class Client extends Admin {
|
||||
}
|
||||
|
||||
public function add(\think\Request $request){
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$data = $request->param();
|
||||
$result = $this->model->validate(true)->save($data);
|
||||
if (false !== $result) {
|
||||
@@ -51,7 +51,7 @@ class Client extends Admin {
|
||||
}
|
||||
|
||||
public function edit(\think\Request $request){
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$data = $request->param();
|
||||
$result = $this->model->validate(true)->save($data, array('id'=>$request->param('id')));
|
||||
if (false !== $result) {
|
||||
|
||||
@@ -52,7 +52,7 @@ class Config extends Admin {
|
||||
}
|
||||
|
||||
public function group($id = 1) {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$config = $this->request->post('config/a');
|
||||
$model = model('Config');
|
||||
foreach ($config as $key => $value) {
|
||||
@@ -78,7 +78,7 @@ class Config extends Admin {
|
||||
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
||||
*/
|
||||
public function add() {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$config = model('Config');
|
||||
$data = $this->request->post();
|
||||
if ($data) {
|
||||
@@ -106,7 +106,7 @@ class Config extends Admin {
|
||||
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
||||
*/
|
||||
public function edit($id = 0) {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$config = model('Config');
|
||||
$data = $this->request->post();
|
||||
if ($data) {
|
||||
@@ -177,7 +177,7 @@ class Config extends Admin {
|
||||
* @author huajie <banhuajie@163.com>
|
||||
*/
|
||||
public function sort() {
|
||||
if (IS_GET) {
|
||||
if ($this->request->isGet()) {
|
||||
$ids = input('ids');
|
||||
//获取排序的数据
|
||||
$map = array('status' => array('gt', -1));
|
||||
@@ -191,7 +191,7 @@ class Config extends Admin {
|
||||
$this->assign('list', $list);
|
||||
$this->setMeta('配置排序');
|
||||
return $this->fetch();
|
||||
} elseif (IS_POST) {
|
||||
} elseif ($this->request->isPost()) {
|
||||
$ids = input('post.ids');
|
||||
$ids = explode(',', $ids);
|
||||
foreach ($ids as $key => $value) {
|
||||
|
||||
@@ -66,7 +66,7 @@ class Content extends Admin {
|
||||
* @author molong <ycgpp@126.com>
|
||||
*/
|
||||
public function add() {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$result = $this->model->save($this->param);
|
||||
if ($result) {
|
||||
//记录行为
|
||||
@@ -99,7 +99,7 @@ class Content extends Admin {
|
||||
* @author molong <ycgpp@126.com>
|
||||
*/
|
||||
public function edit($id) {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$result = $this->model->save($this->param, array('id'=> $id));
|
||||
if ($result !== false) {
|
||||
//记录行为
|
||||
|
||||
@@ -155,7 +155,7 @@ class Database extends Admin {
|
||||
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
||||
*/
|
||||
public function export($tables = null, $id = null, $start = null) {
|
||||
if (IS_POST && !empty($tables) && is_array($tables)) {
|
||||
if ($this->request->isPost() && !empty($tables) && is_array($tables)) {
|
||||
//初始化
|
||||
$path = config('data_backup_path');
|
||||
if (!is_dir($path)) {
|
||||
@@ -189,7 +189,7 @@ class Database extends Admin {
|
||||
} else {
|
||||
return $this->error('初始化失败,备份文件创建失败!');
|
||||
}
|
||||
} elseif (IS_GET && is_numeric($id) && is_numeric($start)) {
|
||||
} elseif ($this->request->isGet() && is_numeric($id) && is_numeric($start)) {
|
||||
//备份数据
|
||||
$tables = session('backup_tables');
|
||||
//备份指定表
|
||||
|
||||
@@ -42,7 +42,7 @@ class Form extends Admin {
|
||||
* 添加表单
|
||||
*/
|
||||
public function add(\think\Request $request) {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$result = $this->model->validate('Form')->save($request->post());
|
||||
if (false !== $result) {
|
||||
return $this->success('添加成功!', url('admin/form/index'));
|
||||
@@ -63,7 +63,7 @@ class Form extends Admin {
|
||||
* 编辑表单
|
||||
*/
|
||||
public function edit(\think\Request $request) {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$result = $this->model->validate('Form')->save($request->post(), array('id' => $request->post('id')));
|
||||
if (false !== $result) {
|
||||
return $this->success('修改成功!', url('admin/form/index'));
|
||||
@@ -170,7 +170,7 @@ class Form extends Admin {
|
||||
if (!$form_id) {
|
||||
return $this->error('非法操作!');
|
||||
}
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$data = $request->post();
|
||||
$result = $this->Fattr->save($data);
|
||||
if (false !== $result) {
|
||||
@@ -198,7 +198,7 @@ class Form extends Admin {
|
||||
if (!$form_id || !$id) {
|
||||
return $this->error('非法操作!');
|
||||
}
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$data = $request->post();
|
||||
$result = $this->Fattr->save($data, array('id'=>$data['id']));
|
||||
if (false !== $result) {
|
||||
|
||||
@@ -39,7 +39,7 @@ class Group extends Admin {
|
||||
|
||||
//会员分组添加控制器
|
||||
public function add($type = 'admin') {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$result = $this->group->change();
|
||||
if ($result) {
|
||||
return $this->success("添加成功!", url('admin/group/index'));
|
||||
@@ -62,7 +62,7 @@ class Group extends Admin {
|
||||
if (!$id) {
|
||||
return $this->error("非法操作!");
|
||||
}
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$result = $this->group->change();
|
||||
if ($result) {
|
||||
return $this->success("编辑成功!", url('admin/group/index'));
|
||||
@@ -138,7 +138,7 @@ class Group extends Admin {
|
||||
if (!$id) {
|
||||
return $this->error("非法操作!");
|
||||
}
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$rule = $this->request->post('rule/a', array());
|
||||
$extend_rule = $this->request->post('extend_rule/a', array());
|
||||
$extend_result = $rule_result = false;
|
||||
@@ -194,7 +194,7 @@ class Group extends Admin {
|
||||
}
|
||||
|
||||
public function addnode($type = 'admin') {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$result = $this->rule->change();
|
||||
if ($result) {
|
||||
return $this->success("创建成功!", url('admin/group/access'));
|
||||
@@ -213,7 +213,7 @@ class Group extends Admin {
|
||||
}
|
||||
|
||||
public function editnode($id) {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$result = $this->rule->change();
|
||||
if (false !== $result) {
|
||||
return $this->success("更新成功!", url('admin/group/access'));
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use app\common\controller\Admin;
|
||||
|
||||
class Index extends Admin {
|
||||
@@ -18,15 +19,17 @@ class Index extends Admin {
|
||||
}
|
||||
|
||||
public function login($username = '', $password = '', $verify = '') {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
if (!$username || !$password) {
|
||||
return $this->error('用户名或者密码不能为空!', '');
|
||||
}
|
||||
|
||||
//验证码验证
|
||||
$this->checkVerify($verify);
|
||||
if(!captcha_check($verify)){
|
||||
return $this->error('验证码错误!', '');
|
||||
}
|
||||
|
||||
$user = model('User');
|
||||
$user = model('Member');
|
||||
$uid = $user->login($username, $password);
|
||||
if ($uid > 0) {
|
||||
return $this->success('登录成功!', url('admin/index/index'));
|
||||
@@ -46,14 +49,23 @@ class Index extends Admin {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* title : 后台退出
|
||||
*
|
||||
*/
|
||||
public function logout() {
|
||||
$user = model('User');
|
||||
$user = model('Member');
|
||||
$user->logout();
|
||||
$this->redirect('admin/index/login');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* title : 清除缓存
|
||||
*
|
||||
*/
|
||||
public function clear() {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$clear = input('post.clear/a', array());
|
||||
foreach ($clear as $key => $value) {
|
||||
if ($value == 'cache') {
|
||||
@@ -79,4 +91,4 @@ class Index extends Admin {
|
||||
return $this->fetch('public/edit');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class Link extends Admin {
|
||||
//添加
|
||||
public function add() {
|
||||
$link = model('Link');
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$data = input('post.');
|
||||
if ($data) {
|
||||
unset($data['id']);
|
||||
@@ -57,7 +57,7 @@ class Link extends Admin {
|
||||
public function edit() {
|
||||
$link = model('Link');
|
||||
$id = input('id', '', 'trim,intval');
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$data = input('post.');
|
||||
if ($data) {
|
||||
$result = $link->save($data, array('id' => $data['id']));
|
||||
|
||||
@@ -46,7 +46,7 @@ class Menu extends Admin {
|
||||
* @author yangweijie <yangweijiester@gmail.com>
|
||||
*/
|
||||
public function add() {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$Menu = model('Menu');
|
||||
$data = input('post.');
|
||||
$id = $Menu->save($data);
|
||||
@@ -80,7 +80,7 @@ class Menu extends Admin {
|
||||
* @author yangweijie <yangweijiester@gmail.com>
|
||||
*/
|
||||
public function edit($id = 0) {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$Menu = model('Menu');
|
||||
$data = input('post.');
|
||||
if ($Menu->save($data, array('id' => $data['id'])) !== false) {
|
||||
@@ -176,7 +176,7 @@ class Menu extends Admin {
|
||||
}
|
||||
|
||||
public function import() {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$tree = input('post.tree');
|
||||
$lists = explode(PHP_EOL, $tree);
|
||||
$menuModel = db('Menu');
|
||||
@@ -217,7 +217,7 @@ class Menu extends Admin {
|
||||
* @author huajie <banhuajie@163.com>
|
||||
*/
|
||||
public function sort() {
|
||||
if (IS_GET) {
|
||||
if ($this->request->isGet()) {
|
||||
$ids = input('ids');
|
||||
$pid = input('pid');
|
||||
|
||||
@@ -235,7 +235,7 @@ class Menu extends Admin {
|
||||
$this->assign('list', $list);
|
||||
$this->setMeta('菜单排序');
|
||||
return $this->fetch();
|
||||
} elseif (IS_POST) {
|
||||
} elseif ($this->request->isPost()) {
|
||||
$ids = input('post.ids');
|
||||
$ids = explode(',', $ids);
|
||||
foreach ($ids as $key => $value) {
|
||||
|
||||
@@ -46,7 +46,7 @@ class Model extends Admin {
|
||||
* @author huajie <banhuajie@163.com>
|
||||
*/
|
||||
public function add(\think\Request $request) {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$result = $this->model->validate('Model.add')->save($request->post());
|
||||
if (false !== $result) {
|
||||
//记录行为
|
||||
@@ -66,7 +66,7 @@ class Model extends Admin {
|
||||
* @author molong <molong@tensent.cn>
|
||||
*/
|
||||
public function edit(\think\Request $request) {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$result = $this->model->validate('Model.edit')->save($request->post(), array('id' => $request->post('id')));
|
||||
if (false !== $result) {
|
||||
//记录行为
|
||||
|
||||
@@ -37,7 +37,7 @@ class Seo extends Admin {
|
||||
}
|
||||
|
||||
public function add() {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$data = $this->request->post();
|
||||
$result = $this->seo->save($data);
|
||||
if ($result) {
|
||||
@@ -56,7 +56,7 @@ class Seo extends Admin {
|
||||
}
|
||||
|
||||
public function edit($id = null) {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$data = $this->request->post();
|
||||
$result = $this->seo->save($data, array('id' => $data['id']));
|
||||
if (false !== $result) {
|
||||
@@ -103,7 +103,7 @@ class Seo extends Admin {
|
||||
}
|
||||
|
||||
public function addrewrite() {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$result = model('Rewrite')->change();
|
||||
if (false != $result) {
|
||||
return $this->success("添加成功!", url('admin/seo/rewrite'));
|
||||
@@ -121,7 +121,7 @@ class Seo extends Admin {
|
||||
}
|
||||
|
||||
public function editrewrite() {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$result = model('Rewrite')->change();
|
||||
if (false != $result) {
|
||||
return $this->success("更新成功!", url('admin/seo/rewrite'));
|
||||
|
||||
@@ -26,7 +26,7 @@ class User extends Admin {
|
||||
}
|
||||
|
||||
$order = "uid desc";
|
||||
$list = model('User')->where($map)->order($order)->paginate(15);
|
||||
$list = model('Member')->where($map)->order($order)->paginate(15);
|
||||
|
||||
$data = array(
|
||||
'list' => $list,
|
||||
@@ -42,8 +42,8 @@ class User extends Admin {
|
||||
* @author colin <molong@tensent.cn>
|
||||
*/
|
||||
public function add() {
|
||||
$model = \think\Loader::model('User');
|
||||
if (IS_POST) {
|
||||
$model = \think\Loader::model('Member');
|
||||
if ($this->request->isPost()) {
|
||||
$data = $this->request->param();
|
||||
//创建注册用户
|
||||
$result = $model->register($data['username'], $data['password'], $data['repassword'], $data['email'], false);
|
||||
@@ -67,8 +67,8 @@ class User extends Admin {
|
||||
* @author huajie <banhuajie@163.com>
|
||||
*/
|
||||
public function edit() {
|
||||
$model = model('User');
|
||||
if (IS_POST) {
|
||||
$model = model('Member');
|
||||
if ($this->request->isPost()) {
|
||||
$data = $this->request->post();
|
||||
|
||||
$reuslt = $model->editUser($data, true);
|
||||
@@ -99,14 +99,14 @@ class User extends Admin {
|
||||
$uid = array('IN', is_array($id) ? implode(',', $id) : $id);
|
||||
//获取用户信息
|
||||
$find = $this->getUserinfo($uid);
|
||||
model('User')->where(array('uid' => $uid))->delete();
|
||||
model('Member')->where(array('uid' => $uid))->delete();
|
||||
return $this->success('删除用户成功!');
|
||||
}
|
||||
|
||||
public function auth() {
|
||||
$access = model('AuthGroupAccess');
|
||||
$group = model('AuthGroup');
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$uid = input('uid', '', 'trim,intval');
|
||||
$access->where(array('uid' => $uid))->delete();
|
||||
$group_type = config('user_group_type');
|
||||
@@ -152,7 +152,7 @@ class User extends Admin {
|
||||
* @author colin <colin@tensent.cn>
|
||||
*/
|
||||
private function getUserinfo($uid = null, $pass = null, $errormsg = null) {
|
||||
$user = model('User');
|
||||
$user = model('Member');
|
||||
$uid = $uid ? $uid : input('id');
|
||||
//如果无UID则修改当前用户
|
||||
$uid = $uid ? $uid : session('user_auth.uid');
|
||||
@@ -215,7 +215,7 @@ class User extends Admin {
|
||||
* @author huajie <banhuajie@163.com>
|
||||
*/
|
||||
public function editpwd() {
|
||||
if (IS_POST) {
|
||||
if ($this->request->isPost()) {
|
||||
$user = model('User');
|
||||
$data = $this->request->post();
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 7.8 KiB |
@@ -1,265 +0,0 @@
|
||||
$(function($) {
|
||||
var storage, fail, uid;
|
||||
try {
|
||||
uid = new Date; (storage = window.localStorage).setItem(uid, uid);
|
||||
fail = storage.getItem(uid) != uid;
|
||||
storage.removeItem(uid);
|
||||
fail && (storage = false);
|
||||
} catch(e) {}
|
||||
if (storage) {
|
||||
try {
|
||||
var usedSkin = localStorage.getItem('config-skin');
|
||||
if (usedSkin != '') {
|
||||
$('#skin-colors .skin-changer').removeClass('active');
|
||||
$('#skin-colors .skin-changer[data-skin="' + usedSkin + '"]').addClass('active');
|
||||
}
|
||||
|
||||
//固定头部、左侧菜单以及底部版权信息
|
||||
$('body').addClass('fixed-header');
|
||||
$('body').addClass('fixed-footer');
|
||||
$('body').addClass('fixed-leftmenu');
|
||||
if ($('#page-wrapper').hasClass('nav-small')) {
|
||||
$('#page-wrapper').removeClass('nav-small');
|
||||
}
|
||||
$('.fixed-leftmenu #col-left').nanoScroller({
|
||||
alwaysVisible: true,
|
||||
iOSNativeScrolling: false,
|
||||
preventPageScrolling: true,
|
||||
contentClass: 'col-left-nano-content'
|
||||
});
|
||||
|
||||
|
||||
var boxedLayout = localStorage.getItem('config-boxed-layout');
|
||||
if (boxedLayout == 'boxed-layout') {
|
||||
$('body').addClass(boxedLayout);
|
||||
$('#config-boxed-layout').prop('checked', true);
|
||||
}
|
||||
var sidebarSamll = localStorage.getItem('config-sidebar-samll');
|
||||
if (sidebarSamll == 'sidebar-samll') {
|
||||
$('#config-sidebar-samll').prop('checked', true);
|
||||
$('#page-wrapper').addClass('nav-small');
|
||||
} else {
|
||||
$('#page-wrapper').removeClass('nav-small');
|
||||
};
|
||||
} catch(e) {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
$('#config-tool-cog').on('click',
|
||||
function() {
|
||||
$('#config-tool').toggleClass('closed');
|
||||
});
|
||||
$('#config-boxed-layout').on('change',
|
||||
function() {
|
||||
var boxedLayout = '';
|
||||
if ($(this).is(':checked')) {
|
||||
$('body').addClass('boxed-layout');
|
||||
boxedLayout = 'boxed-layout';
|
||||
} else {
|
||||
$('body').removeClass('boxed-layout');
|
||||
}
|
||||
writeStorage(storage, 'config-boxed-layout', boxedLayout);
|
||||
});
|
||||
|
||||
$('#config-sidebar-samll').on('change',function(){
|
||||
var sidebarSamll = '';
|
||||
if ($(this).is(':checked')) {
|
||||
$('#page-wrapper').addClass('nav-small');
|
||||
sidebarSamll = 'sidebar-samll';
|
||||
writeStorage(storage, 'config-sidebar-samll', sidebarSamll);
|
||||
} else {
|
||||
$('#page-wrapper').removeClass('nav-small');
|
||||
writeStorage(storage, 'config-sidebar-samll', sidebarSamll);
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
if (!storage) {
|
||||
$('#config-boxed-layout').prop('checked', false);
|
||||
$('#config-sidebar-samll').prop('checked', false);
|
||||
}
|
||||
$('#skin-colors .skin-changer').on('click',
|
||||
function() {
|
||||
$('body').removeClassPrefix('theme-');
|
||||
$('body').addClass($(this).data('skin'));
|
||||
$('#skin-colors .skin-changer').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
writeStorage(storage, 'config-skin', $(this).data('skin'));
|
||||
});
|
||||
|
||||
|
||||
//合并自script.js
|
||||
setTimeout(function() {
|
||||
$('#content-wrapper > .row').css({
|
||||
opacity: 1
|
||||
});
|
||||
},
|
||||
200);
|
||||
$('#sidebar-nav,#nav-col-submenu').on('click', '.dropdown-toggle',
|
||||
function(e) {
|
||||
e.preventDefault();
|
||||
var $item = $(this).parent();
|
||||
if (!$item.hasClass('open')) {
|
||||
$item.parent().find('.open .submenu').slideUp('fast');
|
||||
$item.parent().find('.open').toggleClass('open');
|
||||
}
|
||||
$item.toggleClass('open');
|
||||
if ($item.hasClass('open')) {
|
||||
$item.children('.submenu').slideDown('fast');
|
||||
} else {
|
||||
$item.children('.submenu').slideUp('fast');
|
||||
}
|
||||
});
|
||||
$('body').on('mouseenter', '#page-wrapper.nav-small #sidebar-nav .dropdown-toggle',
|
||||
function(e) {
|
||||
if ($(document).width() >= 992) {
|
||||
var $item = $(this).parent();
|
||||
if ($('body').hasClass('fixed-leftmenu')) {
|
||||
var topPosition = $item.position().top;
|
||||
if ((topPosition + 4 * $(this).outerHeight()) >= $(window).height()) {
|
||||
topPosition -= 6 * $(this).outerHeight();
|
||||
}
|
||||
$('#nav-col-submenu').html($item.children('.submenu').clone());
|
||||
$('#nav-col-submenu > .submenu').css({
|
||||
'top': topPosition
|
||||
});
|
||||
}
|
||||
$item.addClass('open');
|
||||
$item.children('.submenu').slideDown('fast');
|
||||
}
|
||||
});
|
||||
$('body').on('mouseleave', '#page-wrapper.nav-small #sidebar-nav > .nav-pills > li',
|
||||
function(e) {
|
||||
if ($(document).width() >= 992) {
|
||||
var $item = $(this);
|
||||
if ($item.hasClass('open')) {
|
||||
$item.find('.open .submenu').slideUp('fast');
|
||||
$item.find('.open').removeClass('open');
|
||||
$item.children('.submenu').slideUp('fast');
|
||||
}
|
||||
$item.removeClass('open');
|
||||
}
|
||||
});
|
||||
$('body').on('mouseenter', '#page-wrapper.nav-small #sidebar-nav a:not(.dropdown-toggle)',
|
||||
function(e) {
|
||||
if ($('body').hasClass('fixed-leftmenu')) {
|
||||
$('#nav-col-submenu').html('');
|
||||
}
|
||||
});
|
||||
$('body').on('mouseleave', '#page-wrapper.nav-small #nav-col',
|
||||
function(e) {
|
||||
if ($('body').hasClass('fixed-leftmenu')) {
|
||||
$('#nav-col-submenu').html('');
|
||||
}
|
||||
});
|
||||
$('#make-small-nav').click(function(e) {
|
||||
$('#page-wrapper').toggleClass('nav-small');
|
||||
});
|
||||
$(window).smartresize(function() {
|
||||
if ($(document).width() <= 991) {
|
||||
$('#page-wrapper').removeClass('nav-small');
|
||||
}
|
||||
});
|
||||
$('.mobile-search').click(function(e) {
|
||||
e.preventDefault();
|
||||
$('.mobile-search').addClass('active');
|
||||
$('.mobile-search form input.form-control').focus();
|
||||
});
|
||||
$(document).mouseup(function(e) {
|
||||
var container = $('.mobile-search');
|
||||
if (!container.is(e.target) && container.has(e.target).length === 0) {
|
||||
container.removeClass('active');
|
||||
}
|
||||
});
|
||||
$('.fixed-leftmenu #col-left').nanoScroller({
|
||||
alwaysVisible: true,
|
||||
iOSNativeScrolling: false,
|
||||
preventPageScrolling: true,
|
||||
contentClass: 'col-left-nano-content'
|
||||
});
|
||||
$("[data-toggle='tooltip']").each(function(index, el) {
|
||||
$(el).tooltip({
|
||||
placement: $(this).data("placement") || 'top'
|
||||
});
|
||||
});
|
||||
});
|
||||
function writeStorage(storage, key, value) {
|
||||
if (storage) {
|
||||
try {
|
||||
localStorage.setItem(key, value);
|
||||
} catch(e) {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$.fn.removeClassPrefix = function(prefix) {
|
||||
this.each(function(i, el) {
|
||||
var classes = el.className.split(" ").filter(function(c) {
|
||||
return c.lastIndexOf(prefix, 0) !== 0;
|
||||
});
|
||||
el.className = classes.join(" ");
|
||||
});
|
||||
return this;
|
||||
}; (function($, sr) {
|
||||
var debounce = function(func, threshold, execAsap) {
|
||||
var timeout;
|
||||
return function debounced() {
|
||||
var obj = this,
|
||||
args = arguments;
|
||||
function delayed() {
|
||||
if (!execAsap) func.apply(obj, args);
|
||||
timeout = null;
|
||||
};
|
||||
if (timeout) clearTimeout(timeout);
|
||||
else if (execAsap) func.apply(obj, args);
|
||||
timeout = setTimeout(delayed, threshold || 100);
|
||||
};
|
||||
}
|
||||
jQuery.fn[sr] = function(fn) {
|
||||
return fn ? this.bind('resize', debounce(fn)) : this.trigger(sr);
|
||||
};
|
||||
})(jQuery, 'smartresize');
|
||||
|
||||
function helpIntro(){
|
||||
var placementRight = 'right';
|
||||
var placementLeft = 'left';
|
||||
|
||||
if ($('body').hasClass('rtl')) {
|
||||
placementRight = 'left';
|
||||
placementLeft = 'right';
|
||||
}
|
||||
|
||||
// Define the tour!
|
||||
var tour = {
|
||||
id: "Cube-intro",
|
||||
steps: [
|
||||
{
|
||||
target: 'make-small-nav',
|
||||
title: "设置小菜单按钮",
|
||||
content: "点击小菜单可以把左侧菜单变成小菜单,增大右侧操作区域!",
|
||||
placement: "bottom",
|
||||
zindex: 999,
|
||||
xOffset: -8
|
||||
},
|
||||
{
|
||||
target: 'config-tool-options',
|
||||
title: "后台配置工具",
|
||||
content: "配置后台主题色彩,定制头部、左侧菜单以及底部信息",
|
||||
placement: placementLeft,
|
||||
zindex: 999,
|
||||
fixedElement: true,
|
||||
xOffset: -55
|
||||
},
|
||||
{
|
||||
target: 'sidebar-nav',
|
||||
title: "左侧导航区域",
|
||||
content: "左侧功能导航区域。",
|
||||
placement: placementRight
|
||||
}
|
||||
],
|
||||
showPrevButton: true
|
||||
};
|
||||
|
||||
// Start the tour!
|
||||
hopscotch.startTour(tour);
|
||||
}
|
||||
@@ -1,362 +0,0 @@
|
||||
CodeMirror.defineMode("clike", function(config, parserConfig) {
|
||||
var indentUnit = config.indentUnit,
|
||||
statementIndentUnit = parserConfig.statementIndentUnit || indentUnit,
|
||||
dontAlignCalls = parserConfig.dontAlignCalls,
|
||||
keywords = parserConfig.keywords || {},
|
||||
builtin = parserConfig.builtin || {},
|
||||
blockKeywords = parserConfig.blockKeywords || {},
|
||||
atoms = parserConfig.atoms || {},
|
||||
hooks = parserConfig.hooks || {},
|
||||
multiLineStrings = parserConfig.multiLineStrings;
|
||||
var isOperatorChar = /[+\-*&%=<>!?|\/]/;
|
||||
|
||||
var curPunc;
|
||||
|
||||
function tokenBase(stream, state) {
|
||||
var ch = stream.next();
|
||||
if (hooks[ch]) {
|
||||
var result = hooks[ch](stream, state);
|
||||
if (result !== false) return result;
|
||||
}
|
||||
if (ch == '"' || ch == "'") {
|
||||
state.tokenize = tokenString(ch);
|
||||
return state.tokenize(stream, state);
|
||||
}
|
||||
if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
|
||||
curPunc = ch;
|
||||
return null;
|
||||
}
|
||||
if (/\d/.test(ch)) {
|
||||
stream.eatWhile(/[\w\.]/);
|
||||
return "number";
|
||||
}
|
||||
if (ch == "/") {
|
||||
if (stream.eat("*")) {
|
||||
state.tokenize = tokenComment;
|
||||
return tokenComment(stream, state);
|
||||
}
|
||||
if (stream.eat("/")) {
|
||||
stream.skipToEnd();
|
||||
return "comment";
|
||||
}
|
||||
}
|
||||
if (isOperatorChar.test(ch)) {
|
||||
stream.eatWhile(isOperatorChar);
|
||||
return "operator";
|
||||
}
|
||||
stream.eatWhile(/[\w\$_]/);
|
||||
var cur = stream.current();
|
||||
if (keywords.propertyIsEnumerable(cur)) {
|
||||
if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
|
||||
return "keyword";
|
||||
}
|
||||
if (builtin.propertyIsEnumerable(cur)) {
|
||||
if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
|
||||
return "builtin";
|
||||
}
|
||||
if (atoms.propertyIsEnumerable(cur)) return "atom";
|
||||
return "variable";
|
||||
}
|
||||
|
||||
function tokenString(quote) {
|
||||
return function(stream, state) {
|
||||
var escaped = false, next, end = false;
|
||||
while ((next = stream.next()) != null) {
|
||||
if (next == quote && !escaped) {end = true; break;}
|
||||
escaped = !escaped && next == "\\";
|
||||
}
|
||||
if (end || !(escaped || multiLineStrings))
|
||||
state.tokenize = null;
|
||||
return "string";
|
||||
};
|
||||
}
|
||||
|
||||
function tokenComment(stream, state) {
|
||||
var maybeEnd = false, ch;
|
||||
while (ch = stream.next()) {
|
||||
if (ch == "/" && maybeEnd) {
|
||||
state.tokenize = null;
|
||||
break;
|
||||
}
|
||||
maybeEnd = (ch == "*");
|
||||
}
|
||||
return "comment";
|
||||
}
|
||||
|
||||
function Context(indented, column, type, align, prev) {
|
||||
this.indented = indented;
|
||||
this.column = column;
|
||||
this.type = type;
|
||||
this.align = align;
|
||||
this.prev = prev;
|
||||
}
|
||||
function pushContext(state, col, type) {
|
||||
var indent = state.indented;
|
||||
if (state.context && state.context.type == "statement")
|
||||
indent = state.context.indented;
|
||||
return state.context = new Context(indent, col, type, null, state.context);
|
||||
}
|
||||
function popContext(state) {
|
||||
var t = state.context.type;
|
||||
if (t == ")" || t == "]" || t == "}")
|
||||
state.indented = state.context.indented;
|
||||
return state.context = state.context.prev;
|
||||
}
|
||||
|
||||
// Interface
|
||||
|
||||
return {
|
||||
startState: function(basecolumn) {
|
||||
return {
|
||||
tokenize: null,
|
||||
context: new Context((basecolumn || 0) - indentUnit, 0, "top", false),
|
||||
indented: 0,
|
||||
startOfLine: true
|
||||
};
|
||||
},
|
||||
|
||||
token: function(stream, state) {
|
||||
var ctx = state.context;
|
||||
if (stream.sol()) {
|
||||
if (ctx.align == null) ctx.align = false;
|
||||
state.indented = stream.indentation();
|
||||
state.startOfLine = true;
|
||||
}
|
||||
if (stream.eatSpace()) return null;
|
||||
curPunc = null;
|
||||
var style = (state.tokenize || tokenBase)(stream, state);
|
||||
if (style == "comment" || style == "meta") return style;
|
||||
if (ctx.align == null) ctx.align = true;
|
||||
|
||||
if ((curPunc == ";" || curPunc == ":" || curPunc == ",") && ctx.type == "statement") popContext(state);
|
||||
else if (curPunc == "{") pushContext(state, stream.column(), "}");
|
||||
else if (curPunc == "[") pushContext(state, stream.column(), "]");
|
||||
else if (curPunc == "(") pushContext(state, stream.column(), ")");
|
||||
else if (curPunc == "}") {
|
||||
while (ctx.type == "statement") ctx = popContext(state);
|
||||
if (ctx.type == "}") ctx = popContext(state);
|
||||
while (ctx.type == "statement") ctx = popContext(state);
|
||||
}
|
||||
else if (curPunc == ctx.type) popContext(state);
|
||||
else if (((ctx.type == "}" || ctx.type == "top") && curPunc != ';') || (ctx.type == "statement" && curPunc == "newstatement"))
|
||||
pushContext(state, stream.column(), "statement");
|
||||
state.startOfLine = false;
|
||||
return style;
|
||||
},
|
||||
|
||||
indent: function(state, textAfter) {
|
||||
if (state.tokenize != tokenBase && state.tokenize != null) return CodeMirror.Pass;
|
||||
var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);
|
||||
if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev;
|
||||
var closing = firstChar == ctx.type;
|
||||
if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : statementIndentUnit);
|
||||
else if (ctx.align && (!dontAlignCalls || ctx.type != ")")) return ctx.column + (closing ? 0 : 1);
|
||||
else if (ctx.type == ")" && !closing) return ctx.indented + statementIndentUnit;
|
||||
else return ctx.indented + (closing ? 0 : indentUnit);
|
||||
},
|
||||
|
||||
electricChars: "{}",
|
||||
blockCommentStart: "/*",
|
||||
blockCommentEnd: "*/",
|
||||
lineComment: "//",
|
||||
fold: "brace"
|
||||
};
|
||||
});
|
||||
|
||||
(function() {
|
||||
function words(str) {
|
||||
var obj = {}, words = str.split(" ");
|
||||
for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
|
||||
return obj;
|
||||
}
|
||||
var cKeywords = "auto if break int case long char register continue return default short do sizeof " +
|
||||
"double static else struct entry switch extern typedef float union for unsigned " +
|
||||
"goto while enum void const signed volatile";
|
||||
|
||||
function cppHook(stream, state) {
|
||||
if (!state.startOfLine) return false;
|
||||
for (;;) {
|
||||
if (stream.skipTo("\\")) {
|
||||
stream.next();
|
||||
if (stream.eol()) {
|
||||
state.tokenize = cppHook;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
stream.skipToEnd();
|
||||
state.tokenize = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return "meta";
|
||||
}
|
||||
|
||||
// C#-style strings where "" escapes a quote.
|
||||
function tokenAtString(stream, state) {
|
||||
var next;
|
||||
while ((next = stream.next()) != null) {
|
||||
if (next == '"' && !stream.eat('"')) {
|
||||
state.tokenize = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return "string";
|
||||
}
|
||||
|
||||
function mimes(ms, mode) {
|
||||
for (var i = 0; i < ms.length; ++i) CodeMirror.defineMIME(ms[i], mode);
|
||||
}
|
||||
|
||||
mimes(["text/x-csrc", "text/x-c", "text/x-chdr"], {
|
||||
name: "clike",
|
||||
keywords: words(cKeywords),
|
||||
blockKeywords: words("case do else for if switch while struct"),
|
||||
atoms: words("null"),
|
||||
hooks: {"#": cppHook}
|
||||
});
|
||||
mimes(["text/x-c++src", "text/x-c++hdr"], {
|
||||
name: "clike",
|
||||
keywords: words(cKeywords + " asm dynamic_cast namespace reinterpret_cast try bool explicit new " +
|
||||
"static_cast typeid catch operator template typename class friend private " +
|
||||
"this using const_cast inline public throw virtual delete mutable protected " +
|
||||
"wchar_t"),
|
||||
blockKeywords: words("catch class do else finally for if struct switch try while"),
|
||||
atoms: words("true false null"),
|
||||
hooks: {"#": cppHook}
|
||||
});
|
||||
CodeMirror.defineMIME("text/x-java", {
|
||||
name: "clike",
|
||||
keywords: words("abstract assert boolean break byte case catch char class const continue default " +
|
||||
"do double else enum extends final finally float for goto if implements import " +
|
||||
"instanceof int interface long native new package private protected public " +
|
||||
"return short static strictfp super switch synchronized this throw throws transient " +
|
||||
"try void volatile while"),
|
||||
blockKeywords: words("catch class do else finally for if switch try while"),
|
||||
atoms: words("true false null"),
|
||||
hooks: {
|
||||
"@": function(stream) {
|
||||
stream.eatWhile(/[\w\$_]/);
|
||||
return "meta";
|
||||
}
|
||||
}
|
||||
});
|
||||
CodeMirror.defineMIME("text/x-csharp", {
|
||||
name: "clike",
|
||||
keywords: words("abstract as base break case catch checked class const continue" +
|
||||
" default delegate do else enum event explicit extern finally fixed for" +
|
||||
" foreach goto if implicit in interface internal is lock namespace new" +
|
||||
" operator out override params private protected public readonly ref return sealed" +
|
||||
" sizeof stackalloc static struct switch this throw try typeof unchecked" +
|
||||
" unsafe using virtual void volatile while add alias ascending descending dynamic from get" +
|
||||
" global group into join let orderby partial remove select set value var yield"),
|
||||
blockKeywords: words("catch class do else finally for foreach if struct switch try while"),
|
||||
builtin: words("Boolean Byte Char DateTime DateTimeOffset Decimal Double" +
|
||||
" Guid Int16 Int32 Int64 Object SByte Single String TimeSpan UInt16 UInt32" +
|
||||
" UInt64 bool byte char decimal double short int long object" +
|
||||
" sbyte float string ushort uint ulong"),
|
||||
atoms: words("true false null"),
|
||||
hooks: {
|
||||
"@": function(stream, state) {
|
||||
if (stream.eat('"')) {
|
||||
state.tokenize = tokenAtString;
|
||||
return tokenAtString(stream, state);
|
||||
}
|
||||
stream.eatWhile(/[\w\$_]/);
|
||||
return "meta";
|
||||
}
|
||||
}
|
||||
});
|
||||
CodeMirror.defineMIME("text/x-scala", {
|
||||
name: "clike",
|
||||
keywords: words(
|
||||
|
||||
/* scala */
|
||||
"abstract case catch class def do else extends false final finally for forSome if " +
|
||||
"implicit import lazy match new null object override package private protected return " +
|
||||
"sealed super this throw trait try trye type val var while with yield _ : = => <- <: " +
|
||||
"<% >: # @ " +
|
||||
|
||||
/* package scala */
|
||||
"assert assume require print println printf readLine readBoolean readByte readShort " +
|
||||
"readChar readInt readLong readFloat readDouble " +
|
||||
|
||||
"AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either " +
|
||||
"Enumeration Equiv Error Exception Fractional Function IndexedSeq Integral Iterable " +
|
||||
"Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering " +
|
||||
"Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder " +
|
||||
"StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector :: #:: " +
|
||||
|
||||
/* package java.lang */
|
||||
"Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable " +
|
||||
"Compiler Double Exception Float Integer Long Math Number Object Package Pair Process " +
|
||||
"Runtime Runnable SecurityManager Short StackTraceElement StrictMath String " +
|
||||
"StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"
|
||||
|
||||
|
||||
),
|
||||
blockKeywords: words("catch class do else finally for forSome if match switch try while"),
|
||||
atoms: words("true false null"),
|
||||
hooks: {
|
||||
"@": function(stream) {
|
||||
stream.eatWhile(/[\w\$_]/);
|
||||
return "meta";
|
||||
}
|
||||
}
|
||||
});
|
||||
mimes(["x-shader/x-vertex", "x-shader/x-fragment"], {
|
||||
name: "clike",
|
||||
keywords: words("float int bool void " +
|
||||
"vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 " +
|
||||
"mat2 mat3 mat4 " +
|
||||
"sampler1D sampler2D sampler3D samplerCube " +
|
||||
"sampler1DShadow sampler2DShadow" +
|
||||
"const attribute uniform varying " +
|
||||
"break continue discard return " +
|
||||
"for while do if else struct " +
|
||||
"in out inout"),
|
||||
blockKeywords: words("for while do if else struct"),
|
||||
builtin: words("radians degrees sin cos tan asin acos atan " +
|
||||
"pow exp log exp2 sqrt inversesqrt " +
|
||||
"abs sign floor ceil fract mod min max clamp mix step smootstep " +
|
||||
"length distance dot cross normalize ftransform faceforward " +
|
||||
"reflect refract matrixCompMult " +
|
||||
"lessThan lessThanEqual greaterThan greaterThanEqual " +
|
||||
"equal notEqual any all not " +
|
||||
"texture1D texture1DProj texture1DLod texture1DProjLod " +
|
||||
"texture2D texture2DProj texture2DLod texture2DProjLod " +
|
||||
"texture3D texture3DProj texture3DLod texture3DProjLod " +
|
||||
"textureCube textureCubeLod " +
|
||||
"shadow1D shadow2D shadow1DProj shadow2DProj " +
|
||||
"shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod " +
|
||||
"dFdx dFdy fwidth " +
|
||||
"noise1 noise2 noise3 noise4"),
|
||||
atoms: words("true false " +
|
||||
"gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex " +
|
||||
"gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 " +
|
||||
"gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 " +
|
||||
"gl_FogCoord " +
|
||||
"gl_Position gl_PointSize gl_ClipVertex " +
|
||||
"gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor " +
|
||||
"gl_TexCoord gl_FogFragCoord " +
|
||||
"gl_FragCoord gl_FrontFacing " +
|
||||
"gl_FragColor gl_FragData gl_FragDepth " +
|
||||
"gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix " +
|
||||
"gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse " +
|
||||
"gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse " +
|
||||
"gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose " +
|
||||
"gl_ProjectionMatrixInverseTranspose " +
|
||||
"gl_ModelViewProjectionMatrixInverseTranspose " +
|
||||
"gl_TextureMatrixInverseTranspose " +
|
||||
"gl_NormalScale gl_DepthRange gl_ClipPlane " +
|
||||
"gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel " +
|
||||
"gl_FrontLightModelProduct gl_BackLightModelProduct " +
|
||||
"gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ " +
|
||||
"gl_FogParameters " +
|
||||
"gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords " +
|
||||
"gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats " +
|
||||
"gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits " +
|
||||
"gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits " +
|
||||
"gl_MaxDrawBuffers"),
|
||||
hooks: {"#": cppHook}
|
||||
});
|
||||
}());
|
||||
@@ -1,259 +0,0 @@
|
||||
/* BASICS */
|
||||
|
||||
.CodeMirror {
|
||||
/* Set height, width, borders, and global font properties here */
|
||||
font-family: monospace;
|
||||
height: 300px;
|
||||
}
|
||||
.CodeMirror-scroll {
|
||||
/* Set scrolling behaviour here */
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* PADDING */
|
||||
|
||||
.CodeMirror-lines {
|
||||
padding: 4px 0; /* Vertical padding around content */
|
||||
}
|
||||
.CodeMirror pre {
|
||||
padding: 0 4px; /* Horizontal padding of content */
|
||||
}
|
||||
|
||||
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
background-color: white; /* The little square between H and V scrollbars */
|
||||
}
|
||||
|
||||
/* GUTTER */
|
||||
|
||||
.CodeMirror-gutters {
|
||||
border-right: 1px solid #ddd;
|
||||
background-color: #f7f7f7;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.CodeMirror-linenumbers {}
|
||||
.CodeMirror-linenumber {
|
||||
padding: 0 3px 0 5px;
|
||||
min-width: 20px;
|
||||
text-align: right;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
/* CURSOR */
|
||||
|
||||
.CodeMirror div.CodeMirror-cursor {
|
||||
border-left: 1px solid black;
|
||||
z-index: 3;
|
||||
}
|
||||
/* Shown when moving in bi-directional text */
|
||||
.CodeMirror div.CodeMirror-secondarycursor {
|
||||
border-left: 1px solid silver;
|
||||
}
|
||||
.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor {
|
||||
width: auto;
|
||||
border: 0;
|
||||
background: #7e7;
|
||||
z-index: 1;
|
||||
}
|
||||
/* Can style cursor different in overwrite (non-insert) mode */
|
||||
.CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite {}
|
||||
|
||||
.cm-tab { display: inline-block; }
|
||||
|
||||
/* DEFAULT THEME */
|
||||
|
||||
.cm-s-default .cm-keyword {color: #708;}
|
||||
.cm-s-default .cm-atom {color: #219;}
|
||||
.cm-s-default .cm-number {color: #164;}
|
||||
.cm-s-default .cm-def {color: #00f;}
|
||||
.cm-s-default .cm-variable {color: black;}
|
||||
.cm-s-default .cm-variable-2 {color: #05a;}
|
||||
.cm-s-default .cm-variable-3 {color: #085;}
|
||||
.cm-s-default .cm-property {color: black;}
|
||||
.cm-s-default .cm-operator {color: black;}
|
||||
.cm-s-default .cm-comment {color: #a50;}
|
||||
.cm-s-default .cm-string {color: #a11;}
|
||||
.cm-s-default .cm-string-2 {color: #f50;}
|
||||
.cm-s-default .cm-meta {color: #555;}
|
||||
.cm-s-default .cm-error {color: #f00;}
|
||||
.cm-s-default .cm-qualifier {color: #555;}
|
||||
.cm-s-default .cm-builtin {color: #30a;}
|
||||
.cm-s-default .cm-bracket {color: #997;}
|
||||
.cm-s-default .cm-tag {color: #170;}
|
||||
.cm-s-default .cm-attribute {color: #00c;}
|
||||
.cm-s-default .cm-header {color: blue;}
|
||||
.cm-s-default .cm-quote {color: #090;}
|
||||
.cm-s-default .cm-hr {color: #999;}
|
||||
.cm-s-default .cm-link {color: #00c;}
|
||||
|
||||
.cm-negative {color: #d44;}
|
||||
.cm-positive {color: #292;}
|
||||
.cm-header, .cm-strong {font-weight: bold;}
|
||||
.cm-em {font-style: italic;}
|
||||
.cm-link {text-decoration: underline;}
|
||||
|
||||
.cm-invalidchar {color: #f00;}
|
||||
|
||||
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
|
||||
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
||||
.CodeMirror-activeline-background {background: #e8f2ff;}
|
||||
|
||||
/* STOP */
|
||||
|
||||
/* The rest of this file contains styles related to the mechanics of
|
||||
the editor. You probably shouldn't touch them. */
|
||||
|
||||
.CodeMirror {
|
||||
line-height: 1;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: white;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.CodeMirror-scroll {
|
||||
/* 30px is the magic margin used to hide the element's real scrollbars */
|
||||
/* See overflow: hidden in .CodeMirror */
|
||||
margin-bottom: -30px; margin-right: -30px;
|
||||
padding-bottom: 30px; padding-right: 30px;
|
||||
height: 100%;
|
||||
outline: none; /* Prevent dragging from highlighting the element */
|
||||
position: relative;
|
||||
}
|
||||
.CodeMirror-sizer {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
||||
before actuall scrolling happens, thus preventing shaking and
|
||||
flickering artifacts. */
|
||||
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
position: absolute;
|
||||
z-index: 6;
|
||||
display: none;
|
||||
}
|
||||
.CodeMirror-vscrollbar {
|
||||
right: 0; top: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.CodeMirror-hscrollbar {
|
||||
bottom: 0; left: 0;
|
||||
overflow-y: hidden;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
.CodeMirror-scrollbar-filler {
|
||||
right: 0; bottom: 0;
|
||||
}
|
||||
.CodeMirror-gutter-filler {
|
||||
left: 0; bottom: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-gutters {
|
||||
position: absolute; left: 0; top: 0;
|
||||
padding-bottom: 30px;
|
||||
z-index: 3;
|
||||
}
|
||||
.CodeMirror-gutter {
|
||||
white-space: normal;
|
||||
height: 100%;
|
||||
padding-bottom: 30px;
|
||||
margin-bottom: -32px;
|
||||
display: inline-block;
|
||||
/* Hack to make IE7 behave */
|
||||
*zoom:1;
|
||||
*display:inline;
|
||||
}
|
||||
.CodeMirror-gutter-elt {
|
||||
position: absolute;
|
||||
cursor: default;
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
.CodeMirror-lines {
|
||||
cursor: text;
|
||||
}
|
||||
.CodeMirror pre {
|
||||
/* Reset some styles that the rest of the page might have set */
|
||||
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
|
||||
border-width: 0;
|
||||
background: transparent;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
margin: 0;
|
||||
white-space: pre;
|
||||
word-wrap: normal;
|
||||
line-height: inherit;
|
||||
color: inherit;
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
}
|
||||
.CodeMirror-wrap pre {
|
||||
word-wrap: break-word;
|
||||
white-space: pre-wrap;
|
||||
word-break: normal;
|
||||
}
|
||||
.CodeMirror-code pre {
|
||||
border-right: 30px solid transparent;
|
||||
width: -webkit-fit-content;
|
||||
width: -moz-fit-content;
|
||||
width: fit-content;
|
||||
}
|
||||
.CodeMirror-wrap .CodeMirror-code pre {
|
||||
border-right: none;
|
||||
width: auto;
|
||||
}
|
||||
.CodeMirror-linebackground {
|
||||
position: absolute;
|
||||
left: 0; right: 0; top: 0; bottom: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-linewidget {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.CodeMirror-widget {
|
||||
}
|
||||
|
||||
.CodeMirror-wrap .CodeMirror-scroll {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.CodeMirror-measure {
|
||||
position: absolute;
|
||||
width: 100%; height: 0px;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
}
|
||||
.CodeMirror-measure pre { position: static; }
|
||||
|
||||
.CodeMirror div.CodeMirror-cursor {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
border-right: none;
|
||||
width: 0;
|
||||
}
|
||||
.CodeMirror-focused div.CodeMirror-cursor {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.CodeMirror-selected { background: #d9d9d9; }
|
||||
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
|
||||
|
||||
.cm-searching {
|
||||
background: #ffa;
|
||||
background: rgba(255, 255, 0, .4);
|
||||
}
|
||||
|
||||
/* IE7 hack to prevent it from returning funny offsetTops on the spans */
|
||||
.CodeMirror span { *vertical-align: text-bottom; }
|
||||
|
||||
@media print {
|
||||
/* Hide the cursor when printing */
|
||||
.CodeMirror div.CodeMirror-cursor {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,480 +0,0 @@
|
||||
// TODO actually recognize syntax of TypeScript constructs
|
||||
|
||||
CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
var indentUnit = config.indentUnit;
|
||||
var statementIndent = parserConfig.statementIndent;
|
||||
var jsonMode = parserConfig.json;
|
||||
var isTS = parserConfig.typescript;
|
||||
|
||||
// Tokenizer
|
||||
|
||||
var keywords = function(){
|
||||
function kw(type) {return {type: type, style: "keyword"};}
|
||||
var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c");
|
||||
var operator = kw("operator"), atom = {type: "atom", style: "atom"};
|
||||
|
||||
var jsKeywords = {
|
||||
"if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B,
|
||||
"return": C, "break": C, "continue": C, "new": C, "delete": C, "throw": C,
|
||||
"var": kw("var"), "const": kw("var"), "let": kw("var"),
|
||||
"function": kw("function"), "catch": kw("catch"),
|
||||
"for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"),
|
||||
"in": operator, "typeof": operator, "instanceof": operator,
|
||||
"true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom,
|
||||
"this": kw("this")
|
||||
};
|
||||
|
||||
// Extend the 'normal' keywords with the TypeScript language extensions
|
||||
if (isTS) {
|
||||
var type = {type: "variable", style: "variable-3"};
|
||||
var tsKeywords = {
|
||||
// object-like things
|
||||
"interface": kw("interface"),
|
||||
"class": kw("class"),
|
||||
"extends": kw("extends"),
|
||||
"constructor": kw("constructor"),
|
||||
|
||||
// scope modifiers
|
||||
"public": kw("public"),
|
||||
"private": kw("private"),
|
||||
"protected": kw("protected"),
|
||||
"static": kw("static"),
|
||||
|
||||
"super": kw("super"),
|
||||
|
||||
// types
|
||||
"string": type, "number": type, "bool": type, "any": type
|
||||
};
|
||||
|
||||
for (var attr in tsKeywords) {
|
||||
jsKeywords[attr] = tsKeywords[attr];
|
||||
}
|
||||
}
|
||||
|
||||
return jsKeywords;
|
||||
}();
|
||||
|
||||
var isOperatorChar = /[+\-*&%=<>!?|~^]/;
|
||||
|
||||
function chain(stream, state, f) {
|
||||
state.tokenize = f;
|
||||
return f(stream, state);
|
||||
}
|
||||
|
||||
function nextUntilUnescaped(stream, end) {
|
||||
var escaped = false, next;
|
||||
while ((next = stream.next()) != null) {
|
||||
if (next == end && !escaped)
|
||||
return false;
|
||||
escaped = !escaped && next == "\\";
|
||||
}
|
||||
return escaped;
|
||||
}
|
||||
|
||||
// Used as scratch variables to communicate multiple values without
|
||||
// consing up tons of objects.
|
||||
var type, content;
|
||||
function ret(tp, style, cont) {
|
||||
type = tp; content = cont;
|
||||
return style;
|
||||
}
|
||||
function jsTokenBase(stream, state) {
|
||||
var ch = stream.next();
|
||||
if (ch == '"' || ch == "'")
|
||||
return chain(stream, state, jsTokenString(ch));
|
||||
else if (ch == "." && stream.match(/^\d+(?:[eE][+\-]?\d+)?/))
|
||||
return ret("number", "number");
|
||||
else if (/[\[\]{}\(\),;\:\.]/.test(ch))
|
||||
return ret(ch);
|
||||
else if (ch == "0" && stream.eat(/x/i)) {
|
||||
stream.eatWhile(/[\da-f]/i);
|
||||
return ret("number", "number");
|
||||
}
|
||||
else if (/\d/.test(ch)) {
|
||||
stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);
|
||||
return ret("number", "number");
|
||||
}
|
||||
else if (ch == "/") {
|
||||
if (stream.eat("*")) {
|
||||
return chain(stream, state, jsTokenComment);
|
||||
}
|
||||
else if (stream.eat("/")) {
|
||||
stream.skipToEnd();
|
||||
return ret("comment", "comment");
|
||||
}
|
||||
else if (state.lastType == "operator" || state.lastType == "keyword c" ||
|
||||
/^[\[{}\(,;:]$/.test(state.lastType)) {
|
||||
nextUntilUnescaped(stream, "/");
|
||||
stream.eatWhile(/[gimy]/); // 'y' is "sticky" option in Mozilla
|
||||
return ret("regexp", "string-2");
|
||||
}
|
||||
else {
|
||||
stream.eatWhile(isOperatorChar);
|
||||
return ret("operator", null, stream.current());
|
||||
}
|
||||
}
|
||||
else if (ch == "#") {
|
||||
stream.skipToEnd();
|
||||
return ret("error", "error");
|
||||
}
|
||||
else if (isOperatorChar.test(ch)) {
|
||||
stream.eatWhile(isOperatorChar);
|
||||
return ret("operator", null, stream.current());
|
||||
}
|
||||
else {
|
||||
stream.eatWhile(/[\w\$_]/);
|
||||
var word = stream.current(), known = keywords.propertyIsEnumerable(word) && keywords[word];
|
||||
return (known && state.lastType != ".") ? ret(known.type, known.style, word) :
|
||||
ret("variable", "variable", word);
|
||||
}
|
||||
}
|
||||
|
||||
function jsTokenString(quote) {
|
||||
return function(stream, state) {
|
||||
if (!nextUntilUnescaped(stream, quote))
|
||||
state.tokenize = jsTokenBase;
|
||||
return ret("string", "string");
|
||||
};
|
||||
}
|
||||
|
||||
function jsTokenComment(stream, state) {
|
||||
var maybeEnd = false, ch;
|
||||
while (ch = stream.next()) {
|
||||
if (ch == "/" && maybeEnd) {
|
||||
state.tokenize = jsTokenBase;
|
||||
break;
|
||||
}
|
||||
maybeEnd = (ch == "*");
|
||||
}
|
||||
return ret("comment", "comment");
|
||||
}
|
||||
|
||||
// Parser
|
||||
|
||||
var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true, "this": true};
|
||||
|
||||
function JSLexical(indented, column, type, align, prev, info) {
|
||||
this.indented = indented;
|
||||
this.column = column;
|
||||
this.type = type;
|
||||
this.prev = prev;
|
||||
this.info = info;
|
||||
if (align != null) this.align = align;
|
||||
}
|
||||
|
||||
function inScope(state, varname) {
|
||||
for (var v = state.localVars; v; v = v.next)
|
||||
if (v.name == varname) return true;
|
||||
}
|
||||
|
||||
function parseJS(state, style, type, content, stream) {
|
||||
var cc = state.cc;
|
||||
// Communicate our context to the combinators.
|
||||
// (Less wasteful than consing up a hundred closures on every call.)
|
||||
cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc;
|
||||
|
||||
if (!state.lexical.hasOwnProperty("align"))
|
||||
state.lexical.align = true;
|
||||
|
||||
while(true) {
|
||||
var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;
|
||||
if (combinator(type, content)) {
|
||||
while(cc.length && cc[cc.length - 1].lex)
|
||||
cc.pop()();
|
||||
if (cx.marked) return cx.marked;
|
||||
if (type == "variable" && inScope(state, content)) return "variable-2";
|
||||
return style;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Combinator utils
|
||||
|
||||
var cx = {state: null, column: null, marked: null, cc: null};
|
||||
function pass() {
|
||||
for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);
|
||||
}
|
||||
function cont() {
|
||||
pass.apply(null, arguments);
|
||||
return true;
|
||||
}
|
||||
function register(varname) {
|
||||
function inList(list) {
|
||||
for (var v = list; v; v = v.next)
|
||||
if (v.name == varname) return true;
|
||||
return false;
|
||||
}
|
||||
var state = cx.state;
|
||||
if (state.context) {
|
||||
cx.marked = "def";
|
||||
if (inList(state.localVars)) return;
|
||||
state.localVars = {name: varname, next: state.localVars};
|
||||
} else {
|
||||
if (inList(state.globalVars)) return;
|
||||
state.globalVars = {name: varname, next: state.globalVars};
|
||||
}
|
||||
}
|
||||
|
||||
// Combinators
|
||||
|
||||
var defaultVars = {name: "this", next: {name: "arguments"}};
|
||||
function pushcontext() {
|
||||
cx.state.context = {prev: cx.state.context, vars: cx.state.localVars};
|
||||
cx.state.localVars = defaultVars;
|
||||
}
|
||||
function popcontext() {
|
||||
cx.state.localVars = cx.state.context.vars;
|
||||
cx.state.context = cx.state.context.prev;
|
||||
}
|
||||
function pushlex(type, info) {
|
||||
var result = function() {
|
||||
var state = cx.state, indent = state.indented;
|
||||
if (state.lexical.type == "stat") indent = state.lexical.indented;
|
||||
state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info);
|
||||
};
|
||||
result.lex = true;
|
||||
return result;
|
||||
}
|
||||
function poplex() {
|
||||
var state = cx.state;
|
||||
if (state.lexical.prev) {
|
||||
if (state.lexical.type == ")")
|
||||
state.indented = state.lexical.indented;
|
||||
state.lexical = state.lexical.prev;
|
||||
}
|
||||
}
|
||||
poplex.lex = true;
|
||||
|
||||
function expect(wanted) {
|
||||
return function(type) {
|
||||
if (type == wanted) return cont();
|
||||
else if (wanted == ";") return pass();
|
||||
else return cont(arguments.callee);
|
||||
};
|
||||
}
|
||||
|
||||
function statement(type) {
|
||||
if (type == "var") return cont(pushlex("vardef"), vardef1, expect(";"), poplex);
|
||||
if (type == "keyword a") return cont(pushlex("form"), expression, statement, poplex);
|
||||
if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
|
||||
if (type == "{") return cont(pushlex("}"), block, poplex);
|
||||
if (type == ";") return cont();
|
||||
if (type == "if") return cont(pushlex("form"), expression, statement, poplex, maybeelse);
|
||||
if (type == "function") return cont(functiondef);
|
||||
if (type == "for") return cont(pushlex("form"), expect("("), pushlex(")"), forspec1, expect(")"),
|
||||
poplex, statement, poplex);
|
||||
if (type == "variable") return cont(pushlex("stat"), maybelabel);
|
||||
if (type == "switch") return cont(pushlex("form"), expression, pushlex("}", "switch"), expect("{"),
|
||||
block, poplex, poplex);
|
||||
if (type == "case") return cont(expression, expect(":"));
|
||||
if (type == "default") return cont(expect(":"));
|
||||
if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"),
|
||||
statement, poplex, popcontext);
|
||||
return pass(pushlex("stat"), expression, expect(";"), poplex);
|
||||
}
|
||||
function expression(type) {
|
||||
return expressionInner(type, false);
|
||||
}
|
||||
function expressionNoComma(type) {
|
||||
return expressionInner(type, true);
|
||||
}
|
||||
function expressionInner(type, noComma) {
|
||||
var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
|
||||
if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
|
||||
if (type == "function") return cont(functiondef);
|
||||
if (type == "keyword c") return cont(noComma ? maybeexpressionNoComma : maybeexpression);
|
||||
if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop);
|
||||
if (type == "operator") return cont(noComma ? expressionNoComma : expression);
|
||||
if (type == "[") return cont(pushlex("]"), commasep(expressionNoComma, "]"), poplex, maybeop);
|
||||
if (type == "{") return cont(pushlex("}"), commasep(objprop, "}"), poplex, maybeop);
|
||||
return cont();
|
||||
}
|
||||
function maybeexpression(type) {
|
||||
if (type.match(/[;\}\)\],]/)) return pass();
|
||||
return pass(expression);
|
||||
}
|
||||
function maybeexpressionNoComma(type) {
|
||||
if (type.match(/[;\}\)\],]/)) return pass();
|
||||
return pass(expressionNoComma);
|
||||
}
|
||||
|
||||
function maybeoperatorComma(type, value) {
|
||||
if (type == ",") return cont(expression);
|
||||
return maybeoperatorNoComma(type, value, false);
|
||||
}
|
||||
function maybeoperatorNoComma(type, value, noComma) {
|
||||
var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;
|
||||
var expr = noComma == false ? expression : expressionNoComma;
|
||||
if (type == "operator") {
|
||||
if (/\+\+|--/.test(value)) return cont(me);
|
||||
if (value == "?") return cont(expression, expect(":"), expr);
|
||||
return cont(expr);
|
||||
}
|
||||
if (type == ";") return;
|
||||
if (type == "(") return cont(pushlex(")", "call"), commasep(expressionNoComma, ")"), poplex, me);
|
||||
if (type == ".") return cont(property, me);
|
||||
if (type == "[") return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me);
|
||||
}
|
||||
function maybelabel(type) {
|
||||
if (type == ":") return cont(poplex, statement);
|
||||
return pass(maybeoperatorComma, expect(";"), poplex);
|
||||
}
|
||||
function property(type) {
|
||||
if (type == "variable") {cx.marked = "property"; return cont();}
|
||||
}
|
||||
function objprop(type, value) {
|
||||
if (type == "variable") {
|
||||
cx.marked = "property";
|
||||
if (value == "get" || value == "set") return cont(getterSetter);
|
||||
} else if (type == "number" || type == "string") {
|
||||
cx.marked = type + " property";
|
||||
}
|
||||
if (atomicTypes.hasOwnProperty(type)) return cont(expect(":"), expressionNoComma);
|
||||
}
|
||||
function getterSetter(type) {
|
||||
if (type == ":") return cont(expression);
|
||||
if (type != "variable") return cont(expect(":"), expression);
|
||||
cx.marked = "property";
|
||||
return cont(functiondef);
|
||||
}
|
||||
function commasep(what, end) {
|
||||
function proceed(type) {
|
||||
if (type == ",") {
|
||||
var lex = cx.state.lexical;
|
||||
if (lex.info == "call") lex.pos = (lex.pos || 0) + 1;
|
||||
return cont(what, proceed);
|
||||
}
|
||||
if (type == end) return cont();
|
||||
return cont(expect(end));
|
||||
}
|
||||
return function(type) {
|
||||
if (type == end) return cont();
|
||||
else return pass(what, proceed);
|
||||
};
|
||||
}
|
||||
function block(type) {
|
||||
if (type == "}") return cont();
|
||||
return pass(statement, block);
|
||||
}
|
||||
function maybetype(type) {
|
||||
if (type == ":") return cont(typedef);
|
||||
return pass();
|
||||
}
|
||||
function typedef(type) {
|
||||
if (type == "variable"){cx.marked = "variable-3"; return cont();}
|
||||
return pass();
|
||||
}
|
||||
function vardef1(type, value) {
|
||||
if (type == "variable") {
|
||||
register(value);
|
||||
return isTS ? cont(maybetype, vardef2) : cont(vardef2);
|
||||
}
|
||||
return pass();
|
||||
}
|
||||
function vardef2(type, value) {
|
||||
if (value == "=") return cont(expressionNoComma, vardef2);
|
||||
if (type == ",") return cont(vardef1);
|
||||
}
|
||||
function maybeelse(type, value) {
|
||||
if (type == "keyword b" && value == "else") return cont(pushlex("form"), statement, poplex);
|
||||
}
|
||||
function forspec1(type) {
|
||||
if (type == "var") return cont(vardef1, expect(";"), forspec2);
|
||||
if (type == ";") return cont(forspec2);
|
||||
if (type == "variable") return cont(formaybein);
|
||||
return pass(expression, expect(";"), forspec2);
|
||||
}
|
||||
function formaybein(_type, value) {
|
||||
if (value == "in") return cont(expression);
|
||||
return cont(maybeoperatorComma, forspec2);
|
||||
}
|
||||
function forspec2(type, value) {
|
||||
if (type == ";") return cont(forspec3);
|
||||
if (value == "in") return cont(expression);
|
||||
return pass(expression, expect(";"), forspec3);
|
||||
}
|
||||
function forspec3(type) {
|
||||
if (type != ")") cont(expression);
|
||||
}
|
||||
function functiondef(type, value) {
|
||||
if (type == "variable") {register(value); return cont(functiondef);}
|
||||
if (type == "(") return cont(pushlex(")"), pushcontext, commasep(funarg, ")"), poplex, statement, popcontext);
|
||||
}
|
||||
function funarg(type, value) {
|
||||
if (type == "variable") {register(value); return isTS ? cont(maybetype) : cont();}
|
||||
}
|
||||
|
||||
// Interface
|
||||
|
||||
return {
|
||||
startState: function(basecolumn) {
|
||||
return {
|
||||
tokenize: jsTokenBase,
|
||||
lastType: null,
|
||||
cc: [],
|
||||
lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
|
||||
localVars: parserConfig.localVars,
|
||||
globalVars: parserConfig.globalVars,
|
||||
context: parserConfig.localVars && {vars: parserConfig.localVars},
|
||||
indented: 0
|
||||
};
|
||||
},
|
||||
|
||||
token: function(stream, state) {
|
||||
if (stream.sol()) {
|
||||
if (!state.lexical.hasOwnProperty("align"))
|
||||
state.lexical.align = false;
|
||||
state.indented = stream.indentation();
|
||||
}
|
||||
if (state.tokenize != jsTokenComment && stream.eatSpace()) return null;
|
||||
var style = state.tokenize(stream, state);
|
||||
if (type == "comment") return style;
|
||||
state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type;
|
||||
return parseJS(state, style, type, content, stream);
|
||||
},
|
||||
|
||||
indent: function(state, textAfter) {
|
||||
if (state.tokenize == jsTokenComment) return CodeMirror.Pass;
|
||||
if (state.tokenize != jsTokenBase) return 0;
|
||||
var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical;
|
||||
// Kludge to prevent 'maybelse' from blocking lexical scope pops
|
||||
for (var i = state.cc.length - 1; i >= 0; --i) {
|
||||
var c = state.cc[i];
|
||||
if (c == poplex) lexical = lexical.prev;
|
||||
else if (c != maybeelse || /^else\b/.test(textAfter)) break;
|
||||
}
|
||||
if (lexical.type == "stat" && firstChar == "}") lexical = lexical.prev;
|
||||
if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat")
|
||||
lexical = lexical.prev;
|
||||
var type = lexical.type, closing = firstChar == type;
|
||||
|
||||
if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? 4 : 0);
|
||||
else if (type == "form" && firstChar == "{") return lexical.indented;
|
||||
else if (type == "form") return lexical.indented + indentUnit;
|
||||
else if (type == "stat")
|
||||
return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? statementIndent || indentUnit : 0);
|
||||
else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false)
|
||||
return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit);
|
||||
else if (lexical.align) return lexical.column + (closing ? 0 : 1);
|
||||
else return lexical.indented + (closing ? 0 : indentUnit);
|
||||
},
|
||||
|
||||
electricChars: ":{}",
|
||||
blockCommentStart: jsonMode ? null : "/*",
|
||||
blockCommentEnd: jsonMode ? null : "*/",
|
||||
lineComment: jsonMode ? null : "//",
|
||||
fold: "brace",
|
||||
|
||||
helperType: jsonMode ? "json" : "javascript",
|
||||
jsonMode: jsonMode
|
||||
};
|
||||
});
|
||||
|
||||
CodeMirror.defineMIME("text/javascript", "javascript");
|
||||
CodeMirror.defineMIME("text/ecmascript", "javascript");
|
||||
CodeMirror.defineMIME("application/javascript", "javascript");
|
||||
CodeMirror.defineMIME("application/ecmascript", "javascript");
|
||||
CodeMirror.defineMIME("application/json", {name: "javascript", json: true});
|
||||
CodeMirror.defineMIME("application/x-json", {name: "javascript", json: true});
|
||||
CodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true });
|
||||
CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true });
|
||||
File diff suppressed because one or more lines are too long
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
|
||||
Name: 3024 day
|
||||
Author: Jan T. Sott (http://github.com/idleberg)
|
||||
|
||||
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
|
||||
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-3024-day.CodeMirror {background: #f7f7f7; color: #3a3432;}
|
||||
.cm-s-3024-day div.CodeMirror-selected {background: #d6d5d4 !important;}
|
||||
.cm-s-3024-day .CodeMirror-gutters {background: #f7f7f7; border-right: 0px;}
|
||||
.cm-s-3024-day .CodeMirror-linenumber {color: #807d7c;}
|
||||
.cm-s-3024-day .CodeMirror-cursor {border-left: 1px solid #5c5855 !important;}
|
||||
|
||||
.cm-s-3024-day span.cm-comment {color: #cdab53;}
|
||||
.cm-s-3024-day span.cm-atom {color: #a16a94;}
|
||||
.cm-s-3024-day span.cm-number {color: #a16a94;}
|
||||
|
||||
.cm-s-3024-day span.cm-property, .cm-s-3024-day span.cm-attribute {color: #01a252;}
|
||||
.cm-s-3024-day span.cm-keyword {color: #db2d20;}
|
||||
.cm-s-3024-day span.cm-string {color: #fded02;}
|
||||
|
||||
.cm-s-3024-day span.cm-variable {color: #01a252;}
|
||||
.cm-s-3024-day span.cm-variable-2 {color: #01a0e4;}
|
||||
.cm-s-3024-day span.cm-def {color: #e8bbd0;}
|
||||
.cm-s-3024-day span.cm-error {background: #db2d20; color: #5c5855;}
|
||||
.cm-s-3024-day span.cm-bracket {color: #3a3432;}
|
||||
.cm-s-3024-day span.cm-tag {color: #db2d20;}
|
||||
.cm-s-3024-day span.cm-link {color: #a16a94;}
|
||||
|
||||
.cm-s-3024-day .CodeMirror-activeline-background {background: #e8f2ff !important;}
|
||||
.cm-s-3024-day .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
|
||||
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
|
||||
Name: 3024 night
|
||||
Author: Jan T. Sott (http://github.com/idleberg)
|
||||
|
||||
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
|
||||
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-3024-night.CodeMirror {background: #090300; color: #d6d5d4;}
|
||||
.cm-s-3024-night div.CodeMirror-selected {background: #3a3432 !important;}
|
||||
.cm-s-3024-night .CodeMirror-gutters {background: #090300; border-right: 0px;}
|
||||
.cm-s-3024-night .CodeMirror-linenumber {color: #5c5855;}
|
||||
.cm-s-3024-night .CodeMirror-cursor {border-left: 1px solid #807d7c !important;}
|
||||
|
||||
.cm-s-3024-night span.cm-comment {color: #cdab53;}
|
||||
.cm-s-3024-night span.cm-atom {color: #a16a94;}
|
||||
.cm-s-3024-night span.cm-number {color: #a16a94;}
|
||||
|
||||
.cm-s-3024-night span.cm-property, .cm-s-3024-night span.cm-attribute {color: #01a252;}
|
||||
.cm-s-3024-night span.cm-keyword {color: #db2d20;}
|
||||
.cm-s-3024-night span.cm-string {color: #fded02;}
|
||||
|
||||
.cm-s-3024-night span.cm-variable {color: #01a252;}
|
||||
.cm-s-3024-night span.cm-variable-2 {color: #01a0e4;}
|
||||
.cm-s-3024-night span.cm-def {color: #e8bbd0;}
|
||||
.cm-s-3024-night span.cm-error {background: #db2d20; color: #807d7c;}
|
||||
.cm-s-3024-night span.cm-bracket {color: #d6d5d4;}
|
||||
.cm-s-3024-night span.cm-tag {color: #db2d20;}
|
||||
.cm-s-3024-night span.cm-link {color: #a16a94;}
|
||||
|
||||
.cm-s-3024-night .CodeMirror-activeline-background {background: #2F2F2F !important;}
|
||||
.cm-s-3024-night .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
|
||||
@@ -1,5 +0,0 @@
|
||||
.cm-s-ambiance.CodeMirror {
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
|
||||
Name: Base16 Default Dark
|
||||
Author: Chris Kempson (http://chriskempson.com)
|
||||
|
||||
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-chrome-devtools)
|
||||
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-base16-dark.CodeMirror {background: #151515; color: #e0e0e0;}
|
||||
.cm-s-base16-dark div.CodeMirror-selected {background: #202020 !important;}
|
||||
.cm-s-base16-dark .CodeMirror-gutters {background: #151515; border-right: 0px;}
|
||||
.cm-s-base16-dark .CodeMirror-linenumber {color: #505050;}
|
||||
.cm-s-base16-dark .CodeMirror-cursor {border-left: 1px solid #b0b0b0 !important;}
|
||||
|
||||
.cm-s-base16-dark span.cm-comment {color: #8f5536;}
|
||||
.cm-s-base16-dark span.cm-atom {color: #aa759f;}
|
||||
.cm-s-base16-dark span.cm-number {color: #aa759f;}
|
||||
|
||||
.cm-s-base16-dark span.cm-property, .cm-s-base16-dark span.cm-attribute {color: #90a959;}
|
||||
.cm-s-base16-dark span.cm-keyword {color: #ac4142;}
|
||||
.cm-s-base16-dark span.cm-string {color: #f4bf75;}
|
||||
|
||||
.cm-s-base16-dark span.cm-variable {color: #90a959;}
|
||||
.cm-s-base16-dark span.cm-variable-2 {color: #6a9fb5;}
|
||||
.cm-s-base16-dark span.cm-def {color: #d28445;}
|
||||
.cm-s-base16-dark span.cm-error {background: #ac4142; color: #b0b0b0;}
|
||||
.cm-s-base16-dark span.cm-bracket {color: #e0e0e0;}
|
||||
.cm-s-base16-dark span.cm-tag {color: #ac4142;}
|
||||
.cm-s-base16-dark span.cm-link {color: #aa759f;}
|
||||
|
||||
.cm-s-base16-dark .CodeMirror-activeline-background {background: #2F2F2F !important;}
|
||||
.cm-s-base16-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
|
||||
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
|
||||
Name: Base16 Default Light
|
||||
Author: Chris Kempson (http://chriskempson.com)
|
||||
|
||||
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-chrome-devtools)
|
||||
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-base16-light.CodeMirror {background: #f5f5f5; color: #202020;}
|
||||
.cm-s-base16-light div.CodeMirror-selected {background: #e0e0e0 !important;}
|
||||
.cm-s-base16-light .CodeMirror-gutters {background: #f5f5f5; border-right: 0px;}
|
||||
.cm-s-base16-light .CodeMirror-linenumber {color: #b0b0b0;}
|
||||
.cm-s-base16-light .CodeMirror-cursor {border-left: 1px solid #505050 !important;}
|
||||
|
||||
.cm-s-base16-light span.cm-comment {color: #8f5536;}
|
||||
.cm-s-base16-light span.cm-atom {color: #aa759f;}
|
||||
.cm-s-base16-light span.cm-number {color: #aa759f;}
|
||||
|
||||
.cm-s-base16-light span.cm-property, .cm-s-base16-light span.cm-attribute {color: #90a959;}
|
||||
.cm-s-base16-light span.cm-keyword {color: #ac4142;}
|
||||
.cm-s-base16-light span.cm-string {color: #f4bf75;}
|
||||
|
||||
.cm-s-base16-light span.cm-variable {color: #90a959;}
|
||||
.cm-s-base16-light span.cm-variable-2 {color: #6a9fb5;}
|
||||
.cm-s-base16-light span.cm-def {color: #d28445;}
|
||||
.cm-s-base16-light span.cm-error {background: #ac4142; color: #505050;}
|
||||
.cm-s-base16-light span.cm-bracket {color: #202020;}
|
||||
.cm-s-base16-light span.cm-tag {color: #ac4142;}
|
||||
.cm-s-base16-light span.cm-link {color: #aa759f;}
|
||||
|
||||
.cm-s-base16-light .CodeMirror-activeline-background {background: #DDDCDC !important;}
|
||||
.cm-s-base16-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
|
||||
@@ -1,28 +0,0 @@
|
||||
/* Port of TextMate's Blackboard theme */
|
||||
|
||||
.cm-s-blackboard.CodeMirror { background: #0C1021; color: #F8F8F8; }
|
||||
.cm-s-blackboard .CodeMirror-selected { background: #253B76 !important; }
|
||||
.cm-s-blackboard .CodeMirror-gutters { background: #0C1021; border-right: 0; }
|
||||
.cm-s-blackboard .CodeMirror-linenumber { color: #888; }
|
||||
.cm-s-blackboard .CodeMirror-cursor { border-left: 1px solid #A7A7A7 !important; }
|
||||
|
||||
.cm-s-blackboard .cm-keyword { color: #FBDE2D; }
|
||||
.cm-s-blackboard .cm-atom { color: #D8FA3C; }
|
||||
.cm-s-blackboard .cm-number { color: #D8FA3C; }
|
||||
.cm-s-blackboard .cm-def { color: #8DA6CE; }
|
||||
.cm-s-blackboard .cm-variable { color: #FF6400; }
|
||||
.cm-s-blackboard .cm-operator { color: #FBDE2D;}
|
||||
.cm-s-blackboard .cm-comment { color: #AEAEAE; }
|
||||
.cm-s-blackboard .cm-string { color: #61CE3C; }
|
||||
.cm-s-blackboard .cm-string-2 { color: #61CE3C; }
|
||||
.cm-s-blackboard .cm-meta { color: #D8FA3C; }
|
||||
.cm-s-blackboard .cm-error { background: #9D1E15; color: #F8F8F8; }
|
||||
.cm-s-blackboard .cm-builtin { color: #8DA6CE; }
|
||||
.cm-s-blackboard .cm-tag { color: #8DA6CE; }
|
||||
.cm-s-blackboard .cm-attribute { color: #8DA6CE; }
|
||||
.cm-s-blackboard .cm-header { color: #FF6400; }
|
||||
.cm-s-blackboard .cm-hr { color: #AEAEAE; }
|
||||
.cm-s-blackboard .cm-link { color: #8DA6CE; }
|
||||
|
||||
.cm-s-blackboard .CodeMirror-activeline-background {background: #3C3636 !important;}
|
||||
.cm-s-blackboard .CodeMirror-matchingbracket {outline:1px solid grey;color:white !important}
|
||||
@@ -1,21 +0,0 @@
|
||||
.cm-s-cobalt.CodeMirror { background: #002240; color: white; }
|
||||
.cm-s-cobalt div.CodeMirror-selected { background: #b36539 !important; }
|
||||
.cm-s-cobalt .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
|
||||
.cm-s-cobalt .CodeMirror-linenumber { color: #d0d0d0; }
|
||||
.cm-s-cobalt .CodeMirror-cursor { border-left: 1px solid white !important; }
|
||||
|
||||
.cm-s-cobalt span.cm-comment { color: #08f; }
|
||||
.cm-s-cobalt span.cm-atom { color: #845dc4; }
|
||||
.cm-s-cobalt span.cm-number, .cm-s-cobalt span.cm-attribute { color: #ff80e1; }
|
||||
.cm-s-cobalt span.cm-keyword { color: #ffee80; }
|
||||
.cm-s-cobalt span.cm-string { color: #3ad900; }
|
||||
.cm-s-cobalt span.cm-meta { color: #ff9d00; }
|
||||
.cm-s-cobalt span.cm-variable-2, .cm-s-cobalt span.cm-tag { color: #9effff; }
|
||||
.cm-s-cobalt span.cm-variable-3, .cm-s-cobalt span.cm-def { color: white; }
|
||||
.cm-s-cobalt span.cm-error { color: #9d1e15; }
|
||||
.cm-s-cobalt span.cm-bracket { color: #d8d8d8; }
|
||||
.cm-s-cobalt span.cm-builtin, .cm-s-cobalt span.cm-special { color: #ff9e59; }
|
||||
.cm-s-cobalt span.cm-link { color: #845dc4; }
|
||||
|
||||
.cm-s-cobalt .CodeMirror-activeline-background {background: #002D57 !important;}
|
||||
.cm-s-cobalt .CodeMirror-matchingbracket {outline:1px solid grey;color:white !important}
|
||||
@@ -1,23 +0,0 @@
|
||||
.cm-s-eclipse span.cm-meta {color: #FF1717;}
|
||||
.cm-s-eclipse span.cm-keyword { line-height: 1em; font-weight: bold; color: #7F0055; }
|
||||
.cm-s-eclipse span.cm-atom {color: #219;}
|
||||
.cm-s-eclipse span.cm-number {color: #164;}
|
||||
.cm-s-eclipse span.cm-def {color: #00f;}
|
||||
.cm-s-eclipse span.cm-variable {color: black;}
|
||||
.cm-s-eclipse span.cm-variable-2 {color: #0000C0;}
|
||||
.cm-s-eclipse span.cm-variable-3 {color: #0000C0;}
|
||||
.cm-s-eclipse span.cm-property {color: black;}
|
||||
.cm-s-eclipse span.cm-operator {color: black;}
|
||||
.cm-s-eclipse span.cm-comment {color: #3F7F5F;}
|
||||
.cm-s-eclipse span.cm-string {color: #2A00FF;}
|
||||
.cm-s-eclipse span.cm-string-2 {color: #f50;}
|
||||
.cm-s-eclipse span.cm-error {color: #f00;}
|
||||
.cm-s-eclipse span.cm-qualifier {color: #555;}
|
||||
.cm-s-eclipse span.cm-builtin {color: #30a;}
|
||||
.cm-s-eclipse span.cm-bracket {color: #cc7;}
|
||||
.cm-s-eclipse span.cm-tag {color: #170;}
|
||||
.cm-s-eclipse span.cm-attribute {color: #00c;}
|
||||
.cm-s-eclipse span.cm-link {color: #219;}
|
||||
|
||||
.cm-s-eclipse .CodeMirror-activeline-background {background: #e8f2ff !important;}
|
||||
.cm-s-eclipse .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;}
|
||||
@@ -1,13 +0,0 @@
|
||||
.cm-s-elegant span.cm-number, .cm-s-elegant span.cm-string, .cm-s-elegant span.cm-atom {color: #762;}
|
||||
.cm-s-elegant span.cm-comment {color: #262; font-style: italic; line-height: 1em;}
|
||||
.cm-s-elegant span.cm-meta {color: #555; font-style: italic; line-height: 1em;}
|
||||
.cm-s-elegant span.cm-variable {color: black;}
|
||||
.cm-s-elegant span.cm-variable-2 {color: #b11;}
|
||||
.cm-s-elegant span.cm-qualifier {color: #555;}
|
||||
.cm-s-elegant span.cm-keyword {color: #730;}
|
||||
.cm-s-elegant span.cm-builtin {color: #30a;}
|
||||
.cm-s-elegant span.cm-error {background-color: #fdd;}
|
||||
.cm-s-elegant span.cm-link {color: #762;}
|
||||
|
||||
.cm-s-elegant .CodeMirror-activeline-background {background: #e8f2ff !important;}
|
||||
.cm-s-elegant .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;}
|
||||
@@ -1,30 +0,0 @@
|
||||
.cm-s-erlang-dark.CodeMirror { background: #002240; color: white; }
|
||||
.cm-s-erlang-dark div.CodeMirror-selected { background: #b36539 !important; }
|
||||
.cm-s-erlang-dark .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
|
||||
.cm-s-erlang-dark .CodeMirror-linenumber { color: #d0d0d0; }
|
||||
.cm-s-erlang-dark .CodeMirror-cursor { border-left: 1px solid white !important; }
|
||||
|
||||
.cm-s-erlang-dark span.cm-atom { color: #f133f1; }
|
||||
.cm-s-erlang-dark span.cm-attribute { color: #ff80e1; }
|
||||
.cm-s-erlang-dark span.cm-bracket { color: #ff9d00; }
|
||||
.cm-s-erlang-dark span.cm-builtin { color: #eaa; }
|
||||
.cm-s-erlang-dark span.cm-comment { color: #77f; }
|
||||
.cm-s-erlang-dark span.cm-def { color: #e7a; }
|
||||
.cm-s-erlang-dark span.cm-error { color: #9d1e15; }
|
||||
.cm-s-erlang-dark span.cm-keyword { color: #ffee80; }
|
||||
.cm-s-erlang-dark span.cm-meta { color: #50fefe; }
|
||||
.cm-s-erlang-dark span.cm-number { color: #ffd0d0; }
|
||||
.cm-s-erlang-dark span.cm-operator { color: #d55; }
|
||||
.cm-s-erlang-dark span.cm-property { color: #ccc; }
|
||||
.cm-s-erlang-dark span.cm-qualifier { color: #ccc; }
|
||||
.cm-s-erlang-dark span.cm-quote { color: #ccc; }
|
||||
.cm-s-erlang-dark span.cm-special { color: #ffbbbb; }
|
||||
.cm-s-erlang-dark span.cm-string { color: #3ad900; }
|
||||
.cm-s-erlang-dark span.cm-string-2 { color: #ccc; }
|
||||
.cm-s-erlang-dark span.cm-tag { color: #9effff; }
|
||||
.cm-s-erlang-dark span.cm-variable { color: #50fe50; }
|
||||
.cm-s-erlang-dark span.cm-variable-2 { color: #e0e; }
|
||||
.cm-s-erlang-dark span.cm-variable-3 { color: #ccc; }
|
||||
|
||||
.cm-s-erlang-dark .CodeMirror-activeline-background {background: #013461 !important;}
|
||||
.cm-s-erlang-dark .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}
|
||||
@@ -1,47 +0,0 @@
|
||||
/*
|
||||
http://lesscss.org/ dark theme
|
||||
Ported to CodeMirror by Peter Kroon
|
||||
*/
|
||||
.cm-s-lesser-dark {
|
||||
line-height: 1.3em;
|
||||
}
|
||||
.cm-s-lesser-dark {
|
||||
font-family: 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', 'Monaco', Courier, monospace !important;
|
||||
}
|
||||
|
||||
.cm-s-lesser-dark.CodeMirror { background: #262626; color: #EBEFE7; text-shadow: 0 -1px 1px #262626; }
|
||||
.cm-s-lesser-dark div.CodeMirror-selected {background: #45443B !important;} /* 33322B*/
|
||||
.cm-s-lesser-dark .CodeMirror-cursor { border-left: 1px solid white !important; }
|
||||
.cm-s-lesser-dark pre { padding: 0 8px; }/*editable code holder*/
|
||||
|
||||
.cm-s-lesser-dark.CodeMirror span.CodeMirror-matchingbracket { color: #7EFC7E; }/*65FC65*/
|
||||
|
||||
.cm-s-lesser-dark .CodeMirror-gutters { background: #262626; border-right:1px solid #aaa; }
|
||||
.cm-s-lesser-dark .CodeMirror-linenumber { color: #777; }
|
||||
|
||||
.cm-s-lesser-dark span.cm-keyword { color: #599eff; }
|
||||
.cm-s-lesser-dark span.cm-atom { color: #C2B470; }
|
||||
.cm-s-lesser-dark span.cm-number { color: #B35E4D; }
|
||||
.cm-s-lesser-dark span.cm-def {color: white;}
|
||||
.cm-s-lesser-dark span.cm-variable { color:#D9BF8C; }
|
||||
.cm-s-lesser-dark span.cm-variable-2 { color: #669199; }
|
||||
.cm-s-lesser-dark span.cm-variable-3 { color: white; }
|
||||
.cm-s-lesser-dark span.cm-property {color: #92A75C;}
|
||||
.cm-s-lesser-dark span.cm-operator {color: #92A75C;}
|
||||
.cm-s-lesser-dark span.cm-comment { color: #666; }
|
||||
.cm-s-lesser-dark span.cm-string { color: #BCD279; }
|
||||
.cm-s-lesser-dark span.cm-string-2 {color: #f50;}
|
||||
.cm-s-lesser-dark span.cm-meta { color: #738C73; }
|
||||
.cm-s-lesser-dark span.cm-error { color: #9d1e15; }
|
||||
.cm-s-lesser-dark span.cm-qualifier {color: #555;}
|
||||
.cm-s-lesser-dark span.cm-builtin { color: #ff9e59; }
|
||||
.cm-s-lesser-dark span.cm-bracket { color: #EBEFE7; }
|
||||
.cm-s-lesser-dark span.cm-tag { color: #669199; }
|
||||
.cm-s-lesser-dark span.cm-attribute {color: #00c;}
|
||||
.cm-s-lesser-dark span.cm-header {color: #a0a;}
|
||||
.cm-s-lesser-dark span.cm-quote {color: #090;}
|
||||
.cm-s-lesser-dark span.cm-hr {color: #999;}
|
||||
.cm-s-lesser-dark span.cm-link {color: #00c;}
|
||||
|
||||
.cm-s-lesser-dark .CodeMirror-activeline-background {background: #3C3A3A !important;}
|
||||
.cm-s-lesser-dark .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}
|
||||
@@ -1,43 +0,0 @@
|
||||
/* Based on the theme at http://bonsaiden.github.com/JavaScript-Garden */
|
||||
|
||||
/*<!--match-->*/
|
||||
.cm-s-midnight span.CodeMirror-matchhighlight { background: #494949 }
|
||||
.cm-s-midnight.CodeMirror-focused span.CodeMirror-matchhighlight { background: #314D67 !important; }
|
||||
|
||||
/*<!--activeline-->*/
|
||||
.cm-s-midnight .CodeMirror-activeline-background {background: #253540 !important;}
|
||||
|
||||
.cm-s-midnight.CodeMirror {
|
||||
background: #0F192A;
|
||||
color: #D1EDFF;
|
||||
}
|
||||
|
||||
.cm-s-midnight.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
|
||||
|
||||
.cm-s-midnight div.CodeMirror-selected {background: #314D67 !important;}
|
||||
.cm-s-midnight .CodeMirror-gutters {background: #0F192A; border-right: 1px solid;}
|
||||
.cm-s-midnight .CodeMirror-linenumber {color: #D0D0D0;}
|
||||
.cm-s-midnight .CodeMirror-cursor {
|
||||
border-left: 1px solid #F8F8F0 !important;
|
||||
}
|
||||
|
||||
.cm-s-midnight span.cm-comment {color: #428BDD;}
|
||||
.cm-s-midnight span.cm-atom {color: #AE81FF;}
|
||||
.cm-s-midnight span.cm-number {color: #D1EDFF;}
|
||||
|
||||
.cm-s-midnight span.cm-property, .cm-s-midnight span.cm-attribute {color: #A6E22E;}
|
||||
.cm-s-midnight span.cm-keyword {color: #E83737;}
|
||||
.cm-s-midnight span.cm-string {color: #1DC116;}
|
||||
|
||||
.cm-s-midnight span.cm-variable {color: #FFAA3E;}
|
||||
.cm-s-midnight span.cm-variable-2 {color: #FFAA3E;}
|
||||
.cm-s-midnight span.cm-def {color: #4DD;}
|
||||
.cm-s-midnight span.cm-error {background: #F92672; color: #F8F8F0;}
|
||||
.cm-s-midnight span.cm-bracket {color: #D1EDFF;}
|
||||
.cm-s-midnight span.cm-tag {color: #449;}
|
||||
.cm-s-midnight span.cm-link {color: #AE81FF;}
|
||||
|
||||
.cm-s-midnight .CodeMirror-matchingbracket {
|
||||
text-decoration: underline;
|
||||
color: white !important;
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/* Based on Sublime Text's Monokai theme */
|
||||
|
||||
.cm-s-monokai.CodeMirror {background: #272822; color: #f8f8f2;}
|
||||
.cm-s-monokai div.CodeMirror-selected {background: #49483E !important;}
|
||||
.cm-s-monokai .CodeMirror-gutters {background: #272822; border-right: 0px;}
|
||||
.cm-s-monokai .CodeMirror-linenumber {color: #d0d0d0;}
|
||||
.cm-s-monokai .CodeMirror-cursor {border-left: 1px solid #f8f8f0 !important;}
|
||||
|
||||
.cm-s-monokai span.cm-comment {color: #75715e;}
|
||||
.cm-s-monokai span.cm-atom {color: #ae81ff;}
|
||||
.cm-s-monokai span.cm-number {color: #ae81ff;}
|
||||
|
||||
.cm-s-monokai span.cm-property, .cm-s-monokai span.cm-attribute {color: #a6e22e;}
|
||||
.cm-s-monokai span.cm-keyword {color: #f92672;}
|
||||
.cm-s-monokai span.cm-string {color: #e6db74;}
|
||||
|
||||
.cm-s-monokai span.cm-variable {color: #a6e22e;}
|
||||
.cm-s-monokai span.cm-variable-2 {color: #9effff;}
|
||||
.cm-s-monokai span.cm-def {color: #fd971f;}
|
||||
.cm-s-monokai span.cm-error {background: #f92672; color: #f8f8f0;}
|
||||
.cm-s-monokai span.cm-bracket {color: #f8f8f2;}
|
||||
.cm-s-monokai span.cm-tag {color: #f92672;}
|
||||
.cm-s-monokai span.cm-link {color: #ae81ff;}
|
||||
|
||||
.cm-s-monokai .CodeMirror-activeline-background {background: #373831 !important;}
|
||||
.cm-s-monokai .CodeMirror-matchingbracket {
|
||||
text-decoration: underline;
|
||||
color: white !important;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
.cm-s-neat span.cm-comment { color: #a86; }
|
||||
.cm-s-neat span.cm-keyword { line-height: 1em; font-weight: bold; color: blue; }
|
||||
.cm-s-neat span.cm-string { color: #a22; }
|
||||
.cm-s-neat span.cm-builtin { line-height: 1em; font-weight: bold; color: #077; }
|
||||
.cm-s-neat span.cm-special { line-height: 1em; font-weight: bold; color: #0aa; }
|
||||
.cm-s-neat span.cm-variable { color: black; }
|
||||
.cm-s-neat span.cm-number, .cm-s-neat span.cm-atom { color: #3a3; }
|
||||
.cm-s-neat span.cm-meta {color: #555;}
|
||||
.cm-s-neat span.cm-link { color: #3a3; }
|
||||
|
||||
.cm-s-neat .CodeMirror-activeline-background {background: #e8f2ff !important;}
|
||||
.cm-s-neat .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;}
|
||||
@@ -1,24 +0,0 @@
|
||||
/* Loosely based on the Midnight Textmate theme */
|
||||
|
||||
.cm-s-night.CodeMirror { background: #0a001f; color: #f8f8f8; }
|
||||
.cm-s-night div.CodeMirror-selected { background: #447 !important; }
|
||||
.cm-s-night .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
|
||||
.cm-s-night .CodeMirror-linenumber { color: #f8f8f8; }
|
||||
.cm-s-night .CodeMirror-cursor { border-left: 1px solid white !important; }
|
||||
|
||||
.cm-s-night span.cm-comment { color: #6900a1; }
|
||||
.cm-s-night span.cm-atom { color: #845dc4; }
|
||||
.cm-s-night span.cm-number, .cm-s-night span.cm-attribute { color: #ffd500; }
|
||||
.cm-s-night span.cm-keyword { color: #599eff; }
|
||||
.cm-s-night span.cm-string { color: #37f14a; }
|
||||
.cm-s-night span.cm-meta { color: #7678e2; }
|
||||
.cm-s-night span.cm-variable-2, .cm-s-night span.cm-tag { color: #99b2ff; }
|
||||
.cm-s-night span.cm-variable-3, .cm-s-night span.cm-def { color: white; }
|
||||
.cm-s-night span.cm-error { color: #9d1e15; }
|
||||
.cm-s-night span.cm-bracket { color: #8da6ce; }
|
||||
.cm-s-night span.cm-comment { color: #6900a1; }
|
||||
.cm-s-night span.cm-builtin, .cm-s-night span.cm-special { color: #ff9e59; }
|
||||
.cm-s-night span.cm-link { color: #845dc4; }
|
||||
|
||||
.cm-s-night .CodeMirror-activeline-background {background: #1C005A !important;}
|
||||
.cm-s-night .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}
|
||||
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
|
||||
Name: Paraíso (Dark)
|
||||
Author: Jan T. Sott
|
||||
|
||||
Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror)
|
||||
Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-paraiso-dark.CodeMirror {background: #2f1e2e; color: #b9b6b0;}
|
||||
.cm-s-paraiso-dark div.CodeMirror-selected {background: #41323f !important;}
|
||||
.cm-s-paraiso-dark .CodeMirror-gutters {background: #2f1e2e; border-right: 0px;}
|
||||
.cm-s-paraiso-dark .CodeMirror-linenumber {color: #776e71;}
|
||||
.cm-s-paraiso-dark .CodeMirror-cursor {border-left: 1px solid #8d8687 !important;}
|
||||
|
||||
.cm-s-paraiso-dark span.cm-comment {color: #e96ba8;}
|
||||
.cm-s-paraiso-dark span.cm-atom {color: #815ba4;}
|
||||
.cm-s-paraiso-dark span.cm-number {color: #815ba4;}
|
||||
|
||||
.cm-s-paraiso-dark span.cm-property, .cm-s-paraiso-dark span.cm-attribute {color: #48b685;}
|
||||
.cm-s-paraiso-dark span.cm-keyword {color: #ef6155;}
|
||||
.cm-s-paraiso-dark span.cm-string {color: #fec418;}
|
||||
|
||||
.cm-s-paraiso-dark span.cm-variable {color: #48b685;}
|
||||
.cm-s-paraiso-dark span.cm-variable-2 {color: #06b6ef;}
|
||||
.cm-s-paraiso-dark span.cm-def {color: #f99b15;}
|
||||
.cm-s-paraiso-dark span.cm-error {background: #ef6155; color: #8d8687;}
|
||||
.cm-s-paraiso-dark span.cm-bracket {color: #b9b6b0;}
|
||||
.cm-s-paraiso-dark span.cm-tag {color: #ef6155;}
|
||||
.cm-s-paraiso-dark span.cm-link {color: #815ba4;}
|
||||
|
||||
.cm-s-paraiso-dark .CodeMirror-activeline-background {background: #4D344A !important;}
|
||||
.cm-s-paraiso-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
|
||||
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
|
||||
Name: Paraíso (Light)
|
||||
Author: Jan T. Sott
|
||||
|
||||
Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror)
|
||||
Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-paraiso-light.CodeMirror {background: #e7e9db; color: #41323f;}
|
||||
.cm-s-paraiso-light div.CodeMirror-selected {background: #b9b6b0 !important;}
|
||||
.cm-s-paraiso-light .CodeMirror-gutters {background: #e7e9db; border-right: 0px;}
|
||||
.cm-s-paraiso-light .CodeMirror-linenumber {color: #8d8687;}
|
||||
.cm-s-paraiso-light .CodeMirror-cursor {border-left: 1px solid #776e71 !important;}
|
||||
|
||||
.cm-s-paraiso-light span.cm-comment {color: #e96ba8;}
|
||||
.cm-s-paraiso-light span.cm-atom {color: #815ba4;}
|
||||
.cm-s-paraiso-light span.cm-number {color: #815ba4;}
|
||||
|
||||
.cm-s-paraiso-light span.cm-property, .cm-s-paraiso-light span.cm-attribute {color: #48b685;}
|
||||
.cm-s-paraiso-light span.cm-keyword {color: #ef6155;}
|
||||
.cm-s-paraiso-light span.cm-string {color: #fec418;}
|
||||
|
||||
.cm-s-paraiso-light span.cm-variable {color: #48b685;}
|
||||
.cm-s-paraiso-light span.cm-variable-2 {color: #06b6ef;}
|
||||
.cm-s-paraiso-light span.cm-def {color: #f99b15;}
|
||||
.cm-s-paraiso-light span.cm-error {background: #ef6155; color: #776e71;}
|
||||
.cm-s-paraiso-light span.cm-bracket {color: #41323f;}
|
||||
.cm-s-paraiso-light span.cm-tag {color: #ef6155;}
|
||||
.cm-s-paraiso-light span.cm-link {color: #815ba4;}
|
||||
|
||||
.cm-s-paraiso-light .CodeMirror-activeline-background {background: #CFD1C4 !important;}
|
||||
.cm-s-paraiso-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
|
||||
@@ -1,23 +0,0 @@
|
||||
.cm-s-rubyblue { font-family: Trebuchet, Verdana, sans-serif; } /* - customized editor font - */
|
||||
|
||||
.cm-s-rubyblue.CodeMirror { background: #112435; color: white; }
|
||||
.cm-s-rubyblue div.CodeMirror-selected { background: #38566F !important; }
|
||||
.cm-s-rubyblue .CodeMirror-gutters { background: #1F4661; border-right: 7px solid #3E7087; }
|
||||
.cm-s-rubyblue .CodeMirror-linenumber { color: white; }
|
||||
.cm-s-rubyblue .CodeMirror-cursor { border-left: 1px solid white !important; }
|
||||
|
||||
.cm-s-rubyblue span.cm-comment { color: #999; font-style:italic; line-height: 1em; }
|
||||
.cm-s-rubyblue span.cm-atom { color: #F4C20B; }
|
||||
.cm-s-rubyblue span.cm-number, .cm-s-rubyblue span.cm-attribute { color: #82C6E0; }
|
||||
.cm-s-rubyblue span.cm-keyword { color: #F0F; }
|
||||
.cm-s-rubyblue span.cm-string { color: #F08047; }
|
||||
.cm-s-rubyblue span.cm-meta { color: #F0F; }
|
||||
.cm-s-rubyblue span.cm-variable-2, .cm-s-rubyblue span.cm-tag { color: #7BD827; }
|
||||
.cm-s-rubyblue span.cm-variable-3, .cm-s-rubyblue span.cm-def { color: white; }
|
||||
.cm-s-rubyblue span.cm-error { color: #AF2018; }
|
||||
.cm-s-rubyblue span.cm-bracket { color: #F0F; }
|
||||
.cm-s-rubyblue span.cm-link { color: #F4C20B; }
|
||||
.cm-s-rubyblue span.CodeMirror-matchingbracket { color:#F0F !important; }
|
||||
.cm-s-rubyblue span.cm-builtin, .cm-s-rubyblue span.cm-special { color: #FF9D00; }
|
||||
|
||||
.cm-s-rubyblue .CodeMirror-activeline-background {background: #173047 !important;}
|
||||
File diff suppressed because one or more lines are too long
@@ -1,26 +0,0 @@
|
||||
.cm-s-the-matrix.CodeMirror { background: #000000; color: #00FF00; }
|
||||
.cm-s-the-matrix span.CodeMirror-selected { background: #a8f !important; }
|
||||
.cm-s-the-matrix .CodeMirror-gutters { background: #060; border-right: 2px solid #00FF00; }
|
||||
.cm-s-the-matrix .CodeMirror-linenumber { color: #FFFFFF; }
|
||||
.cm-s-the-matrix .CodeMirror-cursor { border-left: 1px solid #00FF00 !important; }
|
||||
|
||||
.cm-s-the-matrix span.cm-keyword {color: #008803; font-weight: bold;}
|
||||
.cm-s-the-matrix span.cm-atom {color: #3FF;}
|
||||
.cm-s-the-matrix span.cm-number {color: #FFB94F;}
|
||||
.cm-s-the-matrix span.cm-def {color: #99C;}
|
||||
.cm-s-the-matrix span.cm-variable {color: #F6C;}
|
||||
.cm-s-the-matrix span.cm-variable-2 {color: #C6F;}
|
||||
.cm-s-the-matrix span.cm-variable-3 {color: #96F;}
|
||||
.cm-s-the-matrix span.cm-property {color: #62FFA0;}
|
||||
.cm-s-the-matrix span.cm-operator {color: #999}
|
||||
.cm-s-the-matrix span.cm-comment {color: #CCCCCC;}
|
||||
.cm-s-the-matrix span.cm-string {color: #39C;}
|
||||
.cm-s-the-matrix span.cm-meta {color: #C9F;}
|
||||
.cm-s-the-matrix span.cm-error {color: #FF0000;}
|
||||
.cm-s-the-matrix span.cm-qualifier {color: #FFF700;}
|
||||
.cm-s-the-matrix span.cm-builtin {color: #30a;}
|
||||
.cm-s-the-matrix span.cm-bracket {color: #cc7;}
|
||||
.cm-s-the-matrix span.cm-tag {color: #FFBD40;}
|
||||
.cm-s-the-matrix span.cm-attribute {color: #FFF700;}
|
||||
|
||||
.cm-s-the-matrix .CodeMirror-activeline-background {background: #040;}
|
||||
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
|
||||
Name: Tomorrow Night - Eighties
|
||||
Author: Chris Kempson
|
||||
|
||||
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
|
||||
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-tomorrow-night-eighties.CodeMirror {background: #000000; color: #CCCCCC;}
|
||||
.cm-s-tomorrow-night-eighties div.CodeMirror-selected {background: #2D2D2D !important;}
|
||||
.cm-s-tomorrow-night-eighties .CodeMirror-gutters {background: #000000; border-right: 0px;}
|
||||
.cm-s-tomorrow-night-eighties .CodeMirror-linenumber {color: #515151;}
|
||||
.cm-s-tomorrow-night-eighties .CodeMirror-cursor {border-left: 1px solid #6A6A6A !important;}
|
||||
|
||||
.cm-s-tomorrow-night-eighties span.cm-comment {color: #d27b53;}
|
||||
.cm-s-tomorrow-night-eighties span.cm-atom {color: #a16a94;}
|
||||
.cm-s-tomorrow-night-eighties span.cm-number {color: #a16a94;}
|
||||
|
||||
.cm-s-tomorrow-night-eighties span.cm-property, .cm-s-tomorrow-night-eighties span.cm-attribute {color: #99cc99;}
|
||||
.cm-s-tomorrow-night-eighties span.cm-keyword {color: #f2777a;}
|
||||
.cm-s-tomorrow-night-eighties span.cm-string {color: #ffcc66;}
|
||||
|
||||
.cm-s-tomorrow-night-eighties span.cm-variable {color: #99cc99;}
|
||||
.cm-s-tomorrow-night-eighties span.cm-variable-2 {color: #6699cc;}
|
||||
.cm-s-tomorrow-night-eighties span.cm-def {color: #f99157;}
|
||||
.cm-s-tomorrow-night-eighties span.cm-error {background: #f2777a; color: #6A6A6A;}
|
||||
.cm-s-tomorrow-night-eighties span.cm-bracket {color: #CCCCCC;}
|
||||
.cm-s-tomorrow-night-eighties span.cm-tag {color: #f2777a;}
|
||||
.cm-s-tomorrow-night-eighties span.cm-link {color: #a16a94;}
|
||||
|
||||
.cm-s-tomorrow-night-eighties .CodeMirror-activeline-background {background: #343600 !important;}
|
||||
.cm-s-tomorrow-night-eighties .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
|
||||
@@ -1,28 +0,0 @@
|
||||
.cm-s-twilight.CodeMirror { background: #141414; color: #f7f7f7; } /**/
|
||||
.cm-s-twilight .CodeMirror-selected { background: #323232 !important; } /**/
|
||||
|
||||
.cm-s-twilight .CodeMirror-gutters { background: #222; border-right: 1px solid #aaa; }
|
||||
.cm-s-twilight .CodeMirror-linenumber { color: #aaa; }
|
||||
.cm-s-twilight .CodeMirror-cursor { border-left: 1px solid white !important; }
|
||||
|
||||
.cm-s-twilight .cm-keyword { color: #f9ee98; } /**/
|
||||
.cm-s-twilight .cm-atom { color: #FC0; }
|
||||
.cm-s-twilight .cm-number { color: #ca7841; } /**/
|
||||
.cm-s-twilight .cm-def { color: #8DA6CE; }
|
||||
.cm-s-twilight span.cm-variable-2, .cm-s-twilight span.cm-tag { color: #607392; } /**/
|
||||
.cm-s-twilight span.cm-variable-3, .cm-s-twilight span.cm-def { color: #607392; } /**/
|
||||
.cm-s-twilight .cm-operator { color: #cda869; } /**/
|
||||
.cm-s-twilight .cm-comment { color:#777; font-style:italic; font-weight:normal; } /**/
|
||||
.cm-s-twilight .cm-string { color:#8f9d6a; font-style:italic; } /**/
|
||||
.cm-s-twilight .cm-string-2 { color:#bd6b18 } /*?*/
|
||||
.cm-s-twilight .cm-meta { background-color:#141414; color:#f7f7f7; } /*?*/
|
||||
.cm-s-twilight .cm-error { border-bottom: 1px solid red; }
|
||||
.cm-s-twilight .cm-builtin { color: #cda869; } /*?*/
|
||||
.cm-s-twilight .cm-tag { color: #997643; } /**/
|
||||
.cm-s-twilight .cm-attribute { color: #d6bb6d; } /*?*/
|
||||
.cm-s-twilight .cm-header { color: #FF6400; }
|
||||
.cm-s-twilight .cm-hr { color: #AEAEAE; }
|
||||
.cm-s-twilight .cm-link { color:#ad9361; font-style:italic; text-decoration:none; } /**/
|
||||
|
||||
.cm-s-twilight .CodeMirror-activeline-background {background: #27282E !important;}
|
||||
.cm-s-twilight .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}
|
||||
@@ -1,30 +0,0 @@
|
||||
/* Taken from the popular Visual Studio Vibrant Ink Schema */
|
||||
|
||||
.cm-s-vibrant-ink.CodeMirror { background: black; color: white; }
|
||||
.cm-s-vibrant-ink .CodeMirror-selected { background: #35493c !important; }
|
||||
|
||||
.cm-s-vibrant-ink .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
|
||||
.cm-s-vibrant-ink .CodeMirror-linenumber { color: #d0d0d0; }
|
||||
.cm-s-vibrant-ink .CodeMirror-cursor { border-left: 1px solid white !important; }
|
||||
|
||||
.cm-s-vibrant-ink .cm-keyword { color: #CC7832; }
|
||||
.cm-s-vibrant-ink .cm-atom { color: #FC0; }
|
||||
.cm-s-vibrant-ink .cm-number { color: #FFEE98; }
|
||||
.cm-s-vibrant-ink .cm-def { color: #8DA6CE; }
|
||||
.cm-s-vibrant-ink span.cm-variable-2, .cm-s-vibrant span.cm-tag { color: #FFC66D }
|
||||
.cm-s-vibrant-ink span.cm-variable-3, .cm-s-vibrant span.cm-def { color: #FFC66D }
|
||||
.cm-s-vibrant-ink .cm-operator { color: #888; }
|
||||
.cm-s-vibrant-ink .cm-comment { color: gray; font-weight: bold; }
|
||||
.cm-s-vibrant-ink .cm-string { color: #A5C25C }
|
||||
.cm-s-vibrant-ink .cm-string-2 { color: red }
|
||||
.cm-s-vibrant-ink .cm-meta { color: #D8FA3C; }
|
||||
.cm-s-vibrant-ink .cm-error { border-bottom: 1px solid red; }
|
||||
.cm-s-vibrant-ink .cm-builtin { color: #8DA6CE; }
|
||||
.cm-s-vibrant-ink .cm-tag { color: #8DA6CE; }
|
||||
.cm-s-vibrant-ink .cm-attribute { color: #8DA6CE; }
|
||||
.cm-s-vibrant-ink .cm-header { color: #FF6400; }
|
||||
.cm-s-vibrant-ink .cm-hr { color: #AEAEAE; }
|
||||
.cm-s-vibrant-ink .cm-link { color: blue; }
|
||||
|
||||
.cm-s-vibrant-ink .CodeMirror-activeline-background {background: #27282E !important;}
|
||||
.cm-s-vibrant-ink .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}
|
||||
@@ -1,49 +0,0 @@
|
||||
/*
|
||||
Copyright (C) 2011 by MarkLogic Corporation
|
||||
Author: Mike Brevoort <mike@brevoort.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
.cm-s-xq-dark.CodeMirror { background: #0a001f; color: #f8f8f8; }
|
||||
.cm-s-xq-dark .CodeMirror-selected { background: #27007A !important; }
|
||||
.cm-s-xq-dark .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
|
||||
.cm-s-xq-dark .CodeMirror-linenumber { color: #f8f8f8; }
|
||||
.cm-s-xq-dark .CodeMirror-cursor { border-left: 1px solid white !important; }
|
||||
|
||||
.cm-s-xq-dark span.cm-keyword {color: #FFBD40;}
|
||||
.cm-s-xq-dark span.cm-atom {color: #6C8CD5;}
|
||||
.cm-s-xq-dark span.cm-number {color: #164;}
|
||||
.cm-s-xq-dark span.cm-def {color: #FFF; text-decoration:underline;}
|
||||
.cm-s-xq-dark span.cm-variable {color: #FFF;}
|
||||
.cm-s-xq-dark span.cm-variable-2 {color: #EEE;}
|
||||
.cm-s-xq-dark span.cm-variable-3 {color: #DDD;}
|
||||
.cm-s-xq-dark span.cm-property {}
|
||||
.cm-s-xq-dark span.cm-operator {}
|
||||
.cm-s-xq-dark span.cm-comment {color: gray;}
|
||||
.cm-s-xq-dark span.cm-string {color: #9FEE00;}
|
||||
.cm-s-xq-dark span.cm-meta {color: yellow;}
|
||||
.cm-s-xq-dark span.cm-error {color: #f00;}
|
||||
.cm-s-xq-dark span.cm-qualifier {color: #FFF700;}
|
||||
.cm-s-xq-dark span.cm-builtin {color: #30a;}
|
||||
.cm-s-xq-dark span.cm-bracket {color: #cc7;}
|
||||
.cm-s-xq-dark span.cm-tag {color: #FFBD40;}
|
||||
.cm-s-xq-dark span.cm-attribute {color: #FFF700;}
|
||||
|
||||
.cm-s-xq-dark .CodeMirror-activeline-background {background: #27282E !important;}
|
||||
.cm-s-xq-dark .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}
|
||||
@@ -1,43 +0,0 @@
|
||||
/*
|
||||
Copyright (C) 2011 by MarkLogic Corporation
|
||||
Author: Mike Brevoort <mike@brevoort.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
.cm-s-xq-light span.cm-keyword {line-height: 1em; font-weight: bold; color: #5A5CAD; }
|
||||
.cm-s-xq-light span.cm-atom {color: #6C8CD5;}
|
||||
.cm-s-xq-light span.cm-number {color: #164;}
|
||||
.cm-s-xq-light span.cm-def {text-decoration:underline;}
|
||||
.cm-s-xq-light span.cm-variable {color: black; }
|
||||
.cm-s-xq-light span.cm-variable-2 {color:black;}
|
||||
.cm-s-xq-light span.cm-variable-3 {color: black; }
|
||||
.cm-s-xq-light span.cm-property {}
|
||||
.cm-s-xq-light span.cm-operator {}
|
||||
.cm-s-xq-light span.cm-comment {color: #0080FF; font-style: italic;}
|
||||
.cm-s-xq-light span.cm-string {color: red;}
|
||||
.cm-s-xq-light span.cm-meta {color: yellow;}
|
||||
.cm-s-xq-light span.cm-error {color: #f00;}
|
||||
.cm-s-xq-light span.cm-qualifier {color: grey}
|
||||
.cm-s-xq-light span.cm-builtin {color: #7EA656;}
|
||||
.cm-s-xq-light span.cm-bracket {color: #cc7;}
|
||||
.cm-s-xq-light span.cm-tag {color: #3F7F7F;}
|
||||
.cm-s-xq-light span.cm-attribute {color: #7F007F;}
|
||||
|
||||
.cm-s-xq-light .CodeMirror-activeline-background {background: #e8f2ff !important;}
|
||||
.cm-s-xq-light .CodeMirror-matchingbracket {outline:1px solid grey;color:black !important;background:yellow;}
|
||||
@@ -1,341 +0,0 @@
|
||||
CodeMirror.defineMode("xml", function(config, parserConfig) {
|
||||
var indentUnit = config.indentUnit;
|
||||
var multilineTagIndentFactor = parserConfig.multilineTagIndentFactor || 1;
|
||||
var multilineTagIndentPastTag = parserConfig.multilineTagIndentPastTag || true;
|
||||
|
||||
var Kludges = parserConfig.htmlMode ? {
|
||||
autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,
|
||||
'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,
|
||||
'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,
|
||||
'track': true, 'wbr': true},
|
||||
implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,
|
||||
'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,
|
||||
'th': true, 'tr': true},
|
||||
contextGrabbers: {
|
||||
'dd': {'dd': true, 'dt': true},
|
||||
'dt': {'dd': true, 'dt': true},
|
||||
'li': {'li': true},
|
||||
'option': {'option': true, 'optgroup': true},
|
||||
'optgroup': {'optgroup': true},
|
||||
'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,
|
||||
'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,
|
||||
'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,
|
||||
'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,
|
||||
'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},
|
||||
'rp': {'rp': true, 'rt': true},
|
||||
'rt': {'rp': true, 'rt': true},
|
||||
'tbody': {'tbody': true, 'tfoot': true},
|
||||
'td': {'td': true, 'th': true},
|
||||
'tfoot': {'tbody': true},
|
||||
'th': {'td': true, 'th': true},
|
||||
'thead': {'tbody': true, 'tfoot': true},
|
||||
'tr': {'tr': true}
|
||||
},
|
||||
doNotIndent: {"pre": true},
|
||||
allowUnquoted: true,
|
||||
allowMissing: true
|
||||
} : {
|
||||
autoSelfClosers: {},
|
||||
implicitlyClosed: {},
|
||||
contextGrabbers: {},
|
||||
doNotIndent: {},
|
||||
allowUnquoted: false,
|
||||
allowMissing: false
|
||||
};
|
||||
var alignCDATA = parserConfig.alignCDATA;
|
||||
|
||||
// Return variables for tokenizers
|
||||
var tagName, type;
|
||||
|
||||
function inText(stream, state) {
|
||||
function chain(parser) {
|
||||
state.tokenize = parser;
|
||||
return parser(stream, state);
|
||||
}
|
||||
|
||||
var ch = stream.next();
|
||||
if (ch == "<") {
|
||||
if (stream.eat("!")) {
|
||||
if (stream.eat("[")) {
|
||||
if (stream.match("CDATA[")) return chain(inBlock("atom", "]]>"));
|
||||
else return null;
|
||||
} else if (stream.match("--")) {
|
||||
return chain(inBlock("comment", "-->"));
|
||||
} else if (stream.match("DOCTYPE", true, true)) {
|
||||
stream.eatWhile(/[\w\._\-]/);
|
||||
return chain(doctype(1));
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} else if (stream.eat("?")) {
|
||||
stream.eatWhile(/[\w\._\-]/);
|
||||
state.tokenize = inBlock("meta", "?>");
|
||||
return "meta";
|
||||
} else {
|
||||
var isClose = stream.eat("/");
|
||||
tagName = "";
|
||||
var c;
|
||||
while ((c = stream.eat(/[^\s\u00a0=<>\"\'\/?]/))) tagName += c;
|
||||
if (!tagName) return "error";
|
||||
type = isClose ? "closeTag" : "openTag";
|
||||
state.tokenize = inTag;
|
||||
return "tag";
|
||||
}
|
||||
} else if (ch == "&") {
|
||||
var ok;
|
||||
if (stream.eat("#")) {
|
||||
if (stream.eat("x")) {
|
||||
ok = stream.eatWhile(/[a-fA-F\d]/) && stream.eat(";");
|
||||
} else {
|
||||
ok = stream.eatWhile(/[\d]/) && stream.eat(";");
|
||||
}
|
||||
} else {
|
||||
ok = stream.eatWhile(/[\w\.\-:]/) && stream.eat(";");
|
||||
}
|
||||
return ok ? "atom" : "error";
|
||||
} else {
|
||||
stream.eatWhile(/[^&<]/);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function inTag(stream, state) {
|
||||
var ch = stream.next();
|
||||
if (ch == ">" || (ch == "/" && stream.eat(">"))) {
|
||||
state.tokenize = inText;
|
||||
type = ch == ">" ? "endTag" : "selfcloseTag";
|
||||
return "tag";
|
||||
} else if (ch == "=") {
|
||||
type = "equals";
|
||||
return null;
|
||||
} else if (ch == "<") {
|
||||
return "error";
|
||||
} else if (/[\'\"]/.test(ch)) {
|
||||
state.tokenize = inAttribute(ch);
|
||||
state.stringStartCol = stream.column();
|
||||
return state.tokenize(stream, state);
|
||||
} else {
|
||||
stream.eatWhile(/[^\s\u00a0=<>\"\']/);
|
||||
return "word";
|
||||
}
|
||||
}
|
||||
|
||||
function inAttribute(quote) {
|
||||
var closure = function(stream, state) {
|
||||
while (!stream.eol()) {
|
||||
if (stream.next() == quote) {
|
||||
state.tokenize = inTag;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return "string";
|
||||
};
|
||||
closure.isInAttribute = true;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function inBlock(style, terminator) {
|
||||
return function(stream, state) {
|
||||
while (!stream.eol()) {
|
||||
if (stream.match(terminator)) {
|
||||
state.tokenize = inText;
|
||||
break;
|
||||
}
|
||||
stream.next();
|
||||
}
|
||||
return style;
|
||||
};
|
||||
}
|
||||
function doctype(depth) {
|
||||
return function(stream, state) {
|
||||
var ch;
|
||||
while ((ch = stream.next()) != null) {
|
||||
if (ch == "<") {
|
||||
state.tokenize = doctype(depth + 1);
|
||||
return state.tokenize(stream, state);
|
||||
} else if (ch == ">") {
|
||||
if (depth == 1) {
|
||||
state.tokenize = inText;
|
||||
break;
|
||||
} else {
|
||||
state.tokenize = doctype(depth - 1);
|
||||
return state.tokenize(stream, state);
|
||||
}
|
||||
}
|
||||
}
|
||||
return "meta";
|
||||
};
|
||||
}
|
||||
|
||||
var curState, curStream, setStyle;
|
||||
function pass() {
|
||||
for (var i = arguments.length - 1; i >= 0; i--) curState.cc.push(arguments[i]);
|
||||
}
|
||||
function cont() {
|
||||
pass.apply(null, arguments);
|
||||
return true;
|
||||
}
|
||||
|
||||
function pushContext(tagName, startOfLine) {
|
||||
var noIndent = Kludges.doNotIndent.hasOwnProperty(tagName) || (curState.context && curState.context.noIndent);
|
||||
curState.context = {
|
||||
prev: curState.context,
|
||||
tagName: tagName,
|
||||
indent: curState.indented,
|
||||
startOfLine: startOfLine,
|
||||
noIndent: noIndent
|
||||
};
|
||||
}
|
||||
function popContext() {
|
||||
if (curState.context) curState.context = curState.context.prev;
|
||||
}
|
||||
|
||||
function element(type) {
|
||||
if (type == "openTag") {
|
||||
curState.tagName = tagName;
|
||||
curState.tagStart = curStream.column();
|
||||
return cont(attributes, endtag(curState.startOfLine));
|
||||
} else if (type == "closeTag") {
|
||||
var err = false;
|
||||
if (curState.context) {
|
||||
if (curState.context.tagName != tagName) {
|
||||
if (Kludges.implicitlyClosed.hasOwnProperty(curState.context.tagName.toLowerCase())) {
|
||||
popContext();
|
||||
}
|
||||
err = !curState.context || curState.context.tagName != tagName;
|
||||
}
|
||||
} else {
|
||||
err = true;
|
||||
}
|
||||
if (err) setStyle = "error";
|
||||
return cont(endclosetag(err));
|
||||
}
|
||||
return cont();
|
||||
}
|
||||
function endtag(startOfLine) {
|
||||
return function(type) {
|
||||
var tagName = curState.tagName;
|
||||
curState.tagName = curState.tagStart = null;
|
||||
if (type == "selfcloseTag" ||
|
||||
(type == "endTag" && Kludges.autoSelfClosers.hasOwnProperty(tagName.toLowerCase()))) {
|
||||
maybePopContext(tagName.toLowerCase());
|
||||
return cont();
|
||||
}
|
||||
if (type == "endTag") {
|
||||
maybePopContext(tagName.toLowerCase());
|
||||
pushContext(tagName, startOfLine);
|
||||
return cont();
|
||||
}
|
||||
return cont();
|
||||
};
|
||||
}
|
||||
function endclosetag(err) {
|
||||
return function(type) {
|
||||
if (err) setStyle = "error";
|
||||
if (type == "endTag") { popContext(); return cont(); }
|
||||
setStyle = "error";
|
||||
return cont(arguments.callee);
|
||||
};
|
||||
}
|
||||
function maybePopContext(nextTagName) {
|
||||
var parentTagName;
|
||||
while (true) {
|
||||
if (!curState.context) {
|
||||
return;
|
||||
}
|
||||
parentTagName = curState.context.tagName.toLowerCase();
|
||||
if (!Kludges.contextGrabbers.hasOwnProperty(parentTagName) ||
|
||||
!Kludges.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) {
|
||||
return;
|
||||
}
|
||||
popContext();
|
||||
}
|
||||
}
|
||||
|
||||
function attributes(type) {
|
||||
if (type == "word") {setStyle = "attribute"; return cont(attribute, attributes);}
|
||||
if (type == "endTag" || type == "selfcloseTag") return pass();
|
||||
setStyle = "error";
|
||||
return cont(attributes);
|
||||
}
|
||||
function attribute(type) {
|
||||
if (type == "equals") return cont(attvalue, attributes);
|
||||
if (!Kludges.allowMissing) setStyle = "error";
|
||||
else if (type == "word") {setStyle = "attribute"; return cont(attribute, attributes);}
|
||||
return (type == "endTag" || type == "selfcloseTag") ? pass() : cont();
|
||||
}
|
||||
function attvalue(type) {
|
||||
if (type == "string") return cont(attvaluemaybe);
|
||||
if (type == "word" && Kludges.allowUnquoted) {setStyle = "string"; return cont();}
|
||||
setStyle = "error";
|
||||
return (type == "endTag" || type == "selfCloseTag") ? pass() : cont();
|
||||
}
|
||||
function attvaluemaybe(type) {
|
||||
if (type == "string") return cont(attvaluemaybe);
|
||||
else return pass();
|
||||
}
|
||||
|
||||
return {
|
||||
startState: function() {
|
||||
return {tokenize: inText, cc: [], indented: 0, startOfLine: true, tagName: null, tagStart: null, context: null};
|
||||
},
|
||||
|
||||
token: function(stream, state) {
|
||||
if (!state.tagName && stream.sol()) {
|
||||
state.startOfLine = true;
|
||||
state.indented = stream.indentation();
|
||||
}
|
||||
if (stream.eatSpace()) return null;
|
||||
|
||||
setStyle = type = tagName = null;
|
||||
var style = state.tokenize(stream, state);
|
||||
state.type = type;
|
||||
if ((style || type) && style != "comment") {
|
||||
curState = state; curStream = stream;
|
||||
while (true) {
|
||||
var comb = state.cc.pop() || element;
|
||||
if (comb(type || style)) break;
|
||||
}
|
||||
}
|
||||
state.startOfLine = false;
|
||||
return setStyle || style;
|
||||
},
|
||||
|
||||
indent: function(state, textAfter, fullLine) {
|
||||
var context = state.context;
|
||||
// Indent multi-line strings (e.g. css).
|
||||
if (state.tokenize.isInAttribute) {
|
||||
return state.stringStartCol + 1;
|
||||
}
|
||||
if ((state.tokenize != inTag && state.tokenize != inText) ||
|
||||
context && context.noIndent)
|
||||
return fullLine ? fullLine.match(/^(\s*)/)[0].length : 0;
|
||||
// Indent the starts of attribute names.
|
||||
if (state.tagName) {
|
||||
if (multilineTagIndentPastTag)
|
||||
return state.tagStart + state.tagName.length + 2;
|
||||
else
|
||||
return state.tagStart + indentUnit * multilineTagIndentFactor;
|
||||
}
|
||||
if (alignCDATA && /<!\[CDATA\[/.test(textAfter)) return 0;
|
||||
if (context && /^<\//.test(textAfter))
|
||||
context = context.prev;
|
||||
while (context && !context.startOfLine)
|
||||
context = context.prev;
|
||||
if (context) return context.indent + indentUnit;
|
||||
else return 0;
|
||||
},
|
||||
|
||||
electricChars: "/",
|
||||
blockCommentStart: "<!--",
|
||||
blockCommentEnd: "-->",
|
||||
|
||||
configuration: parserConfig.htmlMode ? "html" : "xml",
|
||||
helperType: parserConfig.htmlMode ? "html" : "xml"
|
||||
};
|
||||
});
|
||||
|
||||
CodeMirror.defineMIME("text/xml", "xml");
|
||||
CodeMirror.defineMIME("application/xml", "xml");
|
||||
if (!CodeMirror.mimeModes.hasOwnProperty("text/html"))
|
||||
CodeMirror.defineMIME("text/html", {name: "xml", htmlMode: true});
|
||||
@@ -1,21 +0,0 @@
|
||||
var storage, fail, uid;
|
||||
try {
|
||||
uid = new Date; (storage = window.localStorage).setItem(uid, uid);
|
||||
fail = storage.getItem(uid) != uid;
|
||||
storage.removeItem(uid);
|
||||
fail && (storage = false);
|
||||
} catch(e) {}
|
||||
if (storage) {
|
||||
try {
|
||||
var usedSkin = localStorage.getItem('config-skin');
|
||||
if (usedSkin != '' && usedSkin != null) {
|
||||
document.body.className = usedSkin;
|
||||
} else {
|
||||
document.body.className = '';
|
||||
}
|
||||
} catch(e) {
|
||||
document.body.className = '';
|
||||
}
|
||||
} else {
|
||||
document.body.className = '';
|
||||
}
|
||||
@@ -5,16 +5,16 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||
<title>欢迎您登录SentCMS管理平台</title>
|
||||
<link href="__PUBLIC__/css/bootstrap/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/libs/font-awesome.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="__CSS__/style.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/common.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/css/libs/bootstrap.min.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/css/libs/font-awesome.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/css/admin/style.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/css/common.css"/>
|
||||
|
||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="__PUBLIC__/js/html5shiv.min.js"></script>
|
||||
<script src="__PUBLIC__/js/ie8polyfill.min.js"></script>
|
||||
<script src="__STATIC__/js/html5shiv.min.js"></script>
|
||||
<script src="__STATIC__/js/ie8polyfill.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body id="login-page-full">
|
||||
@@ -28,7 +28,7 @@
|
||||
<div class="col-xs-12">
|
||||
<header id="login-header">
|
||||
<div id="login-logo">
|
||||
<img src="__PUBLIC__/images/logo.png" alt=""/>
|
||||
<img src="__STATIC__/images/logo.png" alt=""/>
|
||||
</div>
|
||||
</header>
|
||||
<div id="login-box-inner">
|
||||
@@ -47,7 +47,7 @@
|
||||
<span class="input-group-addon"> <i class="fa fa-qrcode"></i>
|
||||
</span>
|
||||
<input type="text" name="verify" class="form-control" placeholder="验证码">
|
||||
<span class="input-group-addon reloadverify"><img src="{:url('admin/index/verify')}" alt="验证码" height="40" class="verifyimg"></span>
|
||||
<span class="input-group-addon reloadverify"><img src="{:captcha_src()}" alt="验证码" height="40" class="verifyimg"></span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
@@ -78,8 +78,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="__PUBLIC__/js/jquery.js"></script>
|
||||
<script src="__PUBLIC__/js/messager.js"></script>
|
||||
<script src="__STATIC__/js/jquery.js"></script>
|
||||
<script src="__STATIC__/js/messager.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a href="{:url('Index/index')}" id="logo" class="navbar-brand">
|
||||
<img src="__PUBLIC__/images/logo.png" alt="" class="normal-logo logo-white"/>
|
||||
<img src="__STATIC__/images/logo.png" alt="" class="normal-logo logo-white"/>
|
||||
</a>
|
||||
<ul class="nav navbar-nav pull-right visible-xs">
|
||||
<li class="dropdown profile-dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<img src="__PUBLIC__/images/samples/scarlet-159.png" alt=""/>
|
||||
<img src="__STATIC__/images/samples/scarlet-159.png" alt=""/>
|
||||
<span class="hidden-xs">{:session('user_auth.username')}</span> <b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
@@ -70,7 +70,7 @@
|
||||
<ul class="nav navbar-nav pull-right">
|
||||
<li class="dropdown profile-dropdown hidden-sm hidden-xs">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<img src="__PUBLIC__/images/samples/scarlet-159.png" alt=""/>
|
||||
<img src="__STATIC__/images/samples/scarlet-159.png" alt=""/>
|
||||
<span class="hidden-xs">{:session('user_auth.username')}</span> <b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
<script src="__PUBLIC__/js/bootstrap.js"></script>
|
||||
<script src="__PUBLIC__/js/jquery.nanoscroller.min.js"></script>
|
||||
<script src="__PUBLIC__/js/pace.min.js"></script>
|
||||
<script src="__STATIC__/js/bootstrap.js"></script>
|
||||
<script src="__STATIC__/js/jquery.nanoscroller.min.js"></script>
|
||||
<script src="__STATIC__/js/pace.min.js"></script>
|
||||
|
||||
<script src="__PUBLIC__/js/hopscotch.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/libs/hopscotch.css">
|
||||
<script src="__STATIC__/js/hopscotch.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/css/libs/hopscotch.css">
|
||||
|
||||
<script src="__PUBLIC__/js/messager.js"></script>
|
||||
<script src="__JS__/app.js"></script>
|
||||
<script src="__STATIC__/js/messager.js"></script>
|
||||
<script src="__STATIC__/js/admin/app.js"></script>
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var SentCMS = window.Sent = {
|
||||
"ROOT" : "__ROOT__", //当前网站地址
|
||||
"APP" : "__APP__", //当前项目地址
|
||||
"PUBLIC" : "__PUBLIC__", //项目公共目录地址
|
||||
"PUBLIC" : "__STATIC__", //项目公共目录地址
|
||||
"DEEP" : "{:config('URL_PATHINFO_DEPR')}", //PATHINFO分割符
|
||||
"MODEL" : ["{:config('URL_MODEL')}", "{:config('URL_CASE_INSENSITIVE')}", "{:config('URL_HTML_SUFFIX')}"],
|
||||
"VAR" : ["{:config('VAR_MODULE')}", "{:config('VAR_CONTROLLER')}", "{:config('VAR_ACTION')}"]
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<script src="__PUBLIC__/js/core.js"></script>
|
||||
<script src="__STATIC__/js/core.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,13 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||
<title>SentCMS网站管理系统后台</title>
|
||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/bootstrap/bootstrap.min.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/libs/font-awesome.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/libs/nanoscroller.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/common.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/css/libs/bootstrap.min.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/css/libs/font-awesome.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/css/libs/nanoscroller.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/css/common.css"/>
|
||||
<!-- <link href='//fonts.googleapis.com/css?family=Open+Sans:400,600,700,300|Titillium+Web:200,300,400' rel='stylesheet' type='text/css'> -->
|
||||
<link rel="stylesheet" type="text/css" href="__CSS__/style.css"/>
|
||||
<script src="__PUBLIC__/js/jquery.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/css/admin/style.css"/>
|
||||
<script src="__STATIC__/js/jquery.js"></script>
|
||||
<script type="text/javascript">
|
||||
var BASE_URL = "{:config('base_url')}"; //根目录地址
|
||||
$(function(){
|
||||
@@ -22,8 +22,8 @@ $(function(){
|
||||
})
|
||||
</script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="__PUBLIC__/js/html5shiv.js"></script>
|
||||
<script src="__PUBLIC__/js/respond.min.js"></script>
|
||||
<script src="__STATIC__/js/html5shiv.js"></script>
|
||||
<script src="__STATIC__/js/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
@@ -48,4 +48,4 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<script src="__JS__/skin-changer.js"></script>
|
||||
<script src="__STATIC__/js/admin/skin-changer.js"></script>
|
||||
Reference in New Issue
Block a user