Merge branch 'saas-dev-usability-hints' of github.com:sourcefabric/Airtime into saas-dev-usability-hints
This commit is contained in:
commit
5a2ef8d3db
8 changed files with 135 additions and 1 deletions
|
@ -161,3 +161,28 @@ function removeSuccessMsg() {
|
|||
|
||||
$status.fadeOut("slow", function(){$status.empty()});
|
||||
}
|
||||
|
||||
function getUsabilityHint() {
|
||||
var pathname = window.location.pathname;
|
||||
$.getJSON("/api/get-usability-hint", {"format": "json", "userPath": pathname}, function(json) {
|
||||
var $hint_div = $('.usability_hint');
|
||||
var current_hint = $hint_div.html();
|
||||
if (json === "") {
|
||||
// there are no more hints to display to the user
|
||||
$hint_div.hide();
|
||||
} else if (current_hint !== json) {
|
||||
// we only change the message if it is new
|
||||
if ($hint_div.is(":hidden")) {
|
||||
$hint_div.show();
|
||||
}
|
||||
$hint_div.slideUp("slow");
|
||||
$hint_div.html(json);
|
||||
$hint_div.slideDown("slow");
|
||||
} else {
|
||||
// hint is the same before we hid it so we just need to show it
|
||||
if ($hint_div.is(":hidden")) {
|
||||
$hint_div.show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -146,6 +146,9 @@ $(document).ready(function() {
|
|||
} else {
|
||||
self.stopRefreshingRecentUploads();
|
||||
}
|
||||
|
||||
// Update usability hint - in common.js
|
||||
getUsabilityHint();
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
|
|
@ -359,6 +359,7 @@ function getFullCalendarEvents(start, end, callback) {
|
|||
var d = new Date();
|
||||
$.post(url, {format: "json", start: start_date, end: end_date, cachep: d.getTime()}, function(json){
|
||||
callback(json.events);
|
||||
getUsabilityHint();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -154,6 +154,7 @@ function buildScheduleDialog (json, instance_id) {
|
|||
"class": "btn",
|
||||
click: function() {
|
||||
$(this).dialog("close");
|
||||
//getUsabilityHint();
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -283,6 +283,8 @@ var AIRTIME = (function(AIRTIME){
|
|||
mod.enableUI();
|
||||
//Unneccessary reload of the library pane after moving tracks in the showbuilder pane.
|
||||
//$("#library_content").find("#library_display").dataTable().fnStandingRedraw();
|
||||
|
||||
getUsabilityHint();
|
||||
};
|
||||
|
||||
mod.getSelectedCursors = function() {
|
||||
|
@ -316,7 +318,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
mod.disableUI();
|
||||
|
||||
$.post(baseUrl+"showbuilder/schedule-add",
|
||||
{"format": "json", "mediaIds": aMediaIds, "schedIds": aSchedIds},
|
||||
{"format": "json", "mediaIds": aMediaIds, "schedIds": aSchedIds},
|
||||
mod.fnItemCallback
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue