-
-
Save carcer/8190302 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.directive('grid', function() { | |
return { | |
scope: { | |
panels: "=" | |
}, | |
templateUrl: 'partials/templates/grid.html', | |
link: function($scope, element, attributes ) { | |
} | |
} | |
}); | |
app.directive("onRepeatDone", function() { | |
return { | |
restriction: 'A', | |
link: function($scope, element, attributes ) { | |
$scope.$emit(attributes["onRepeatDone"] || "repeat_done", element); | |
} | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div style="display: none;"> | |
<div ng-repeat="panel in panels" class="panel panel-default" ng-controller="panelCtrl"> | |
<div class="panel-heading"> | |
<span>{{panel.name}}</span> | |
<span class="panel-options"> | |
<a href="" ng-click="delete($index)">Delete</a> | |
<a href="" ng-click="open(panel)">Edit</a> | |
</span> | |
</div> | |
<div class="panel-body"> | |
<ul> | |
<li ng-repeat="entry in panel.feed.entries"> | |
<a target="_blank" href="{{entry.link}}">{{entry.title}}</a> | |
</li> | |
</ul> | |
</div> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="row-fluid"> | |
<div id="header" class="span12"> | |
<a href="" ng-click="open()">+Add Content</a> | |
</div> | |
</div> | |
<div class="row-fluid"> | |
<div id="content" class="span12"> | |
<div errors></div> | |
<div grid panels="panels"></div> | |
<div id="column1" class="span4 column"></div> | |
<div id="column2" class="span4 column"></div> | |
<div id="column3" class="span4 column"></div> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.controller('panelCtrl', function($scope) { | |
// you now have $scope.panel | |
$scope.delete = function() { | |
$scope.panel.delete(); | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment