adding in some history plumbing
This commit is contained in:
Родитель
3fa8e8c089
Коммит
5138e602f6
|
@ -2,9 +2,22 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Share History</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="history.css">
|
||||
|
||||
<script src="../../scripts/requireplugins-jquery-1.4.2.js" charset="utf-8"></script>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
|
||||
<script>require(["history.js"]);</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Share History</h1>
|
||||
<p>TODO</p>
|
||||
<div id="content"></div>
|
||||
|
||||
<div id="error" class="template">There was an error: {message}</div>
|
||||
|
||||
<div id="history" class="template">
|
||||
<!-- this div should repeat for every history entry -->
|
||||
<div class="name">${username}</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Raindrop.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Mozilla Messaging, Inc..
|
||||
* Portions created by the Initial Developer are Copyright (C) 2009
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* */
|
||||
|
||||
/*jslint plusplus: false */
|
||||
/*global require: false, location: true, window: false, alert: false */
|
||||
"use strict";
|
||||
|
||||
require.def("history",
|
||||
["require", "jquery", "blade/fn", "rdapi", "blade/jig"],
|
||||
function (require, $, fn, rdapi, jig) {
|
||||
|
||||
rdapi('history/get', {
|
||||
success: function (json) {
|
||||
if (json.error) {
|
||||
$('#content').append(jig('#error', json.error));
|
||||
} else {
|
||||
$('#content').append(jig('#history', json));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
|
@ -1,12 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="share.css">
|
||||
|
||||
<script src="../../scripts/requireplugins-jquery-1.4.2.js" charset="utf-8"></script>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
|
||||
<script>require(["index.js"]);</script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="share.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
@ -100,8 +99,13 @@
|
|||
</div>
|
||||
|
||||
<div id="debug" class="tab">
|
||||
<button onclick="location = '#!close'">Close</button>
|
||||
<button onclick="$('#tabs').addClass('hidden');$('#statusSent').removeClass('hidden');">Show sent status</button>
|
||||
<div class="col">
|
||||
<button onclick="location = '#!close'">Close</button>
|
||||
<button onclick="$('#tabs').addClass('hidden');$('#statusSent').removeClass('hidden');">Show sent status</button>
|
||||
</div>
|
||||
<div class="col">
|
||||
<textarea id="debugOutput"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="settings" class="tab">
|
||||
|
|
Загрузка…
Ссылка в новой задаче