Commit 011bdf36 authored by Liang Ding's avatar Liang Ding

📦 #12353

parent f731e2e4
...@@ -1049,7 +1049,7 @@ $.extend(TablePaginate.prototype, { ...@@ -1049,7 +1049,7 @@ $.extend(TablePaginate.prototype, {
* *
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a> * @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.4.5.7, May 21, 2017 * @version 1.4.6.7, Oct 19, 2017
*/ */
admin.article = { admin.article = {
currentEditorType: '', currentEditorType: '',
...@@ -1495,7 +1495,7 @@ admin.article = { ...@@ -1495,7 +1495,7 @@ admin.article = {
height: 160, height: 160,
buttonText: Label.selectLabel, buttonText: Label.selectLabel,
data: tags data: tags
}).width($("#tag").parent().width() - 68); }).innerWidth($("#tag").parent().width() - 68);
$("#loadMsg").text(""); $("#loadMsg").text("");
} }
...@@ -2578,12 +2578,13 @@ admin.register["page-list"] = { ...@@ -2578,12 +2578,13 @@ admin.register["page-list"] = {
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
/** /**
* others for admin * others for admin.
* *
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a> * @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.1.0.8, Jul 27, 2016 * @version 1.2.0.0, Nov 1, 2017
*/ */
/* oterhs 相关操作 */ /* oterhs 相关操作 */
...@@ -2613,7 +2614,7 @@ admin.others = { ...@@ -2613,7 +2614,7 @@ admin.others = {
}); });
}, },
/* /*
* @description 移除未使用的标签。 * @description 移除未使用的标签
*/ */
removeUnusedTags: function () { removeUnusedTags: function () {
$("#tipMsg").text(""); $("#tipMsg").text("");
...@@ -2628,7 +2629,7 @@ admin.others = { ...@@ -2628,7 +2629,7 @@ admin.others = {
}); });
}, },
/* /*
* @description 移除未使用的标签。 * @description 导出数据为 SQL 文件
*/ */
exportSQL: function () { exportSQL: function () {
$("#tipMsg").text(""); $("#tipMsg").text("");
...@@ -2648,6 +2649,27 @@ admin.others = { ...@@ -2648,6 +2649,27 @@ admin.others = {
} }
}); });
}, },
/*
* @description 导出数据为 JSON 文件
*/
exportJSON: function () {
$("#tipMsg").text("");
$.ajax({
url: latkeConfig.servePath + "/console/export/json",
type: "GET",
cache: false,
success: function (result, textStatus) {
// AJAX 下载文件的话这里会发两次请求,用 sc 来判断是否是文件,如果没有 sc 说明文件可以下载(实际上就是 result)
if (!result.sc) {
// 再发一次请求进行正式下载
window.location = latkeConfig.servePath + "/console/export/json";
} else {
$("#tipMsg").text(result.msg);
}
}
});
},
/* /*
* 获取未使用的标签。 * 获取未使用的标签。
* XXX: Not used this function yet. * XXX: Not used this function yet.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment