w2toolbar.right
更新日: 2018-09-07
ツールバーの右隅にHTMLを定義します。
String, default = ''指定した内容が、ツールバーの右隅に表示されます。 typeがspacerのアイテムを追加すると、右隅にボタンを設置することができます。 spacerを追加すると、以降の全てのアイテムが右寄せになります。 このプロパティはオブジェクト作成時またはランタイム時に定義することができます。
$('#toolbar').w2toolbar({
    name  : 'toolbar',
    right : 'text on the right',
    items : [
        { type: 'check',  id: 'item1', text: 'Check', img: 'icon-page', checked: true },
        { type: 'radio',  id: 'item3',  group: '1', text: 'Radio 1', img: 'icon-add' },
        { type: 'radio',  id: 'item4',  group: '1', text: 'Radio 2', img: 'icon-add' }
    ]
});ランタイム時に.rightプロパティを変更した場合、w2utils.refresh()メソッドを使ってツールバーを更新する必要があります。
w2ui['toolbar'].right = 'text on the right';
w2ui['toolbar'].refresh();デモ
テキストをツールバーの右隅に表示します。
JavaScript
$('#toolbar').w2toolbar({
  name  : 'mytoolbar',
  right : 'テキストを右隅に表示します。',
  items : [
    { type: 'check',  id: 'item1', text: 'Check', img: 'icon-page', checked: true },
    { type: 'radio',  id: 'item3',  group: '1', text: 'Radio 1', img: 'icon-add' },
    { type: 'radio',  id: 'item4',  group: '1', text: 'Radio 2', img: 'icon-add' }
  ]
});
© 2017.  .
.
Code licensed under theMIT License. Documentation licensed underCC BY 3.0.
このコンテンツはvitmalinaによるw2ui.toolbarドキュメントを翻訳/改変したものです。