1 2013-08-17T01:19:34  <ThomasWaldmann> sharky93: yes, that's a little better
   2 2013-08-17T06:51:25  <sharky93> moin
   3 2013-08-17T08:18:19  <TheSheep> moin
   4 2013-08-17T08:19:55  <TheSheep> sharky93: that "User actions" heading
   5 2013-08-17T08:20:02  <TheSheep> https://bitbucket.org/sharky93/moin-2.0-bootstrap/src/7328625c7ef24bb15bfdb6c7a06f2bec91b1c9b5/MoinMoin/themes/basic/templates/show.html#cl-33
   6 2013-08-17T08:20:12  <TheSheep> sharky93: can't you just move it outside the for loop>
   7 2013-08-17T08:22:20  <TheSheep> sharky93: like this http://paste.openstack.org/show/44384/
   8 2013-08-17T08:24:07  <TheSheep> sharky93: also, I was thinking about having methods on that ThemeSupport that just give you a ready list of everyting you need for the tabs and menus
   9 2013-08-17T08:24:44  <TheSheep> sharky93: like  get_item_views_tabs(item)
  10 2013-08-17T08:25:02  <TheSheep> sharky93: and they would already return a tuple with everything you need, including the href and the icon
  11 2013-08-17T08:25:14  <TheSheep> sharky93: and the label, so you don't need those silly IFs inside the loop
  12 2013-08-17T08:36:19  <sharky93> TheSheep: hmm, sure that can be done, i somehow missed that after fixing #27, weird
  13 2013-08-17T08:36:58  <sharky93> ^ about the "user actions" heading
  14 2013-08-17T08:37:42  <sharky93> TheSheep: btw why are lines 4, 6 required @ http://paste.openstack.org/show/44384/ ?
  15 2013-08-17T08:39:49  <TheSheep> maybe they aren't, I just copy-pasted to give you an idea
  16 2013-08-17T08:40:24  <TheSheep> sharky93: also see my comments on the commits
  17 2013-08-17T08:41:06  <TheSheep> sharky93: but generally, best have all the logic in python, and just pass a ready list of tabs, menu entries, etc. to the template
  18 2013-08-17T08:41:50  <sharky93> true
  19 2013-08-17T08:41:58  <TheSheep> sharky93: so you would have get_view_tabs, get_user_actions, et_item_actions, etc.
  20 2013-08-17T08:46:15  <sharky93> TheSheep: if we use get_endpoint_icon(self, endpoint) , we should then make that icon dict map a data member of the ThemeSupport object
  21 2013-08-17T08:59:37  <TheSheep> sharky93: just forget about having that in the theme
  22 2013-08-17T09:00:35  <TheSheep> sharky93: have that get_action_tabs function return tuples of  endpoint, label, title, icon  and whatever you need
  23 2013-08-17T09:00:41  <TheSheep> sharky93: iterate over that directly
  24 2013-08-17T09:01:51  <sharky93> ok
  25 2013-08-17T09:02:21  <TheSheep> then the template can be really dumb
  26 2013-08-17T09:02:27  <sharky93> sure
  27 2013-08-17T09:02:41  <sharky93> btw there are some issues regarding solving https://bitbucket.org/sharky93/moin-2.0-bootstrap/issue/31/quicklinks-add-a-icon-for-unlinking
  28 2013-08-17T09:02:44  <sharky93> TheSheep: ^
  29 2013-08-17T09:03:10  <sharky93> we would not want buttons there, since we need it to work without JS,
  30 2013-08-17T09:03:41  <TheSheep> so just have a link?
  31 2013-08-17T09:03:48  <sharky93> an alternative solution would be using <a> <icon> </a> but that creates its own list-item in the sidebar
  32 2013-08-17T09:03:51  <TheSheep> you can have a link styled like button easily
  33 2013-08-17T09:04:14  <TheSheep> ah, you can't have a link inside a link
  34 2013-08-17T09:04:45  <TheSheep> seems like you would need to create a custom list item
  35 2013-08-17T09:04:56  <TheSheep> with two links in it
  36 2013-08-17T09:05:51  <TheSheep> maybe using the media item class
  37 2013-08-17T09:06:19  <TheSheep> maybe leave it for later
  38 2013-08-17T09:07:33  <sharky93> would absolute positioning work?
  39 2013-08-17T09:07:40  <sharky93> or would it be too dirty a hack
  40 2013-08-17T09:09:13  <sharky93> TheSheep: ^
  41 2013-08-17T09:11:44  <TheSheep> you would need something like <div class="moin-quicklink"><a class="moinj-quicklink-label">page</a><a class="moin-quicklink-delete">x</a></div>
  42 2013-08-17T09:12:22  <TheSheep> and then position:relative on the div, and either a float on the second <a>, or a position absolute on it
  43 2013-08-17T09:12:38  <TheSheep> oh, and display:block on the first a
  44 2013-08-17T09:12:50  <TheSheep> so that i takes up the whole div
  45 2013-08-17T09:23:44  <sharky93> TheSheep: and also add features from the list-group-item so that it actually looks like that
  46 2013-08-17T09:24:18  <sharky93> atleast the padding, borders etc, no?
  47 2013-08-17T09:25:44  <TheSheep> yeah, and hover
  48 2013-08-17T09:25:56  <TheSheep> etc.
  49 2013-08-17T09:30:58  <sharky93> TheSheep: but if we apply the block display on the first <a>, it pushes the other <a> outside the div, why would be want that?
  50 2013-08-17T09:31:22  <TheSheep> sharky93: because you position the second <a> absolutely anyways
  51 2013-08-17T09:31:29  <TheSheep> sharky93: so you don't care where it goes
  52 2013-08-17T09:32:09  <TheSheep> alternatively, you could have the first <a> take up all space but the width of the second <a>, and the second <a> fill the rest
  53 2013-08-17T09:32:20  <sharky93> TheSheep: we could avoid the absolute, with a simple float right, no?
  54 2013-08-17T09:32:22  <TheSheep> in that case I suppose I would use display: inline-block
  55 2013-08-17T09:32:29  <sharky93> right.
  56 2013-08-17T09:32:37  <TheSheep> sharky93: absolute is more robust, I think
  57 2013-08-17T09:32:58  <TheSheep> float can get nasty when you start shrinking the thing
  58 2013-08-17T09:35:06  <sharky93> float right works currently, did not get weird with shrinking
  59 2013-08-17T09:38:13  <sharky93> finalise with float ?
  60 2013-08-17T09:57:11  <TheSheep> yeah
  61 2013-08-17T09:58:44  <sharky93> TheSheep: but there's one more issue :)
  62 2013-08-17T09:59:06  <sharky93> if its not, display block, it behaves differently than the other list-group items as in
  63 2013-08-17T09:59:25  <TheSheep> yeah, it has to be display:block
  64 2013-08-17T09:59:40  <sharky93> hmm so, no float :P
  65 2013-08-17T09:59:44  <TheSheep> why not?
  66 2013-08-17T10:00:05  <sharky93> because it goes outside anyway so will have to position by absolute
  67 2013-08-17T12:58:26  <sharky93> TheSheep: did you have a look at the history view?
  68 2013-08-17T12:59:09  <sharky93> TheSheep: I have some ideas which we could discuss if you're free ?
  69 2013-08-17T16:05:21  <TheSheep> sharky93: that dropdown menu -- it doesn't work without js
  70 2013-08-17T16:06:34  <TheSheep> sharky93: when I click on it with js disabled, I get the message "The item 'The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.' does not exist."
  71 2013-08-17T16:06:41  <TheSheep> sharky93: which looks pretty wrong
  72 2013-08-17T16:09:10  <TheSheep> sharky93: by the way, the "comments" and "transclusions" tabs still don't work
  73 2013-08-17T16:17:59  <sharky93> TheSheep: the transclusions tab works now
  74 2013-08-17T16:18:09  <sharky93> i added a patch recently
  75 2013-08-17T16:22:45  <TheSheep> sharky93: I can't switch to it
  76 2013-08-17T16:22:55  <TheSheep> sharky93: clicking on it does nothing
  77 2013-08-17T16:23:05  <sharky93> :o
  78 2013-08-17T16:25:15  * sharky93 checking 
  79 2013-08-17T16:25:23  <sharky93> TheSheep: i think you have JS disabled? :)
  80 2013-08-17T16:25:42  <sharky93> that is a button, that adds an overlay to the transclusions
  81 2013-08-17T16:27:11  <TheSheep> sharky93: if it's a button, why is it a tab?
  82 2013-08-17T16:41:05  <sharky93> TheSheep: it suited the position, hence there
  83 2013-08-17T16:41:37  <sharky93> TheSheep: where else can we put that and the comments button
  84 2013-08-17T16:42:09  <TheSheep> sharky93: item navigation
  85 2013-08-17T16:42:15  <TheSheep> sharky93: buttons are not tabs
  86 2013-08-17T16:42:26  <TheSheep> tabs are something you switch to
  87 2013-08-17T16:43:19  <TheSheep> sharky93: another thing, when I see a diff, there is no diff tab
  88 2013-08-17T16:43:33  <TheSheep> and the history tab is not active either
  89 2013-08-17T16:43:53  <sharky93> TheSheep: we can enact a switch by making it (Transclusions) active, but there will be JS in the back, should we do this?
  90 2013-08-17T16:43:56  <TheSheep> either the history tab should still be active, or there should be a diff tab added
  91 2013-08-17T16:44:23  <TheSheep> sharky93: I think it's not a different view, it should be a button
  92 2013-08-17T16:44:36  <TheSheep> sharky93: but it should change when you click it, indicating the state
  93 2013-08-17T16:45:03  <TheSheep> that should be a separate issue in the bug tracker I think
  94 2013-08-17T17:00:26  <sharky93> TheSheep: i slider like an on/off switch would be nice, i remember jquery mobile had it
  95 2013-08-17T17:00:34  <sharky93> s/i/a
  96 2013-08-17T17:02:58  <TheSheep> sharky93: bootstrap has a checkbox
  97 2013-08-17T17:21:59  <sharky93> TheSheep: mapping frontend.diff to the same as frontend.history in order to make it active, this works right?
  98 2013-08-17T17:27:49  * sharky93 begins coding
  99 2013-08-17T20:03:10  <sharky93> TheSheep: what would be the corresponding code in python for https://bitbucket.org/sharky93/moin-2.0-bootstrap/src/c515adfb6b690a13ef3b73f2347d903c4ce8e534/MoinMoin/templates/itemviews.html?at=default#cl-4 ?
 100 2013-08-17T20:07:49  <TheSheep> sharky93: the same
 101 2013-08-17T20:16:44  <sharky93> TheSheep: but what does "exists" mean?
 102 2013-08-17T20:16:53  <sharky93> "and exists"
 103 2013-08-17T20:17:04  <sharky93> oh, sry
 104 2013-08-17T20:17:06  <sharky93> :)
 105 2013-08-17T20:24:41  <TheSheep> sharky93: `a and b` checks whether both variables are truthy
 106 2013-08-17T20:25:50  <TheSheep> so it is only True when both a and b are true -- that is not False, 0, [], {} or '' etc.
 107 2013-08-17T20:26:24  <sharky93> hmm, i somehow missed the declaration in the first line, and was trying to interpret it as a keyword
 108 2013-08-17T20:26:25  <TheSheep> 'exists' is a variable name there
 109 2013-08-17T20:27:50  <TheSheep> by the way, `not check_exists or check_exists and exists` can be written as just `not check_exists or exists`
 110 2013-08-17T20:28:33  <TheSheep> because it only gets to that `and` part when check_exists is False anyways
 111 2013-08-17T20:29:06  <sharky93> right
 112 2013-08-17T20:38:45  <sharky93> TheSheep: local_panel refactored, please have a look
 113 2013-08-17T21:07:47  <TheSheep> sharky93: you are still keeping the silliness with an if inside a for loop checking for a single item
 114 2013-08-17T21:07:59  <TheSheep> sharky93: where did you learn that, it's horrible :(
 115 2013-08-17T21:11:11  <TheSheep> oh well, but it does look better
 116 2013-08-17T21:11:56  <TheSheep> perhaps now you should make a macro for the repeating part of the template
 117 2013-08-17T21:21:43  <sharky93> TheSheep: can you please point out just once more which is the bad part with the if inside a for loop
 118 2013-08-17T21:40:32  <ThomasWaldmann> re
 119 2013-08-17T21:47:08  <TheSheep> sharky93:   for i in range(3): if i == 0: print "zero"; elif i == 1: print "one"; elif i == 2: print "two";
 120 2013-08-17T21:47:17  <TheSheep> sharky93: how would you rewrite that?
 121 2013-08-17T21:49:21  <sharky93> TheSheep: umm, words=["zero", "one", "two"]; for i in range(3): print words[i]; ?
 122 2013-08-17T21:49:57  <TheSheep> for word in words: print word
 123 2013-08-17T21:50:13  <TheSheep> but yeah, you get the idea
 124 2013-08-17T21:50:50  <TheSheep> even just  print "zero"; print "one"; print "two"   is better
 125 2013-08-17T21:51:26  <TheSheep> sharky93: you don't only have lists, you can use dicts too!
 126 2013-08-17T21:51:52  <TheSheep> I need to go to bed, we can talk tomorrow
 127 2013-08-17T21:52:17  <sharky93> yeah right, but im still wondering which part of the code is messed up so bad :P
 128 2013-08-17T21:52:29  <sharky93> ah, ok
 129 2013-08-17T21:52:35  <sharky93> 'nite
 130 2013-08-17T22:32:33  <ananasova> hm.. is the moin server down?
 131 2013-08-17T22:37:23  <dreimark> looks like
 132 2013-08-17T22:37:49  <dreimark> ThomasWaldmann: waldi ^ (new update ?)
 133 2013-08-17T22:52:43  <ThomasWaldmann> [5646823.479998] vif vif-8-1: vif8.1: Frag is bigger than frame.
 134 2013-08-17T22:52:43  <ThomasWaldmann> [5646823.481144] vif vif-8-1: vif8.1: fatal error; disabling device
 135 2013-08-17T22:55:00  <xorAxAx> the new ipv6 attack?
 136 2013-08-17T23:10:51  *** moinBot has joined #moin-dev
 137 2013-08-17T23:19:36  <ThomasWaldmann> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=701744

MoinMoin: MoinMoinChat/Logs/moin-dev/2013-08-17 (last edited 2013-08-17 01:30:02 by IrcLogImporter)