From 33196c24f4c9609611cfbcf6466ceee60c51ef8e Mon Sep 17 00:00:00 2001 From: csarven Date: Tue, 9 Dec 2008 21:16:07 -0500 Subject: [PATCH] Jcrop v2 (POST cropping to be completed) darcs-hash:20081210021607-eefa4-c3590f3e734255faf098bf5ca09fc17901a6db70.gz --- _darcs/inventory | 4 +- ...3590f3e734255faf098bf5ca09fc17901a6db70.gz | Bin 0 -> 8253 bytes _darcs/patches/unrevert | 333 ++++++++++++++++++ _darcs/pristine/actions/profilesettings.php | 96 ++--- _darcs/pristine/js/jcrop/Jcrop.gif | Bin 0 -> 329 bytes _darcs/pristine/js/jcrop/jquery.Jcrop.css | 45 +++ _darcs/pristine/js/jcrop/jquery.Jcrop.go.js | 41 +++ _darcs/pristine/js/jcrop/jquery.Jcrop.pack.js | 8 + _darcs/pristine/lib/settingsaction.php | 13 +- _darcs/pristine/theme/default/display.css | 11 + _darcs/tentative_inventory | 123 +++++++ _darcs/tentative_pristine | 10 - actions/profilesettings.php | 96 ++--- js/jcrop/Jcrop.gif | Bin 0 -> 329 bytes js/jcrop/jquery.Jcrop.css | 45 +++ js/jcrop/jquery.Jcrop.go.js | 41 +++ js/jcrop/jquery.Jcrop.pack.js | 8 + lib/settingsaction.php | 13 +- theme/default/display.css | 11 + 19 files changed, 777 insertions(+), 121 deletions(-) create mode 100644 _darcs/patches/20081210021607-eefa4-c3590f3e734255faf098bf5ca09fc17901a6db70.gz create mode 100644 _darcs/patches/unrevert create mode 100644 _darcs/pristine/js/jcrop/Jcrop.gif create mode 100644 _darcs/pristine/js/jcrop/jquery.Jcrop.css create mode 100644 _darcs/pristine/js/jcrop/jquery.Jcrop.go.js create mode 100644 _darcs/pristine/js/jcrop/jquery.Jcrop.pack.js create mode 100644 _darcs/tentative_inventory create mode 100644 js/jcrop/Jcrop.gif create mode 100644 js/jcrop/jquery.Jcrop.css create mode 100644 js/jcrop/jquery.Jcrop.go.js create mode 100644 js/jcrop/jquery.Jcrop.pack.js diff --git a/_darcs/inventory b/_darcs/inventory index 8e63bf0ffa..4926f6f3b1 100644 --- a/_darcs/inventory +++ b/_darcs/inventory @@ -118,4 +118,6 @@ Zach Copley **20090105010407] [trac750 configurable sync flags for Facebook app (noticesync, replysync) Zach Copley **20090105040212] [trac750 added some output to the facebook_update.php script -Zach Copley **20090105045603] \ No newline at end of file +Zach Copley **20090105045603] +[Jcrop v2 (POST cropping to be completed) +csarven@controlyourself.ca**20081210021607] \ No newline at end of file diff --git a/_darcs/patches/20081210021607-eefa4-c3590f3e734255faf098bf5ca09fc17901a6db70.gz b/_darcs/patches/20081210021607-eefa4-c3590f3e734255faf098bf5ca09fc17901a6db70.gz new file mode 100644 index 0000000000000000000000000000000000000000..575df96185e9c86f87e6dd7879640ec3802f163a GIT binary patch literal 8253 zcmV-DAj01tiwFP!000001MPf!U)#E}=--P^;nl@%Y;ZzkJ3O4aJ(QM03#A46E{C6E zE3t_k2iqYDIN$xwjO@H1lymFB zS+ZT%^<$~Bc9E=IAkn3e$1NU9)k;;8m%Lu54UM*w`cWrY>&8*j4|u}U6vj>}U9T(E zHkQhN{NXnxc{%m`r2N#5TXHF}uXssOU<7FVBX2?Ac}_!C>ew`rc#v>uzI(45M7Dd2 zfB>J{S9WU0_fv2@yVK%bJ4tR)5l!dV){kPhptH0p<$sGOGe*I`1+yCCJYa5j(YrOt z9}%3N>Rm+dnDd0}L)5&^mR1)F8w@8OdrHgzoSKF5)0VZNqh7$Y!>Du410M2DdY%Be zR4z56I4r4>9mn=iE`>bxBDW-2Po)yNM@c1p=YKH8lApKEjdL4OFoei+Ejb@Sg_KBSu>sQ^Q+;M?zj&Uun1P?DHYl_2263)G7)L{3Ir z9u&0&A|7Mk;&;+A!*l_j7V#(aAmkJx2FNz>+gy6I|Qic}#kOtX(5 z2}0gP@N({D>cq#&s#H-)Bj<{UHgi9zanB61HU@bh~dFzNC3Ig0(3-?4*YyE>bi<&qz^COJ8Y z9pY@<3pS2%FteR0IRWkoDfNndm{cIo?t4mo-%Y)Fas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WJg*fTHRYo@eKXkE6 z0D^zpb6Y$EiKWEeQL_o8u-{3qi?6NRg``)3654|kk|ig}5DsC}-6JuJ;=UcslY99f;-Vn9 zTBoqxj?k2_;g5de14~)pqc`nDaR=xW3}it7A4%+FFjX2IZ9Jy~=&ZAcr z4)e&^%^jt~`;(MX+{n!6M{H;nBb zFcu%A$QWI9hBl{%!3QOoaj@k>y4VO=!_Tef9W;=w=vA^C2qf@H?&JDl2)3ZJDo_I( z(6uT$9Jb@VudLZARg!Lizm?8Pidt1~M#|m4q6+-RTJa+#@!KWwib;K`j8}QbR}b;V z+_|{iCNHOc8gNxw4wIH8ejd4;^c)9rt3_**@vrQDvAgJe^HU7h1j7sd-hMbZxc>)k z#K`|05z*lPu!w$AI{0(AUuSgk-aTAp&2`1rg%ZEJP5itPhn$Qyc{}0+0ar?@RH8xC z{1^V?-|78Lx#QnGle*7Ter!w&Cis9ZcTIWr7l!vZz&(msy-yL-g9#FVzs0}E z{_UT?{qwhf{%8I3|AjpMPsNbm9{t;+7ySLN@#ud`8vO?y^0$%yHu47yI&I|t!=wBI z-a+(l6V`A4`(N*WKlF#K*_XylPb>cs==@8J@ZB|&w;07d5bq#L(qX_8kMnfq7t_=4 z=fn3!tT{vY2j-vo?Y=6-^^~6DhJy;M{oCcw$DGlJU-b!daKM5 z4!P^wId@LXc}K-pBwdJ8NmWX(ikD^0PZ8fz-JN<3;oKB1>?^xKnGBfgWc*&I2h1k_ zG3xlG#Q!Ni=;Z?i7o+jsJU5-x19sN(1K2g!Pr89Uq!)}BhQ73V>&N0~HR6ZVWpOrb vG9DH$f0+M;I3gFvv!*!PoxDV1YhAp4A^!n*UL`t9qow}?VX~5lD`@}#9p38@ literal 0 HcmV?d00001 diff --git a/_darcs/patches/unrevert b/_darcs/patches/unrevert new file mode 100644 index 0000000000..fbfd7b2fc0 --- /dev/null +++ b/_darcs/patches/unrevert @@ -0,0 +1,333 @@ + +New patches: + +[unrevert +anonymous**20090106212611] { +hunk ./actions/profilesettings.php 57 + return; + } + ++v v v v v v v + if ($this->arg('save')) { + $this->save_profile(); + } else if ($this->arg('upload')) { +hunk ./actions/profilesettings.php 62 + $this->upload_avatar(); ++ } else if ($this->arg('crop')) { ++ $this->crop_avatar(); + } else if ($this->arg('changepass')) { + $this->change_password(); + } +hunk ./actions/profilesettings.php 67 ++************* ++ if ($this->arg('save')) { ++ $this->save_profile(); ++ } else if ($this->arg('upload')) { ++ $this->upload_avatar(); ++ } else if ($this->arg('changepass')) { ++ $this->change_password(); ++ } ++^ ^ ^ ^ ^ ^ ^ + + } + +hunk ./actions/profilesettings.php 85 + $user = common_current_user(); + $profile = $user->getProfile(); + ++v v v v v v v + common_element_start('form', array('method' => 'POST', + 'id' => 'profilesettings', +hunk ./actions/profilesettings.php 88 +- 'action' => +- common_local_url('profilesettings'))); ++ 'action' => common_local_url('profilesettings'))); + common_hidden('token', common_session_token()); + + # too much common patterns here... abstractable? +hunk ./actions/profilesettings.php 110 + common_input('tags', _('Tags'), + ($this->arg('tags')) ? $this->arg('tags') : implode(' ', $user->getSelfTags()), + _('Tags for yourself (letters, numbers, -, ., and _), comma- or space- separated')); ++************* ++ common_element_start('form', array('method' => 'POST', ++ 'id' => 'profilesettings', ++ 'action' => ++ common_local_url('profilesettings'))); ++ common_hidden('token', common_session_token()); ++ ++ # too much common patterns here... abstractable? ++ ++ common_input('nickname', _('Nickname'), ++ ($this->arg('nickname')) ? $this->arg('nickname') : $profile->nickname, ++ _('1-64 lowercase letters or numbers, no punctuation or spaces')); ++ common_input('fullname', _('Full name'), ++ ($this->arg('fullname')) ? $this->arg('fullname') : $profile->fullname); ++ common_input('homepage', _('Homepage'), ++ ($this->arg('homepage')) ? $this->arg('homepage') : $profile->homepage, ++ _('URL of your homepage, blog, or profile on another site')); ++ common_textarea('bio', _('Bio'), ++ ($this->arg('bio')) ? $this->arg('bio') : $profile->bio, ++ _('Describe yourself and your interests in 140 chars')); ++ common_input('location', _('Location'), ++ ($this->arg('location')) ? $this->arg('location') : $profile->location, ++ _('Where you are, like "City, State (or Region), Country"')); ++ common_input('tags', _('Tags'), ++ ($this->arg('tags')) ? $this->arg('tags') : implode(' ', $user->getSelfTags()), ++ _('Tags for yourself (letters, numbers, -, ., and _), comma- or space- separated')); ++^ ^ ^ ^ ^ ^ ^ + + $language = common_language(); + common_dropdown('language', _('Language'), get_nice_language_list(), _('Preferred language'), true, $language); +hunk ./actions/profilesettings.php 179 + common_local_url('profilesettings'))); + common_hidden('token', common_session_token()); + ++v v v v v v v + if ($original) { +hunk ./actions/profilesettings.php 181 ++ common_element('h3', null, _("Original:")); ++ common_element_start('div', array('id'=>'avatar_original')); + common_element('img', array('src' => $original->url, + 'class' => 'avatar original', + 'width' => $original->width, +hunk ./actions/profilesettings.php 188 + 'height' => $original->height, + 'alt' => $user->nickname)); ++ common_element_end('div'); ++ ++ foreach(array('avatar_crop_x', 'avatar_crop_y', 'avatar_crop_w', 'avatar_crop_h') as $crop_info) { ++ common_element('input', array('name' => $crop_info, ++ 'type' => 'hidden', ++ 'id' => $crop_info)); ++ } ++ common_submit('avatar_crop', _('Crop')); + } +hunk ./actions/profilesettings.php 197 ++************* ++ if ($original) { ++ common_element('img', array('src' => $original->url, ++ 'class' => 'avatar original', ++ 'width' => $original->width, ++ 'height' => $original->height, ++ 'alt' => $user->nickname)); ++ } ++^ ^ ^ ^ ^ ^ ^ + + $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE); + +hunk ./actions/profilesettings.php 209 ++v v v v v v v + if ($avatar) { +hunk ./actions/profilesettings.php 211 +- common_element('img', array('src' => $avatar->url, ++ common_element('h3', null, _("Preview:")); ++ common_element_start('div', array('id'=>'avatar_preview')); ++ common_element('img', array('src' => $original->url,//$avatar->url, + 'class' => 'avatar profile', + 'width' => AVATAR_PROFILE_SIZE, + 'height' => AVATAR_PROFILE_SIZE, +hunk ./actions/profilesettings.php 218 + 'alt' => $user->nickname)); ++ common_element_end('div'); + } +hunk ./actions/profilesettings.php 220 ++************* ++ if ($avatar) { ++ common_element('img', array('src' => $avatar->url, ++ 'class' => 'avatar profile', ++ 'width' => AVATAR_PROFILE_SIZE, ++ 'height' => AVATAR_PROFILE_SIZE, ++ 'alt' => $user->nickname)); ++ } ++^ ^ ^ ^ ^ ^ ^ + + + common_element('input', array('name' => 'MAX_FILE_SIZE', +hunk ./actions/profilesettings.php 465 + $this->show_form(_('Failed updating avatar.')); + } + ++v v v v v v v + @unlink($_FILES['avatarfile']['tmp_name']); + } + +hunk ./actions/profilesettings.php 469 ++ function crop_avatar() { ++// http://deepliquid.com/content/Jcrop_Implementation_Theory.html ++// Grab POSTs x, y, w, h and crop out a rectangle topleft: (x,y), bottomright: (x+w, x+h) using the original image. ++ } ++************* ++ @unlink($_FILES['avatarfile']['tmp_name']); ++ } ++^ ^ ^ ^ ^ ^ ^ ++ + function nickname_exists($nickname) + { + $user = common_current_user(); +hunk ./lib/settingsaction.php 63 + } + } + ++v v v v v v v + function form_header($title, $msg=NULL, $success=false) { + common_show_header($title, +hunk ./lib/settingsaction.php 66 +- NULL, ++ array($this, 'show_header'), + array($msg, $success), + array($this, 'show_top')); + } +hunk ./lib/settingsaction.php 71 + ++ 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 form_header($title, $msg=null, $success=false) ++ { ++ common_show_header($title, ++ null, ++ array($msg, $success), ++ array($this, 'show_top')); ++ } ++^ ^ ^ ^ ^ ^ ^ ++ + function show_top($arr) + { + $msg = $arr[0]; +} + +Context: + +[Jcrop v2 (POST cropping to be completed) +csarven@controlyourself.ca**20081210021607] +[trac750 added some output to the facebook_update.php script +Zach Copley **20090105045603] +[trac750 configurable sync flags for Facebook app (noticesync, replysync) +Zach Copley **20090105040212] +[trac750 Automatically update linked Facebook users' statuses +Zach Copley **20090105010407] +[wrapper element for config.xml +Evan Prodromou **20081230212202] +[better serialization of arrays and booleans in config output +Evan Prodromou **20081230211957] +[implement the api/laconica/config method +Evan Prodromou **20081230211444] +[add some breaks so that switch statement works +Evan Prodromou **20081230210114] +[implement api/laconica/version method +Evan Prodromou **20081230205939] +[add laconica methods to unauthed ones +Evan Prodromou **20081230203747] +[add laconica-specific methods to htaccess.sample +Evan Prodromou **20081230202513] +[Laconica-specific extensions for Twitter API +Evan Prodromou **20081230202019] +[whitespace changes in actions/register.php after global search-and-replace +Evan Prodromou **20081223195722] +[Twitter-bridge: fix for Twitter's new strict policy of rejecting HTTP POSTs with invalid "expect" headers +Zach Copley **20081225152207] +[move opening brace of class declaration to next line +Evan Prodromou **20081223194923 + + Another gigantor PEAR coding standards patch. Here, I've moved the + opening curly bracket on a class statement to the following line. + +] +[TRUE => true, FALSE => false +Evan Prodromou **20081223194428 + + More PEAR coding standards global changes. Here, I've changed all + instances of TRUE to true and FALSE to false. + +] +[change function headers to K&R style +Evan Prodromou **20081223193323 + + Another huge change, for PEAR code standards compliance. Function + headers have to be in K&R style (opening brace on its own line), + instead of having the opening brace on the same line as the function + and parameters. So, a little perl magic found all the function + definitions and move the opening brace to the next line (properly + indented... usually). + +] +[replace NULL with null +Evan Prodromou **20081223192129 + + Another global search-and-replace update. Here, I've replaced the PHP + keyword 'NULL' with its lowercase version. This is another PEAR code + standards change. + +] +[replace all tabs with four spaces +Evan Prodromou **20081223191907 + + The PEAR coding standards decree: no tabs, but indent by four spaces. + I've done a global search-and-replace on all tabs, replacing them by + four spaces. This is a huge change, but it will go a long way to + getting us towards phpcs-compliance. And that means better code + readability, and that means more participation. + +] +[incorrect label on notice list file comment +Evan Prodromou **20081223191430] +[bring lib/noticelist.php into line with PEAR code standards +Evan Prodromou **20081223190851] +[reformat and document lib/mail.php for phpcs conformance +Evan Prodromou **20081223173330] +[bring messaging section (inbox, outbox, mailbox) into PEAR Code Standards compliance +Evan Prodromou **20081222201304 + + Actually refactored the method names on these classes to come into + complete compliance with the code standards. Untested; maybe there are + some bad method names now. + +] +[bring mailbox.php into line with PEAR Coding Standards (mostly) +Evan Prodromou **20081222195041] +[reformat lib/language.php for PEAR Coding Standards +Evan Prodromou **20081222193029] +[reformat lib/jabber.php for phpcs, including doc comments +Evan Prodromou **20081222173249] +[reformat for phpcs +Evan Prodromou **20081221005837] +[reformat lib/daemon.php for phpcs +Evan Prodromou **20081221004607] +[some modifications to assuage phpcs +Evan Prodromou **20081221003955] +[reformatting for phpcs in lib/util.php +Evan Prodromou **20081221003016] +[first step of phpcs-cleanup of index.php +Evan Prodromou **20081221002332] +[more information in subscription notices +Evan Prodromou **20081212171135] +[identica badge by Kent Brewster. For more information see: +Sarven Capadisli **20081218003302 + http://kentbrewster.com/identica-badge/ + + Copy and paste the following wherever you want the badge to show up: + + + + Substitute your own ID in the user parameter. + +] +[TAG 0.6.4.1 +Evan Prodromou **20081220204906] +Patch bundle hash: +afe7b4b695e91033a56499c2eee94a02fa1f0105 diff --git a/_darcs/pristine/actions/profilesettings.php b/_darcs/pristine/actions/profilesettings.php index 6c22a7933f..caec2f93d7 100644 --- a/_darcs/pristine/actions/profilesettings.php +++ b/_darcs/pristine/actions/profilesettings.php @@ -54,13 +54,13 @@ class ProfilesettingsAction extends SettingsAction return; } - if ($this->arg('save')) { - $this->save_profile(); - } else if ($this->arg('upload')) { - $this->upload_avatar(); - } else if ($this->arg('changepass')) { - $this->change_password(); - } + if ($this->arg('save')) { + $this->save_profile(); + } else if ($this->arg('upload')) { + $this->upload_avatar(); + } else if ($this->arg('changepass')) { + $this->change_password(); + } } @@ -70,31 +70,31 @@ class ProfilesettingsAction extends SettingsAction $user = common_current_user(); $profile = $user->getProfile(); - common_element_start('form', array('method' => 'POST', - 'id' => 'profilesettings', - 'action' => - common_local_url('profilesettings'))); - common_hidden('token', common_session_token()); - - # too much common patterns here... abstractable? - - common_input('nickname', _('Nickname'), - ($this->arg('nickname')) ? $this->arg('nickname') : $profile->nickname, - _('1-64 lowercase letters or numbers, no punctuation or spaces')); - common_input('fullname', _('Full name'), - ($this->arg('fullname')) ? $this->arg('fullname') : $profile->fullname); - common_input('homepage', _('Homepage'), - ($this->arg('homepage')) ? $this->arg('homepage') : $profile->homepage, - _('URL of your homepage, blog, or profile on another site')); - common_textarea('bio', _('Bio'), - ($this->arg('bio')) ? $this->arg('bio') : $profile->bio, - _('Describe yourself and your interests in 140 chars')); - common_input('location', _('Location'), - ($this->arg('location')) ? $this->arg('location') : $profile->location, - _('Where you are, like "City, State (or Region), Country"')); - common_input('tags', _('Tags'), - ($this->arg('tags')) ? $this->arg('tags') : implode(' ', $user->getSelfTags()), - _('Tags for yourself (letters, numbers, -, ., and _), comma- or space- separated')); + common_element_start('form', array('method' => 'POST', + 'id' => 'profilesettings', + 'action' => + common_local_url('profilesettings'))); + common_hidden('token', common_session_token()); + + # too much common patterns here... abstractable? + + common_input('nickname', _('Nickname'), + ($this->arg('nickname')) ? $this->arg('nickname') : $profile->nickname, + _('1-64 lowercase letters or numbers, no punctuation or spaces')); + common_input('fullname', _('Full name'), + ($this->arg('fullname')) ? $this->arg('fullname') : $profile->fullname); + common_input('homepage', _('Homepage'), + ($this->arg('homepage')) ? $this->arg('homepage') : $profile->homepage, + _('URL of your homepage, blog, or profile on another site')); + common_textarea('bio', _('Bio'), + ($this->arg('bio')) ? $this->arg('bio') : $profile->bio, + _('Describe yourself and your interests in 140 chars')); + common_input('location', _('Location'), + ($this->arg('location')) ? $this->arg('location') : $profile->location, + _('Where you are, like "City, State (or Region), Country"')); + common_input('tags', _('Tags'), + ($this->arg('tags')) ? $this->arg('tags') : implode(' ', $user->getSelfTags()), + _('Tags for yourself (letters, numbers, -, ., and _), comma- or space- separated')); $language = common_language(); common_dropdown('language', _('Language'), get_nice_language_list(), _('Preferred language'), true, $language); @@ -137,23 +137,23 @@ class ProfilesettingsAction extends SettingsAction common_local_url('profilesettings'))); common_hidden('token', common_session_token()); - if ($original) { - common_element('img', array('src' => $original->url, - 'class' => 'avatar original', - 'width' => $original->width, - 'height' => $original->height, - 'alt' => $user->nickname)); - } + if ($original) { + common_element('img', array('src' => $original->url, + 'class' => 'avatar original', + 'width' => $original->width, + 'height' => $original->height, + 'alt' => $user->nickname)); + } $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE); - if ($avatar) { - common_element('img', array('src' => $avatar->url, - 'class' => 'avatar profile', - 'width' => AVATAR_PROFILE_SIZE, - 'height' => AVATAR_PROFILE_SIZE, - 'alt' => $user->nickname)); - } + if ($avatar) { + common_element('img', array('src' => $avatar->url, + 'class' => 'avatar profile', + 'width' => AVATAR_PROFILE_SIZE, + 'height' => AVATAR_PROFILE_SIZE, + 'alt' => $user->nickname)); + } common_element('input', array('name' => 'MAX_FILE_SIZE', @@ -390,8 +390,8 @@ class ProfilesettingsAction extends SettingsAction $this->show_form(_('Failed updating avatar.')); } - @unlink($_FILES['avatarfile']['tmp_name']); - } + @unlink($_FILES['avatarfile']['tmp_name']); + } function nickname_exists($nickname) { diff --git a/_darcs/pristine/js/jcrop/Jcrop.gif b/_darcs/pristine/js/jcrop/Jcrop.gif new file mode 100644 index 0000000000000000000000000000000000000000..72ea7ccb5321d5384d70437cfaac73011237901e GIT binary patch literal 329 zcmZ?wbhEHb9b#5NV>2k zBC~b@b~P=nNfWAe-b%_i6tS^-1y(h@EsB~1TqDA_h@fkxG$bHgvj}VxE1JLgr!*!^ ILUxTc0Q$^Q5C8xG literal 0 HcmV?d00001 diff --git a/_darcs/pristine/js/jcrop/jquery.Jcrop.css b/_darcs/pristine/js/jcrop/jquery.Jcrop.css new file mode 100644 index 0000000000..b95178a726 --- /dev/null +++ b/_darcs/pristine/js/jcrop/jquery.Jcrop.css @@ -0,0 +1,45 @@ +/* Fixes issue here http://code.google.com/p/jcrop/issues/detail?id=1 */ +.jcrop-holder +{ + text-align: left; +} + +.jcrop-vline, .jcrop-hline +{ + font-size: 0; + position: absolute; + background: white url('Jcrop.gif') top left repeat; + /* + opacity: .5; + *filter:alpha(opacity=50); + */ +} +.jcrop-vline { height: 100%; width: 1px !important; } +.jcrop-hline { width: 100%; height: 1px !important; } +.jcrop-handle { + font-size: 1px; + width: 7px !important; + height: 7px !important; + border: 1px #eee solid; + background-color: #333; + *width: 9px; + *height: 9px; +} + +.jcrop-tracker { + *background-color: gray; + width: 100%; height: 100%; +} + +.custom .jcrop-vline, +.custom .jcrop-hline +{ + background: yellow; +} +.custom .jcrop-handle +{ + border-color: black; + background-color: #C7BB00; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; +} diff --git a/_darcs/pristine/js/jcrop/jquery.Jcrop.go.js b/_darcs/pristine/js/jcrop/jquery.Jcrop.go.js new file mode 100644 index 0000000000..57639814f0 --- /dev/null +++ b/_darcs/pristine/js/jcrop/jquery.Jcrop.go.js @@ -0,0 +1,41 @@ + $(function(){ + jQuery("#avatar_original img.avatar").Jcrop({ onChange: showPreview, + setSelect: [ 0, 0, $("#avatar_original img.avatar").attr("width"), $("#avatar_original img.avatar").attr("height") ], + onSelect: updateCoords, + aspectRatio: 1, + boxWidth: 640, + boxHeight: 640, + bgColor: '#000', + bgOpacity: .4 + }); + }); + + function showPreview(coords) { + var rx = 96 / coords.w; + var ry = 96 / coords.h; + + var img_width = $("#avatar_original img.avatar").attr("width"); + var img_height = $("#avatar_original img.avatar").attr("height"); + + + $('#avatar_preview img.avatar').css({ + width: Math.round(rx *img_width) + 'px', + height: Math.round(ry * img_height) + 'px', + marginLeft: '-' + Math.round(rx * coords.x) + 'px', + marginTop: '-' + Math.round(ry * coords.y) + 'px' + }); + }; + + function updateCoords(c) { + $('#avatar_crop_x').val(c.x); + $('#avatar_crop_y').val(c.y); + $('#avatar_crop_w').val(c.w); + $('#avatar_crop_h').val(c.h); + }; + + function checkCoords() { + if (parseInt($('#avatar_crop_w').val())) return true; + alert('Please select a crop region then press submit.'); + return false; + }; + diff --git a/_darcs/pristine/js/jcrop/jquery.Jcrop.pack.js b/_darcs/pristine/js/jcrop/jquery.Jcrop.pack.js new file mode 100644 index 0000000000..aa82e8abec --- /dev/null +++ b/_darcs/pristine/js/jcrop/jquery.Jcrop.pack.js @@ -0,0 +1,8 @@ +/** + * Jcrop v.0.9.5 (packed) + * (c) 2008 Kelly Hallman and DeepLiquid.com + * More information: http://deepliquid.com/content/Jcrop.html + * Released under MIT License - this header must remain with code + */ + +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('$.1n=7(G,F){d G=G,F=F;g(1p(G)!==\'2d\')G=$(G)[0];g(1p(F)!==\'2d\')F={};g(!(\'2x\'1a F))F.2x=$.3d.3e?K:M;g(!(\'2c\'1a F))F.2c=$.3d.3e?K:M;d 4f={2x:K,3W:\'4C\',1f:4D,3T:\'4Y\',3x:.6,3O:.4,3P:.5,53:5,3N:9,3D:5,51:14,25:0,2c:M,3I:M,3B:M,30:M,3A:M,49:0,4p:0,4k:8,3V:20,3X:3,2f:K,3n:[0,0],2z:[0,0],2O:[0,0],2D:7(){},2G:7(){}};d j=4f;21(F);d $I=$(G).B({16:\'1b\'});47($I,j.49,j.4p);d S=$I.W(),L=$I.U(),$12=$(\'<12 />\').W(S).U(L).1f(1L(\'4F\')).B({16:\'4H\',4B:j.3T});g(j.1f)$12.1f(j.1f);$I.54($12);d $34=$(\'\').3Y(\'2N\',$I.3Y(\'2N\')).B(\'16\',\'1b\').W(S).U(L);d $2C=$(\'<12 />\').W(1t(V)).U(1t(V)).B({1l:59,16:\'1b\',4o:\'4g\'}).1P($34);d $2g=$(\'<12 />\').W(1t(V)).U(1t(V)).B({1l:5b});d $28=$(\'<12 />\').B({16:\'1b\',1l:55}).3U($I).1P($2C,$2g);d 23=j.4k;d $1S=$(\'<12 />\').1f(1L(\'3v\')).W(S+(23*2)).U(L+(23*2)).B({16:\'1b\',R:D(-23),P:D(-23),1l:3R,1z:0}).3q(48);d 1I,1Q;d 2u=2Q(G),1q,1B,3i,58,3h,1O;g(\'36\'1a j){1I=j.36[0]/S;1Q=j.36[1]/L}d E=7(){d A=0,u=0,q=0,m=0,Z,Y;7 1A(z){d z=2T(z);q=A=z[0];m=u=z[1]};7 1y(z){d z=2T(z);Z=z[0]-q;Y=z[1]-m;q=z[0];m=z[1]};7 3f(){k[Z,Y]};7 2b(2y){d Z=2y[0],Y=2y[1];g(0>A+Z)Z-=Z+A;g(0>u+Y)Y-=Y+u;g(LS){15=S;h=N.17((15-A)/1k);13=1Z<0?u-h:h+u}}1g{15=q;h=3c/1k;13=1Z<0?u-h:u+h;g(13<0){13=0;w=N.17((13-u)*1k);15=1V<0?A-w:w+A}1g g(13>L){13=L;w=N.17(13-u)*1k;15=1V<0?A-w:w+A}}k 4E=3g(1F(A,u,15,13))};7 2T(p){g(p[0]<0)p[0]=0;g(p[1]<0)p[1]=0;g(p[0]>S)p[0]=S;g(p[1]>L)p[1]=L;k[p[0],p[1]]};7 1F(A,u,q,m){d 2R=A,3r=q,3o=u,3l=m;g(q2q))q=(1U>0)?(A+2q):(A-2q);g(2n&&(N.17(22)>2n))m=(22>0)?(u+2n):(u-2n);g(2i&&(N.17(22)<2i))m=(22>0)?(u+2i):(u-2i);g(2m&&(N.17(1U)<2m))q=(1U>0)?(A+2m):(A-2m);g(A<0){q-=A;A-=A}g(u<0){m-=u;u-=u}g(q<0){A-=q;q-=q}g(m<0){u-=m;m-=m}g(q>S){d X=q-S;A-=X;q-=X}g(m>L){d X=m-L;u-=X;m-=X}g(A>S){d X=A-L;m-=X;u-=X}g(u>L){d X=u-L;m-=X;u-=X}k 3g(1F(A,u,q,m))};7 3g(a){k{x:a[0],y:a[1],q:a[2],m:a[3],w:a[2]-a[0],h:a[3]-a[1]}};k{1F:1F,1A:1A,1y:1y,3f:3f,2b:2b,2K:2K,Q:Q}}();d J=7(){d 4v,4z,4y,1R,2U=4x;d 2F={};d H={};d 2E=K;d 1i=j.3D;g(j.30){2F={R:1Y(\'3C\').B(\'R\',$.3d.3e?D(-1):D(0)),3Q:1Y(\'3C\'),P:1Y(\'3z\'),3L:1Y(\'3z\')}}g(j.3A){H.t=1W(\'n\');H.b=1W(\'s\');H.r=1W(\'e\');H.l=1W(\'w\')}j.3B&&2Y([\'n\',\'s\',\'e\',\'w\']);j.3I&&2Y([\'1M\',\'11\',\'1s\',\'2e\']);7 1Y(1u){d 1J=$(\'<12 />\').B({16:\'1b\',1z:j.3O}).1f(1L(1u));$2C.1P(1J);k 1J};7 2W(T,3y){d 1J=$(\'<12 />\').3q(3b(T)).B({3p:T+\'-2A\',16:\'1b\',1l:3y});$2g.1P(1J);k 1J};7 3J(T){k 2W(T,2U++).B({R:D(-1i+1),P:D(-1i+1),1z:j.3P}).1f(1L(\'H\'))};7 1W(T){d s=j.3N,o=1i,h=s,w=s,t=o,l=o;1E(T){C\'n\':C\'s\':w=1t(V);O;C\'e\':C\'w\':h=1t(V);O}k 2W(T,2U++).W(w).U(h).B({R:D(-t+1),P:D(-l+1)})};7 2Y(2J){4U(i 1a 2J)H[2J[i]]=3J(2J[i])};7 31(c){d 3a=N.1K((c.h/2)-1i),35=N.1K((c.w/2)-1i),4V=4W=-1i+1,2a=c.w-1i,1X=c.h-1i,x,y;\'e\'1a H&&H.e.B({R:D(3a),P:D(2a)})&&H.w.B({R:D(3a)})&&H.s.B({R:D(1X),P:D(35)})&&H.n.B({P:D(35)});\'1s\'1a H&&H.1s.B({P:D(2a)})&&H.2e.B({R:D(1X),P:D(2a)})&&H.1M.B({R:D(1X)});\'b\'1a H&&H.b.B({R:D(1X)})&&H.r.B({P:D(2a)})};7 3K(x,y){$34.B({R:D(-y),P:D(-x)});$28.B({R:D(y),P:D(x)})};7 2A(w,h){$28.W(w).U(h)};7 3s(){d p=E.Q();E.1A([p.x,p.y]);E.1y([p.q,p.m])};7 2I(){g(1R)k 1e()};7 1e(){d c=E.Q();2A(c.w,c.h);3K(c.x,c.y);j.30&&2F[\'3L\'].B({P:D(c.w-1)})&&2F[\'3Q\'].B({R:D(c.h-1)});2E&&31(c);1R||1w();j.2D(2H(c))};7 1w(){$28.1w();$I.B(\'1z\',j.3x);1R=M};7 1r(){1o();$28.1v();$I.B(\'1z\',1);1R=K};7 1v(){1r();$I.B(\'1z\',1);1R=K};7 2t(){2E=M;31(E.Q());$2g.1w()};7 1o(){2E=K;$2g.1v()};7 2o(v){(3h=v)?1o():2t()};7 1h(){d c=E.Q();2o(K);3s()};1o();$2C.1P($(\'<12 />\').1f(1L(\'3v\')).3q(3b(\'1N\')).B({3p:\'1N\',16:\'1b\',1l:4M,1z:0}));k{2I:2I,1e:1e,1r:1r,1w:1w,1v:1v,2t:2t,1o:1o,2o:2o,1h:1h}}();d 1j=7(){d 2w=7(){},2v=7(){},2L=j.2x;g(!2L){$1S.3k(2B).2S(26).4N(26)}7 4j(){g(2L){$(3t).3k(2B).2S(26)}$1S.B({1l:4G})}7 4i(){g(2L){$(3t).3H(\'3k\',2B).3H(\'2S\',26)}$1S.B({1l:3R})}7 2B(e){2w(2r(e))};7 26(e){e.2j();e.2k();g(1q){1q=K;2v(2r(e));j.2G(2H(E.Q()));4i();2w=7(){};2v=7(){}}k K};7 1G(1N,1h){1q=M;2w=1N;2v=1h;4j();k K};7 1x(t){$1S.B(\'3p\',t)};$I.4s($1S);k{1G:1G,1x:1x}}();d 33=7(){d $24=$(\'<4w 1u="4L" />\').B({16:\'1b\',P:\'-4O\'}).57(43).56(2f).5a(41),$3S=$(\'<12 />\').B({16:\'1b\',4o:\'4g\'}).1P($24);7 2l(){g(j.2c){$24.1w();$24.4Z()}};7 41(e){$24.1v()};7 2f(e){g(!j.2f)k;d 42=1O,1C;1O=e.4Q?M:K;g(42!=1O){g(1O&&1q){1C=E.Q();1B=1C.w/1C.h}1g 1B=0;J.1e()}e.2k();e.2j();k K};7 29(e,x,y){E.2b([x,y]);J.2I();e.2j();e.2k()};7 43(e){g(e.4T)k M;2f(e);d 2h=1O?10:1;1E(e.5d){C 37:29(e,-2h,0);O;C 39:29(e,2h,0);O;C 38:29(e,0,-2h);O;C 40:29(e,0,2h);O;C 27:J.1r();O;C 9:k M}k K};g(j.2c)$3S.3U($I);k{2l:2l}}();7 D(n){k\'\'+1m(n)+\'D\'};7 1t(n){k\'\'+1m(n)+\'%\'};7 1L(44){k j.3W+\'-\'+44};7 2Q(G){d z=$(G).2y();k[z.P,z.R]};7 2r(e){k[(e.4q-2u[0]),(e.4r-2u[1])]};7 46(1u){g(1u!=3i){1j.1x(1u);3i=1u}};7 4a(19,z){2u=2Q(G);1j.1x(19==\'1N\'?19:19+\'-2A\');g(19==\'1N\')k 1j.1G(4e(z),2P);d 1C=E.Q();E.1A(E.2K(4b(19)));1j.1G(45(19,1C),2P)};7 45(19,f){k 7(z){g(!j.25&&!1B)1E(19){C\'e\':z[1]=f.m;O;C\'w\':z[1]=f.m;O;C\'n\':z[0]=f.q;O;C\'s\':z[0]=f.q;O}1g 1E(19){C\'e\':z[1]=f.y+1;O;C\'w\':z[1]=f.y+1;O;C\'n\':z[0]=f.x+1;O;C\'s\':z[0]=f.x+1;O}E.1y(z);J.1e()}};7 4e(z){d 2M=z;33.2l();k 7(z){E.2b([z[0]-2M[0],z[1]-2M[1]]);2M=z;J.1e()}};7 4b(T){1E(T){C\'n\':k\'1M\';C\'s\':k\'11\';C\'e\':k\'11\';C\'w\':k\'1s\';C\'1s\':k\'1M\';C\'11\':k\'2e\';C\'2e\':k\'11\';C\'1M\':k\'1s\'}};7 3b(T){k 7(e){1q=M;4a(T,2r(e));e.2k();e.2j();k K}};7 47($G,w,h){d 11=$G.W(),1H=$G.U();g((11>w)&&w>0){11=w;1H=(w/$G.W())*$G.U()}g((1H>h)&&h>0){1H=h;11=(h/$G.U())*$G.W()}1I=$G.W()/11;1Q=$G.U()/1H;$G.W(11).U(1H)};7 2H(c){k{x:1m(c.x*1I),y:1m(c.y*1Q),q:1m(c.q*1I),m:1m(c.m*1Q),w:1m(c.w*1I),h:1m(c.h*1Q)}};7 2P(z){d c=E.Q();g(c.w>j.3n[0]&&c.h>j.3n[1]){J.2t();J.1h()}1g{J.1r()}1j.1x(\'2X\')};7 48(e){1q=M;2u=2Q(G);J.1r();J.1o();46(\'2X\');E.1A(2r(e));1j.1G(4c,2P);33.2l();e.2k();e.2j();k K};7 4c(z){E.1y(z);J.1e()};7 2Z(a){d A=a[0],u=a[1],q=a[2],m=a[3];g(3h)k;d 2s=E.1F(A,u,q,m);d c=E.Q();d 18=2p=[c.x,c.y,c.q,c.m];d 3w=j.3V;d x=18[0];d y=18[1];d q=18[2];d m=18[3];d 3Z=2s[0]-2p[0];d 4m=2s[1]-2p[1];d 4n=2s[2]-2p[2];d 4l=2s[3]-2p[3];d 1c=0;d 4h=j.3X;J.2o(M);d 3u=7(){k 7(){1c+=(V-1c)/4h;18[0]=x+((1c/V)*3Z);18[1]=y+((1c/V)*4m);18[2]=q+((1c/V)*4n);18[3]=m+((1c/V)*4l);g(1c=4K.8)1c=V;1d(18)}}();7 32(){4I.4t(3u,3w)};32()};7 1d(l){E.1A([l[0],l[1]]);E.1y([l[2],l[3]]);J.1e()};7 21(F){g(1p(F)!=\'2d\')F={};j=$.4X(j,F);g(1p(j.2D)!==\'7\')j.2D=7(){};g(1p(j.2G)!==\'7\')j.2G=7(){}};7 3m(){k 2H(E.Q())};7 2V(){k E.Q()};7 3E(F){21(F);g(\'1d\'1a F){1d(F.1d);J.1h()}};g(1p(F)!=\'2d\')F={};g(\'1d\'1a F){1d(F.1d);J.1h()}d 2q=j.2z[0]||0;d 2n=j.2z[1]||0;d 2m=j.2O[0]||0;d 2i=j.2O[1]||0;1j.1x(\'2X\');k{2Z:2Z,1d:1d,21:3E,3m:3m,2V:2V}};$.5e.1n=7(j){7 3G(1D){d 4d=j.4R||1D.2N;d I=4P 4S();d 1D=1D;I.50=7(){$(1D).1v().4A(I);1D.1n=$.1n(I,j)};I.2N=4d};g(1p(j)!==\'2d\')j={};1T.4J(7(){g(\'1n\'1a 1T){g(j==\'52\')k 1T.1n;1g 1T.1n.21(j)}1g 3G(1T)});k 1T};',62,325,'|||||||function||||||var|||if|||options|return||y2||||x2||||y1|||||pos|x1|css|case|px|Coords|opt|obj|handle|img|Selection|false|boundy|true|Math|break|left|getFixed|top|boundx|ord|height|100|width|delta|oy|ox||nw|div|yy||xx|position|abs|animat|mode|in|absolute|pcent|setSelect|update|addClass|else|done|hhs|Tracker|aspect|zIndex|parseInt|Jcrop|disableHandles|typeof|btndown|release|ne|pct|type|hide|show|setCursor|setCurrent|opacity|setPressed|aspectLock|fc|from|switch|flipCoords|activateHandlers|nh|xscale|jq|round|cssClass|sw|move|shift_down|append|yscale|awake|trk|this|xsize|rw|insertDragbar|south|insertBorder|rh||setOptions|ysize|bound|keymgr|aspectRatio|trackUp||sel|doNudge|east|moveOffset|keySupport|object|se|watchShift|hdl_holder|nudge|ymin|preventDefault|stopPropagation|watchKeys|xmin|ylimit|animMode|initcr|xlimit|mouseAbs|animto|enableHandles|docOffset|onDone|onMove|trackDocument|offset|maxSize|resize|trackMove|img_holder|onChange|seehandles|borders|onSelect|unscale|updateVisible|li|getCorner|trackDoc|lloc|src|minSize|doneSelect|getPos|xa|mouseup|rebound|hdep|tellScaled|dragDiv|crosshair|createHandles|animateTo|drawBorders|moveHandles|animateStart|KeyManager|img2|midhoriz|trueSize||||midvert|createDragger|rwa|browser|msie|getOffset|makeObj|animating|lastcurs|rha|mousemove|yb|tellSelect|minSelect|ya|cursor|mousedown|xb|refresh|document|animator|tracker|interv|bgOpacity|zi|vline|dragEdges|sideHandles|hline|handleOffset|setOptionsNew|getRect|attachWhenDone|unbind|cornerHandles|insertHandle|moveto|right|real_ratio|handleSize|borderOpacity|handleOpacity|bottom|290|keywrap|bgColor|insertBefore|animationDelay|baseClass|swingSpeed|attr|ix1||onBlur|init_shift|parseKey|cl|dragmodeHandler|myCursor|presize|newSelection|boxWidth|startDragMode|oppLockCorner|selectDrag|loadsrc|createMover|defaults|hidden|velocity|toBack|toFront|boundary|iy2|iy1|ix2|overflow|boxHeight|pageX|pageY|before|setTimeout|max|start|input|370|dragmode|end|after|backgroundColor|jcrop|null|last|holder|450|relative|window|each|99|radio|360|mouseout|30px|new|shiftKey|useImg|Image|ctrlKey|for|north|west|extend|black|focus|onload|edgeMargin|api|handlePad|wrap|300|keyup|keydown|dimmed|310|blur|320|min|keyCode|fn'.split('|'),0,{})) diff --git a/_darcs/pristine/lib/settingsaction.php b/_darcs/pristine/lib/settingsaction.php index 46f713fa85..62de39d459 100644 --- a/_darcs/pristine/lib/settingsaction.php +++ b/_darcs/pristine/lib/settingsaction.php @@ -60,13 +60,12 @@ class SettingsAction extends Action } } - function form_header($title, $msg=null, $success=false) - { - common_show_header($title, - null, - array($msg, $success), - array($this, 'show_top')); - } + function form_header($title, $msg=NULL, $success=false) { + common_show_header($title, + NULL, + array($msg, $success), + array($this, 'show_top')); + } function show_top($arr) { diff --git a/_darcs/pristine/theme/default/display.css b/_darcs/pristine/theme/default/display.css index 0b894550c1..9773216169 100644 --- a/_darcs/pristine/theme/default/display.css +++ b/_darcs/pristine/theme/default/display.css @@ -440,6 +440,17 @@ p.time a { float: left; margin: 0 10px 18px 0; } +#avatar_original { + margin-bottom:1em; +} + +#avatar_preview { + overflow:hidden; + width:96px; + height:96px; +} + + a.nickname { font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; diff --git a/_darcs/tentative_inventory b/_darcs/tentative_inventory new file mode 100644 index 0000000000..4926f6f3b1 --- /dev/null +++ b/_darcs/tentative_inventory @@ -0,0 +1,123 @@ +Starting with tag: +[TAG 0.6.4.1 +Evan Prodromou **20081220204906] +[identica badge by Kent Brewster. For more information see: +Sarven Capadisli **20081218003302 + http://kentbrewster.com/identica-badge/ + + Copy and paste the following wherever you want the badge to show up: + + + + Substitute your own ID in the user parameter. + +] +[more information in subscription notices +Evan Prodromou **20081212171135] +[first step of phpcs-cleanup of index.php +Evan Prodromou **20081221002332] +[reformatting for phpcs in lib/util.php +Evan Prodromou **20081221003016] +[some modifications to assuage phpcs +Evan Prodromou **20081221003955] +[reformat lib/daemon.php for phpcs +Evan Prodromou **20081221004607] +[reformat for phpcs +Evan Prodromou **20081221005837] +[reformat lib/jabber.php for phpcs, including doc comments +Evan Prodromou **20081222173249] +[reformat lib/language.php for PEAR Coding Standards +Evan Prodromou **20081222193029] +[bring mailbox.php into line with PEAR Coding Standards (mostly) +Evan Prodromou **20081222195041] +[bring messaging section (inbox, outbox, mailbox) into PEAR Code Standards compliance +Evan Prodromou **20081222201304 + + Actually refactored the method names on these classes to come into + complete compliance with the code standards. Untested; maybe there are + some bad method names now. + +] +[reformat and document lib/mail.php for phpcs conformance +Evan Prodromou **20081223173330] +[bring lib/noticelist.php into line with PEAR code standards +Evan Prodromou **20081223190851] +[incorrect label on notice list file comment +Evan Prodromou **20081223191430] +[replace all tabs with four spaces +Evan Prodromou **20081223191907 + + The PEAR coding standards decree: no tabs, but indent by four spaces. + I've done a global search-and-replace on all tabs, replacing them by + four spaces. This is a huge change, but it will go a long way to + getting us towards phpcs-compliance. And that means better code + readability, and that means more participation. + +] +[replace NULL with null +Evan Prodromou **20081223192129 + + Another global search-and-replace update. Here, I've replaced the PHP + keyword 'NULL' with its lowercase version. This is another PEAR code + standards change. + +] +[change function headers to K&R style +Evan Prodromou **20081223193323 + + Another huge change, for PEAR code standards compliance. Function + headers have to be in K&R style (opening brace on its own line), + instead of having the opening brace on the same line as the function + and parameters. So, a little perl magic found all the function + definitions and move the opening brace to the next line (properly + indented... usually). + +] +[TRUE => true, FALSE => false +Evan Prodromou **20081223194428 + + More PEAR coding standards global changes. Here, I've changed all + instances of TRUE to true and FALSE to false. + +] +[move opening brace of class declaration to next line +Evan Prodromou **20081223194923 + + Another gigantor PEAR coding standards patch. Here, I've moved the + opening curly bracket on a class statement to the following line. + +] +[Twitter-bridge: fix for Twitter's new strict policy of rejecting HTTP POSTs with invalid "expect" headers +Zach Copley **20081225152207] +[whitespace changes in actions/register.php after global search-and-replace +Evan Prodromou **20081223195722] +[Laconica-specific extensions for Twitter API +Evan Prodromou **20081230202019] +[add laconica-specific methods to htaccess.sample +Evan Prodromou **20081230202513] +[add laconica methods to unauthed ones +Evan Prodromou **20081230203747] +[implement api/laconica/version method +Evan Prodromou **20081230205939] +[add some breaks so that switch statement works +Evan Prodromou **20081230210114] +[implement the api/laconica/config method +Evan Prodromou **20081230211444] +[better serialization of arrays and booleans in config output +Evan Prodromou **20081230211957] +[wrapper element for config.xml +Evan Prodromou **20081230212202] +[trac750 Automatically update linked Facebook users' statuses +Zach Copley **20090105010407] +[trac750 configurable sync flags for Facebook app (noticesync, replysync) +Zach Copley **20090105040212] +[trac750 added some output to the facebook_update.php script +Zach Copley **20090105045603] +[Jcrop v2 (POST cropping to be completed) +csarven@controlyourself.ca**20081210021607] \ No newline at end of file diff --git a/_darcs/tentative_pristine b/_darcs/tentative_pristine index 212e028d83..e69de29bb2 100644 --- a/_darcs/tentative_pristine +++ b/_darcs/tentative_pristine @@ -1,10 +0,0 @@ -hunk ./scripts/update_facebook.php 51 -+print date('r', $current_time) . " Looking for notices to send to Facebook...\n"; -+ -+$cnt = 0; -+ -hunk ./scripts/update_facebook.php 67 -+ $cnt++; -hunk ./scripts/update_facebook.php 74 -+print "Sent $cnt notices to Facebook.\n"; -+ diff --git a/actions/profilesettings.php b/actions/profilesettings.php index 6c22a7933f..caec2f93d7 100644 --- a/actions/profilesettings.php +++ b/actions/profilesettings.php @@ -54,13 +54,13 @@ class ProfilesettingsAction extends SettingsAction return; } - if ($this->arg('save')) { - $this->save_profile(); - } else if ($this->arg('upload')) { - $this->upload_avatar(); - } else if ($this->arg('changepass')) { - $this->change_password(); - } + if ($this->arg('save')) { + $this->save_profile(); + } else if ($this->arg('upload')) { + $this->upload_avatar(); + } else if ($this->arg('changepass')) { + $this->change_password(); + } } @@ -70,31 +70,31 @@ class ProfilesettingsAction extends SettingsAction $user = common_current_user(); $profile = $user->getProfile(); - common_element_start('form', array('method' => 'POST', - 'id' => 'profilesettings', - 'action' => - common_local_url('profilesettings'))); - common_hidden('token', common_session_token()); - - # too much common patterns here... abstractable? - - common_input('nickname', _('Nickname'), - ($this->arg('nickname')) ? $this->arg('nickname') : $profile->nickname, - _('1-64 lowercase letters or numbers, no punctuation or spaces')); - common_input('fullname', _('Full name'), - ($this->arg('fullname')) ? $this->arg('fullname') : $profile->fullname); - common_input('homepage', _('Homepage'), - ($this->arg('homepage')) ? $this->arg('homepage') : $profile->homepage, - _('URL of your homepage, blog, or profile on another site')); - common_textarea('bio', _('Bio'), - ($this->arg('bio')) ? $this->arg('bio') : $profile->bio, - _('Describe yourself and your interests in 140 chars')); - common_input('location', _('Location'), - ($this->arg('location')) ? $this->arg('location') : $profile->location, - _('Where you are, like "City, State (or Region), Country"')); - common_input('tags', _('Tags'), - ($this->arg('tags')) ? $this->arg('tags') : implode(' ', $user->getSelfTags()), - _('Tags for yourself (letters, numbers, -, ., and _), comma- or space- separated')); + common_element_start('form', array('method' => 'POST', + 'id' => 'profilesettings', + 'action' => + common_local_url('profilesettings'))); + common_hidden('token', common_session_token()); + + # too much common patterns here... abstractable? + + common_input('nickname', _('Nickname'), + ($this->arg('nickname')) ? $this->arg('nickname') : $profile->nickname, + _('1-64 lowercase letters or numbers, no punctuation or spaces')); + common_input('fullname', _('Full name'), + ($this->arg('fullname')) ? $this->arg('fullname') : $profile->fullname); + common_input('homepage', _('Homepage'), + ($this->arg('homepage')) ? $this->arg('homepage') : $profile->homepage, + _('URL of your homepage, blog, or profile on another site')); + common_textarea('bio', _('Bio'), + ($this->arg('bio')) ? $this->arg('bio') : $profile->bio, + _('Describe yourself and your interests in 140 chars')); + common_input('location', _('Location'), + ($this->arg('location')) ? $this->arg('location') : $profile->location, + _('Where you are, like "City, State (or Region), Country"')); + common_input('tags', _('Tags'), + ($this->arg('tags')) ? $this->arg('tags') : implode(' ', $user->getSelfTags()), + _('Tags for yourself (letters, numbers, -, ., and _), comma- or space- separated')); $language = common_language(); common_dropdown('language', _('Language'), get_nice_language_list(), _('Preferred language'), true, $language); @@ -137,23 +137,23 @@ class ProfilesettingsAction extends SettingsAction common_local_url('profilesettings'))); common_hidden('token', common_session_token()); - if ($original) { - common_element('img', array('src' => $original->url, - 'class' => 'avatar original', - 'width' => $original->width, - 'height' => $original->height, - 'alt' => $user->nickname)); - } + if ($original) { + common_element('img', array('src' => $original->url, + 'class' => 'avatar original', + 'width' => $original->width, + 'height' => $original->height, + 'alt' => $user->nickname)); + } $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE); - if ($avatar) { - common_element('img', array('src' => $avatar->url, - 'class' => 'avatar profile', - 'width' => AVATAR_PROFILE_SIZE, - 'height' => AVATAR_PROFILE_SIZE, - 'alt' => $user->nickname)); - } + if ($avatar) { + common_element('img', array('src' => $avatar->url, + 'class' => 'avatar profile', + 'width' => AVATAR_PROFILE_SIZE, + 'height' => AVATAR_PROFILE_SIZE, + 'alt' => $user->nickname)); + } common_element('input', array('name' => 'MAX_FILE_SIZE', @@ -390,8 +390,8 @@ class ProfilesettingsAction extends SettingsAction $this->show_form(_('Failed updating avatar.')); } - @unlink($_FILES['avatarfile']['tmp_name']); - } + @unlink($_FILES['avatarfile']['tmp_name']); + } function nickname_exists($nickname) { diff --git a/js/jcrop/Jcrop.gif b/js/jcrop/Jcrop.gif new file mode 100644 index 0000000000000000000000000000000000000000..72ea7ccb5321d5384d70437cfaac73011237901e GIT binary patch literal 329 zcmZ?wbhEHb9b#5NV>2k zBC~b@b~P=nNfWAe-b%_i6tS^-1y(h@EsB~1TqDA_h@fkxG$bHgvj}VxE1JLgr!*!^ ILUxTc0Q$^Q5C8xG literal 0 HcmV?d00001 diff --git a/js/jcrop/jquery.Jcrop.css b/js/jcrop/jquery.Jcrop.css new file mode 100644 index 0000000000..b95178a726 --- /dev/null +++ b/js/jcrop/jquery.Jcrop.css @@ -0,0 +1,45 @@ +/* Fixes issue here http://code.google.com/p/jcrop/issues/detail?id=1 */ +.jcrop-holder +{ + text-align: left; +} + +.jcrop-vline, .jcrop-hline +{ + font-size: 0; + position: absolute; + background: white url('Jcrop.gif') top left repeat; + /* + opacity: .5; + *filter:alpha(opacity=50); + */ +} +.jcrop-vline { height: 100%; width: 1px !important; } +.jcrop-hline { width: 100%; height: 1px !important; } +.jcrop-handle { + font-size: 1px; + width: 7px !important; + height: 7px !important; + border: 1px #eee solid; + background-color: #333; + *width: 9px; + *height: 9px; +} + +.jcrop-tracker { + *background-color: gray; + width: 100%; height: 100%; +} + +.custom .jcrop-vline, +.custom .jcrop-hline +{ + background: yellow; +} +.custom .jcrop-handle +{ + border-color: black; + background-color: #C7BB00; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; +} diff --git a/js/jcrop/jquery.Jcrop.go.js b/js/jcrop/jquery.Jcrop.go.js new file mode 100644 index 0000000000..57639814f0 --- /dev/null +++ b/js/jcrop/jquery.Jcrop.go.js @@ -0,0 +1,41 @@ + $(function(){ + jQuery("#avatar_original img.avatar").Jcrop({ onChange: showPreview, + setSelect: [ 0, 0, $("#avatar_original img.avatar").attr("width"), $("#avatar_original img.avatar").attr("height") ], + onSelect: updateCoords, + aspectRatio: 1, + boxWidth: 640, + boxHeight: 640, + bgColor: '#000', + bgOpacity: .4 + }); + }); + + function showPreview(coords) { + var rx = 96 / coords.w; + var ry = 96 / coords.h; + + var img_width = $("#avatar_original img.avatar").attr("width"); + var img_height = $("#avatar_original img.avatar").attr("height"); + + + $('#avatar_preview img.avatar').css({ + width: Math.round(rx *img_width) + 'px', + height: Math.round(ry * img_height) + 'px', + marginLeft: '-' + Math.round(rx * coords.x) + 'px', + marginTop: '-' + Math.round(ry * coords.y) + 'px' + }); + }; + + function updateCoords(c) { + $('#avatar_crop_x').val(c.x); + $('#avatar_crop_y').val(c.y); + $('#avatar_crop_w').val(c.w); + $('#avatar_crop_h').val(c.h); + }; + + function checkCoords() { + if (parseInt($('#avatar_crop_w').val())) return true; + alert('Please select a crop region then press submit.'); + return false; + }; + diff --git a/js/jcrop/jquery.Jcrop.pack.js b/js/jcrop/jquery.Jcrop.pack.js new file mode 100644 index 0000000000..aa82e8abec --- /dev/null +++ b/js/jcrop/jquery.Jcrop.pack.js @@ -0,0 +1,8 @@ +/** + * Jcrop v.0.9.5 (packed) + * (c) 2008 Kelly Hallman and DeepLiquid.com + * More information: http://deepliquid.com/content/Jcrop.html + * Released under MIT License - this header must remain with code + */ + +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('$.1n=7(G,F){d G=G,F=F;g(1p(G)!==\'2d\')G=$(G)[0];g(1p(F)!==\'2d\')F={};g(!(\'2x\'1a F))F.2x=$.3d.3e?K:M;g(!(\'2c\'1a F))F.2c=$.3d.3e?K:M;d 4f={2x:K,3W:\'4C\',1f:4D,3T:\'4Y\',3x:.6,3O:.4,3P:.5,53:5,3N:9,3D:5,51:14,25:0,2c:M,3I:M,3B:M,30:M,3A:M,49:0,4p:0,4k:8,3V:20,3X:3,2f:K,3n:[0,0],2z:[0,0],2O:[0,0],2D:7(){},2G:7(){}};d j=4f;21(F);d $I=$(G).B({16:\'1b\'});47($I,j.49,j.4p);d S=$I.W(),L=$I.U(),$12=$(\'<12 />\').W(S).U(L).1f(1L(\'4F\')).B({16:\'4H\',4B:j.3T});g(j.1f)$12.1f(j.1f);$I.54($12);d $34=$(\'\').3Y(\'2N\',$I.3Y(\'2N\')).B(\'16\',\'1b\').W(S).U(L);d $2C=$(\'<12 />\').W(1t(V)).U(1t(V)).B({1l:59,16:\'1b\',4o:\'4g\'}).1P($34);d $2g=$(\'<12 />\').W(1t(V)).U(1t(V)).B({1l:5b});d $28=$(\'<12 />\').B({16:\'1b\',1l:55}).3U($I).1P($2C,$2g);d 23=j.4k;d $1S=$(\'<12 />\').1f(1L(\'3v\')).W(S+(23*2)).U(L+(23*2)).B({16:\'1b\',R:D(-23),P:D(-23),1l:3R,1z:0}).3q(48);d 1I,1Q;d 2u=2Q(G),1q,1B,3i,58,3h,1O;g(\'36\'1a j){1I=j.36[0]/S;1Q=j.36[1]/L}d E=7(){d A=0,u=0,q=0,m=0,Z,Y;7 1A(z){d z=2T(z);q=A=z[0];m=u=z[1]};7 1y(z){d z=2T(z);Z=z[0]-q;Y=z[1]-m;q=z[0];m=z[1]};7 3f(){k[Z,Y]};7 2b(2y){d Z=2y[0],Y=2y[1];g(0>A+Z)Z-=Z+A;g(0>u+Y)Y-=Y+u;g(LS){15=S;h=N.17((15-A)/1k);13=1Z<0?u-h:h+u}}1g{15=q;h=3c/1k;13=1Z<0?u-h:u+h;g(13<0){13=0;w=N.17((13-u)*1k);15=1V<0?A-w:w+A}1g g(13>L){13=L;w=N.17(13-u)*1k;15=1V<0?A-w:w+A}}k 4E=3g(1F(A,u,15,13))};7 2T(p){g(p[0]<0)p[0]=0;g(p[1]<0)p[1]=0;g(p[0]>S)p[0]=S;g(p[1]>L)p[1]=L;k[p[0],p[1]]};7 1F(A,u,q,m){d 2R=A,3r=q,3o=u,3l=m;g(q2q))q=(1U>0)?(A+2q):(A-2q);g(2n&&(N.17(22)>2n))m=(22>0)?(u+2n):(u-2n);g(2i&&(N.17(22)<2i))m=(22>0)?(u+2i):(u-2i);g(2m&&(N.17(1U)<2m))q=(1U>0)?(A+2m):(A-2m);g(A<0){q-=A;A-=A}g(u<0){m-=u;u-=u}g(q<0){A-=q;q-=q}g(m<0){u-=m;m-=m}g(q>S){d X=q-S;A-=X;q-=X}g(m>L){d X=m-L;u-=X;m-=X}g(A>S){d X=A-L;m-=X;u-=X}g(u>L){d X=u-L;m-=X;u-=X}k 3g(1F(A,u,q,m))};7 3g(a){k{x:a[0],y:a[1],q:a[2],m:a[3],w:a[2]-a[0],h:a[3]-a[1]}};k{1F:1F,1A:1A,1y:1y,3f:3f,2b:2b,2K:2K,Q:Q}}();d J=7(){d 4v,4z,4y,1R,2U=4x;d 2F={};d H={};d 2E=K;d 1i=j.3D;g(j.30){2F={R:1Y(\'3C\').B(\'R\',$.3d.3e?D(-1):D(0)),3Q:1Y(\'3C\'),P:1Y(\'3z\'),3L:1Y(\'3z\')}}g(j.3A){H.t=1W(\'n\');H.b=1W(\'s\');H.r=1W(\'e\');H.l=1W(\'w\')}j.3B&&2Y([\'n\',\'s\',\'e\',\'w\']);j.3I&&2Y([\'1M\',\'11\',\'1s\',\'2e\']);7 1Y(1u){d 1J=$(\'<12 />\').B({16:\'1b\',1z:j.3O}).1f(1L(1u));$2C.1P(1J);k 1J};7 2W(T,3y){d 1J=$(\'<12 />\').3q(3b(T)).B({3p:T+\'-2A\',16:\'1b\',1l:3y});$2g.1P(1J);k 1J};7 3J(T){k 2W(T,2U++).B({R:D(-1i+1),P:D(-1i+1),1z:j.3P}).1f(1L(\'H\'))};7 1W(T){d s=j.3N,o=1i,h=s,w=s,t=o,l=o;1E(T){C\'n\':C\'s\':w=1t(V);O;C\'e\':C\'w\':h=1t(V);O}k 2W(T,2U++).W(w).U(h).B({R:D(-t+1),P:D(-l+1)})};7 2Y(2J){4U(i 1a 2J)H[2J[i]]=3J(2J[i])};7 31(c){d 3a=N.1K((c.h/2)-1i),35=N.1K((c.w/2)-1i),4V=4W=-1i+1,2a=c.w-1i,1X=c.h-1i,x,y;\'e\'1a H&&H.e.B({R:D(3a),P:D(2a)})&&H.w.B({R:D(3a)})&&H.s.B({R:D(1X),P:D(35)})&&H.n.B({P:D(35)});\'1s\'1a H&&H.1s.B({P:D(2a)})&&H.2e.B({R:D(1X),P:D(2a)})&&H.1M.B({R:D(1X)});\'b\'1a H&&H.b.B({R:D(1X)})&&H.r.B({P:D(2a)})};7 3K(x,y){$34.B({R:D(-y),P:D(-x)});$28.B({R:D(y),P:D(x)})};7 2A(w,h){$28.W(w).U(h)};7 3s(){d p=E.Q();E.1A([p.x,p.y]);E.1y([p.q,p.m])};7 2I(){g(1R)k 1e()};7 1e(){d c=E.Q();2A(c.w,c.h);3K(c.x,c.y);j.30&&2F[\'3L\'].B({P:D(c.w-1)})&&2F[\'3Q\'].B({R:D(c.h-1)});2E&&31(c);1R||1w();j.2D(2H(c))};7 1w(){$28.1w();$I.B(\'1z\',j.3x);1R=M};7 1r(){1o();$28.1v();$I.B(\'1z\',1);1R=K};7 1v(){1r();$I.B(\'1z\',1);1R=K};7 2t(){2E=M;31(E.Q());$2g.1w()};7 1o(){2E=K;$2g.1v()};7 2o(v){(3h=v)?1o():2t()};7 1h(){d c=E.Q();2o(K);3s()};1o();$2C.1P($(\'<12 />\').1f(1L(\'3v\')).3q(3b(\'1N\')).B({3p:\'1N\',16:\'1b\',1l:4M,1z:0}));k{2I:2I,1e:1e,1r:1r,1w:1w,1v:1v,2t:2t,1o:1o,2o:2o,1h:1h}}();d 1j=7(){d 2w=7(){},2v=7(){},2L=j.2x;g(!2L){$1S.3k(2B).2S(26).4N(26)}7 4j(){g(2L){$(3t).3k(2B).2S(26)}$1S.B({1l:4G})}7 4i(){g(2L){$(3t).3H(\'3k\',2B).3H(\'2S\',26)}$1S.B({1l:3R})}7 2B(e){2w(2r(e))};7 26(e){e.2j();e.2k();g(1q){1q=K;2v(2r(e));j.2G(2H(E.Q()));4i();2w=7(){};2v=7(){}}k K};7 1G(1N,1h){1q=M;2w=1N;2v=1h;4j();k K};7 1x(t){$1S.B(\'3p\',t)};$I.4s($1S);k{1G:1G,1x:1x}}();d 33=7(){d $24=$(\'<4w 1u="4L" />\').B({16:\'1b\',P:\'-4O\'}).57(43).56(2f).5a(41),$3S=$(\'<12 />\').B({16:\'1b\',4o:\'4g\'}).1P($24);7 2l(){g(j.2c){$24.1w();$24.4Z()}};7 41(e){$24.1v()};7 2f(e){g(!j.2f)k;d 42=1O,1C;1O=e.4Q?M:K;g(42!=1O){g(1O&&1q){1C=E.Q();1B=1C.w/1C.h}1g 1B=0;J.1e()}e.2k();e.2j();k K};7 29(e,x,y){E.2b([x,y]);J.2I();e.2j();e.2k()};7 43(e){g(e.4T)k M;2f(e);d 2h=1O?10:1;1E(e.5d){C 37:29(e,-2h,0);O;C 39:29(e,2h,0);O;C 38:29(e,0,-2h);O;C 40:29(e,0,2h);O;C 27:J.1r();O;C 9:k M}k K};g(j.2c)$3S.3U($I);k{2l:2l}}();7 D(n){k\'\'+1m(n)+\'D\'};7 1t(n){k\'\'+1m(n)+\'%\'};7 1L(44){k j.3W+\'-\'+44};7 2Q(G){d z=$(G).2y();k[z.P,z.R]};7 2r(e){k[(e.4q-2u[0]),(e.4r-2u[1])]};7 46(1u){g(1u!=3i){1j.1x(1u);3i=1u}};7 4a(19,z){2u=2Q(G);1j.1x(19==\'1N\'?19:19+\'-2A\');g(19==\'1N\')k 1j.1G(4e(z),2P);d 1C=E.Q();E.1A(E.2K(4b(19)));1j.1G(45(19,1C),2P)};7 45(19,f){k 7(z){g(!j.25&&!1B)1E(19){C\'e\':z[1]=f.m;O;C\'w\':z[1]=f.m;O;C\'n\':z[0]=f.q;O;C\'s\':z[0]=f.q;O}1g 1E(19){C\'e\':z[1]=f.y+1;O;C\'w\':z[1]=f.y+1;O;C\'n\':z[0]=f.x+1;O;C\'s\':z[0]=f.x+1;O}E.1y(z);J.1e()}};7 4e(z){d 2M=z;33.2l();k 7(z){E.2b([z[0]-2M[0],z[1]-2M[1]]);2M=z;J.1e()}};7 4b(T){1E(T){C\'n\':k\'1M\';C\'s\':k\'11\';C\'e\':k\'11\';C\'w\':k\'1s\';C\'1s\':k\'1M\';C\'11\':k\'2e\';C\'2e\':k\'11\';C\'1M\':k\'1s\'}};7 3b(T){k 7(e){1q=M;4a(T,2r(e));e.2k();e.2j();k K}};7 47($G,w,h){d 11=$G.W(),1H=$G.U();g((11>w)&&w>0){11=w;1H=(w/$G.W())*$G.U()}g((1H>h)&&h>0){1H=h;11=(h/$G.U())*$G.W()}1I=$G.W()/11;1Q=$G.U()/1H;$G.W(11).U(1H)};7 2H(c){k{x:1m(c.x*1I),y:1m(c.y*1Q),q:1m(c.q*1I),m:1m(c.m*1Q),w:1m(c.w*1I),h:1m(c.h*1Q)}};7 2P(z){d c=E.Q();g(c.w>j.3n[0]&&c.h>j.3n[1]){J.2t();J.1h()}1g{J.1r()}1j.1x(\'2X\')};7 48(e){1q=M;2u=2Q(G);J.1r();J.1o();46(\'2X\');E.1A(2r(e));1j.1G(4c,2P);33.2l();e.2k();e.2j();k K};7 4c(z){E.1y(z);J.1e()};7 2Z(a){d A=a[0],u=a[1],q=a[2],m=a[3];g(3h)k;d 2s=E.1F(A,u,q,m);d c=E.Q();d 18=2p=[c.x,c.y,c.q,c.m];d 3w=j.3V;d x=18[0];d y=18[1];d q=18[2];d m=18[3];d 3Z=2s[0]-2p[0];d 4m=2s[1]-2p[1];d 4n=2s[2]-2p[2];d 4l=2s[3]-2p[3];d 1c=0;d 4h=j.3X;J.2o(M);d 3u=7(){k 7(){1c+=(V-1c)/4h;18[0]=x+((1c/V)*3Z);18[1]=y+((1c/V)*4m);18[2]=q+((1c/V)*4n);18[3]=m+((1c/V)*4l);g(1c=4K.8)1c=V;1d(18)}}();7 32(){4I.4t(3u,3w)};32()};7 1d(l){E.1A([l[0],l[1]]);E.1y([l[2],l[3]]);J.1e()};7 21(F){g(1p(F)!=\'2d\')F={};j=$.4X(j,F);g(1p(j.2D)!==\'7\')j.2D=7(){};g(1p(j.2G)!==\'7\')j.2G=7(){}};7 3m(){k 2H(E.Q())};7 2V(){k E.Q()};7 3E(F){21(F);g(\'1d\'1a F){1d(F.1d);J.1h()}};g(1p(F)!=\'2d\')F={};g(\'1d\'1a F){1d(F.1d);J.1h()}d 2q=j.2z[0]||0;d 2n=j.2z[1]||0;d 2m=j.2O[0]||0;d 2i=j.2O[1]||0;1j.1x(\'2X\');k{2Z:2Z,1d:1d,21:3E,3m:3m,2V:2V}};$.5e.1n=7(j){7 3G(1D){d 4d=j.4R||1D.2N;d I=4P 4S();d 1D=1D;I.50=7(){$(1D).1v().4A(I);1D.1n=$.1n(I,j)};I.2N=4d};g(1p(j)!==\'2d\')j={};1T.4J(7(){g(\'1n\'1a 1T){g(j==\'52\')k 1T.1n;1g 1T.1n.21(j)}1g 3G(1T)});k 1T};',62,325,'|||||||function||||||var|||if|||options|return||y2||||x2||||y1|||||pos|x1|css|case|px|Coords|opt|obj|handle|img|Selection|false|boundy|true|Math|break|left|getFixed|top|boundx|ord|height|100|width|delta|oy|ox||nw|div|yy||xx|position|abs|animat|mode|in|absolute|pcent|setSelect|update|addClass|else|done|hhs|Tracker|aspect|zIndex|parseInt|Jcrop|disableHandles|typeof|btndown|release|ne|pct|type|hide|show|setCursor|setCurrent|opacity|setPressed|aspectLock|fc|from|switch|flipCoords|activateHandlers|nh|xscale|jq|round|cssClass|sw|move|shift_down|append|yscale|awake|trk|this|xsize|rw|insertDragbar|south|insertBorder|rh||setOptions|ysize|bound|keymgr|aspectRatio|trackUp||sel|doNudge|east|moveOffset|keySupport|object|se|watchShift|hdl_holder|nudge|ymin|preventDefault|stopPropagation|watchKeys|xmin|ylimit|animMode|initcr|xlimit|mouseAbs|animto|enableHandles|docOffset|onDone|onMove|trackDocument|offset|maxSize|resize|trackMove|img_holder|onChange|seehandles|borders|onSelect|unscale|updateVisible|li|getCorner|trackDoc|lloc|src|minSize|doneSelect|getPos|xa|mouseup|rebound|hdep|tellScaled|dragDiv|crosshair|createHandles|animateTo|drawBorders|moveHandles|animateStart|KeyManager|img2|midhoriz|trueSize||||midvert|createDragger|rwa|browser|msie|getOffset|makeObj|animating|lastcurs|rha|mousemove|yb|tellSelect|minSelect|ya|cursor|mousedown|xb|refresh|document|animator|tracker|interv|bgOpacity|zi|vline|dragEdges|sideHandles|hline|handleOffset|setOptionsNew|getRect|attachWhenDone|unbind|cornerHandles|insertHandle|moveto|right|real_ratio|handleSize|borderOpacity|handleOpacity|bottom|290|keywrap|bgColor|insertBefore|animationDelay|baseClass|swingSpeed|attr|ix1||onBlur|init_shift|parseKey|cl|dragmodeHandler|myCursor|presize|newSelection|boxWidth|startDragMode|oppLockCorner|selectDrag|loadsrc|createMover|defaults|hidden|velocity|toBack|toFront|boundary|iy2|iy1|ix2|overflow|boxHeight|pageX|pageY|before|setTimeout|max|start|input|370|dragmode|end|after|backgroundColor|jcrop|null|last|holder|450|relative|window|each|99|radio|360|mouseout|30px|new|shiftKey|useImg|Image|ctrlKey|for|north|west|extend|black|focus|onload|edgeMargin|api|handlePad|wrap|300|keyup|keydown|dimmed|310|blur|320|min|keyCode|fn'.split('|'),0,{})) diff --git a/lib/settingsaction.php b/lib/settingsaction.php index 46f713fa85..62de39d459 100644 --- a/lib/settingsaction.php +++ b/lib/settingsaction.php @@ -60,13 +60,12 @@ class SettingsAction extends Action } } - function form_header($title, $msg=null, $success=false) - { - common_show_header($title, - null, - array($msg, $success), - array($this, 'show_top')); - } + function form_header($title, $msg=NULL, $success=false) { + common_show_header($title, + NULL, + array($msg, $success), + array($this, 'show_top')); + } function show_top($arr) { diff --git a/theme/default/display.css b/theme/default/display.css index 0b894550c1..9773216169 100644 --- a/theme/default/display.css +++ b/theme/default/display.css @@ -440,6 +440,17 @@ p.time a { float: left; margin: 0 10px 18px 0; } +#avatar_original { + margin-bottom:1em; +} + +#avatar_preview { + overflow:hidden; + width:96px; + height:96px; +} + + a.nickname { font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold;