[Owncloud] App settings

Alessandro Cosentino cosenal at gmail.com
Wed Aug 1 03:45:35 UTC 2012


good job Thomas!

The news app now features the new Settings popup!
I've met two issues with the popup though:

1) I added

OCP\Util::addStyle('news', 'settings');

in news/settings.php and created a corresponding css/settings.css, but
it doesn't seem to work. The css works if I include it from
news/index.php with the above line.

2) I have another popup menu in my app which is shown when the user
wants to add a new feed/folder. If I click on it right after I closed
the settings popup, it doesn't work. This might be my fault, but maybe
you can give me some ideas on how to fix it.

Thank you,
Alessandro (zimba12)


On Tue, Jul 31, 2012 at 2:47 PM, Jan-Christoph Borchardt
<hey at jancborchardt.net> wrote:
> Wow, super good! Thanks for doing that, it’s exactly what I meant.
>
>
> On Tue, Jul 31, 2012 at 3:55 AM, Thomas Tanghus <thomas at tanghus.net> wrote:
>> On Sunday 22 July 2012 22:01 Thomas Tanghus wrote:
>>> For quite some time there has been talk about moving personal settings away
>>> from settings/personal.php and have them at app level instead.
>>
>> I have now made a simple popup for app specific settings based on Jans suggestions.
>>
>> It requires very few changes for app maintainers:
>>
>> - A button/link with the standard cog settings icon e.g:
>>
>>    <a class="settings" title="<?php echo $l->t('Settings'); ?>">
>>       <img class="svg" src="core/img/actions/settings.svg" alt="<?php echo $l->t('Settings'); ?>" />
>>    </a>
>>
>> - An element preferably somewhere inside #rightcontent looking either like:
>>
>>    <div id="appsettings" class="popup topright hidden"></div>
>>
>>  or like this:
>>
>>    <div id="appsettings" class="popup bottomleft hidden"></div>
>>
>>  depending on where you have your settings button.
>>
>> - A call to popup the settings dialog e.g:
>>
>>    $('#bottomcontrols .settings').on('click keydown', function() {
>>       OC.appSettings('appid'); // appid being 'contacts', 'calendar' etc.
>>    });
>>
>> - Change one line in the settings script from:
>>
>>         return $tmpl->fetchPage();
>>
>>  to:
>>
>>         $tmpl->printPage();
>>
>> - And of course loading any js used in the settings. I suggest using the
>> namespace OC.AppName.Settings to keep a uniform naming scheme.
>>
>> One small catch: I presume that the app use a script 'settings.php' in the
>> root of the apps folder hierarchy. We could also use what is already available
>> from OCP\App::registerPersonal(), but then again some apps that don't have a
>> WUI and will have to use that space.
>>
>> The mandatory screen shots:
>>
>> http://owncloud.tanghus.net/public.php?service=files&token=b5010160a998edafc83c4eb7f56dd97d43473f83&file=/Pictures/Screenies/ownCloud/setting_popup_topright.png
>> http://owncloud.tanghus.net/public.php?service=files&token=83a0a9d1ad9a1725c6562288549ac1bf514df2d3&file=/Pictures/Screenies/ownCloud/setting_popup_bottomleft.png
>>
>> Suggestions are for changes/improvements are welcome :-)
>>
>> --
>> Med venlig hilsen / Best Regards
>>
>> Thomas Tanghus
> _______________________________________________
> Owncloud mailing list
> Owncloud at kde.org
> https://mail.kde.org/mailman/listinfo/owncloud



More information about the Owncloud mailing list