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
function getRoutes() { | |
return [ | |
{ | |
url: '/profiles', | |
config: { | |
templateUrl: 'Views/allprofiles?v=4', | |
controller: 'allprofiles' | |
} | |
}, { | |
url: '/profiles/:profileId', |
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
function getRoutes() { | |
return [ | |
{ | |
url: '/profiles', | |
config: { | |
templateUrl: 'Views/allprofiles', | |
controller: 'allprofiles' | |
} | |
}, { | |
url: '/profiles/:profileId', |
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
<%@ Control Language="c#" AutoEventWireup="true" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %> | |
<div data-ng-controller="allprofiles as vm"> | |
<p><a class="btn btn-primary btn-lg" ng-click="vm.load();">Load Data</a></p> | |
<div class="row" ng-repeat="profile in vm.repository"> | |
<div class=" col-md-1"> | |
<a class="btn btn-danger btn-small" href="#profiles/{{profile.ID}}">Edit</a> | |
</div> | |
<div class="col-md-1">{{profile.DisplayName}}</div> | |
<div class="col-md-6">{{profile.ID}}</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
<%@ Page language="c#" Codepage="65001" AutoEventWireup="true" %> | |
<%@ OutputCache Location="None" VaryByParam="none" %> | |
<sc:FieldRenderer ID="FieldRenderer1" runat="server" FieldName="details" /> | |
<sc:placeholder key="main" runat="server" /> |
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.config( | |
... | |
'$httpProvider', function($httpProvider) { | |
$httpProvider.defaults.headers.put = { 'X-Scitemwebapi-Username': 'admin' }; | |
$httpProvider.defaults.headers.put = { 'X-Scitemwebapi-Password': 'b' }; | |
}); |
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 data-ng-controller="allprofiles as vm"> | |
<p><a class="btn btn-primary btn-lg" ng-click="vm.load();">Load Data</a></p> | |
<div class="row" ng-repeat="profile in vm.repository"> | |
<div class=" col-md-1"> | |
<a class="btn btn-danger btn-small" href="#profiles/{{profile.ID}}">Edit</a> | |
</div> | |
<div class="col-md-1">{{profile.DisplayName}}</div> | |
<div class="col-md-6">{{profile.ID}}</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
(function () { | |
'use strict'; | |
// Controller name is handy for logging | |
var controllerId = 'allprofiles'; | |
// Define the controller on the module. | |
// Inject the dependencies. | |
// Point to the controller definition function. | |
angular.module('app').controller(controllerId, |
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.factory('profileservice', function ($http) { | |
var items = {}; | |
var myProfileService = {}; | |
myProfileService.addItem = function (item) { | |
items.push(item); | |
}; | |
myProfileService.removeItem = function (item) { | |
var index = items.indexOf(item); | |
items.splice(index, 1); |
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
public class FormSaveActionUtilities | |
{ | |
public static string GetGoogleAnalyticsScriptFromSaveAction(SubmitSuccessArgs args) | |
{ | |
var googleAnalyticsSubmitActionId = new ID("{617DD7D9-950B-4767-B40A-CEFA848B64C6}"); | |
var script = string.Empty; | |
var lid = ListDefinition.Parse(args.Form.SaveActions).Groups[0].ListItems; | |
if (lid == null) return script; |
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
public class FormatSuccessMessage | |
{ | |
public void Process(SubmitSuccessArgs args) | |
{ | |
var script = FormSaveActionUtilities.GetGoogleAnalyticsScriptFromSaveAction(args); | |
Assert.IsNotNull((object)args, "args"); | |
if (args.Form == null) | |
return; | |
args.Result = args.Form.SuccessMessage + script; |
NewerOlder