Merge branch 'saas-dev' of https://github.com/sourcefabric/Airtime into saas-dev
This commit is contained in:
commit
a9eb3f737d
4 changed files with 34 additions and 6 deletions
|
@ -138,7 +138,13 @@ class Application_Model_Preference
|
||||||
$st->execute();
|
$st->execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function getValue($key, $isUserValue = false)
|
/**
|
||||||
|
* @param string $key the preference key string
|
||||||
|
* @param bool|false $isUserValue select the preference for the current user
|
||||||
|
* @param bool|false $forceDefault only look for default (no user ID) values
|
||||||
|
* @return mixed the preference value
|
||||||
|
*/
|
||||||
|
private static function getValue($key, $isUserValue = false, $forceDefault = false)
|
||||||
{
|
{
|
||||||
$cache = new Cache();
|
$cache = new Cache();
|
||||||
|
|
||||||
|
@ -164,6 +170,8 @@ class Application_Model_Preference
|
||||||
if ($isUserValue) {
|
if ($isUserValue) {
|
||||||
$sql .= " AND subjid = :id";
|
$sql .= " AND subjid = :id";
|
||||||
$paramMap[':id'] = $userId;
|
$paramMap[':id'] = $userId;
|
||||||
|
} else if ($forceDefault) {
|
||||||
|
$sql .= " AND subjid IS NULL";
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = Application_Common_Database::prepareAndExecute($sql, $paramMap, Application_Common_Database::COLUMN);
|
$result = Application_Common_Database::prepareAndExecute($sql, $paramMap, Application_Common_Database::COLUMN);
|
||||||
|
@ -1482,6 +1490,11 @@ class Application_Model_Preference
|
||||||
public static function getWhatsNewDialogViewed()
|
public static function getWhatsNewDialogViewed()
|
||||||
{
|
{
|
||||||
$val = self::getValue("whats_new_dialog_viewed", true);
|
$val = self::getValue("whats_new_dialog_viewed", true);
|
||||||
|
if (empty($val)) {
|
||||||
|
// Check the default (no user ID) value if the user value is empty
|
||||||
|
// This is so that new stations won't see the popup
|
||||||
|
$val = self::getValue("whats_new_dialog_viewed", false, true);
|
||||||
|
}
|
||||||
return empty($val) ? false : $val;
|
return empty($val) ? false : $val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -385,6 +385,6 @@ CREATE UNIQUE INDEX cc_pref_key_idx ON cc_pref (keystr) WHERE subjid IS NULL;
|
||||||
ANALYZE cc_pref; -- this validates the new partial index
|
ANALYZE cc_pref; -- this validates the new partial index
|
||||||
|
|
||||||
--end added in 2.5.14
|
--end added in 2.5.14
|
||||||
INSERT INTO cc_pref (keystr, valstr, subjid) VALUES ('whats_new_dialog_viewed', 'true', '0');
|
|
||||||
INSERT INTO cc_pref (keystr, valstr, subjid) VALUES ('whats_new_dialog_viewed', 'true', '1');
|
-- For now, just needs to be truthy - to be updated later; we should find a better way to implement this...
|
||||||
INSERT INTO cc_pref (keystr, valstr, subjid) VALUES ('whats_new_dialog_viewed', 'true', '2');
|
INSERT INTO cc_pref("keystr", "valstr") VALUES('whats_new_dialog_viewed', 1);
|
|
@ -113,14 +113,17 @@ label.wrapp-label input[type="checkbox"] {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#add_show_hosts-label {
|
||||||
|
width: 100%;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
#add_show_hosts-element {
|
#add_show_hosts-element {
|
||||||
max-height: 80px;
|
max-height: 80px;
|
||||||
min-width: 150px;
|
min-width: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#add_show_hosts-element > label {
|
#add_show_hosts-element > label {
|
||||||
margin: 0 0 6px 5px;
|
|
||||||
vertical-align: middle;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
}
|
}
|
||||||
|
@ -129,6 +132,10 @@ label.wrapp-label input[type="checkbox"] {
|
||||||
margin-right: 6px;
|
margin-right: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#schedule-show-who {
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
#add_show_logo {
|
#add_show_logo {
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -329,6 +329,9 @@ thead th.ui-state-default:focus {
|
||||||
.sb-options-form label {
|
.sb-options-form label {
|
||||||
color: #efefef;
|
color: #efefef;
|
||||||
line-height: 26px;
|
line-height: 26px;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0 0 0 4px;
|
||||||
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sb_show_filter {
|
#sb_show_filter {
|
||||||
|
@ -336,6 +339,11 @@ thead th.ui-state-default:focus {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#sb_my_shows {
|
||||||
|
top: 1px;
|
||||||
|
left: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
.nav-tabs {
|
.nav-tabs {
|
||||||
border-bottom: 1px solid #5b5b5b;
|
border-bottom: 1px solid #5b5b5b;
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue