<script language="ecmascript" type="text/ecmascript">
var statusId = '';
var notifyId = '';
function AddNotification() {
notifyId = SP.UI.Notify.addNotification("Hello World!", true);
}
function RemoveNotification() {
SP.UI.Notify.removeNotification(notifyId);
notifyId = '';
}
function AddStatus() {
statusId = SP.UI.Status.addStatus("Status good!");
SP.UI.Status.setStatusPriColor(statusId, 'red');
}
function RemoveLastStatus() {
SP.UI.Status.removeStatus(statusId);
statusId = '';
}
function RemoveAllStatus() {
SP.UI.Status.removeAllStatus(true);
}
</script>
<input id="Button1" onclick="AddNotification()" type="button" value="Add Notification"/>
<input id="Button2" onclick="RemoveNotification()" type="button" value="Remove Notification"/>
<input id="Button3" onclick="AddStatus()" type="button" value="Add Status"/>
<input id="Button4" onclick="RemoveLastStatus()" type="button" value="Remove Last Status"/>
<input id="Button5" onclick="RemoveAllStatus()" type="button" value="Remove All Status"/>
var statusId = '';
var notifyId = '';
function AddNotification() {
notifyId = SP.UI.Notify.addNotification("Hello World!", true);
}
function RemoveNotification() {
SP.UI.Notify.removeNotification(notifyId);
notifyId = '';
}
function AddStatus() {
statusId = SP.UI.Status.addStatus("Status good!");
SP.UI.Status.setStatusPriColor(statusId, 'red');
}
function RemoveLastStatus() {
SP.UI.Status.removeStatus(statusId);
statusId = '';
}
function RemoveAllStatus() {
SP.UI.Status.removeAllStatus(true);
}
</script>
<input id="Button1" onclick="AddNotification()" type="button" value="Add Notification"/>
<input id="Button2" onclick="RemoveNotification()" type="button" value="Remove Notification"/>
<input id="Button3" onclick="AddStatus()" type="button" value="Add Status"/>
<input id="Button4" onclick="RemoveLastStatus()" type="button" value="Remove Last Status"/>
<input id="Button5" onclick="RemoveAllStatus()" type="button" value="Remove All Status"/>
No comments:
Post a Comment