KYLIN-1251 enable nav tree expand and hide funciton and remove duplicate rat 
config in kylin/pom.xml


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/cb4b8d32
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/cb4b8d32
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/cb4b8d32

Branch: refs/heads/KYLIN-1122
Commit: cb4b8d32b8c5b2dd3c907c7add6a369eccf8c690
Parents: 4c230e9
Author: jian <zhongj...@apache.org>
Authored: Tue Jan 12 18:42:09 2016 +0800
Committer: Xiaoyu Wang <wangxia...@apache.org>
Committed: Mon Jan 18 13:38:30 2016 +0800

----------------------------------------------------------------------
 pom.xml                                         | 146 ++++---------------
 .../js/directives/kylin_abn_tree_directive.js   |  26 +++-
 2 files changed, 55 insertions(+), 117 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/cb4b8d32/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 41505ce..cbbac81 100644
--- a/pom.xml
+++ b/pom.xml
@@ -704,113 +704,6 @@
                             <skip>false</skip>
                         </configuration>
                     </plugin>
-
-                    <!-- Apache-RAT checks for files without headers.
-                         If run on a messy developer's sandbox, it will fail.
-                         This serves as a reminder to only build a release in 
a clean
-                         sandbox! -->
-                    <plugin>
-                        <groupId>org.apache.rat</groupId>
-                        <artifactId>apache-rat-plugin</artifactId>
-                        <configuration>
-                            <numUnapprovedLicenses>0</numUnapprovedLicenses>
-                            <excludes>
-                                <exclude>DEPENDENCIES</exclude>
-                                <exclude>README.*</exclude>
-                                <exclude>**/LICENSE*</exclude>
-                                <!-- Local git repo -->
-                                <exclude>.git/**</exclude>
-                                <!-- IDE files -->
-                                <exclude>.idea/**</exclude>
-                                <exclude>**/*.iml</exclude>                    
            
-                                <exclude>.settings/**</exclude>
-                                <exclude>**/.classpath</exclude>
-                                <exclude>**/.project</exclude>
-
-                                <!-- text files without comments -->
-                                <exclude>**/*.csv</exclude>
-                                <exclude>**/*.json</exclude>
-                                <exclude>**/*.md</exclude>
-                                <!-- binary files -->
-                                <exclude>**/*.dict</exclude>
-                                <exclude>**/*.dic</exclude>
-                                <exclude>**/*.snapshot</exclude>
-                                <exclude>**/*.log</exclude>
-                                
-                                <!-- image files constitute images required 
for documentation. .pptx contain the sources for images -->
-                                <exclude>**/*.png</exclude>
-                                <exclude>**/*.jpg</exclude>
-                                <exclude>**/*.gif</exclude>
-                                <exclude>**/*.ico</exclude>
-
-                                <exclude>server/logs**</exclude>
-
-                                <exclude>**/.checkstyle</exclude>
-                                <!--Job's Test Data-->
-                                <exclude>**/src/test/resources/**</exclude>
-
-                                <!-- generated files -->
-                                <exclude>**/target/**</exclude>
-                                <exclude>lib/**</exclude>
-                                <exclude>dist/**</exclude>
-                                <!-- Kylin's website content -->
-                                <exclude>**/.sass-cache/**</exclude>
-
-                                <exclude>website/**</exclude>
-
-                                <!-- front end libary and generated files -->
-                                <exclude>webapp/node_modules/**</exclude>
-                                <exclude>webapp/dist/**</exclude>
-                                <exclude>webapp/app/components/**</exclude>
-                                <!-- json configuration file-->
-                                <exclude>webapp/.bowerrc</exclude>
-                                <exclude>webapp/.jshintrc</exclude>
-                                <!-- generated dict files -->
-                                <exclude>dictionary/metastore_db/**</exclude>
-
-                                <!-- MIT license -->
-                                <exclude>webapp/app/css/AdminLTE.css</exclude>
-                                
-                                <!--configuration file -->
-                                <exclude>webapp/app/routes.json</exclude>
-                                <exclude>webapp/bower.json</exclude>
-                                <exclude>webapp/grunt.json</exclude>
-                                <exclude>webapp/package.json</exclude>
-
-                                <!-- jdbc log -->
-                                <exclude>jdbc/kylin_jdbc.log*</exclude>
-                                <!-- server log -->
-                                <exclude>server/logs/**</exclude>
-
-                                <!-- HBase MiniCluster Testing Data, for 
testing only -->
-                                
<exclude>examples/test_case_data/minicluster/hbase-export.tar.gz</exclude>
-                                
<exclude>examples/test_case_data/**/*.xml</exclude>
-
-                            </excludes>
-                        </configuration>
-                        <executions>
-                            <execution>
-                                <phase>verify</phase>
-                                <goals>
-                                    <goal>check</goal>
-                                </goals>
-                            </execution>
-                        </executions>
-                        <dependencies>
-                            <dependency>
-                                <groupId>org.apache.maven.doxia</groupId>
-                                <artifactId>doxia-core</artifactId>
-                                <version>1.6</version>
-                                <exclusions>
-                                    <exclusion>
-                                        <groupId>xerces</groupId>
-                                        <artifactId>xercesImpl</artifactId>
-                                    </exclusion>
-                                </exclusions>
-                            </dependency>
-                        </dependencies>
-                    </plugin>
-
                     <!-- Override the parent assembly execution to customize 
the assembly
                         descriptor and final name. -->
                     <plugin>
@@ -878,6 +771,34 @@
                         <configuration>
                             <!-- Exclude files/folders for apache release -->
                             <excludes>
