Просмотр исходного кода

Merge pull request #64 from crowi/fix-seenusers-array

Fix seenusers array
Sotaro KARASAWA 10 лет назад
Родитель
Сommit
0655484c74
4 измененных файлов с 17 добавлено и 10 удалено
  1. 5 3
      lib/views/admin/app.html
  2. 5 3
      lib/views/admin/index.html
  3. 5 3
      lib/views/admin/users.html
  4. 2 1
      resource/js/crowi.js

+ 5 - 3
lib/views/admin/app.html

@@ -3,9 +3,11 @@
 {% block html_title %}アプリ設定 · {% endblock %}
 
 {% block content_head %}
-<header id="page-header">
-  <h1 class="title" id="">アプリ設定</h1>
-</header>
+<div class="header-wrap">
+  <header id="page-header">
+    <h1 class="title" id="">アプリ設定</h1>
+  </header>
+</div>
 {% endblock %}
 
 {% block content_main %}

+ 5 - 3
lib/views/admin/index.html

@@ -3,9 +3,11 @@
 {% block html_title %}Wiki管理 · {{ path }}{% endblock %}
 
 {% block content_head %}
-<header id="page-header">
-  <h1 class="title" id="">Wiki管理</h1>
-</header>
+<div class="header-wrap">
+  <header id="page-header">
+    <h1 class="title" id="">Wiki管理</h1>
+  </header>
+</div>
 {% endblock %}
 
 {% block content_main %}

+ 5 - 3
lib/views/admin/users.html

@@ -3,9 +3,11 @@
 {% block html_title %}ユーザー管理 · {% endblock %}
 
 {% block content_head %}
-<header id="page-header">
-  <h1 class="title" id="">ユーザー管理</h1>
-</header>
+<div class="header-wrap">
+  <header id="page-header">
+    <h1 class="title" id="">ユーザー管理</h1>
+  </header>
+</div>
 {% endblock %}
 
 {% block content_main %}

+ 2 - 1
resource/js/crowi.js

@@ -549,7 +549,8 @@ $(function() {
 
     var $seenUserList = $("#seen-user-list");
     var seenUsers = $seenUserList.data('seen-users');
-    if (seenUsers && seenUsers.length > 0 && seenUsers.length <= 10) {
+    var seenUsersArray = seenUsers.split(',');
+    if (seenUsers && seenUsersArray.length > 0 && seenUsersArray.length <= 10) {
       // FIXME: user data cache
       $.get('/_api/users.list', {user_ids: seenUsers}, function(res) {
         // ignore unless response has error