[owncloud-devel] DOM messed up after loading new #app-content as TemplateResponse via Ajax
dev at bernhard-posselt.com
Fri Apr 10 11:54:13 GMT 2015
Your problem is the TemplateResponse itself here
You have to pass in the renderAs parameter which needs to be blank
because otherwise it will return a fully render the full ownCloud interface
More in here:
Apart from that I'd recommend to use clientside templates
Some other quick things:
is done automatically for you and can be removed
use listTrashBin($dir='', $sort='name', $sortdirection=false)
Don't use the header method but return a Response with the
Http::STATUS_NOT_FOUND and get rid of the exit()
* You should get rid of private apis like OC_Log, and pass the stuff
into the constructor like log, translation, userId by using their public
interfaces. Check this for a complete listing
On 04/10/2015 01:09 PM, Marcus Mundt wrote:
> Dear hopefully more experienced app developers,
> I split up my app in several part.* templates to be loaded, when
> clicked on a navigation link.
> When loading another template into my #app-content my DOM gets messed
> up. There is another content-wrapper within the app-content-wrapper.
> Resulting in redundant header, nav and content wrapper in app-content.
> I checked my DIVs and everything seems ok. The TemplateResponses seem
> to return more than there is coded into them. I got a hint on the IRC
> channel to check my main template and the part.* templates. Still no
> luck. Is there maybe a common mistake I'm overlooking?
> my app (quite messy) on github: https://github.com/marmuDev/oc-app-bck
> Would be awesome if someone could take a short look into my code. Any
> hint is highly appreciated!
> Devel mailing list
> Devel at owncloud.org
More information about the Devel