Skip to content

Commit

Permalink
1、优化界面
Browse files Browse the repository at this point in the history
2、新增“复制代码”功能
3、新增自定义package及class功能
  • Loading branch information
giantray committed Jun 15, 2015
1 parent 30dd4a9 commit 3574bf5
Show file tree
Hide file tree
Showing 71 changed files with 11,733 additions and 54 deletions.
Binary file added img/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
84 changes: 48 additions & 36 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,64 +4,76 @@
<meta charset="UTF-8">
<title></title>
</head>
<link rel="stylesheet" href="lib/highlight/styles/vs.css">
<link rel="stylesheet" href="style.css">
<body>

<div class="left">
<div class="input-tip">
<div class="wrapper ">
<div id="source-type" style="display: none">json</div>

<span>在下方输入源文本:</span>
</div>
<div class="input-box">
<textarea id="input-textarea" ></textarea>
</div>
</div>
<header class="section">
<h1>json to java </h1>
<p>帮助您将json格式的数据,转换成javabean</p>
<p>用法:在下面右侧框中输入json,右侧会实时显示解析结果</p>
</header>

<div class="section main clearfix">
<h2>配置</h2>
<div class="config">
<p><label>package:<input id="package-input" value="com.duowan.tool"/></label></p>
<p><label>class:<input id="class-input" value="example"/></label></p>
</div>

<div id="source-type" style="display: none">json</div>
<div class="src-div">
<h2 class="not-margin-bottom"><label>请输入json:</label></h2>
<div class="input-box">
<textarea id="input-textarea" ></textarea>
</div>
</div>


<div class="right">
<div class="result-oper">
<span id="result-tip">显示结果:</span>
</div>
<div>

<div class="dest-div">
<h2 class="not-margin-bottom"><label>显示结果:</label></h2>
<div>
<button id="copy-button" class="right-button">复制代码</button>
<textarea id="result"></textarea>
</div>
</div>

<textarea id="result">

</textarea>
</div>

</div>

</body>
<div style="display: none" id="getset-templ">

<div style="display: none" id="getset-templ">

public void setA(T a) {
this.a = a;
}
public T getA() {
return a;
}
</div>

<div style="display: none" id="input-example">
{
"id": 1,
"username": "john_smith",
"email": "john@example.com",
"name": "John Smith",
"state": "active",
"created_at": "2012-05-23T08:00:58Z",
"access_level": 40,
"person":{"name":"test","age":1},
"about":["a","b"]
}
</div>

</div>

<div style="display: none" id="input-example">
{
"id": 1,
"username": "john_smith",
"email": "john@example.com",
"name": "John Smith",
"state": "active",
"created_at": "2012-05-23T08:00:58Z",
"access_level": 40,
"person":{"name":"test","age":1},
"about":["a","b"]
}
</div>

</div>
</body>
<script src="lib/jquery.min.js"></script>
<script src="lib/highlight/highlight.pack.js"></script>
<script src="lib/ZeroClipboard/ZeroClipboard.js"></script>
<script src="tool.js"></script>
<script src="to-bean.js"></script>
</html>
70 changes: 70 additions & 0 deletions lib/ZeroClipboard/.jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
/* Enforcing options */
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"es3": true,
"es5": false,
"forin": true,
"freeze": true,
"immed": true,
"indent": 2,
"latedef": true,
"newcap": true,
"noarg": true,
"noempty": true,
"nonbsp": true,
"nonew": true,
"plusplus": false,
"quotmark": "double",
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"maxparams": 4,
"maxdepth": 5,
"maxstatements": false,
"maxlen": false, /* IDEAL: 120? */


/* Relaxing options */
"asi": false,
"boss": false,
"debug": false,
"eqnull": true,
"esnext": false,
"evil": false,
"expr": false,
"funcscope": false,
"gcl": false,
"globalstrict": false,
"iterator": false,
"lastsemic": false,
"laxbreak": false,
"laxcomma": false,
"loopfunc": false,
"maxerr": 50,
"moz": false,
"multistr": false,
"notypeof": false,
"proto": false,
"scripturl": false,
"smarttabs": false,
"shadow": false,
"sub": false,
"supernew": false,
"validthis": false,
"noyield": false,

/* Environments */
"browser": true,

/* Global variables */
"globals": {
/* AMD */
"define": false,
/* CommonJS */
"module": false
}
}
Loading

0 comments on commit 3574bf5

Please sign in to comment.