]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/settingsaction.php
Merge branch 'uiredesign' of ../evan into uiredesign
[quix0rs-gnu-social.git] / lib / settingsaction.php
index 208d2a1b6803351a2b415715b8942f2d648ad108..03bac3a93b0173f9ffcf1a6dc5fbc78162bd809a 100644 (file)
 
 if (!defined('LACONICA')) { exit(1); }
 
-class SettingsAction extends Action {
+class SettingsAction extends Action
+{
 
-    function handle($args) {
+    function handle($args)
+    {
         parent::handle($args);
         if (!common_logged_in()) {
             common_user_error(_('Not logged in.'));
@@ -40,29 +42,46 @@ class SettingsAction extends Action {
     }
 
     # override!
-    function handle_post() {
+    function handle_post()
+    {
         return false;
     }
 
-    function show_form($msg=null, $success=false) {
+    function show_form($msg=null, $success=false)
+    {
         return false;
     }
 
-    function message($msg, $success) {
+    function message($msg, $success)
+    {
         if ($msg) {
             common_element('div', ($success) ? 'success' : 'error',
                            $msg);
         }
     }
 
-    function form_header($title, $msg=null, $success=false) {
+    function form_header($title, $msg=NULL, $success=false) 
+    {
         common_show_header($title,
-                           null,
+                           array($this, 'show_header'),
                            array($msg, $success),
                            array($this, 'show_top'));
     }
 
-    function show_top($arr) {
+    function show_header() 
+    {
+        common_element('link', array('rel' => 'stylesheet',
+                                     'type' => 'text/css',
+                                     'href' => common_path('js/jcrop/jquery.Jcrop.css?version='.LACONICA_VERSION),
+                                     'media' => 'screen, projection, tv'));
+        common_element('script', array('type' => 'text/javascript',
+                                       'src' => common_path('js/jcrop/jquery.Jcrop.pack.js')));
+        common_element('script', array('type' => 'text/javascript',
+                                       'src' => common_path('js/jcrop/jquery.Jcrop.go.js')));
+    }
+
+    function show_top($arr)
+    {
         $msg = $arr[0];
         $success = $arr[1];
         if ($msg) {
@@ -77,7 +96,8 @@ class SettingsAction extends Action {
         $this->settings_menu();
     }
 
-    function settings_menu() {
+    function settings_menu()
+    {
         # action => array('prompt', 'title')
         $menu =
           array('profilesettings' =>