@@ -115,7 +115,7 @@ def add_item(self, item, position=None):
115
115
return item
116
116
117
117
def find_items (self , item_type , ** attributes ):
118
- """Returns a list of :class:`ItemSearchResult` objects matching all items of ``item_type``
118
+ """Returns a list of :class:`~cms.toolbar.items. ItemSearchResult` objects matching all items of ``item_type``
119
119
(e.g. ``LinkItem``)."""
120
120
results = []
121
121
attr_items = attributes .items ()
@@ -126,8 +126,8 @@ def find_items(self, item_type, **attributes):
126
126
return results
127
127
128
128
def find_first (self , item_type , ** attributes ):
129
- """Returns the first :class:`ItemSearchResult` that matches the search, or ``None``. The
130
- search strategy is the same as in :meth:`find_items`. The return value of this method is
129
+ """Returns the first :class:`~cms.toolbar.items. ItemSearchResult` that matches the search, or ``None``.
130
+ The search strategy is the same as in :meth:`find_items`. The return value of this method is
131
131
safe to use as the :option:`position` argument of the various APIs to add items."""
132
132
try :
133
133
return self .find_items (item_type , ** attributes )[0 ]
@@ -163,7 +163,7 @@ def remove_item(self, item):
163
163
164
164
def add_sideframe_item (self , name , url , active = False , disabled = False ,
165
165
extra_classes = None , on_close = None , side = LEFT , position = None ):
166
- """Adds a :class:`SideframeItem` that opens ``url`` in the sideframe and returns it."""
166
+ """Adds a :class:`~cms.toolbar.items. SideframeItem` that opens ``url`` in the sideframe and returns it."""
167
167
168
168
item = SideframeItem (
169
169
name , url ,
@@ -178,7 +178,7 @@ def add_sideframe_item(self, name, url, active=False, disabled=False,
178
178
179
179
def add_modal_item (self , name , url , active = False , disabled = False ,
180
180
extra_classes = None , on_close = REFRESH_PAGE , side = LEFT , position = None ):
181
- """Similar to :meth:`add_sideframe_item`, but adds a :class:`ModalItem` that opens the
181
+ """Similar to :meth:`add_sideframe_item`, but adds a :class:`~cms.toolbar.items. ModalItem` that opens the
182
182
``url`` in a modal dialog instead of the sideframe, and returns it."""
183
183
184
184
item = ModalItem (
@@ -194,7 +194,7 @@ def add_modal_item(self, name, url, active=False, disabled=False,
194
194
195
195
def add_link_item (self , name , url , active = False , disabled = False ,
196
196
extra_classes = None , side = LEFT , position = None ):
197
- """Adds a :class:`LinkItem` that opens ``url``, and returns it."""
197
+ """Adds a :class:`~cms.toolbar.items. LinkItem` that opens ``url``, and returns it."""
198
198
199
199
item = LinkItem (
200
200
name , url ,
@@ -209,7 +209,7 @@ def add_link_item(self, name, url, active=False, disabled=False,
209
209
def add_ajax_item (self , name , action , active = False , disabled = False ,
210
210
extra_classes = None , data = None , question = None ,
211
211
side = LEFT , position = None , on_success = None , method = 'POST' ):
212
- """Adds :class:`AjaxItem` that sends a POST request to ``action`` with ``data``, and returns
212
+ """Adds :class:`~cms.toolbar.items. AjaxItem` that sends a POST request to ``action`` with ``data``, and returns
213
213
it. ``data`` should be ``None`` or a dictionary. The CSRF token will automatically be added
214
214
to the item.
215
215
@@ -370,6 +370,11 @@ def get_context(self):
370
370
371
371
372
372
class FrameItem (BaseItem ):
373
+ """
374
+ Base class for :class:`~cms.toolbar.items.ModalItem` and :class:`~cms.toolbar.items.SideframeItem`.
375
+ Frame items have three dots besides their name indicating that some frame or dialog will open
376
+ when selected.
377
+ """
373
378
# Be sure to define the correct template
374
379
375
380
def __init__ (self , name , url , active = False , disabled = False ,
0 commit comments