1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

ダッシュボードからだと規定のビューが反映されないのでスクリプトを追加

Posted at

ダッシュボードのクイックパーツ

クイックパーツからページ遷移した時に規定のビューで表示されない

クイックパーツのページを並べて、そのボタンを押してページ遷移した時にカレンダーを規定にしていても一覧で表示される。
リンクがhref="/items/5/index"になっていたので、一覧で表示されるみたい。
ダッシュボードではない、通常のテーブル一覧の画面を見てみるとhref="/items/5/calendar"となっていて規定のビューが反映されて、カレンダーで表示されるみたい。

規定のビューを設定し直してみる

テーブルの管理から、ビューの規定を一度、一覧に戻して更新してから、カレンダーに戻してみる。
ダッシュボードのリンクはhref="/items/5/index"のままでカレンダーには変わらないよう。
なので一覧で表示された。規定のビューは反映されないみたい。

スクリプトでリンクを書き換える

このようなスクリプトを追加しました。
href="/items/5/index"href="/items/5/calendar"に書き換えることで、カレンダーの状態で開くことができた!!!
html、jsとか全然やった事ないので、めちゃ苦労した。。。。。。。

$(function(){
    var atag = document.getElementById('DashboardPart_1').getElementsByTagName('a');
    for (var i = 0; atag.length; i++){
        if (typeof atag[i] == 'undefined') {
            console.log('undefined' + i);
            break;
        } else {
            if (atag[i].getAttribute('href') === '/items/5/index'){
                atag[i].setAttribute('href', '/items/5/calendar');
            }
        }
    }
});

if (typeof atag[i] == 'undefined')としている所は、プロパティが未定義でエラーとなるので入れています。

参考
https://qiita.com/husqy/items/5e617210bfa75606c0fb

プリザンターは頻繁に更新されててすごい!

バージョンアップが頻繁にされてて色々機能追加されるし、合わせて公式のユーザーマニュアルも更新される!
https://pleasanter.org/manual
他にも、プリザンターの会社の方々?が、Qiitaとかで機能の使い方を解説されてる!

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?