Open NukeRusich opened 9 years ago
Comment by psychobunny Thursday May 22, 2014 at 05:08 GMT
Pinging you again @frissdiegurke, this is blocking me-ish in my ACP refactor. If you can't repro etc I'll take a crack at it at some point :)
Comment by frissdiegurke Thursday May 22, 2014 at 05:35 GMT
Ah sorry, have been a bit busy these days...
I'll take a look at this in a few hours or up to 1.5d ;-)
What I can make clear for now: data-new
is just for arrays and describes what to insert into new added fields. data-empty
may be 0
, 1
, false
, true
and determines whether empty values should stay within structure or get completely deleted (e.g. empty input-fields within arrays would be saved as ""
within the array if data-empty
is 1
or true
)...
Comment by psychobunny Thursday May 22, 2014 at 05:37 GMT
Yeah no worries, I'm working mostly on the front-end of the new ACP atm so no real immediate rush :)
Comment by frissdiegurke Saturday May 24, 2014 at 11:21 GMT
I cannot see anything within <!-- BEGIN branding -->
and <!-- END branding -->
within client-side source-code in browser :confused:
Am I doing anything wrong?
Anyway I guess you're trying to set the default values client-side within data-empty
, this isn't correct.
you can only define the default values server-side, this is why the constructor-parameter defCfg is more important than your usage {}
^^
So set the default configs within Settings-constructor server-side and it should work (cannot test because of above block doesn't appear)
Comment by a5mith Saturday May 24, 2014 at 16:35 GMT
Don't think it's in yet. I don't have it either, but according to a post on the forums it's for changing primary-branding in css.
Comment by psychobunny Monday May 26, 2014 at 14:26 GMT
I cannot see anything
Up to date on core too right?
So set the default configs within Settings-constructor server-side and it should work
The problem with doing this is that I wouldn't be able to design the layout using the templates system (I'd have to make a settings plugin I guess, but that would seemingly be more work than necessary to get something simple working). Might be hard to get this point across if it doesn't actually work for you :P
Issue by psychobunny Wednesday May 14, 2014 at 22:08 GMT Originally opened as https://github.com/NodeBB/NodeBB/issues/1528
So, here's the first time we're using the new settings framework in core. I realize that if a default value is set by
data-new
ordata-empty
(not sure which is the preferred one to use) the value is[object Object]
even though I'm sending through a string.Everything else seems to work, and after first time save, works fine.
To repro, update to latest, relevant commit is here: core, template