7d1dbcd72f77bc3976c1b8cfeb6ec5394002bbb4.svn-base 1015 字节
/**
 * Created by lgy on 2015/10/20.
 */

App.controller('timelineCtrl', ['$scope','$http','$location', function ($scope, $http,$location) {
  'use strict';
  $http.post('./plan_findMarketingPlan.action', {
    currpage:1,
    pagesize:10
}, $scope.postCfg)
      .success(function (data) {
        console.log(data);
      }).error(function (data) {
        //处理错误
      });

  //页面跳转
  $scope.includehtml=function(html){
    $scope.$apply(function(){
      $location.url(html);
    });
  };


}]);

App.directive('openpic', function() {
  'use strict';

  return {
    restrict: 'A',
    link: function(scope, element, attrs) {
      element.click(function(e){
        e.stopPropagation();
        var opencheck=$(this).parent().parent().find('.photo-view');
        if(opencheck.attr('opencheck')==0){
          opencheck.attr('opencheck',1);
          opencheck.show(500);
        }else{
          opencheck.attr('opencheck',0);
          opencheck.hide(500);
        }
      });
    }
  };
});