|
@@ -136,12 +136,12 @@
|
|
|
<th>网站名称</th>
|
|
|
<th>栏目名称</th>
|
|
|
<th>爬虫代码</th>
|
|
|
- <th>紧急度</th>
|
|
|
+ <th>紧急度</th>
|
|
|
<th>节点</th>
|
|
|
<th>作者</th>
|
|
|
<th>最后修改时间</th>
|
|
|
<th>状态</th>
|
|
|
- <th>平台</th>
|
|
|
+ <th>平台</th>
|
|
|
<th class="hidden-xs">操作</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
@@ -160,103 +160,103 @@ $(function(){
|
|
|
},
|
|
|
"columnDefs": [
|
|
|
{ "orderable": false, "targets": [0,10,11] },
|
|
|
- {"targets":[6], createdCell: function (cell, cellData, rowData, rowIndex, colIndex) {
|
|
|
- {{if gt (session "auth") 2}}
|
|
|
- var aInput;
|
|
|
- $(cell).click(function () {
|
|
|
- $(this).html(createComboxEvent(rowData._id,rowData.state,rowData.code));
|
|
|
- var aInput = $(this).find(":input");
|
|
|
- aInput.focus().val(cellData);
|
|
|
- });
|
|
|
- $(cell).on("click", ":input", function (e) {
|
|
|
- e.stopPropagation();
|
|
|
- });
|
|
|
- $(cell).on("change", ":input", function () {
|
|
|
- $(this).blur();
|
|
|
- });
|
|
|
- $(cell).on("blur", ":input", function () {
|
|
|
- var text = $(this).find("option:selected").text();
|
|
|
- ttable.cell(cell).data(text);
|
|
|
- cellData = text;
|
|
|
- });
|
|
|
- {{end}}
|
|
|
- }},
|
|
|
- {"targets":[9], createdCell: function (cell, cellData, rowData, rowIndex, colIndex) {
|
|
|
- {{if gt (session "auth") 2}}
|
|
|
- var aInput;
|
|
|
- $(cell).click(function () {
|
|
|
- if(cellData!=4&&cellData!=7&&cellData!=8&&cellData!=9&&cellData!=10){
|
|
|
- return
|
|
|
- }
|
|
|
- $(this).html(createComboxState(rowData._id));
|
|
|
- var aInput = $(this).find(":input");
|
|
|
- aInput.focus().val(cellData);
|
|
|
- });
|
|
|
- $(cell).on("click", ":input", function (e) {
|
|
|
- e.stopPropagation();
|
|
|
- });
|
|
|
- $(cell).on("change", ":input", function () {
|
|
|
- $(this).blur();
|
|
|
- });
|
|
|
- $(cell).on("blur", ":input", function () {
|
|
|
- var text = $(this).find("option:selected").text();
|
|
|
- if(text=="待完成"){
|
|
|
- text = 0
|
|
|
- }else if (text=="已作废"){
|
|
|
- text = 4
|
|
|
- }else if (text=="无发布"){
|
|
|
- text = 7
|
|
|
- }else if (text=="需登录"){
|
|
|
- text = 8
|
|
|
- }else if (text=="无法处理"){
|
|
|
- text = 9
|
|
|
- }else if (text=="已删除"){
|
|
|
- text = 10
|
|
|
- }else if (text=="已上线"){
|
|
|
- text = 11
|
|
|
- }
|
|
|
- ttable.cell(cell).data(text);
|
|
|
- cellData = text;
|
|
|
- });
|
|
|
- {{end}}
|
|
|
- }},
|
|
|
- {"targets":[10], createdCell: function (cell, cellData, rowData, rowIndex, colIndex) {
|
|
|
- {{if gt (session "auth") 2}}
|
|
|
- var aInput;
|
|
|
- $(cell).click(function () {
|
|
|
- $(this).html(createComboxPlatform(rowData._id));
|
|
|
- var aInput = $(this).find(":input");
|
|
|
- aInput.focus().val(cellData);
|
|
|
- });
|
|
|
- $(cell).on("click", ":input", function (e) {
|
|
|
- e.stopPropagation();
|
|
|
- });
|
|
|
- $(cell).on("change", ":input", function () {
|
|
|
- $(this).blur();
|
|
|
- });
|
|
|
- $(cell).on("blur", ":input", function () {
|
|
|
- var text = $(this).find("option:selected").text();
|
|
|
- if(text=="待完成"){
|
|
|
- text = 0
|
|
|
- }else if (text=="已作废"){
|
|
|
- text = 4
|
|
|
- }else if (text=="无发布"){
|
|
|
- text = 7
|
|
|
- }else if (text=="需登录"){
|
|
|
- text = 8
|
|
|
- }else if (text=="无法处理"){
|
|
|
- text = 9
|
|
|
- }else if (text=="已删除"){
|
|
|
- text = 10
|
|
|
- }else if (text=="已上线"){
|
|
|
- text = 11
|
|
|
- }
|
|
|
-
|
|
|
- ttable.cell(cell).data(text);
|
|
|
- cellData = text;
|
|
|
- });
|
|
|
- {{end}}
|
|
|
- }}
|
|
|
+ {"targets":[6], createdCell: function (cell, cellData, rowData, rowIndex, colIndex) {
|
|
|
+ {{if gt (session "auth") 2}}
|
|
|
+ var aInput;
|
|
|
+ $(cell).click(function () {
|
|
|
+ $(this).html(createComboxEvent(rowData._id,rowData.state,rowData.code));
|
|
|
+ var aInput = $(this).find(":input");
|
|
|
+ aInput.focus().val(cellData);
|
|
|
+ });
|
|
|
+ $(cell).on("click", ":input", function (e) {
|
|
|
+ e.stopPropagation();
|
|
|
+ });
|
|
|
+ $(cell).on("change", ":input", function () {
|
|
|
+ $(this).blur();
|
|
|
+ });
|
|
|
+ $(cell).on("blur", ":input", function () {
|
|
|
+ var text = $(this).find("option:selected").text();
|
|
|
+ ttable.cell(cell).data(text);
|
|
|
+ cellData = text;
|
|
|
+ });
|
|
|
+ {{end}}
|
|
|
+ }},
|
|
|
+ {"targets":[9], createdCell: function (cell, cellData, rowData, rowIndex, colIndex) {
|
|
|
+ {{if gt (session "auth") 2}}
|
|
|
+ var aInput;
|
|
|
+ $(cell).click(function () {
|
|
|
+ if(cellData!=4&&cellData!=7&&cellData!=8&&cellData!=9&&cellData!=10){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ $(this).html(createComboxState(rowData._id));
|
|
|
+ var aInput = $(this).find(":input");
|
|
|
+ aInput.focus().val(cellData);
|
|
|
+ });
|
|
|
+ $(cell).on("click", ":input", function (e) {
|
|
|
+ e.stopPropagation();
|
|
|
+ });
|
|
|
+ $(cell).on("change", ":input", function () {
|
|
|
+ $(this).blur();
|
|
|
+ });
|
|
|
+ $(cell).on("blur", ":input", function () {
|
|
|
+ var text = $(this).find("option:selected").text();
|
|
|
+ if(text=="待完成"){
|
|
|
+ text = 0
|
|
|
+ }else if (text=="已作废"){
|
|
|
+ text = 4
|
|
|
+ }else if (text=="无发布"){
|
|
|
+ text = 7
|
|
|
+ }else if (text=="需登录"){
|
|
|
+ text = 8
|
|
|
+ }else if (text=="无法处理"){
|
|
|
+ text = 9
|
|
|
+ }else if (text=="已删除"){
|
|
|
+ text = 10
|
|
|
+ }else if (text=="已上线"){
|
|
|
+ text = 11
|
|
|
+ }
|
|
|
+ ttable.cell(cell).data(text);
|
|
|
+ cellData = text;
|
|
|
+ });
|
|
|
+ {{end}}
|
|
|
+ }},
|
|
|
+ {"targets":[10], createdCell: function (cell, cellData, rowData, rowIndex, colIndex) {
|
|
|
+ {{if gt (session "auth") 2}}
|
|
|
+ var aInput;
|
|
|
+ $(cell).click(function () {
|
|
|
+ $(this).html(createComboxPlatform(rowData.code,rowData._id));
|
|
|
+ var aInput = $(this).find(":input");
|
|
|
+ aInput.focus().val(cellData);
|
|
|
+ });
|
|
|
+ $(cell).on("click", ":input", function (e) {
|
|
|
+ e.stopPropagation();
|
|
|
+ });
|
|
|
+ $(cell).on("change", ":input", function () {
|
|
|
+ $(this).blur();
|
|
|
+ });
|
|
|
+ $(cell).on("blur", ":input", function () {
|
|
|
+ var text = $(this).find("option:selected").text();
|
|
|
+ if(text=="待完成"){
|
|
|
+ text = 0
|
|
|
+ }else if (text=="已作废"){
|
|
|
+ text = 4
|
|
|
+ }else if (text=="无发布"){
|
|
|
+ text = 7
|
|
|
+ }else if (text=="需登录"){
|
|
|
+ text = 8
|
|
|
+ }else if (text=="无法处理"){
|
|
|
+ text = 9
|
|
|
+ }else if (text=="已删除"){
|
|
|
+ text = 10
|
|
|
+ }else if (text=="已上线"){
|
|
|
+ text = 11
|
|
|
+ }
|
|
|
+
|
|
|
+ ttable.cell(cell).data(text);
|
|
|
+ cellData = text;
|
|
|
+ });
|
|
|
+ {{end}}
|
|
|
+ }}
|
|
|
],
|
|
|
"order": [[1,"desc"]],
|
|
|
"processing":true,
|
|
@@ -733,8 +733,8 @@ $(function(){
|
|
|
"<option disabled value='10'>已上线</option>"+
|
|
|
+"</select>"
|
|
|
};
|
|
|
- function createComboxPlatform(id){
|
|
|
- return "<select onchange='changeEventOrStateOrPlatform(this.value,\"platform\",\"\",\"\",\""+id+"\")' class='form-control input-sm'>"+
|
|
|
+ function createComboxPlatform(code,id){
|
|
|
+ return "<select onchange='changeEventOrStateOrPlatform(this.value,\"platform\",\"\",\""+code+"\",\""+id+"\")' class='form-control input-sm'>"+
|
|
|
"<option value='golua平台'>golua平台</option>"+
|
|
|
"<option value='python'>python</option>"+
|
|
|
"<option value='通用爬虫'>通用爬虫</option>"+
|
|
@@ -749,8 +749,8 @@ $(function(){
|
|
|
"val":val,
|
|
|
"w":w,
|
|
|
"id":id,
|
|
|
- "s":s,
|
|
|
- "c":c
|
|
|
+ "s":s,
|
|
|
+ "c":c
|
|
|
},
|
|
|
success:function(r){
|
|
|
if(r=="n"){
|