Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
b9ea84516f
|
@ -13,6 +13,7 @@ class UsersettingsController extends Zend_Controller_Action
|
|||
->addActionContext('get-timeline-datatable', 'json')
|
||||
->addActionContext('set-timeline-datatable', 'json')
|
||||
->addActionContext('remindme', 'json')
|
||||
->addActionContext('remindme-never', 'json')
|
||||
->addActionContext('donotshowregistrationpopup', 'json')
|
||||
->initContext();
|
||||
}
|
||||
|
@ -88,6 +89,13 @@ class UsersettingsController extends Zend_Controller_Action
|
|||
Zend_Session::namespaceUnset('referrer');
|
||||
Application_Model_Preference::SetRemindMeDate();
|
||||
}
|
||||
|
||||
public function remindmeNeverAction()
|
||||
{
|
||||
Zend_Session::namespaceUnset('referrer');
|
||||
//pass in true to indicate 'Remind me never' was clicked
|
||||
Application_Model_Preference::SetRemindMeDate(true);
|
||||
}
|
||||
|
||||
public function donotshowregistrationpopupAction()
|
||||
{
|
||||
|
|
|
@ -587,10 +587,14 @@ class Application_Model_Preference
|
|||
}
|
||||
}
|
||||
|
||||
public static function SetRemindMeDate()
|
||||
public static function SetRemindMeDate($p_never = false)
|
||||
{
|
||||
$weekAfter = mktime(0, 0, 0, gmdate("m"), gmdate("d")+7, gmdate("Y"));
|
||||
self::setValue("remindme", $weekAfter);
|
||||
if ($p_never) {
|
||||
self::setValue("remindme", -1);
|
||||
} else {
|
||||
$weekAfter = mktime(0, 0, 0, gmdate("m"), gmdate("d")+7, gmdate("Y"));
|
||||
self::setValue("remindme", $weekAfter);
|
||||
}
|
||||
}
|
||||
|
||||
public static function GetRemindMeDate()
|
||||
|
@ -1105,9 +1109,13 @@ class Application_Model_Preference
|
|||
{
|
||||
$today = mktime(0, 0, 0, gmdate("m"), gmdate("d"), gmdate("Y"));
|
||||
$remindDate = Application_Model_Preference::GetRemindMeDate();
|
||||
if ($remindDate == NULL || $today >= $remindDate) {
|
||||
return true;
|
||||
$retVal = false;
|
||||
|
||||
if ($remindDate == NULL || ($remindDate != -1 && $today >= $remindDate)) {
|
||||
$retVal = true;
|
||||
}
|
||||
|
||||
return $retVal;
|
||||
}
|
||||
|
||||
public static function getCurrentLibraryTableSetting(){
|
||||
|
|
|
@ -26,6 +26,18 @@ $(document).ready(function(){
|
|||
$(this).dialog("close");
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "remind_never",
|
||||
text: "Remind me never",
|
||||
click: function() {
|
||||
var url ='/Usersettings/remindme-never';
|
||||
$.ajax({
|
||||
url: url,
|
||||
data: {format:"json"}
|
||||
});
|
||||
$(this).dialog("close");
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "help_airtime",
|
||||
text: "Yes, help Airtime",
|
||||
|
|
Loading…
Reference in New Issue