Browse Source

adjust column header for main

MaiXinRong 8 years ago
parent
commit
8f5658d53b

+ 2 - 1
public/web/sheet/sheet_data_helper.js

@@ -36,6 +36,7 @@ var SheetDataHelper = {
         spread.options.scrollbarMaxAlign = true;
         spread.options.cutCopyIndicatorVisible = false;
         spread.options.allowCopyPasteExcelStyle = false;
+        spread.options.allowUserDragDrop = false;
         spread.getActiveSheet().setRowCount(3);
         return spread;
     },
@@ -78,7 +79,7 @@ var SheetDataHelper = {
         style.font = setting.data.font;
         style.hAlign = setting.data.hAlign;
         style.vAlign = setting.data.vAlign;
-        //style.wordWrap = setting.data.wordWrap;
+        style.wordWrap = setting.data.wordWrap;
         return style;
     },
     loadSheetData: function (setting, sheet, datas) {

+ 1 - 0
public/web/tree_sheet/tree_sheet_helper.js

@@ -100,6 +100,7 @@ var TREE_SHEET_HELPER = {
                     cell.value(getFieldText2());
                 }
             });
+            sheet.autoFitRow(node.serialNo());
             if (recursive) {
                 TREE_SHEET_HELPER.refreshTreeNodeData(setting, sheet, node.children, recursive);
             }

+ 13 - 13
server.js

@@ -89,18 +89,18 @@ var pmRouter = require('./modules/pm/routes/pm_route');
 app.use('/pm/api', pmRouter);
 
 app.get('/main',  function(req, res) {
-    var checkProjectRight = function (userID, projectID) {
-        return true;
-    }
-    if (checkProjectRight(req.session.userID, req.query.project)) {
-        res.render('building_saas/main/html/main.html',
-            {
-                userAccount: req.session.userAccount,
-                userID: req.session.userID
-            });
-    } else {
-        res.redirect('/pm');
-    }
+    let pm = require('./modules/pm/controllers/pm_controller');
+    pm.checkProjectRight(req.session.userID, req.query.project, function (hasRight) {
+        if (hasRight) {
+            res.render('building_saas/main/html/main.html',
+                {
+                    userAccount: req.session.userAccount,
+                    userID: req.session.userID
+                });
+        } else {
+            res.redirect('/pm');
+        }
+    });
 });
 
 var project_Router = require('./modules/main/routes/project_route');
@@ -150,6 +150,6 @@ app.use(function(err, req, res, next) {
     console.error(err.stack);
     res.status(500).send('500 Error');
 });
-app.listen(6060);
+app.listen(6066);
 
 

+ 1 - 0
web/building_saas/main/html/main.html

@@ -603,6 +603,7 @@
         billsSpread = new GC.Spread.Sheets.Workbook($('#billsSpread')[0], { sheetCount: 1 });
         billsSpread.options.tabStripVisible = false;
         billsSpread.options.scrollbarMaxAlign = true;
+        billsSpread.options.allowUserDragDrop = false;
         billsSpread.getActiveSheet().selectionPolicy(GC.Spread.Sheets.SelectionPolicy.single);
 
         // For Test