Univention Bugzilla – Attachment 7335 Details for
Bug 39662
Center app tiles in the UMC App Center gallery pane
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch center apps
39662_center_apps.patch (text/plain), 3.23 KB, created by
Alexander Kramer
on 2015-12-01 16:05:33 CET
(
hide
)
Description:
Patch center apps
Filename:
MIME Type:
Creator:
Alexander Kramer
Created:
2015-12-01 16:05:33 CET
Size:
3.23 KB
patch
obsolete
>Index: umc/js/appcenter.styl >=================================================================== >--- umc/js/appcenter.styl (Revision 65977) >+++ umc/js/appcenter.styl (Arbeitskopie) >@@ -425,7 +425,7 @@ > .umcAppCenterGallery > /*height: 175px;*/ > height: auto >- margin: 0 -14px >+ margin: 0 > > .umcAppCenter .umcLiveSearchSidebar > .searchField, .dropDownMenu >Index: umc/js/appcenter/AppCenterMetaCategory.js >=================================================================== >--- umc/js/appcenter/AppCenterMetaCategory.js (Revision 65977) >+++ umc/js/appcenter/AppCenterMetaCategory.js (Arbeitskopie) >@@ -38,6 +38,7 @@ > "dojo/query", > "dojo/dom", > "dojo/dom-class", >+ "dojo/dom-style", > "dojo/dom-geometry", > "dojo/store/Memory", > "dojo/store/Observable", >@@ -47,7 +48,7 @@ > "umc/modules/appcenter/AppCenterGallery", > "umc/widgets/ContainerWidget", > "umc/i18n!" >-], function(declare, lang, array, win, on, has, domQuery, dom, domClass, domGeom, Memory, Observable, tools, Text, Button, AppCenterGallery, Container, _) { >+], function(declare, lang, array, win, on, has, domQuery, dom, domClass, domStyle, domGeom, Memory, Observable, tools, Text, Button, AppCenterGallery, Container, _) { > return declare("umc.modules.appcenter.AppCenterMetaCategory", [Container], { > // summary: > // Offers a container which contains a label, More/Less button and a grid to >@@ -131,7 +132,7 @@ > this.own(this.grid); > > this.own(on(win.global, 'resize', lang.hitch(this, function() { >- this._handleButtonVisibility(); >+ this._handleResize(); > }))); > }, > >@@ -153,18 +154,17 @@ > data: filteredApps > }))); > this._set('store', applications); >- this._handleButtonVisibility(); >+ this._centerApps(); > }, > > _setFilterQueryAttr: function(query) { > this.grid.set('query', query); > this._set('filterQuery', query); >- this._handleButtonVisibility(); > }, > >- _handleButtonVisibility: function() { >+ _handleResize: function() { > if (!this._visibilityDeferred || this._visibilityDeferred.isFulfilled()) { >- this._visibilityDeferred = tools.defer(lang.hitch(this, '_updateButtonVisibility'), 200); >+ this._visibilityDeferred = tools.defer(lang.hitch(this, '_centerApps'), 200); > } > }, > >@@ -180,12 +180,29 @@ > var appWidth = appMarginBox.w; > var neededWidthToDisplayApps = appsDisplayed.length * appWidth; > >+ > var hideButton = neededWidthToDisplayApps < gridWidth; > domClass.toggle(this.button.domNode, 'hiddenButton', hideButton); > } > domClass.toggle(this.domNode, 'dijitHidden', !appsDisplayed.length); > }, > >+ _centerApps: function() { >+ //make sure the domNode is not hidden >+ domClass.remove(this.domNode, 'dijitHidden'); >+ var appsDisplayed = domQuery('div[class*="dgrid-row"]', this.id); >+ if (appsDisplayed.length) { >+ var gridMarginBox = domGeom.getMarginBox(this.grid.domNode); >+ var gridWidth = gridMarginBox.w; >+ var appDomNode = appsDisplayed[0]; >+ var appMarginBox = domGeom.getMarginBox(appDomNode); >+ var appWidth = appMarginBox.w; >+ var leftPadding = (gridWidth % appWidth) / 2; >+ domStyle.set(this.grid.domNode, "padding-left", leftPadding + "px"); >+ } >+ domClass.toggle(this.domNode, 'dijitHidden', !appsDisplayed.length); >+ }, >+ > onShowApp: function(app) { > } > });
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 39662
:
7233
|
7335
|
7336
|
7353
|
7362