[英]UI Useability - Reordering and merging columns
I'm writing a little web-based utility for my brother who needs to merge columns in a CSV file. 我正在为我的兄弟编写一个基于Web的实用工具,该兄弟需要合并CSV文件中的列。 I know things like this surely exist somewhere, but a large part of this is that is a fun little exercise.
我知道这样的事情肯定存在于某处,但是其中很大一部分是有趣的小练习。
Anyways, I'm trying to figure out the best/neatest way to present the part of the UI where he reorders the columns and chooses which columns get merged. 无论如何,我正在尝试找出最好/最近的方式来呈现UI的一部分,在该部分中他可以对列进行重新排序并选择要合并的列。
The jQuery UI "selectable" interaction provides about 85% of what I need - the simple reordering of the columns - but I'm having a bit of a rough time with the merging. jQuery UI的“可选”交互提供了我所需的大约85%的内容-列的简单重新排序-但合并时我的工作有些艰难。 What I'm trying to do is make it so that "merged" columns become a nested list under a single item.
我正在尝试做的是使“合并的”列成为单个项目下的嵌套列表。
For example: 例如:
<ul id="columns">
<li>Column 1</li>
<li>Column 2</li>
</ul>
would become: 会成为:
<ul id="columns">
<li>Column 1<ul class="merge"><li>Column 2</li></ul></li>
</ul>
This is proving to be a bit more of a pain than I anticipated, so I was wondering if anyone had any ideas for a better way to present the overall UI. 事实证明,这比我预料的要痛苦得多,所以我想知道是否有人对如何更好地呈现整体UI有任何想法。 I'm fairly comfortable in jQuery, so bonus points if it can be done in jQuery :D
我对jQuery非常满意,因此如果可以在jQuery中完成,则可以加分:D
@dylanfm: This isn't tabular data - it's just a list of column names , but no actual data. @dylanfm:这不是表格数据-只是列名列表,但没有实际数据。 Besides, the specific HTML element I use is hardly at the heart of what I'm asking.
此外,我使用的特定HTML元素几乎不是我要问的核心。
@smo: I like the simplicity of your idea, but the problem is that there are several dozen different columns, so listing every column once per column would unfortunately be out of the question. @smo:我喜欢您的想法的简单性,但是问题是有几十个不同的列,因此不幸的是,每列只列出一次。
@strager: That's pretty much exactly what I've been trying to do, it's just that particulars of making UI respond the way I want have been giving me problems. @strager:那几乎就是我一直在尝试做的,只是让UI响应我想要的方式给我带来问题的细节。 I'll give you the answer for now, and I guess it's back to the salt mines for me.
我现在给你答案,我想这已经回到了我的盐矿上。
Basic steps: 基本步骤:
我想坚持使用表格来处理表格数据,无序列表似乎不太适合内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.