+                                <exclude>DEPENDENCIES</exclude>
+                                <exclude>.settings/**</exclude>
+                                <exclude>**/LICENSE*</exclude>
+                                <!-- Local git repo -->
+                                <exclude>.git/**</exclude>
+                                <!-- IDE files -->
+                                <exclude>.idea/**</exclude>
+                                <exclude>**/*.iml</exclude>
+                                <exclude>**/.classpath</exclude>
+                                <exclude>**/.project</exclude>
+
+                                <!-- image files constitute images required 
for documentation. .pptx contain the sources for images -->
+                                <exclude>**/*.png</exclude>
+                                <exclude>**/*.jpg</exclude>
+                                <exclude>**/*.gif</exclude>
+                                <exclude>**/*.ico</exclude>
+
+                                <exclude>server/logs**</exclude>
+
+                                <!--Job's Test Data-->
+                                <exclude>**/src/test/resources/**</exclude>
+
+                                <!-- generated files -->
+                                <exclude>**/target/**</exclude>
+                                <exclude>lib/**</exclude>
+                                <exclude>dist/**</exclude>
+
+                                <exclude>website/**</exclude>
                                 <!-- text files without comments -->
                                 <exclude>**/*.csv</exclude>
                                 <exclude>**/*.json</exclude>
@@ -895,15 +816,9 @@
                                 <exclude>**/.checkstyle</exclude>
                                 <!--Job's Test Data-->
                                 
<exclude>**/src/test/resources/data/**</exclude>
-
-                                <!-- generated files -->
-                                <exclude>**/target/**</exclude>
-                                <exclude>lib/**</exclude>
                                 <!-- Kylin's website content -->
                                 <exclude>**/.sass-cache/**</exclude>
 
-                                <exclude>website/**</exclude>
-
                                 <!-- tomcat package -->
                                 <exclude>tomcat/**</exclude>
                                 <!-- front end libary and generated files -->
@@ -917,15 +832,15 @@
                                 <exclude>dictionary/metastore_db/**</exclude>
 
                                 <!-- MIT license -->
-                                
<exclude>webapp/app/css/AdminLTE-fonts.css</exclude>
                                 <exclude>webapp/app/css/AdminLTE.css</exclude>
+                                
<exclude>webapp/app/js/directives/kylin_abn_tree_directive.js</exclude>
 
                                 <!--configuration file -->
                                 <exclude>webapp/app/routes.json</exclude>
                                 <exclude>webapp/bower.json</exclude>
                                 <exclude>webapp/grunt.json</exclude>
                                 <exclude>webapp/package.json</exclude>
-                                
+
                                 <!-- jdbc log -->
                                 <exclude>jdbc/kylin_jdbc.log*</exclude>
                                 <!-- server log -->
@@ -946,7 +861,6 @@
                                 <exclude>**/*.DEF</exclude>
                                 <exclude>**/*.isl</exclude>
                                 <exclude>**/*.isproj</exclude>
-
                             </excludes>
                         </configuration>
                         <executions>

http://git-wip-us.apache.org/repos/asf/kylin/blob/cb4b8d32/webapp/app/js/directives/kylin_abn_tree_directive.js
----------------------------------------------------------------------
diff --git a/webapp/app/js/directives/kylin_abn_tree_directive.js 
b/webapp/app/js/directives/kylin_abn_tree_directive.js
index 144364a..a3023ab 100644
--- a/webapp/app/js/directives/kylin_abn_tree_directive.js
+++ b/webapp/app/js/directives/kylin_abn_tree_directive.js
@@ -1,3 +1,26 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2013 Nick Perkins
+ *
+ * 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.
+ */
+
 (function() {
   var module,
     __indexOf = [].indexOf || function(item) { for (var i = 0, l = 
this.length; i < l; i++) { if (i in this && this[i] === item) return i; } 
return -1; };
@@ -8,7 +31,7 @@
     '$timeout', function($timeout) {
       return {
         restrict: 'E',
-        template: "<ul class=\"nav nav-list nav-pills nav-stacked 
abn-tree\">\n  <li ng-repeat=\"row in tree_rows | filter:{visible:true} track 
by row.branch.uid\" ng-animate=\"'abn-tree-animate'\" ng-class=\"'level-' + {{ 
row.level }} + (row.branch.selected ? ' active':'') + ' ' +row.classes.join(' 
')\" class=\"abn-tree-row\"><a ng-click=\"user_clicks_branch(row.branch)\" 
ng-dblclick=\"user_dbClicks_branch(row.branch)\"><i ng-class=\"row.tree_icon\" 
ng-click=\"row.branch.expanded = !row.branch.expanded\" class=\"indented 
tree-icon\"> </i><span class=\"indented tree-label\">{{ row.label }} 
</span></a></li>\n</ul>",
+        template: "<ul class=\"nav nav-list nav-pills nav-stacked 
abn-tree\">\n  <li ng-repeat=\"row in tree_rows | filter:{visible:true} track 
by row.branch.uid\" ng-animate=\"'abn-tree-animate'\" ng-class=\"'level-' + {{ 
row.level }} + (row.branch.selected ? ' active':'') + ' ' +row.classes.join(' 
')\" class=\"abn-tree-row\"><a ng-click=\"user_clicks_branch(row.branch)\" 
ng-dblclick=\"user_dbClicks_branch(row.branch)\"><i ng-class=\"row.tree_icon\" 
class=\"indented tree-icon\"> </i><span class=\"indented tree-label\">{{ 
row.label }} </span></a></li>\n</ul>",
         replace: true,
         scope: {
           treeData: '=',
@@ -104,6 +127,7 @@
             }
           };
           scope.user_clicks_branch = function(branch) {
+            branch.expanded = !branch.expanded;
             if (branch !== selected_branch) {
               return select_branch(branch);
             }

Reply via email to