1app.controller("officialCtrl",function($scope,siteQuery,domQuery,masonryQuery) { 2 var URL = officialListUrl; 3 var formURL = officialFormUrl; 4 var dom = domQuery.getDom("#officialCtrl"); // 컨í¸ë¡¤ë¬ íë¶ DOM구조 ë¡ë©. 5 $scope.tags = _.filter(tagsData,function(tagJson){ return tagJson.type == "official";}); // ì ë ¥ì ìí í그목ë¡. 6 7 dom.loading(); // ë¡ë©ì¤~ 8 siteQuery.getData(URL,function(cells){ 9 $scope.sites = cells; // ì¬ì´í¸ 리ì¤í¸ ì ë³´ ì ë¬ 10 dom.loaded(); // ë¡ë© ì¢ ë£~ 11 masonryQuery.setOption(dom.list); // 미ìë ë ì´ìì ì ì©. 12 }); 13 14 $scope.changeVal = function(){ // ì ë ¬ë´ì© ë°ê¾¸ë©´ ì¤í. 15 masonryQuery.change(dom.list); // ë°ì´í°ê° ë°ëë masonryë ì¬ë¡ë© 16 }; 17 18 $scope.$watch("sites",function(){ // ì¬ì´í¸ê° ë°ëë©´ ì¤í 19 if($scope.sites){ 20 masonryQuery.watch(dom.list); // ë°ì´í°ë¥¼ ì§ì°ê³ ìë¡ì°ë ìí©ì¼ë¡ ì ì©. 21 }; 22 }); 23 24 $scope.refresh = function(){ // ì¬ì´í¸ 리ì¤í¸ ì¬ë¡ë©. 25 dom.loading(); // ë¡ë©ì¤~ 26 siteQuery.getData(URL,function(cells) { 27 $scope.sites = cells; // ë°ì´í° ìë¡ ë¡ë©í¨. 28 dom.loaded(); // ë¡ë© ì¢ ë£~ 29 }); 30 }; 31 32 33 34 // ì ë°ì´í¸ ìì² 35 $scope.update = function(){ 36 var data = { 37 name:$scope.name, 38 url:$scope.url, 39 desc:$scope.desc, 40 regname:$scope.regname, 41 regemail:$scope.regemail 42 }; 43 44 var tagChecked = dom.ctrl.find("form input[type='checkbox']:checked"); 45 data.tag = (_.map(tagChecked,function(inp){return $(inp).val()})).join(","); 46 47 $.ajax({ 48 url: formURL, 49 data: data, 50 type: "POST", 51 success: function(response) { 52 $scope.refresh(); 53 $scope.name = ""; 54 $scope.url = ""; 55 $scope.desc = ""; 56 $scope.regname = ""; 57 $scope.regemail = ""; 58 dom.ctrl.find("form input[type='checkbox']").removeAttr("checked"); 59 }.bind(this), 60 error: function(xhr, status, err) { 61 62 }.bind(this) 63 }); 64 65 }; 66});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.