Skip to content

Commit

Permalink
Upstream Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherleckie committed Sep 22, 2014
1 parent ba11a84 commit 6ccbf1d
Show file tree
Hide file tree
Showing 27 changed files with 135 additions and 81 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
*.sw?
*.bak
framework/cache/*
framework/cache/*
framework/settings/cashmusic.ini.php
framework/settings/connections.json
framework/db/*
Expand Down
4 changes: 4 additions & 0 deletions framework/cache/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore
8 changes: 7 additions & 1 deletion framework/classes/plants/SystemPlant.php
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ protected function generatePasswordHash($password,$force52compatibility=false) {
*
* @param {int} $user_id - the user
* @return array|false
*/protected function setLoginCredentials($user_id,$address=false,$password=false,$username=false,$is_admin=false) {
*/protected function setLoginCredentials($user_id,$address=false,$password=false,$username=false,$is_admin=false,$display_name=false,$url=false) {
if ($password) {
$password_hash = $this->generatePasswordHash($password);
}
Expand All @@ -437,6 +437,12 @@ protected function generatePasswordHash($password,$force52compatibility=false) {
if ($is_admin) {
$credentials['is_admin'] = $is_admin;
}
if ($display_name) {
$credentials['display_name'] = $display_name;
}
if ($url) {
$credentials['url'] = $url;
}
if ($username) {
$id_request = new CASHRequest(
array(
Expand Down
12 changes: 12 additions & 0 deletions interfaces/admin/components/pages/controllers/account.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@
$changes['username'] = strtolower(preg_replace("/[^a-z0-9]+/i", '',$_POST['new_username']));
}
}
if (isset($_POST['new_displayname'])) {
if ($_POST['new_displayname']) {
$changes['display_name'] = $_POST['new_displayname'];
}
}
if (isset($_POST['new_url'])) {
if ($_POST['new_url']) {
$changes['url'] = $_POST['new_url'];
}
}
if (isset($_POST['new_password'])) {
if ($_POST['new_password']) {
if (!defined('MINIMUM_PASSWORD_LENGTH')) {
Expand Down Expand Up @@ -65,6 +75,8 @@
if (is_array($user_request['payload'])) {
$cash_admin->page_data['email_address'] = $user_request['payload']['email_address'];
$cash_admin->page_data['username'] = $user_request['payload']['username'];
$cash_admin->page_data['display_name'] = $user_request['payload']['display_name'];
$cash_admin->page_data['url'] = $user_request['payload']['url'];
$cash_admin->page_data['api_key'] = $user_request['payload']['api_key'];
$cash_admin->page_data['api_url'] = CASH_API_URL;
if (isset($_REQUEST['reveal'])) {
Expand Down
8 changes: 4 additions & 4 deletions interfaces/admin/components/pages/views/account.mustache
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<form accept-charset="UTF-8" method="post" action="{{www_path}}/account/">
<form accept-charset="UTF-8" method="post" class="returntocurrentroute" action="{{www_path}}/account/">
<!-- extra fields to stop password managers from overriding username/password fields -->
<input style="display:none">
<input type="password" style="display:none">
Expand All @@ -13,10 +13,10 @@
<input type="text" id="new_username" name="new_username" placeholder="{{username}}" value="{{username}}" />

<label for="new_username">Display name</label>
<input type="text" id="new_displayname" name="new_displayname" placeholder="{{displayname}}" value="{{displayname}}" />
<input type="text" id="new_displayname" name="new_displayname" placeholder="{{display_name}}" value="{{display_name}}" />

<label for="new_url">URL</label>
<input type="text" id="new_url" name="new_url" placeholder="{{url}}" value="{{url}}" />
<input type="text" id="new_url" name="new_url" value="{{url}}" placeholder="http://..." />

<label for="new_password">New password (Blank = no change)</label>
<input type="password" id="new_password" class="needsreveal" name="new_password" autocomplete="off" />
Expand All @@ -31,7 +31,7 @@
<input type="password" id="password" name="password" autocomplete="off" />
<br />
<!--input type="submit" value="Save changes" /-->
<button type="submit"><i class="icon icon-save"></i>Save changes</button>
<button type="submit">Save changes</button>
</form>

<p>&nbsp;</p>
Expand Down
2 changes: 1 addition & 1 deletion interfaces/admin/components/pages/views/assets.mustache
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<div class="page-description">Something Interesting an informative to educate someone about this section!</div>

<h4>Releases</h4>
<div class="row">
{{#featured_releases}}
Expand Down
2 changes: 1 addition & 1 deletion interfaces/admin/components/pages/views/calendar.mustache
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="page-description">Something Interesting an informative to educate someone about this section!</div>

<div class="row">
<div class="six columns">
<h4>Add an event</h4>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="page-description">Something Interesting an informative to educate someone about this section!</div>

<div class="row">
<div class="six columns">
<h4>Add an event</h4>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="page-description">Something Interesting an informative to educate someone about this section!</div>

<div class="row">
<div class="six columns">
<h4>Quick add a venue</h4>
Expand Down
2 changes: 1 addition & 1 deletion interfaces/admin/components/pages/views/commerce.mustache
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="page-description">Something Interesting an informative to educate someone about this section!</div>

{{#total_orders}}
<div class="sectiondash">
<div class="primarystat">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="page-description">Something Interesting an informative to educate someone about this section!</div>

<div class="row">
<div class="six columns">
<h4>Add an item</h4>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="page-description">Something Interesting an informative to educate someone about this section!</div>

{{#all_order_details}}
<h4>Export orders</h4>
<a href="{{www_path}}/commerce/orders/export/unfulfilled" class="button noajax">Export all UNFULFILLED orders</a>
Expand Down
4 changes: 2 additions & 2 deletions interfaces/admin/components/pages/views/login.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!--img src="/admin/ui/default/assets/images/logo.svg" alt="CASH Music"-->

<h3 id="message" {{#login_error}} class="error"{{/login_error}}>{{login_message}}</h3>
<form method="post" id="cash_signin_form" action="">
<form method="post" id="cash_signin_form" action="{{www_path}}/">
<div class="row">
<div class="two columns"></div>
<div class="three columns">
Expand Down Expand Up @@ -32,7 +32,7 @@
</div>

{{#allow_signups}}
<div class="row">
<div class="row signup">
<div class="two columns"></div>
<div class="eight columns">
<h5>No account? <a href="{{www_path}}/signup/" class="lightboxed">Sign up.</a></h5>
Expand Down
4 changes: 1 addition & 3 deletions interfaces/admin/components/pages/views/mainpage.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@
<h1>Welcome to the CASH Music Platform v.5</h1>
<h2>Watch the video to get started</h2>
</div><!--welcome-->
<iframe src="//www.youtube.com/embed/8IgQ2SP-vBY" frameborder="0" allowfullscreen></iframe>
<!--iframe src="//www.youtube.com/embed/8IgQ2SP-vBY" frameborder="0" allowfullscreen></iframe-->
<!-- {{#dashboard_news}}
<h2>While you were gone</h2>
<div class="callout newsfeed cashnews">{{{dashboard_news}}}<div class="newsimage" style="background-image:url({{dashboard_news_img}})"></div></div>
{{/dashboard_news}} -->
</div><!--hero-->

<div class="page-description">Something Interesting an informative to educate someone about this section!</div>

<!--<h2>Activity While you were gone</h2>-->
{{#dashboard_news}}
<div class="callout newsfeed cashnews">{{{dashboard_news}}}<div class="newsimage" style="background-image:url({{dashboard_news_img}})"></div></div>
Expand Down
2 changes: 1 addition & 1 deletion interfaces/admin/components/pages/views/people.mustache
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<div class="page-description">Something Interesting an informative to educate someone about this section!</div>

{{#dashboard_list_total_new}}
<div class="sectiondash">
<div class="primarystat">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="page-description">Something Interesting an informative to educate someone about this section!</div>

<div class="row">
<div class="six columns">
<h4>Add A New List</h4>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<div class="page-description">Something Interesting an informative to educate someone about this section!</div>

<p>
Send a test message to a specific list.
</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="page-description">Something Interesting an informative to educate someone about this section!</div>

<div class="row">
<div class="six columns">
<h4>Add new press coverage</h4>
Expand Down
15 changes: 5 additions & 10 deletions interfaces/admin/components/pages/views/settings.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,12 @@ Advanced settings have been hidden and should not be changed unless you like bro
<p>

</p>
<form accept-charset="UTF-8" method="post" action="{{www_path}}/settings/">
<form accept-charset="UTF-8" method="post" class="returntocurrentroute" action="{{www_path}}/settings/">
<label for="currency_id">Currency</label>
<div class="row">
<div class="six columns">
<select id="currency_id" name="currency_id">
{{{currency_options}}}
</select>
</div><div class="six columns">
<button type="submit"><i class="icon icon-money"></i>Use this currency</button>
</div>
</div>
<select id="currency_id" name="currency_id">
{{{currency_options}}}
</select>
<button type="submit">Use this currency</button>
</form>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions interfaces/admin/components/text/en/pages/assets.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pagetip":"Here you’ll see your assets, playlists, and any files you’ve added. To create a new asset, just click the ‘add a new ...’ link, give it a name and description, and you’ll be able to start editing and adding files immediately.",
"learn":"",
"pagetip":"Add/edit your releases and the files that you’ll need for your campaigns here.",
"learn":"<p>This section is where you’ll organize and define your releases as well as add all the digital files that you’ll be using in your elements.</p>",
"related":{},
"labels":{},
"tooltips":{},
Expand Down
4 changes: 2 additions & 2 deletions interfaces/admin/components/text/en/pages/default.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pagetip":"There are no tips currently written for this page.",
"learn":"",
"pagetip":"",
"learn":"There is no learn content written for this page.",
"related":{},
"labels":{},
"tooltips":{},
Expand Down
2 changes: 1 addition & 1 deletion interfaces/admin/components/text/en/pages/people.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"pagetip":"Here you'll create and maintain lists to use with your elements as mailing lists or security lists. (Think fan clubs.)",
"pagetip":"",
"learn":"",
"related":{},
"labels":{},
Expand Down
2 changes: 1 addition & 1 deletion interfaces/admin/constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*********************************************************/
define('ALLOW_SIGNUPS',true); // should people be able to sign up from the admin page?
// define('CDN_URL',''); // base CDN for some static assets (img tags, mostly)
define('JQUERY_URL','//cdnjs.cloudflare.com/ajax/libs/jquery/1.10.2/jquery.min.js'); // CDN for jQuery
define('JQUERY_URL','//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js'); // CDN for jQuery
define('MINIMUM_PASSWORD_LENGTH',10); // doesn't allow passwords shorter than this value
define('USE_SUBDOMAIN',true); // subdomain or subdirectory for user URL scheme (x.cashmusic.org v cashmuisc.org/x)
?>
1 change: 1 addition & 0 deletions interfaces/admin/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ function cash_admin_autoloadCore($classname) {
// page specifics
$page_components = AdminHelper::getPageComponents();
$cash_admin->page_data['ui_page_tip'] = $page_components['pagetip'];
$cash_admin->page_data['ui_learn_text'] = $page_components['learn'];
if (is_array($page_components['labels'])) {
foreach ($page_components['labels'] as $key => $val) {
$cash_admin->page_data['label_' . $key] = $val;
Expand Down
27 changes: 27 additions & 0 deletions interfaces/admin/ui/default/assets/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,10 @@ small{

.login #hero {
width:100%;
opacity:1;
height:auto;
min-height:420px;
position:fixed;
}

/* Element Statistics */
Expand Down Expand Up @@ -1137,6 +1141,8 @@ section[role=main].hero{
opacity:1;
}

#learn_tip {display:none;}

/*
#learnpanel,#settingspanel,#helppanel {
-webkit-transition: 0.3s;
Expand All @@ -1145,6 +1151,8 @@ section[role=main].hero{
}
*/

#learnpanel p { font-size:18px; line-height:26px;}

#tertiary {
/*display:none;*/
position:relative;
Expand Down Expand Up @@ -1444,6 +1452,25 @@ color:#f5f5f5!important;
margin:400px 0 0 0;
}

/* mobile login */
@media only screen and (max-width: 535px) {
.login section[role=main]{
margin:580px 0 0 0;
}

.login .signup, .login #footer {
position:relative;
background: #e3e3e3 url(../images/paint_low.png) 0% 0%;
background-repeat: no-repeat;
background-position: center top;
background-attachment: fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
}

.login #signup {
padding-top:80px;
}
Expand Down
Loading

0 comments on commit 6ccbf1d

Please sign in to comment.