-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbatch-update-items.html
156 lines (137 loc) · 6.17 KB
/
batch-update-items.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<!DOCTYPE html>
<html>
<meta charset="UTF-8" />
<title>Batch Update List Items</title>
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/bootstrap-responsive.min.css" />
<link rel="stylesheet" href="css/sptools.css" />
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/0.7.1a/jquery.SPServices-0.7.1a.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/sptools-batch-update-items.js"></script>
</head>
<body data-spy="scroll">
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="index.html">SPTools</a>
<div class="nav-collapse">
<ul class="nav">
<li class="active"><a href="batch-update-items.html">Update Items</a></li>
<li><a href="batch-approve-items.html">Approve List Items</a></li>
<li><a href="batch-dup-items.html">Dup List Items</a></li>
<li><a href="batch-check-in-documents.html">Check-in Documents</a></li>
<li><a href="batch-start-workflow.html">Start Workflow</a></li>
<li><a href="check-permissions.html">Check Permissions</a></li>
<li><a href="script-audit.html">Script Audit</a></li>
<li><a href="select-items.html">Select Items</a></li>
</ul>
</div>
</div><!-- .container -->
</div><!-- .navbar-inner -->
</div><!-- .navbar .navbar-fixed-top -->
<div class="container">
<header class="page-header">
<h1>Batch Update List Items</h1>
<p>Sometimes you need to update a lot of items. Sometimes datasheet mode doesn't cut it.</p>
<p>* indicates a required field.</p>
</header>
<form id="batch-form" class="form-horizontal" action="#">
<fieldset>
<legend>1. Select List and Items</legend>
<div class="control-group">
<label class="control-label" for="source-list-name">List Name*</label>
<div class="controls">
<input type="text" id="source-list-name" placeholder="List Name" required="required" />
<p class="help-block">Enter the display name or the GUID of the source list (e.g. “Announcements” or “{A123AB12-AB1A-12A1-1234-ABC1A1234A12}”).</p>
</div>
</div>
<div class="control-group">
<label class="control-label" for="source-web-url">Web URL*</label>
<div class="controls">
<input type="text" id="source-web-url" placeholder="http://Server/Site" required="required" />
<p class="help-block">Enter the path to the site or sub-site where the source list is located (e.g. “http://Server/Site”).</p>
</div>
</div>
<div class="control-group">
<label class="control-label" for="caml-query">CAML Query*</label>
<div class="controls">
<textarea id="caml-query" class="input-xlarge" rows="6" required="required"><Query><Where><Neq><FieldRef Name="ID" /><Value Type="Integer">0</Value></Neq></Where></Query></textarea>
<p class="help-block">Enter the CAML Query to select the items you want to update. By default this selects all items.</p>
</div>
</div>
<div class="control-group">
<label class="control-label" for="preview-button">Preview Your Query</label>
<div class="controls">
<input type="button" id="preview-button" class="btn btn-info" value="Preview" />
<p class="help-block">Click the Preview button to view all of the items that will be updated. This will <strong>not</strong> perform the actual updates.</p>
</div>
</div>
<!--
<div class="control-group">
<label class="control-label" for="source-list-content-type">Source List Content Type</label>
<div class="controls">
<input type="text" id="source-list-content-type" value="" />
<p class="help-block">Enter the display name of the content type source list (e.g. “Announcements”).</p>
</div>
</div>
-->
</fieldset>
<fieldset class="spt-update-fields">
<legend>2a. Select Fields to Update</legend>
<div class="control-group">
<label class="control-label" for="add-field-button">Add Fields to Map</label>
<div class="controls">
<table border="0" cellpadding="0" cellspacing="0" id="field-list-table" class="table">
<thead>
<tr>
<th>Field</th>
<th>Update</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<input type="button" id="add-field-button" class="btn" value="Add a Field" /> <input type="button" id="reset-button" class="btn btn-warning" value="Reset Fields" />
<p class="help-block">Add any fields that you want to update, then select how you want to update them.</p>
</div>
</div>
</fieldset>
<fieldset>
<legend>2b. Or Delete Items</legend>
<div class="control-group">
<label class="control-label" for="delete-items">Delete Items</label>
<div class="controls">
<label class="checkbox"><input type="checkbox" id="delete-items" value="Delete" /> I want to delete these items instead of update them</label>
</div>
</div>
</fieldset>
<fieldset>
<legend>3. Update Items</legend>
<div class="alert">
<p><strong>Warning</strong>: Make sure your lists and updates are set properly and you've run a preview to ensure that the correct list items will be updated. Once this process begins it can only be stopped by closing your browser tab/window. It cannot be undone.</p>
</div>
<p><input type="submit" id="update-button" class="btn btn-primary" value="Update Items" /></p>
</fieldset>
</form>
<h2>Results</h2>
<table border="0" cellpadding="0" cellspacing="0" id="results-table" width="100%" class="table table-bordered table-striped">
<thead>
<tr>
<th>Item URL</th><th>Result</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="2">Waiting for your input to complete the batch update process.</td>
</tr>
</tbody>
</table>
</div><!-- .container -->
</body>
</html>